\hypertarget{gxemul__diskreg_8h_source}{}\doxysection{gxemul\+\_\+diskreg.\+h}
\label{gxemul__diskreg_8h_source}\index{dev/gxemul/disk/gxemul\_diskreg.h@{dev/gxemul/disk/gxemul\_diskreg.h}}
\mbox{\hyperlink{gxemul__diskreg_8h}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00001}00001 \textcolor{comment}{/*-\/}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00002}00002 \textcolor{comment}{ * SPDX-\/License-\/Identifier: BSD-\/2-\/Clause-\/FreeBSD}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00003}00003 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00004}00004 \textcolor{comment}{ * Copyright (c) 2008-\/2012 Juli Mallett <jmallett@FreeBSD.org>}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00005}00005 \textcolor{comment}{ * All rights reserved.}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00006}00006 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00007}00007 \textcolor{comment}{ * Redistribution and use in source and binary forms, with or without}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00008}00008 \textcolor{comment}{ * modification, are permitted provided that the following conditions}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00009}00009 \textcolor{comment}{ * are met:}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00010}00010 \textcolor{comment}{ * 1. Redistributions of source code must retain the above copyright}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00011}00011 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer.}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00012}00012 \textcolor{comment}{ * 2. Redistributions in binary form must reproduce the above copyright}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00013}00013 \textcolor{comment}{ *    notice, this list of conditions and the following disclaimer in the}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00014}00014 \textcolor{comment}{ *    documentation and/or other materials provided with the distribution.}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00015}00015 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00016}00016 \textcolor{comment}{ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00017}00017 \textcolor{comment}{ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00018}00018 \textcolor{comment}{ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00019}00019 \textcolor{comment}{ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00020}00020 \textcolor{comment}{ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00021}00021 \textcolor{comment}{ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00022}00022 \textcolor{comment}{ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00023}00023 \textcolor{comment}{ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00024}00024 \textcolor{comment}{ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00025}00025 \textcolor{comment}{ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00026}00026 \textcolor{comment}{ * SUCH DAMAGE.}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00027}00027 \textcolor{comment}{ *}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00028}00028 \textcolor{comment}{ * \$FreeBSD\$}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00029}00029 \textcolor{comment}{ */}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00030}00030 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00031}00031 \textcolor{preprocessor}{\#ifndef \_DEV\_GXEMUL\_DISK\_GXEMUL\_DISK\_H\_}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00032}00032 \textcolor{preprocessor}{\#define \_DEV\_GXEMUL\_DISK\_GXEMUL\_DISK\_H\_}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00033}00033 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00034}\mbox{\hyperlink{gxemul__diskreg_8h_abd69ae0125d80ff707c6180fa657fd43}{00034}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_BASE            (0x13000000)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00035}00035 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00036}\mbox{\hyperlink{gxemul__diskreg_8h_ac9da57da2d0f6aee494344bede05f520}{00036}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_BLOCKSIZE       (0x0200)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00037}00037 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00038}\mbox{\hyperlink{gxemul__diskreg_8h_a49aed916d603dc6e755ae1b4db62217a}{00038}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_ID\_START        (0x0000)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00039}\mbox{\hyperlink{gxemul__diskreg_8h_a3201bb58e3b72404886df10ea5f23875}{00039}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_ID\_END          (0x0100)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00040}00040 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00041}00041 \textcolor{preprocessor}{\#ifdef \_LP64}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00042}00042 \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_OFFSET          (0x0000)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00043}00043 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00044}\mbox{\hyperlink{gxemul__diskreg_8h_ae0cbb3c3ae7513175471c6fd9bb71eaa}{00044}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_OFFSET\_LO       (0x0000)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00045}\mbox{\hyperlink{gxemul__diskreg_8h_a030b2ad35f85bd26e6f4ae122d2da566}{00045}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_OFFSET\_HI       (0x0008)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00046}00046 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00047}\mbox{\hyperlink{gxemul__diskreg_8h_a5dbd6953e1a4302f475c9ff06c2000cd}{00047}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_DISKID          (0x0010)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00048}\mbox{\hyperlink{gxemul__diskreg_8h_a1fd7cc2875f8000041c8b3e7c37d2db3}{00048}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_START           (0x0020)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00049}\mbox{\hyperlink{gxemul__diskreg_8h_aafc2c9df9427806e9a672d2b93320791}{00049}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_STATUS          (0x0030)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00050}\mbox{\hyperlink{gxemul__diskreg_8h_a5b0ecc0e0fd0d446a0d18c27c0d835bd}{00050}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_BLOCK           (0x4000)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00051}00051 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00052}00052 \textcolor{preprocessor}{\#ifdef \_LP64}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00053}00053 \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_FUNCTION(f)                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00054}00054 \textcolor{preprocessor}{        (volatile uint64\_t *)MIPS\_PHYS\_TO\_DIRECT\_UNCACHED(GXEMUL\_DISK\_DEV\_BASE + (f))}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00055}00055 \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_READ(f)                                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00056}00056 \textcolor{preprocessor}{        (volatile uint64\_t)*GXEMUL\_DISK\_DEV\_FUNCTION(f)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00057}00057 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00058}\mbox{\hyperlink{gxemul__diskreg_8h_a0b4304f0463072204abd8746b0862910}{00058}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_FUNCTION(f)                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00059}00059 \textcolor{preprocessor}{        (volatile uint32\_t *)MIPS\_PHYS\_TO\_DIRECT\_UNCACHED(GXEMUL\_DISK\_DEV\_BASE + (f))}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00060}\mbox{\hyperlink{gxemul__diskreg_8h_a1424174b2c1019ea8161c87425b09165}{00060}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_READ(f)                                         \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00061}00061 \textcolor{preprocessor}{        (volatile uint32\_t)*GXEMUL\_DISK\_DEV\_FUNCTION(f)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00062}00062 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00063}\mbox{\hyperlink{gxemul__diskreg_8h_adbae48d1b040865775cdb26c7069d49a}{00063}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_WRITE(f, v)                                     \(\backslash\)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00064}00064 \textcolor{preprocessor}{        *GXEMUL\_DISK\_DEV\_FUNCTION(f) = (v)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00065}00065 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00066}\mbox{\hyperlink{gxemul__diskreg_8h_ab538f1586de6ea637f34105e1334ed5f}{00066}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_START\_READ      (0x00)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00067}\mbox{\hyperlink{gxemul__diskreg_8h_a4df48d28e6fedea127e771fc3c430181}{00067}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_START\_WRITE     (0x01)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00068}00068 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00069}\mbox{\hyperlink{gxemul__diskreg_8h_a1035ff9bb6c296bf4f4e23c48aa09b19}{00069}} \textcolor{preprocessor}{\#define GXEMUL\_DISK\_DEV\_STATUS\_FAILURE  (0x00)}}
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00070}00070 }
\DoxyCodeLine{\Hypertarget{gxemul__diskreg_8h_source_l00071}00071 \textcolor{preprocessor}{\#endif }\textcolor{comment}{/* !\_DEV\_GXEMUL\_DISK\_GXEMUL\_DISK\_H\_ */}\textcolor{preprocessor}{}}

\end{DoxyCode}
