Annotation of sys/dev/ic/stireg.h, Revision 1.1
1.1 ! nbrk 1: /* $OpenBSD: stireg.h,v 1.11 2005/10/29 11:54:07 miod Exp $ */
! 2:
! 3: /*
! 4: * Copyright (c) 2000 Michael Shalayeff
! 5: * All rights reserved.
! 6: *
! 7: * Redistribution and use in source and binary forms, with or without
! 8: * modification, are permitted provided that the following conditions
! 9: * are met:
! 10: * 1. Redistributions of source code must retain the above copyright
! 11: * notice, this list of conditions and the following disclaimer.
! 12: * 2. Redistributions in binary form must reproduce the above copyright
! 13: * notice, this list of conditions and the following disclaimer in the
! 14: * documentation and/or other materials provided with the distribution.
! 15: *
! 16: * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
! 17: * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
! 18: * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
! 19: * IN NO EVENT SHALL THE AUTHOR OR HIS RELATIVES BE LIABLE FOR ANY DIRECT,
! 20: * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
! 21: * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
! 22: * SERVICES; LOSS OF MIND, USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 23: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
! 24: * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
! 25: * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
! 26: * THE POSSIBILITY OF SUCH DAMAGE.
! 27: */
! 28:
! 29: #ifndef _IC_STIREG_H_
! 30: #define _IC_STIREG_H_
! 31:
! 32: /* #define STIDEBUG */
! 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: /* code ROM definitions */
! 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: /* sti returns */
! 65: #define STI_OK 0
! 66: #define STI_FAIL -1
! 67: #define STI_NRDY 1
! 68:
! 69: /* sti errno */
! 70: #define STI_NOERRNO 0 /* no error */
! 71: #define STI_BADREENTLVL 1 /* bad reentry level */
! 72: #define STI_NOREGIONSDEF 2 /* region table is not setup */
! 73: #define STI_ILLNPLANES 3 /* invalid num of text planes */
! 74: #define STI_ILLINDEX 4 /* invalid font index */
! 75: #define STI_ILLLOC 5 /* invalid font location */
! 76: #define STI_ILLCOLOUR 6 /* invalid colour */
! 77: #define STI_ILLBLKMVFROM 7 /* invalid from in blkmv */
! 78: #define STI_ILLBLKMVTO 8 /* invalid to in blkmv */
! 79: #define STI_ILLBLKMVSIZE 9 /* invalid size in blkmv */
! 80: #define STI_BEIUNSUPP 10 /* bus error ints unsupported */
! 81: #define STI_UNXPBE 11 /* unexpected bus error */
! 82: #define STI_UNXHWF 12 /* unexpected hardware failure */
! 83: #define STI_NEGCFG 13 /* no ext global config struct */
! 84: #define STI_NEIG 14 /* no ext init struct */
! 85: #define STI_ILLSCME 15 /* invalid set cmap entry */
! 86: #define STI_ILLCMVAL 16 /* invalid cmap value */
! 87: #define STI_NORESMEM 17 /* no requested global memory */
! 88: #define STI_RESMEMCORR 18 /* reserved memory corrupted */
! 89: #define STI_ILLNTBLKMV 19 /* invalid non-text blkmv */
! 90: #define STI_ILLMONITOR 20 /* monitor selection is out of range */
! 91: #define STI_ILLEXCADDR 21 /* invalid excpt handler addr */
! 92: #define STI_ILLEXCFLAGS 22 /* invalid excpt handler flags */
! 93: #define STI_NOEHE 23 /* no ext exhdl struct */
! 94: #define STI_NOINQCE 24 /* no ext inq cfg struct */
! 95: #define STI_ILLRGNPTR 25 /* invalid region pointer */
! 96: #define STI_ILLUTLOP 26 /* invalid util opcode */
! 97: #define STI_UNKNOWN 250 /* unknown error */
! 98: #define STI_NOCFGPTR 251 /* no config ptr defined */
! 99: #define STI_NOFLPTR 252 /* no flag ptr defined */
! 100: #define STI_NOINPTR 253 /* no in ptr defined */
! 101: #define STI_NOOUTPTR 254 /* no way you can get it */
! 102: #define STI_NOLOCK 255 /* kernel dishonour graphics lock */
! 103:
! 104: /* colours */
! 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: /* LSB high */
! 117: struct sti_dd {
! 118: u_int32_t dd_type; /* 0x00 device type */
! 119: #define STI_DEVTYPE1 1
! 120: #define STI_DEVTYPE4 3
! 121: u_int8_t dd_unused;
! 122: u_int8_t dd_nmon; /* 0x05 number monitor rates */
! 123: u_int8_t dd_grrev; /* 0x06 global rom revision */
! 124: u_int8_t dd_lrrev; /* 0x07 local rom revision */
! 125: u_int32_t dd_grid[2]; /* 0x08 graphics id */
! 126: u_int32_t dd_fntaddr; /* 0x10 font start address */
! 127: u_int32_t dd_maxst; /* 0x14 max state storage */
! 128: u_int32_t dd_romend; /* 0x18 rom last address */
! 129: u_int32_t dd_reglst; /* 0x1c device region list */
! 130: u_int16_t dd_maxreent; /* 0x20 max reent storage */
! 131: u_int16_t dd_maxtimo; /* 0x22 max execution timeout .1 sec */
! 132: u_int32_t dd_montbl; /* 0x24 mon table address, array of
! 133: names num of dd_nmon */
! 134: u_int32_t dd_udaddr; /* 0x28 user data address */
! 135: u_int32_t dd_stimemreq; /* 0x2c sti memory request */
! 136: u_int32_t dd_udsize; /* 0x30 user data size */
! 137: u_int16_t dd_pwruse; /* 0x34 power usage */
! 138: u_int8_t dd_bussup; /* 0x36 bus support */
! 139: #define STI_BUSSUPPORT_GSCINTL 0x01 /* supports pulling INTL for int */
! 140: #define STI_BUSSUPPORT_GSC15X 0x02 /* supports GSC 1.5X */
! 141: #define STI_BUSSUPPORT_GSC2X 0x04 /* supports GSC 2.X */
! 142: #define STI_BUSSUPPORT_PCIIOEIM 0x08 /* will use directed int */
! 143: #define STI_BUSSUPPORT_PCISTD 0x10 /* will use std PCI int */
! 144: #define STI_BUSSUPPORT_ILOCK 0x20 /* supports implicit locking */
! 145: #define STI_BUSSUPPORT_ROMMAP 0x40 /* rom is only in pci erom space */
! 146: #define STI_BUSSUPPORT_2DECODE 0x80 /* single address decoder */
! 147: u_int8_t dd_ebussup; /* 0x37 extended bus support */
! 148: #define STI_EBUSSUPPORT_DMA 0x01 /* supports dma */
! 149: #define STI_EBUSSUPPORT_PIOLOCK 0x02 /* no implicit locking for dma */
! 150: u_int8_t dd_altcodet; /* 0x38 alternate code type */
! 151: #define STI_ALTCODE_UNKNOWN 0x00
! 152: #define STI_ALTCODE_PA64 0x01 /* alt code is in pa64 */
! 153: u_int8_t dd_eddst[3]; /* 0x39 extended DD struct */
! 154: u_int32_t dd_cfbaddr; /* 0x3c CFB address, location of
! 155: X11 driver to be used for
! 156: servers w/o accel */
! 157: u_int32_t dd_pacode[16]; /* 0x40 routines for pa-risc */
! 158: u_int32_t dd_altcode[16]; /* 0x80 routines for m68k/i386 */
! 159: };
! 160:
! 161: #define STI_REVISION(maj, min) (((maj) << 4) | ((min) & 0x0f))
! 162:
! 163: /* after the last region there is one indirect list ptr */
! 164: struct sti_region {
! 165: u_int offset :14; /* page offset dev io space relative */
! 166: u_int sys_only: 1; /* whether allow user access */
! 167: u_int cache : 1; /* map in cache */
! 168: u_int btlb : 1; /* should use BTLB if available */
! 169: u_int last : 1; /* last region in the list */
! 170: u_int length :14; /* size in pages */
! 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; /* power dissipation Watts */
! 203: u_int32_t freq_ref;
! 204: u_int32_t *addr; /* memory block of size dd_stimemreq */
! 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: /* routine types */
! 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 /* non-text planes cmap black */
! 236: #define STI_INITF_EBET 0x02000000 /* enable bus error timer */
! 237: #define STI_INITF_EBETI 0x01000000 /* enable bus error timer interrupt */
! 238: #define STI_INITF_PTS 0x00800000 /* preserve text settings */
! 239: #define STI_INITF_PNTS 0x00400000 /* preserve non-text settings */
! 240: #define STI_INITF_PBET 0x00200000 /* preserve BET settings */
! 241: #define STI_INITF_PBETI 0x00100000 /* preserve BETI settings */
! 242: #define STI_INITF_ICMT 0x00080000 /* init cmap for text planes */
! 243: #define STI_INITF_SCMT 0x00040000 /* change current monitor type */
! 244: #define STI_INITF_RIE 0x00020000 /* retain int enables */
! 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; /* possible on pci */
! 252: void *future;
! 253: } *sti_einitin_t;
! 254:
! 255: typedef struct sti_initin {
! 256: u_int32_t text_planes; /* number of planes for text */
! 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; /* number of planes used for text */
! 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 /* restore all display planes */
! 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 /* intp non-text planes */
! 292: void *future;
! 293: } *sti_unpmvflags_t;
! 294:
! 295: typedef struct sti_unpmvin {
! 296: u_int32_t *font_addr; /* font */
! 297: u_int16_t index; /* character index in the font */
! 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 /* change colour on move */
! 315: #define STI_BLKMVF_CLR 0x20000000 /* clear on move */
! 316: #define STI_BLKMVF_NTXT 0x10000000 /* move in non-text planes */
! 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 /* clear int */
! 359: #define STI_EXHDLF_CBE 0x20000000 /* clear BE */
! 360: #define STI_EXHDLF_PINT 0x10000000 /* preserve int */
! 361: #define STI_EXHDLF_RINT 0x08000000 /* restore int */
! 362: #define STI_EXHDLF_WEIM 0x04000000 /* write eim w/ sti_eexhdlin */
! 363: #define STI_EXHDLF_REIM 0x02000000 /* read eim to sti_eexhdlout */
! 364: #define STI_EXHDLF_GIE 0x01000000 /* global int enable */
! 365: #define STI_EXHDLF_PGIE 0x00800000
! 366: #define STI_EXHDLF_WIEM 0x00400000
! 367: #define STI_EXHDLF_EIEM 0x00200000
! 368: #define STI_EXHDLF_BIC 0x00100000 /* begin int cycle */
! 369: #define STI_EXHDLF_EIC 0x00080000 /* end int cycle */
! 370: #define STI_EXHDLF_RIE 0x00040000 /* reset do not clear int enables */
! 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; /* enable mask */
! 378: u_int32_t icm; /* clear mask */
! 379: void *future;
! 380: } *sti_eexhdlin_t;
! 381:
! 382: typedef struct sti_exhdlint {
! 383: u_int32_t flags;
! 384: #define STI_EXHDLINT_BET 0x80000000 /* bus error timer */
! 385: #define STI_EXHDLINT_HW 0x40000000 /* high water */
! 386: #define STI_EXHDLINT_LW 0x20000000 /* low water */
! 387: #define STI_EXHDLINT_TM 0x10000000 /* texture map */
! 388: #define STI_EXHDLINT_VB 0x08000000 /* vertical blank */
! 389: #define STI_EXHDLINT_UDC 0x04000000 /* unbuffered dma complete */
! 390: #define STI_EXHDLINT_BDC 0x02000000 /* buffered dma complete */
! 391: #define STI_EXHDLINT_UDPC 0x01000000 /* unbuf priv dma complete */
! 392: #define STI_EXHDLINT_BDPC 0x00800000 /* buffered priv dma complete */
! 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; /* enable mask */
! 404: u_int32_t icm; /* clear mask */
! 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 /* BE was intercepted */
! 412: #define STI_EXHDLO_IP 0x40000000 /* there is int pending */
! 413: #define STI_EXHDLO_IE 0x20000000 /* global enable set */
! 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; /* bits per pixel */
! 439: u_int32_t bppu; /* accessible bpp */
! 440: u_int32_t planes;
! 441: u_int8_t name[STI_DEVNAME_LEN];
! 442: u_int32_t attributes;
! 443: #define STI_INQCONF_Y2X 0x0001 /* pixel is higher than wider */
! 444: #define STI_INQCONF_HWBLKMV 0x0002 /* hw blkmv is present */
! 445: #define STI_INQCONF_AHW 0x0004 /* adv hw accel */
! 446: #define STI_INQCONF_INT 0x0008 /* can interrupt */
! 447: #define STI_INQCONF_GONOFF 0x0010 /* supports on/off */
! 448: #define STI_INQCONF_AONOFF 0x0020 /* supports alpha on/off */
! 449: #define STI_INQCONF_VARY 0x0040 /* variable fb height */
! 450: #define STI_INQCONF_ODDBYTES 0x0080 /* use only odd fb bytes */
! 451: #define STI_INQCONF_FLUSH 0x0100 /* fb cache requires flushing */
! 452: #define STI_INQCONF_DMA 0x0200 /* supports dma */
! 453: #define STI_INQCONF_VDMA 0x0400 /* supports vdma */
! 454: #define STI_INQCONF_YUV1 0x2000 /* supports YUV type 1 */
! 455: #define STI_INQCONF_YUV2 0x4000 /* supports YUV type 2 */
! 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 /* priv dma */
! 487: #define STI_DMACF_DIS 0x20000000 /* disable */
! 488: #define STI_DMACF_BUF 0x10000000 /* buffered */
! 489: #define STI_DMACF_MRK 0x08000000 /* write a marker */
! 490: #define STI_DMACF_ABRT 0x04000000 /* abort dma xfer */
! 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 /* check high water */
! 514: #define STI_FLOWCF_WHW 0x20000000 /* write high water */
! 515: #define STI_FLOWCF_WLW 0x10000000 /* write low water */
! 516: #define STI_FLOWCF_PCSE 0x08000000 /* preserve cse */
! 517: #define STI_FLOWCF_CSE 0x04000000
! 518: #define STI_FLOWCF_CSWF 0x02000000 /* cs write fine */
! 519: #define STI_FLOWCF_CSWC 0x01000000 /* cs write coarse */
! 520: #define STI_FLOWCF_CSWQ 0x00800000 /* cs write fifo */
! 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; /* cs fine value */
! 530: u_int32_t cscv; /* cs coarse value */
! 531: u_int32_t csqc; /* cs fifo count */
! 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 /* has kbuf_size */
! 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; /* buffer required 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 /* was called as root */
! 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 /* _IC_STIREG_H_ */
CVSweb