This source file includes following definitions.
- sti_ecfg_t
- sti_cfg_t
- sti_initflags_t
- sti_einitin_t
- sti_initin_t
- sti_initout_t
- sti_mgmtflags_t
- sti_mgmtin_t
- sti_mgmtout_t
- sti_unpmvflags_t
- sti_unpmvin_t
- sti_unpmvout_t
- sti_blkmvflags_t
- sti_blkmvin_t
- sti_blkmvout_t
- sti_testflags_t
- sti_testin_t
- sti_testout_t
- sti_exhdlflags_t
- sti_eexhdlin_t
- sti_exhdlint_t
- sti_exhdlin_t
- sti_eexhdlout_t
- sti_exhdlout_t
- sti_inqconfflags_t
- sti_inqconfin_t
- sti_einqconfout_t
- sti_inqconfout_t
- sti_scmentflags_t
- sti_scmentin_t
- sti_scmentout_t
- sti_dmacflags_t
- sti_dmacin_t
- sti_dmacout_t
- sti_flowcflags_t
- sti_flowcin_t
- sti_flowcout_t
- sti_utimingflags_t
- sti_utimingin_t
- sti_utimingout_t
- sti_pmgrflags_t
- sti_pmgrin_t
- sti_pmgrout_t
- sti_utilflags_t
- sti_utilin_t
- sti_utilout_t
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_STIREG_H_
30 #define _IC_STIREG_H_
31
32
33
34 #define STI_REGION_MAX 8
35 #define STI_MONITOR_MAX 256
36 #define STI_DEVNAME_LEN 32
37 #define STI_NCMAP 256
38
39
40 #define STI_BEGIN 0
41 #define STI_INIT_GRAPH 0
42 #define STI_STATE_MGMT 1
43 #define STI_FONT_UNPMV 2
44 #define STI_BLOCK_MOVE 3
45 #define STI_SELF_TEST 4
46 #define STI_EXCEP_HDLR 5
47 #define STI_INQ_CONF 6
48 #define STI_SCM_ENT 7
49 #define STI_DMA_CTRL 8
50 #define STI_FLOW_CTRL 9
51 #define STI_UTIMING 10
52 #define STI_PROC_MGR 11
53 #define STI_UTIL 12
54 #define STI_END 13
55 #define STI_CODECNT 16
56
57 #define STI_CODEBASE_MAIN 0x40
58 #define STI_CODEBASE_ALT 0x80
59
60 #define STI_CODEBASE_PA STI_CODEBASE_MAIN
61 #define STI_CODEBASE_M68K STI_CODEBASE_ALT
62 #define STI_CODEBASE_PA64 STI_CODEBASE_ALT
63
64
65 #define STI_OK 0
66 #define STI_FAIL -1
67 #define STI_NRDY 1
68
69
70 #define STI_NOERRNO 0
71 #define STI_BADREENTLVL 1
72 #define STI_NOREGIONSDEF 2
73 #define STI_ILLNPLANES 3
74 #define STI_ILLINDEX 4
75 #define STI_ILLLOC 5
76 #define STI_ILLCOLOUR 6
77 #define STI_ILLBLKMVFROM 7
78 #define STI_ILLBLKMVTO 8
79 #define STI_ILLBLKMVSIZE 9
80 #define STI_BEIUNSUPP 10
81 #define STI_UNXPBE 11
82 #define STI_UNXHWF 12
83 #define STI_NEGCFG 13
84 #define STI_NEIG 14
85 #define STI_ILLSCME 15
86 #define STI_ILLCMVAL 16
87 #define STI_NORESMEM 17
88 #define STI_RESMEMCORR 18
89 #define STI_ILLNTBLKMV 19
90 #define STI_ILLMONITOR 20
91 #define STI_ILLEXCADDR 21
92 #define STI_ILLEXCFLAGS 22
93 #define STI_NOEHE 23
94 #define STI_NOINQCE 24
95 #define STI_ILLRGNPTR 25
96 #define STI_ILLUTLOP 26
97 #define STI_UNKNOWN 250
98 #define STI_NOCFGPTR 251
99 #define STI_NOFLPTR 252
100 #define STI_NOINPTR 253
101 #define STI_NOOUTPTR 254
102 #define STI_NOLOCK 255
103
104
105 #define STI_COLOUR_BLACK 0
106 #define STI_COLOUR_WHITE 1
107 #define STI_COLOUR_RED 2
108 #define STI_COLOUR_YELLOW 3
109 #define STI_COLOUR_GREEN 4
110 #define STI_COLOUR_CYAN 5
111 #define STI_COLOUR_BLUE 6
112 #define STI_COLOUR_MAGENTA 7
113
114 #pragma pack(1)
115
116
117 struct sti_dd {
118 u_int32_t dd_type;
119 #define STI_DEVTYPE1 1
120 #define STI_DEVTYPE4 3
121 u_int8_t dd_unused;
122 u_int8_t dd_nmon;
123 u_int8_t dd_grrev;
124 u_int8_t dd_lrrev;
125 u_int32_t dd_grid[2];
126 u_int32_t dd_fntaddr;
127 u_int32_t dd_maxst;
128 u_int32_t dd_romend;
129 u_int32_t dd_reglst;
130 u_int16_t dd_maxreent;
131 u_int16_t dd_maxtimo;
132 u_int32_t dd_montbl;
133
134 u_int32_t dd_udaddr;
135 u_int32_t dd_stimemreq;
136 u_int32_t dd_udsize;
137 u_int16_t dd_pwruse;
138 u_int8_t dd_bussup;
139 #define STI_BUSSUPPORT_GSCINTL 0x01
140 #define STI_BUSSUPPORT_GSC15X 0x02
141 #define STI_BUSSUPPORT_GSC2X 0x04
142 #define STI_BUSSUPPORT_PCIIOEIM 0x08
143 #define STI_BUSSUPPORT_PCISTD 0x10
144 #define STI_BUSSUPPORT_ILOCK 0x20
145 #define STI_BUSSUPPORT_ROMMAP 0x40
146 #define STI_BUSSUPPORT_2DECODE 0x80
147 u_int8_t dd_ebussup;
148 #define STI_EBUSSUPPORT_DMA 0x01
149 #define STI_EBUSSUPPORT_PIOLOCK 0x02
150 u_int8_t dd_altcodet;
151 #define STI_ALTCODE_UNKNOWN 0x00
152 #define STI_ALTCODE_PA64 0x01
153 u_int8_t dd_eddst[3];
154 u_int32_t dd_cfbaddr;
155
156
157 u_int32_t dd_pacode[16];
158 u_int32_t dd_altcode[16];
159 };
160
161 #define STI_REVISION(maj, min) (((maj) << 4) | ((min) & 0x0f))
162
163
164 struct sti_region {
165 u_int offset :14;
166 u_int sys_only: 1;
167 u_int cache : 1;
168 u_int btlb : 1;
169 u_int last : 1;
170 u_int length :14;
171 };
172
173 struct sti_font {
174 u_int16_t first;
175 u_int16_t last;
176 u_int8_t width;
177 u_int8_t height;
178 u_int8_t type;
179 #define STI_FONT_HPROMAN8 1
180 #define STI_FONT_KANA8 2
181 u_int8_t bpc;
182 u_int32_t next;
183 u_int8_t uheight;
184 u_int8_t uoffset;
185 u_int8_t unused[2];
186 };
187
188 struct sti_fontcfg {
189 u_int16_t first;
190 u_int16_t last;
191 u_int8_t width;
192 u_int8_t height;
193 u_int8_t type;
194 u_int8_t bpc;
195 u_int8_t uheight;
196 u_int8_t uoffset;
197 };
198
199 typedef struct sti_ecfg {
200 u_int8_t current_monitor;
201 u_int8_t uf_boot;
202 u_int16_t power;
203 u_int32_t freq_ref;
204 u_int32_t *addr;
205 void *future;
206 } *sti_ecfg_t;
207
208 typedef struct sti_cfg {
209 u_int32_t text_planes;
210 u_int16_t scr_width;
211 u_int16_t scr_height;
212 u_int16_t oscr_width;
213 u_int16_t oscr_height;
214 u_int16_t fb_width;
215 u_int16_t fb_height;
216 u_int32_t regions[STI_REGION_MAX];
217 u_int32_t reent_level;
218 u_int32_t *save_addr;
219 sti_ecfg_t ext_cfg;
220 } *sti_cfg_t;
221
222
223
224 #define STI_DEP(n) \
225 typedef int (*sti_##n##_t)( \
226 sti_##n##flags_t, sti_##n##in_t, sti_##n##out_t, sti_cfg_t);
227
228 typedef struct sti_initflags {
229 u_int32_t flags;
230 #define STI_INITF_WAIT 0x80000000
231 #define STI_INITF_RESET 0x40000000
232 #define STI_INITF_TEXT 0x20000000
233 #define STI_INITF_NTEXT 0x10000000
234 #define STI_INITF_CLEAR 0x08000000
235 #define STI_INITF_CMB 0x04000000
236 #define STI_INITF_EBET 0x02000000
237 #define STI_INITF_EBETI 0x01000000
238 #define STI_INITF_PTS 0x00800000
239 #define STI_INITF_PNTS 0x00400000
240 #define STI_INITF_PBET 0x00200000
241 #define STI_INITF_PBETI 0x00100000
242 #define STI_INITF_ICMT 0x00080000
243 #define STI_INITF_SCMT 0x00040000
244 #define STI_INITF_RIE 0x00020000
245 void *future;
246 } *sti_initflags_t;
247
248 typedef struct sti_einitin {
249 u_int8_t mon_type;
250 u_int8_t pad;
251 u_int16_t inflight;
252 void *future;
253 } *sti_einitin_t;
254
255 typedef struct sti_initin {
256 u_int32_t text_planes;
257 sti_einitin_t ext_in;
258 } *sti_initin_t;
259
260 typedef struct sti_initout {
261 int32_t errno;
262 u_int32_t text_planes;
263 void *future;
264 } *sti_initout_t;
265
266 STI_DEP(init);
267
268 typedef struct sti_mgmtflags {
269 u_int32_t flags;
270 #define STI_MGMTF_WAIT 0x80000000
271 #define STI_MGMTF_SAVE 0x40000000
272 #define STI_MGMTF_RALL 0x20000000
273 void *future;
274 } *sti_mgmtflags_t;
275
276 typedef struct sti_mgmtin {
277 void *addr;
278 void *future;
279 } *sti_mgmtin_t;
280
281 typedef struct sti_mgmtout {
282 int32_t errno;
283 void *future;
284 } *sti_mgmtout_t;
285
286 STI_DEP(mgmt);
287
288 typedef struct sti_unpmvflags {
289 u_int32_t flags;
290 #define STI_UNPMVF_WAIT 0x80000000
291 #define STI_UNPMVF_NTXT 0x40000000
292 void *future;
293 } *sti_unpmvflags_t;
294
295 typedef struct sti_unpmvin {
296 u_int32_t *font_addr;
297 u_int16_t index;
298 u_int8_t fg_colour;
299 u_int8_t bg_colour;
300 u_int16_t x, y;
301 void *future;
302 } *sti_unpmvin_t;
303
304 typedef struct sti_unpmvout {
305 u_int32_t errno;
306 void *future;
307 } *sti_unpmvout_t;
308
309 STI_DEP(unpmv);
310
311 typedef struct sti_blkmvflags {
312 u_int32_t flags;
313 #define STI_BLKMVF_WAIT 0x80000000
314 #define STI_BLKMVF_COLR 0x40000000
315 #define STI_BLKMVF_CLR 0x20000000
316 #define STI_BLKMVF_NTXT 0x10000000
317 void *future;
318 } *sti_blkmvflags_t;
319
320 typedef struct sti_blkmvin {
321 u_int8_t fg_colour;
322 u_int8_t bg_colour;
323 u_int16_t srcx, srcy, dstx, dsty;
324 u_int16_t width, height;
325 u_int16_t pad;
326 void *future;
327 } *sti_blkmvin_t;
328
329 typedef struct sti_blkmvout {
330 u_int32_t errno;
331 void *future;
332 } *sti_blkmvout_t;
333
334 STI_DEP(blkmv);
335
336 typedef struct sti_testflags {
337 u_int32_t flags;
338 #define STI_TESTF_WAIT 0x80000000
339 #define STI_TESTF_ETST 0x40000000
340 void *future;
341 } *sti_testflags_t;
342
343 typedef struct sti_testin {
344 void *future;
345 } *sti_testin_t;
346
347 typedef struct sti_testout {
348 u_int32_t errno;
349 u_int32_t result;
350 void *future;
351 } *sti_testout_t;
352
353 STI_DEP(test);
354
355 typedef struct sti_exhdlflags {
356 u_int32_t flags;
357 #define STI_EXHDLF_WAIT 0x80000000
358 #define STI_EXHDLF_CINT 0x40000000
359 #define STI_EXHDLF_CBE 0x20000000
360 #define STI_EXHDLF_PINT 0x10000000
361 #define STI_EXHDLF_RINT 0x08000000
362 #define STI_EXHDLF_WEIM 0x04000000
363 #define STI_EXHDLF_REIM 0x02000000
364 #define STI_EXHDLF_GIE 0x01000000
365 #define STI_EXHDLF_PGIE 0x00800000
366 #define STI_EXHDLF_WIEM 0x00400000
367 #define STI_EXHDLF_EIEM 0x00200000
368 #define STI_EXHDLF_BIC 0x00100000
369 #define STI_EXHDLF_EIC 0x00080000
370 #define STI_EXHDLF_RIE 0x00040000
371 void *future;
372 } *sti_exhdlflags_t;
373
374 typedef struct sti_eexhdlin {
375 u_int32_t eim_addr;
376 u_int32_t eim_data;
377 u_int32_t iem;
378 u_int32_t icm;
379 void *future;
380 } *sti_eexhdlin_t;
381
382 typedef struct sti_exhdlint {
383 u_int32_t flags;
384 #define STI_EXHDLINT_BET 0x80000000
385 #define STI_EXHDLINT_HW 0x40000000
386 #define STI_EXHDLINT_LW 0x20000000
387 #define STI_EXHDLINT_TM 0x10000000
388 #define STI_EXHDLINT_VB 0x08000000
389 #define STI_EXHDLINT_UDC 0x04000000
390 #define STI_EXHDLINT_BDC 0x02000000
391 #define STI_EXHDLINT_UDPC 0x01000000
392 #define STI_EXHDLINT_BDPC 0x00800000
393 } *sti_exhdlint_t;
394
395 typedef struct sti_exhdlin {
396 sti_exhdlint_t addr;
397 sti_eexhdlin_t ext;
398 } *sti_exhdlin_t;
399
400 typedef struct sti_eexhdlout {
401 u_int32_t eim_addr;
402 u_int32_t eim_data;
403 u_int32_t iem;
404 u_int32_t icm;
405 void *future;
406 } *sti_eexhdlout_t;
407
408 typedef struct sti_exhdlout {
409 u_int32_t errno;
410 u_int32_t flags;
411 #define STI_EXHDLO_BE 0x80000000
412 #define STI_EXHDLO_IP 0x40000000
413 #define STI_EXHDLO_IE 0x20000000
414 sti_eexhdlout_t ext;
415 } *sti_exhdlout_t;
416
417 STI_DEP(exhdl);
418
419 typedef struct sti_inqconfflags {
420 u_int32_t flags;
421 #define STI_INQCONFF_WAIT 0x80000000
422 void *future;
423 } *sti_inqconfflags_t;
424
425 typedef struct sti_inqconfin {
426 void *future;
427 } *sti_inqconfin_t;
428
429 typedef struct sti_einqconfout {
430 u_int32_t crt_config[3];
431 u_int32_t crt_hw[3];
432 void *future;
433 } *sti_einqconfout_t;
434
435 typedef struct sti_inqconfout {
436 u_int32_t errno;
437 u_int16_t width, height, owidth, oheight, fbwidth, fbheight;
438 u_int32_t bpp;
439 u_int32_t bppu;
440 u_int32_t planes;
441 u_int8_t name[STI_DEVNAME_LEN];
442 u_int32_t attributes;
443 #define STI_INQCONF_Y2X 0x0001
444 #define STI_INQCONF_HWBLKMV 0x0002
445 #define STI_INQCONF_AHW 0x0004
446 #define STI_INQCONF_INT 0x0008
447 #define STI_INQCONF_GONOFF 0x0010
448 #define STI_INQCONF_AONOFF 0x0020
449 #define STI_INQCONF_VARY 0x0040
450 #define STI_INQCONF_ODDBYTES 0x0080
451 #define STI_INQCONF_FLUSH 0x0100
452 #define STI_INQCONF_DMA 0x0200
453 #define STI_INQCONF_VDMA 0x0400
454 #define STI_INQCONF_YUV1 0x2000
455 #define STI_INQCONF_YUV2 0x4000
456 #define STI_INQCONF_BITS \
457 "\020\001y2x\002hwblkmv\003ahw\004int\005gonoff\006aonoff\007vary"\
458 "\010oddb\011flush\012dma\013vdma\016yuv1\017yuv2"
459 sti_einqconfout_t ext;
460 } *sti_inqconfout_t;
461
462 STI_DEP(inqconf);
463
464 typedef struct sti_scmentflags {
465 u_int32_t flags;
466 #define STI_SCMENTF_WAIT 0x80000000
467 void *future;
468 } *sti_scmentflags_t;
469
470 typedef struct sti_scmentin {
471 u_int32_t entry;
472 u_int32_t value;
473 void *future;
474 } *sti_scmentin_t;
475
476 typedef struct sti_scmentout {
477 u_int32_t errno;
478 void *future;
479 } *sti_scmentout_t;
480
481 STI_DEP(scment);
482
483 typedef struct sti_dmacflags {
484 u_int32_t flags;
485 #define STI_DMACF_WAIT 0x80000000
486 #define STI_DMACF_PRIV 0x40000000
487 #define STI_DMACF_DIS 0x20000000
488 #define STI_DMACF_BUF 0x10000000
489 #define STI_DMACF_MRK 0x08000000
490 #define STI_DMACF_ABRT 0x04000000
491 void *future;
492 } *sti_dmacflags_t;
493
494 typedef struct sti_dmacin {
495 u_int32_t pa_upper;
496 u_int32_t pa_lower;
497 u_int32_t len;
498 u_int32_t mrk_data;
499 u_int32_t mrk_off;
500 void *future;
501 } *sti_dmacin_t;
502
503 typedef struct sti_dmacout {
504 u_int32_t errno;
505 void *future;
506 } *sti_dmacout_t;
507
508 STI_DEP(dmac);
509
510 typedef struct sti_flowcflags {
511 u_int32_t flags;
512 #define STI_FLOWCF_WAIT 0x80000000
513 #define STI_FLOWCF_CHW 0x40000000
514 #define STI_FLOWCF_WHW 0x20000000
515 #define STI_FLOWCF_WLW 0x10000000
516 #define STI_FLOWCF_PCSE 0x08000000
517 #define STI_FLOWCF_CSE 0x04000000
518 #define STI_FLOWCF_CSWF 0x02000000
519 #define STI_FLOWCF_CSWC 0x01000000
520 #define STI_FLOWCF_CSWQ 0x00800000
521 void *future;
522 } *sti_flowcflags_t;
523
524 typedef struct sti_flowcin {
525 u_int32_t retry;
526 u_int32_t bufz;
527 u_int32_t hwcnt;
528 u_int32_t lwcnt;
529 u_int32_t csfv;
530 u_int32_t cscv;
531 u_int32_t csqc;
532 void *future;
533 } *sti_flowcin_t;
534
535 typedef struct sti_flowcout {
536 u_int32_t errno;
537 u_int32_t retry_result;
538 u_int32_t fifo_size;
539 void *future;
540 } *sti_flowcout_t;
541
542 STI_DEP(flowc);
543
544 typedef struct sti_utimingflags {
545 u_int32_t flags;
546 #define STI_UTIMF_WAIT 0x80000000
547 #define STI_UTIMF_HKS 0x40000000
548 void *future;
549 } *sti_utimingflags_t;
550
551 typedef struct sti_utimingin {
552 void *data;
553 void *kbuf;
554 void *future;
555 } *sti_utimingin_t;
556
557 typedef struct sti_utimingout {
558 u_int32_t errno;
559 u_int32_t kbuf_size;
560 void *future;
561 } *sti_utimingout_t;
562
563 STI_DEP(utiming);
564
565 typedef struct sti_pmgrflags {
566 u_int32_t flags;
567 #define STI_UTIMF_WAIT 0x80000000
568 #define STI_UTIMOP_CLEANUP 0x00000000
569 #define STI_UTIMOP_BAC 0x10000000
570 #define STI_UTIMF_CRIT 0x04000000
571 #define STI_UTIMF_BUFF 0x02000000
572 #define STI_UTIMF_IBUFF 0x01000000
573 void *future;
574 } *sti_pmgrflags_t;
575
576 typedef struct sti_pmgrin {
577 u_int32_t reserved[4];
578 void *future;
579 } *sti_pmgrin_t;
580
581 typedef struct sti_pmgrout {
582 int32_t errno;
583 void *future;
584 } *sti_pmgrout_t;
585
586 STI_DEP(pmgr);
587
588 typedef struct sti_utilflags {
589 u_int32_t flags;
590 #define STI_UTILF_ROOT 0x80000000
591 void *future;
592 } *sti_utilflags_t;
593
594 typedef struct sti_utilin {
595 u_int32_t in_size;
596 u_int32_t out_size;
597 u_int8_t *buf;
598 } *sti_utilin_t;
599
600 typedef struct sti_utilout {
601 int32_t errno;
602 void *future;
603 } *sti_utilout_t;
604
605 STI_DEP(util);
606
607 #pragma pack()
608
609 #endif