Hint added.
[AROS.git] / workbench / hidds / nvidia / nv_local.h
blob821f8220a48243cc4a5dd916b45bbd966cef1bc2
1 /***************************************************************************\
2 |* *|
3 |* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
4 |* *|
5 |* NOTICE TO USER: The source code is copyrighted under U.S. and *|
6 |* international laws. Users and possessors of this source code are *|
7 |* hereby granted a nonexclusive, royalty-free copyright license to *|
8 |* use this code in individual and commercial software. *|
9 |* *|
10 |* Any use of this source code must include, in the user documenta- *|
11 |* tion and internal comments to the code, notices to the end user *|
12 |* as follows: *|
13 |* *|
14 |* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *|
15 |* *|
16 |* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *|
17 |* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *|
18 |* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *|
19 |* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *|
20 |* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *|
21 |* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *|
22 |* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *|
23 |* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *|
24 |* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *|
25 |* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *|
26 |* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *|
27 |* *|
28 |* U.S. Government End Users. This source code is a "commercial *|
29 |* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *|
30 |* consisting of "commercial computer software" and "commercial *|
31 |* computer software documentation," as such terms are used in *|
32 |* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *|
33 |* ment only as a commercial end item. Consistent with 48 C.F.R. *|
34 |* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *|
35 |* all U.S. Government End Users acquire the source code with only *|
36 |* those rights set forth herein. *|
37 |* *|
38 \***************************************************************************/
40 #ifndef __NV_LOCAL_H__
41 #define __NV_LOCAL_H__
44 * This file includes any environment or machine specific values to access the
45 * HW. Put all affected includes, typdefs, etc. here so the riva_hw.* files
46 * can stay generic in nature.
47 */
49 #include <exec/types.h>
50 #include "nv.h"
53 * Typedefs to force certain sized values.
55 typedef UBYTE U008;
56 typedef UWORD U016;
57 typedef ULONG U032;
59 typedef UBYTE CARD8;
60 typedef BOOL Bool;
63 * HW access macros. These assume memory-mapped I/O, and not normal I/O space.
65 #define NV_WR08(p,i,d) (*(volatile UBYTE*)((UBYTE*)(p)+(i)) = (d))
66 #define NV_RD08(p,i) (*(volatile UBYTE*)((UBYTE*)(p)+(i)))
67 #define NV_WR16(p,i,d) (*(volatile UWORD*)((UBYTE*)(p)+(i)) = (d))
68 #define NV_RD16(p,i) (*(volatile UWORD*)((UBYTE*)(p)+(i)))
69 #define NV_WR32(p,i,d) (*(volatile ULONG*)((UBYTE*)(p)+(i)) = (d))
70 #define NV_RD32(p,i) (*(volatile ULONG*)((UBYTE*)(p)+(i)))
72 /* VGA I/O is now always done through MMIO */
73 #define VGA_WR08(p,i,d) NV_WR08(p,i,d)
74 #define VGA_RD08(p,i) NV_RD08(p,i)
76 #endif /* __NV_LOCAL_H__ */