gsreg.h revision 1.4.6.2 1 1.4.6.2 tls /* $NetBSD: gsreg.h,v 1.4.6.2 2014/08/20 00:03:18 tls Exp $ */
2 1.4.6.2 tls
3 1.4.6.2 tls /*-
4 1.4.6.2 tls * Copyright (c) 2001 The NetBSD Foundation, Inc.
5 1.4.6.2 tls * All rights reserved.
6 1.4.6.2 tls *
7 1.4.6.2 tls * This code is derived from software contributed to The NetBSD Foundation
8 1.4.6.2 tls * by UCHIYAMA Yasushi.
9 1.4.6.2 tls *
10 1.4.6.2 tls * Redistribution and use in source and binary forms, with or without
11 1.4.6.2 tls * modification, are permitted provided that the following conditions
12 1.4.6.2 tls * are met:
13 1.4.6.2 tls * 1. Redistributions of source code must retain the above copyright
14 1.4.6.2 tls * notice, this list of conditions and the following disclaimer.
15 1.4.6.2 tls * 2. Redistributions in binary form must reproduce the above copyright
16 1.4.6.2 tls * notice, this list of conditions and the following disclaimer in the
17 1.4.6.2 tls * documentation and/or other materials provided with the distribution.
18 1.4.6.2 tls *
19 1.4.6.2 tls * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 1.4.6.2 tls * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 1.4.6.2 tls * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 1.4.6.2 tls * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 1.4.6.2 tls * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 1.4.6.2 tls * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 1.4.6.2 tls * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 1.4.6.2 tls * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 1.4.6.2 tls * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 1.4.6.2 tls * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 1.4.6.2 tls * POSSIBILITY OF SUCH DAMAGE.
30 1.4.6.2 tls */
31 1.4.6.2 tls
32 1.4.6.2 tls #define GS_S_PMODE_REG MIPS_PHYS_TO_KSEG1(0x12000000)
33 1.4.6.2 tls #define GS_S_SMODE1_REG MIPS_PHYS_TO_KSEG1(0x12000010)
34 1.4.6.2 tls #define GS_S_SMODE2_REG MIPS_PHYS_TO_KSEG1(0x12000020)
35 1.4.6.2 tls #define GS_S_SRFSH_REG MIPS_PHYS_TO_KSEG1(0x12000030)
36 1.4.6.2 tls #define GS_S_SYNCH1_REG MIPS_PHYS_TO_KSEG1(0x12000040)
37 1.4.6.2 tls #define GS_S_SYNCH2_REG MIPS_PHYS_TO_KSEG1(0x12000050)
38 1.4.6.2 tls #define GS_S_SYNCV_REG MIPS_PHYS_TO_KSEG1(0x12000060)
39 1.4.6.2 tls #define GS_S_DISPFB1_REG MIPS_PHYS_TO_KSEG1(0x12000070)
40 1.4.6.2 tls #define GS_S_DISPLAY1_REG MIPS_PHYS_TO_KSEG1(0x12000080)
41 1.4.6.2 tls #define GS_S_DISPFB2_REG MIPS_PHYS_TO_KSEG1(0x12000090)
42 1.4.6.2 tls #define GS_S_DISPLAY2_REG MIPS_PHYS_TO_KSEG1(0x120000a0)
43 1.4.6.2 tls #define GS_S_EXTBUF_REG MIPS_PHYS_TO_KSEG1(0x120000b0)
44 1.4.6.2 tls #define GS_S_EXTDATA_REG MIPS_PHYS_TO_KSEG1(0x120000c0)
45 1.4.6.2 tls #define GS_S_EXTWRITE_REG MIPS_PHYS_TO_KSEG1(0x120000d0)
46 1.4.6.2 tls #define GS_S_BGCOLOR_REG MIPS_PHYS_TO_KSEG1(0x120000e0)
47 1.4.6.2 tls #define GS_S_CSR_REG MIPS_PHYS_TO_KSEG1(0x12001000)
48 1.4.6.2 tls #define GS_S_IMR_REG MIPS_PHYS_TO_KSEG1(0x12001010)
49 1.4.6.2 tls #define GS_S_BUSDIR_REG MIPS_PHYS_TO_KSEG1(0x12001040)
50 1.4.6.2 tls #define GS_S_SIGLBLID_REG MIPS_PHYS_TO_KSEG1(0x12001080)
51 1.4.6.2 tls
52 1.4.6.2 tls #define SMODE1(vhp, vcksel, slck2, nvck, clksel, pevs, pehs, pvs, phs, \
53 1.4.6.2 tls gcont, spml, pck2, xpck, sint, prst, ex, cmod, slck, t1248, lc, rc) \
54 1.4.6.2 tls (((u_int64_t)(vhp) << 36) | \
55 1.4.6.2 tls ((u_int64_t)(vcksel) << 34) | \
56 1.4.6.2 tls ((u_int64_t)(slck2) << 33) | \
57 1.4.6.2 tls ((u_int64_t)(nvck) << 32) | \
58 1.4.6.2 tls ((u_int64_t)(clksel) << 30) | \
59 1.4.6.2 tls ((u_int64_t)(pevs) << 29) | \
60 1.4.6.2 tls ((u_int64_t)(pehs) << 28) | \
61 1.4.6.2 tls ((u_int64_t)(pvs) << 27) | \
62 1.4.6.2 tls ((u_int64_t)(phs) << 26) | \
63 1.4.6.2 tls ((u_int64_t)(gcont) << 25) | \
64 1.4.6.2 tls ((u_int64_t)(spml) << 21) | \
65 1.4.6.2 tls ((u_int64_t)(pck2) << 19) | \
66 1.4.6.2 tls ((u_int64_t)(xpck) << 18) | \
67 1.4.6.2 tls ((u_int64_t)(sint) << 17) | \
68 1.4.6.2 tls ((u_int64_t)(prst) << 16) | \
69 1.4.6.2 tls ((u_int64_t)(ex) << 15) | \
70 1.4.6.2 tls ((u_int64_t)(cmod) << 13) | \
71 1.4.6.2 tls ((u_int64_t)(slck) << 12) | \
72 1.4.6.2 tls ((u_int64_t)(t1248) << 10) | \
73 1.4.6.2 tls ((u_int64_t)(lc) << 3) | \
74 1.4.6.2 tls ((u_int64_t)(rc) << 0))
75 1.4.6.2 tls
76 1.4.6.2 tls #define SMODE2(dpms, ffmd, inter) \
77 1.4.6.2 tls (((u_int64_t)(dpms) << 2) | \
78 1.4.6.2 tls ((u_int64_t)(ffmd) << 1) | \
79 1.4.6.2 tls ((u_int64_t)(inter) << 0))
80 1.4.6.2 tls
81 1.4.6.2 tls #define SRFSH(x) (x)
82 1.4.6.2 tls
83 1.4.6.2 tls #define SYNCH1(hs, hsvs, hseq, hbp, hfp) \
84 1.4.6.2 tls (((u_int64_t)(hs) << 43) | \
85 1.4.6.2 tls ((u_int64_t)(hsvs) << 32) | \
86 1.4.6.2 tls ((u_int64_t)(hseq) << 22) | \
87 1.4.6.2 tls ((u_int64_t)(hbp) << 11) | \
88 1.4.6.2 tls ((u_int64_t)(hfp) << 0))
89 1.4.6.2 tls
90 1.4.6.2 tls #define SYNCH2(hb, hf) \
91 1.4.6.2 tls (((u_int64_t)(hb) << 11) | \
92 1.4.6.2 tls ((u_int64_t)(hf) << 0))
93 1.4.6.2 tls
94 1.4.6.2 tls #define SYNCV(vs, vdp, vbpe, vbp, vfpe, vfp) \
95 1.4.6.2 tls (((u_int64_t)(vs) << 53) | \
96 1.4.6.2 tls ((u_int64_t)(vdp) << 42) | \
97 1.4.6.2 tls ((u_int64_t)(vbpe) << 32) | \
98 1.4.6.2 tls ((u_int64_t)(vbp) << 20) | \
99 1.4.6.2 tls ((u_int64_t)(vfpe) << 10) | \
100 1.4.6.2 tls ((u_int64_t)(vfp) << 0))
101 1.4.6.2 tls
102 1.4.6.2 tls #define DISPLAY(dh, dw, magv, magh, dy, dx) \
103 1.4.6.2 tls (((u_int64_t)(dh) << 44) | \
104 1.4.6.2 tls ((u_int64_t)(dw) << 32) | \
105 1.4.6.2 tls ((u_int64_t)(magv) << 27) | \
106 1.4.6.2 tls ((u_int64_t)(magh) << 23) | \
107 1.4.6.2 tls ((u_int64_t)(dy) << 12) | \
108 1.4.6.2 tls ((u_int64_t)(dx) << 0))
109