1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29 #ifndef _IC_STIVAR_H_
30 #define _IC_STIVAR_H_
31
32 struct sti_softc;
33
34 struct sti_screen {
35 struct sti_softc *scr_main;
36 int scr_devtype;
37
38 bus_space_tag_t iot, memt;
39 bus_space_handle_t romh;
40 bus_addr_t *bases;
41 bus_addr_t fbaddr;
42 bus_size_t fblen;
43
44 int scr_bpp;
45
46 struct sti_dd scr_dd;
47 struct sti_font scr_curfont;
48 struct sti_cfg scr_cfg;
49 struct sti_ecfg scr_ecfg;
50
51 void *scr_romfont;
52 u_int scr_fontmaxcol;
53 u_int scr_fontbase;
54
55 u_int8_t scr_rcmap[STI_NCMAP],
56 scr_gcmap[STI_NCMAP],
57 scr_bcmap[STI_NCMAP];
58
59 vaddr_t scr_code;
60 sti_init_t init;
61 sti_mgmt_t mgmt;
62 sti_unpmv_t unpmv;
63 sti_blkmv_t blkmv;
64 sti_test_t test;
65 sti_exhdl_t exhdl;
66 sti_inqconf_t inqconf;
67 sti_scment_t scment;
68 sti_dmac_t dmac;
69 sti_flowc_t flowc;
70 sti_utiming_t utiming;
71 sti_pmgr_t pmgr;
72 sti_util_t util;
73
74 u_int16_t fbheight, fbwidth, oheight, owidth;
75 u_int8_t name[STI_DEVNAME_LEN];
76
77
78 struct wsscreen_descr scr_wsd;
79 struct wsscreen_descr *scr_scrlist[1];
80 struct wsscreen_list scr_screenlist;
81 };
82
83 struct sti_softc {
84 struct device sc_dev;
85 void *sc_ih;
86
87 u_int sc_flags;
88 #define STI_TEXTMODE 0x0001
89 #define STI_CLEARSCR 0x0002
90 #define STI_CONSOLE 0x0004
91 #define STI_ATTACHED 0x0008
92 #define STI_ROM_ENABLED 0x0010
93 int sc_nscreens;
94
95 bus_space_tag_t iot, memt;
96 bus_space_handle_t romh;
97 bus_addr_t bases[STI_REGION_MAX];
98
99 struct sti_screen *sc_scr;
100 u_int sc_wsmode;
101
102
103 void (*sc_enable_rom)(struct sti_softc *);
104 void (*sc_disable_rom)(struct sti_softc *);
105 };
106
107 int sti_attach_common(struct sti_softc *sc, u_int codebase);
108 void sti_clear(struct sti_screen *);
109 int sti_cnattach(struct sti_screen *, bus_space_tag_t, bus_addr_t *, u_int);
110 void sti_describe(struct sti_softc *);
111 void sti_end_attach(void *);
112 u_int sti_rom_size(bus_space_tag_t, bus_space_handle_t);
113
114 #endif