\hypertarget{lio__mem__ops_8c_source}{}\doxysection{lio\+\_\+mem\+\_\+ops.\+c}
\label{lio__mem__ops_8c_source}\index{dev/liquidio/base/lio\_mem\_ops.c@{dev/liquidio/base/lio\_mem\_ops.c}}
\mbox{\hyperlink{lio__mem__ops_8c}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00001}00001 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00002}00002 \textcolor{comment}{ *   BSD LICENSE}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00004}00004 \textcolor{comment}{ *   Copyright(c) 2017 Cavium, Inc.. All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00005}00005 \textcolor{comment}{ *   All rights reserved.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00007}00007 \textcolor{comment}{ *   Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00008}00008 \textcolor{comment}{ *   modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00009}00009 \textcolor{comment}{ *   are met:}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00010}00010 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00011}00011 \textcolor{comment}{ *     * Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00012}00012 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00013}00013 \textcolor{comment}{ *     * Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00014}00014 \textcolor{comment}{ *       notice, this list of conditions and the following disclaimer in}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00015}00015 \textcolor{comment}{ *       the documentation and/or other materials provided with the}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00016}00016 \textcolor{comment}{ *       distribution.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00017}00017 \textcolor{comment}{ *     * Neither the name of Cavium, Inc. nor the names of its}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00018}00018 \textcolor{comment}{ *       contributors may be used to endorse or promote products derived}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00019}00019 \textcolor{comment}{ *       from this software without specific prior written permission.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00020}00020 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00021}00021 \textcolor{comment}{ *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00022}00022 \textcolor{comment}{ *   "{}AS IS"{} AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00023}00023 \textcolor{comment}{ *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00024}00024 \textcolor{comment}{ *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00025}00025 \textcolor{comment}{ *   OWNER(S) OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00026}00026 \textcolor{comment}{ *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00027}00027 \textcolor{comment}{ *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00028}00028 \textcolor{comment}{ *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00029}00029 \textcolor{comment}{ *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00030}00030 \textcolor{comment}{ *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00031}00031 \textcolor{comment}{ *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00032}00032 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00033}00033 \textcolor{comment}{/*\$FreeBSD\$*/}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00034}00034 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00035}00035 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__bsd_8h}{lio\_bsd.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00036}00036 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__common_8h}{lio\_common.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00037}00037 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__droq_8h}{lio\_droq.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00038}00038 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__iq_8h}{lio\_iq.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00039}00039 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__response__manager_8h}{lio\_response\_manager.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00040}00040 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__device_8h}{lio\_device.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00041}00041 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{lio__mem__ops_8h}{lio\_mem\_ops.h}}"{}}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00042}00042 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00043}\mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{00043}} \textcolor{preprocessor}{\#define MEMOPS\_IDX   LIO\_MAX\_BAR1\_MAP\_INDEX}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00044}00044 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00045}00045 \textcolor{preprocessor}{\#if BYTE\_ORDER == BIG\_ENDIAN}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00046}00046 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00047}\mbox{\hyperlink{lio__mem__ops_8c_a507208f7d816ba09c5db29dbc5a36722}{00047}} \mbox{\hyperlink{lio__mem__ops_8c_a507208f7d816ba09c5db29dbc5a36722}{lio\_toggle\_bar1\_swapmode}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t idx)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00048}00048 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00049}00049         uint32\_t mask;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00050}00050 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00051}00051         mask = oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_aa33304d54160568928aa9e75e72312d9}{bar1\_idx\_read}}(oct, idx);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00052}00052         mask = (mask \& 0x2) ? (mask \& \string~2) : (mask | 2);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00053}00053         oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_ab76d1d720b89b6fd821e7ccb2882b0a3}{bar1\_idx\_write}}(oct, idx, mask);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00054}00054 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00055}00055 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00056}00056 \textcolor{preprocessor}{\#else   }\textcolor{comment}{/* BYTE\_ORDER != BIG\_ENDIAN */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00057}00057 \textcolor{preprocessor}{\#define lio\_toggle\_bar1\_swapmode(oct, idx)}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00058}00058 \textcolor{preprocessor}{\#endif  }\textcolor{comment}{/* BYTE\_ORDER == BIG\_ENDIAN */}\textcolor{preprocessor}{}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00059}00059 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00060}00060 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00061}\mbox{\hyperlink{lio__mem__ops_8c_a5bdc37c040efca7779701e2636638da1}{00061}} \mbox{\hyperlink{lio__mem__ops_8c_a5bdc37c040efca7779701e2636638da1}{lio\_write\_bar1\_mem8}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t reg, uint64\_t val)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00062}00062 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00063}00063 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00064}00064         bus\_space\_write\_1(oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a24ae86625462b13aa2b06c911bb1a98f}{tag}},}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00065}00065                           oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a8619d07df912e2eba66b2ddaf05302c5}{handle}}, reg, val);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00066}00066 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00067}00067 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00068}00068 \textcolor{preprocessor}{\#ifdef \_\_i386\_\_}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00069}00069 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint32\_t}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00070}00070 lio\_read\_bar1\_mem32(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t reg)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00071}00071 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00072}00072 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00073}00073         \textcolor{keywordflow}{return} (bus\_space\_read\_4(oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a24ae86625462b13aa2b06c911bb1a98f}{tag}},}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00074}00074                                  oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a8619d07df912e2eba66b2ddaf05302c5}{handle}}, reg));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00075}00075 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00076}00076 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00077}00077 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00078}00078 lio\_write\_bar1\_mem32(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t reg, uint32\_t val)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00079}00079 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00080}00080 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00081}00081         bus\_space\_write\_4(oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a24ae86625462b13aa2b06c911bb1a98f}{tag}},}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00082}00082                           oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a8619d07df912e2eba66b2ddaf05302c5}{handle}}, reg, val);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00083}00083 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00084}00084 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00085}00085 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00086}00086 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint64\_t}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00087}\mbox{\hyperlink{lio__mem__ops_8c_a45da9487fd682f298a35ef5b2c307c3a}{00087}} \mbox{\hyperlink{lio__mem__ops_8c_a45da9487fd682f298a35ef5b2c307c3a}{lio\_read\_bar1\_mem64}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t reg)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00088}00088 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00089}00089 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00090}00090 \textcolor{preprocessor}{\#ifdef \_\_i386\_\_}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00091}00091         \textcolor{keywordflow}{return} (lio\_read\_bar1\_mem32(oct, reg) |}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00092}00092                         ((uint64\_t)lio\_read\_bar1\_mem32(oct, reg + 4) << 32));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00093}00093 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00094}00094         \textcolor{keywordflow}{return} (bus\_space\_read\_8(oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a24ae86625462b13aa2b06c911bb1a98f}{tag}},}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00095}00095                                  oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a8619d07df912e2eba66b2ddaf05302c5}{handle}}, reg));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00096}00096 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00097}00097 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00098}00098 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00099}00099 \textcolor{keyword}{static} \textcolor{keyword}{inline} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00100}\mbox{\hyperlink{lio__mem__ops_8c_ab6761b5bfb323eda0ecea27cf1aad80e}{00100}} \mbox{\hyperlink{lio__mem__ops_8c_ab6761b5bfb323eda0ecea27cf1aad80e}{lio\_write\_bar1\_mem64}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t reg, uint64\_t val)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00101}00101 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00102}00102 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00103}00103 \textcolor{preprocessor}{\#ifdef \_\_i386\_\_}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00104}00104         lio\_write\_bar1\_mem32(oct, reg, (uint32\_t)val);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00105}00105         lio\_write\_bar1\_mem32(oct, reg + 4, val >> 32);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00106}00106 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00107}00107         bus\_space\_write\_8(oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a24ae86625462b13aa2b06c911bb1a98f}{tag}},}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00108}00108                           oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a8619d07df912e2eba66b2ddaf05302c5}{handle}}, reg, val);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00109}00109 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00110}00110 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00111}00111 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00112}00112 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00113}\mbox{\hyperlink{lio__mem__ops_8c_a10422e288a21fa7db602bbfa520ebd06}{00113}} \mbox{\hyperlink{lio__mem__ops_8c_a10422e288a21fa7db602bbfa520ebd06}{lio\_pci\_fastwrite}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t offset,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00114}00114                   uint8\_t *hostbuf, uint32\_t len)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00115}00115 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00116}00116 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00117}00117         \textcolor{keywordflow}{while} ((len) \&\& ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})offset) \& 7) \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00118}00118                 \mbox{\hyperlink{lio__mem__ops_8c_a5bdc37c040efca7779701e2636638da1}{lio\_write\_bar1\_mem8}}(oct, offset++, *(hostbuf++));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00119}00119                 len-\/-\/;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00120}00120         \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00121}00121 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00122}00122         \mbox{\hyperlink{lio__mem__ops_8c_a507208f7d816ba09c5db29dbc5a36722}{lio\_toggle\_bar1\_swapmode}}(oct, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00123}00123 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00124}00124         \textcolor{keywordflow}{while} (len >= 8) \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00125}00125                 \mbox{\hyperlink{lio__mem__ops_8c_ab6761b5bfb323eda0ecea27cf1aad80e}{lio\_write\_bar1\_mem64}}(oct, offset, *((uint64\_t *)hostbuf));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00126}00126                 offset += 8;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00127}00127                 hostbuf += 8;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00128}00128                 len -\/= 8;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00129}00129         \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00130}00130 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00131}00131         \mbox{\hyperlink{lio__mem__ops_8c_a507208f7d816ba09c5db29dbc5a36722}{lio\_toggle\_bar1\_swapmode}}(oct, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00132}00132 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00133}00133         \textcolor{keywordflow}{while} (len-\/-\/)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00134}00134                 \mbox{\hyperlink{lio__mem__ops_8c_a5bdc37c040efca7779701e2636638da1}{lio\_write\_bar1\_mem8}}(oct, offset++, *(hostbuf++));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00135}00135 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00136}00136 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00137}00137 \textcolor{keyword}{static} \textcolor{keyword}{inline} uint64\_t}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00138}\mbox{\hyperlink{lio__mem__ops_8c_a9e37fa6f87a0ab00aea31a9fff7a294c}{00138}} \mbox{\hyperlink{lio__mem__ops_8c_a9e37fa6f87a0ab00aea31a9fff7a294c}{lio\_read\_bar1\_mem8}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t reg)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00139}00139 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00140}00140 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00141}00141         \textcolor{keywordflow}{return} (bus\_space\_read\_1(oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a24ae86625462b13aa2b06c911bb1a98f}{tag}},}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00142}00142                                  oct-\/>\mbox{\hyperlink{structocteon__device_aed119d475f65551c1b3d1d9f7c4ea6fd}{mem\_bus\_space}}[1].\mbox{\hyperlink{structlio__mem__bus__space_a8619d07df912e2eba66b2ddaf05302c5}{handle}}, reg));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00143}00143 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00144}00144 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00145}00145 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00146}\mbox{\hyperlink{lio__mem__ops_8c_a9a7b93ffcc498594f02a2f1288ee971a}{00146}} \mbox{\hyperlink{lio__mem__ops_8c_a9a7b93ffcc498594f02a2f1288ee971a}{lio\_pci\_fastread}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint32\_t offset,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00147}00147                  uint8\_t *hostbuf, uint32\_t len)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00148}00148 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00149}00149 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00150}00150         \textcolor{keywordflow}{while} ((len) \&\& ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{long})offset) \& 7) \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00151}00151                 *(hostbuf++) = \mbox{\hyperlink{lio__mem__ops_8c_a9e37fa6f87a0ab00aea31a9fff7a294c}{lio\_read\_bar1\_mem8}}(oct, offset++);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00152}00152                 len-\/-\/;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00153}00153         \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00154}00154 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00155}00155         \mbox{\hyperlink{lio__mem__ops_8c_a507208f7d816ba09c5db29dbc5a36722}{lio\_toggle\_bar1\_swapmode}}(oct, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00156}00156 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00157}00157         \textcolor{keywordflow}{while} (len >= 8) \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00158}00158                 *((uint64\_t *)hostbuf) = \mbox{\hyperlink{lio__mem__ops_8c_a45da9487fd682f298a35ef5b2c307c3a}{lio\_read\_bar1\_mem64}}(oct, offset);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00159}00159                 offset += 8;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00160}00160                 hostbuf += 8;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00161}00161                 len -\/= 8;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00162}00162         \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00163}00163 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00164}00164         \mbox{\hyperlink{lio__mem__ops_8c_a507208f7d816ba09c5db29dbc5a36722}{lio\_toggle\_bar1\_swapmode}}(oct, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00166}00166         \textcolor{keywordflow}{while} (len-\/-\/)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00167}00167                 *(hostbuf++) = \mbox{\hyperlink{lio__mem__ops_8c_a9e37fa6f87a0ab00aea31a9fff7a294c}{lio\_read\_bar1\_mem8}}(oct, offset++);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00168}00168 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00169}00169 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00170}00170 \textcolor{comment}{/* Core mem read/write with temporary bar1 settings. */}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00171}00171 \textcolor{comment}{/* op = 1 to read, op = 0 to write. */}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00172}00172 \textcolor{keyword}{static} \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00173}\mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{00173}} \mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{lio\_pci\_rw\_core\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint64\_t addr,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00174}00174                     uint8\_t *hostbuf, uint32\_t len, uint32\_t op)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00175}00175 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00176}00176         uint64\_t        static\_mapping\_base;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00177}00177         uint32\_t        copy\_len = 0, index\_reg\_val = 0;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00178}00178         uint32\_t        offset;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00180}00180         static\_mapping\_base = oct-\/>\mbox{\hyperlink{structocteon__device_af2e78949b445bb4de7f3051905614273}{console\_nb\_info}}.\mbox{\hyperlink{structocteon__device_ae883caf7a69c2d28a114a04e44341c5b}{dram\_region\_base}};}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00181}00181 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00182}00182         \textcolor{keywordflow}{if} (static\_mapping\_base \&\& static\_mapping\_base ==}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00183}00183             (addr \& 0xFFFFFFFFFFC00000ULL)) \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00184}00184                 \textcolor{keywordtype}{int}     bar1\_index = oct-\/>\mbox{\hyperlink{structocteon__device_af2e78949b445bb4de7f3051905614273}{console\_nb\_info}}.\mbox{\hyperlink{structocteon__device_a8c8a82a663de0d8a8b6ca367592ba31c}{bar1\_index}};}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00185}00185 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00186}00186                 offset = (bar1\_index << 22) + (addr \& 0x3fffff);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00187}00187 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00188}00188                 \textcolor{keywordflow}{if} (op)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00189}00189                         \mbox{\hyperlink{lio__mem__ops_8c_a9a7b93ffcc498594f02a2f1288ee971a}{lio\_pci\_fastread}}(oct, offset, hostbuf, len);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00190}00190                 \textcolor{keywordflow}{else}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00191}00191                         \mbox{\hyperlink{lio__mem__ops_8c_a10422e288a21fa7db602bbfa520ebd06}{lio\_pci\_fastwrite}}(oct, offset, hostbuf, len);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00192}00192 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00193}00193                 \textcolor{keywordflow}{return};}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00194}00194         \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00195}00195         mtx\_lock(\&oct-\/>\mbox{\hyperlink{structocteon__device_ab25d4012a903a681cb7de48f8a407840}{mem\_access\_lock}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00196}00196 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00197}00197         \textcolor{comment}{/* Save the original index reg value. */}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00198}00198         index\_reg\_val = oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_aa33304d54160568928aa9e75e72312d9}{bar1\_idx\_read}}(oct, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00199}00199         \textcolor{keywordflow}{do} \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00200}00200                 oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_a9043bae39c669e11e2da1e201d07682b}{bar1\_idx\_setup}}(oct, addr, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}}, 1);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00201}00201                 offset = (\mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}} << 22) + (addr \& 0x3fffff);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00202}00202 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00203}00203                 \textcolor{comment}{/*}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00204}00204 \textcolor{comment}{                 * If operation crosses a 4MB boundary, split the transfer}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00205}00205 \textcolor{comment}{                 * at the 4MB boundary.}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00206}00206 \textcolor{comment}{                 */}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00207}00207                 \textcolor{keywordflow}{if} (((addr + len -\/ 1) \& \string~(0x3fffff)) != (addr \& \string~(0x3fffff))) \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00208}00208                         copy\_len = (uint32\_t)(((addr \& \string~(0x3fffff)) +}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00209}00209                                                (\mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}} << 22)) -\/ addr);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00210}00210                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00211}00211                         copy\_len = len;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00212}00212                 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00213}00213 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00214}00214                 \textcolor{keywordflow}{if} (op) \{       \textcolor{comment}{/* read from core */}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00215}00215                         \mbox{\hyperlink{lio__mem__ops_8c_a9a7b93ffcc498594f02a2f1288ee971a}{lio\_pci\_fastread}}(oct, offset, hostbuf,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00216}00216                                          copy\_len);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00217}00217                 \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00218}00218                         \mbox{\hyperlink{lio__mem__ops_8c_a10422e288a21fa7db602bbfa520ebd06}{lio\_pci\_fastwrite}}(oct, offset, hostbuf,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00219}00219                                           copy\_len);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00220}00220                 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00221}00221 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00222}00222                 len -\/= copy\_len;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00223}00223                 addr += copy\_len;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00224}00224                 hostbuf += copy\_len;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00225}00225 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00226}00226         \} \textcolor{keywordflow}{while} (len);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00227}00227 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00228}00228         oct-\/>\mbox{\hyperlink{structocteon__device_a07eedda72ba39292f548957a394234dd}{fn\_list}}.\mbox{\hyperlink{structlio__fn__list_ab76d1d720b89b6fd821e7ccb2882b0a3}{bar1\_idx\_write}}(oct, \mbox{\hyperlink{lio__mem__ops_8c_a94cd776a3d1eca0aec6b32a9b6554bdd}{MEMOPS\_IDX}}, index\_reg\_val);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00229}00229 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00230}00230         mtx\_unlock(\&oct-\/>\mbox{\hyperlink{structocteon__device_ab25d4012a903a681cb7de48f8a407840}{mem\_access\_lock}});}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00231}00231 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00232}00232 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00233}00233 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00234}\mbox{\hyperlink{lio__mem__ops_8c_a45994a9251fc63e2f51c86b503773cce}{00234}} \mbox{\hyperlink{lio__mem__ops_8c_a45994a9251fc63e2f51c86b503773cce}{lio\_pci\_read\_core\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint64\_t coreaddr,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00235}00235                       uint8\_t *buf, uint32\_t len)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00236}00236 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00237}00237 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00238}00238         \mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{lio\_pci\_rw\_core\_mem}}(oct, coreaddr, buf, len, 1);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00239}00239 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00240}00240 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00241}00241 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00242}\mbox{\hyperlink{lio__mem__ops_8c_a1369fd16acd4008689763e9a39154db3}{00242}} \mbox{\hyperlink{lio__mem__ops_8c_a1369fd16acd4008689763e9a39154db3}{lio\_pci\_write\_core\_mem}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint64\_t coreaddr,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00243}00243                        uint8\_t *buf, uint32\_t len)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00244}00244 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00245}00245 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00246}00246         \mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{lio\_pci\_rw\_core\_mem}}(oct, coreaddr, buf, len, 0);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00247}00247 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00248}00248 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00249}00249 uint64\_t}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00250}\mbox{\hyperlink{lio__mem__ops_8c_aa1bf6312e87aa3edf0277d170a3500b5}{00250}} \mbox{\hyperlink{lio__mem__ops_8c_aa1bf6312e87aa3edf0277d170a3500b5}{lio\_read\_device\_mem64}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint64\_t coreaddr)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00251}00251 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00252}00252         \mbox{\hyperlink{lio__bsd_8h_a575a6be7a3f079739f00e4ac7d75c785}{\_\_be64}}    ret;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00253}00253 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00254}00254         \mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{lio\_pci\_rw\_core\_mem}}(oct, coreaddr, (uint8\_t *)\&ret, 8, 1);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00255}00255 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00256}00256         \textcolor{keywordflow}{return} (be64toh(ret));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00257}00257 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00258}00258 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00259}00259 uint32\_t}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00260}\mbox{\hyperlink{lio__mem__ops_8c_a93793dfe1384b5c18ff5b96b51d55a61}{00260}} \mbox{\hyperlink{lio__mem__ops_8c_a93793dfe1384b5c18ff5b96b51d55a61}{lio\_read\_device\_mem32}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint64\_t coreaddr)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00261}00261 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00262}00262         \mbox{\hyperlink{lio__bsd_8h_a1fcbe0fe57dc78d034b654a327a171df}{\_\_be32}}    ret;}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00263}00263 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00264}00264         \mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{lio\_pci\_rw\_core\_mem}}(oct, coreaddr, (uint8\_t *)\&ret, 4, 1);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00265}00265 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00266}00266         \textcolor{keywordflow}{return} (be32toh(ret));}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00267}00267 \}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00268}00268 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00269}00269 \textcolor{keywordtype}{void}}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00270}\mbox{\hyperlink{lio__mem__ops_8c_ac4351e9029c6e41f375ce98a39ff83d4}{00270}} \mbox{\hyperlink{lio__mem__ops_8c_ac4351e9029c6e41f375ce98a39ff83d4}{lio\_write\_device\_mem32}}(\textcolor{keyword}{struct} \mbox{\hyperlink{structocteon__device}{octeon\_device}} *oct, uint64\_t coreaddr,}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00271}00271                        uint32\_t val)}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00272}00272 \{}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00273}00273         \mbox{\hyperlink{lio__bsd_8h_a1fcbe0fe57dc78d034b654a327a171df}{\_\_be32}}    t = htobe32(val);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00274}00274 }
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00275}00275         \mbox{\hyperlink{lio__mem__ops_8c_aaa57c267aa3fb4b55d35d9b3ce9f8729}{lio\_pci\_rw\_core\_mem}}(oct, coreaddr, (uint8\_t *)\&t, 4, 0);}
\DoxyCodeLine{\Hypertarget{lio__mem__ops_8c_source_l00276}00276 \}}

\end{DoxyCode}
