1 /* $OpenBSD: stireg.h,v 1.8 2003/08/19 02:52:38 mickey 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 /* sti returns */ 58 #define STI_OK 0 59 #define STI_FAIL -1 60 #define STI_NRDY 1 61 62 /* sti errno */ 63 #define STI_NOERRNO 0 /* no error */ 64 #define STI_BADREENTLVL 1 /* bad reentry level */ 65 #define STI_NOREGIONSDEF 2 /* region table is not setup */ 66 #define STI_ILLNPLANES 3 /* invalid num of text planes */ 67 #define STI_ILLINDEX 4 /* invalid fond index */ 68 #define STI_ILLLOC 5 /* invalid font location */ 69 #define STI_ILLCOLOUR 6 /* invalid colour */ 70 #define STI_ILLBLKMVFROM 7 /* invalid from in blkmv */ 71 #define STI_ILLBLKMVTO 8 /* invalid to in blkmv */ 72 #define STI_ILLBLKMVSIZE 9 /* invalid siz in blkmv */ 73 #define STI_BEIUNSUPP 10 /* bus error ints unsupported */ 74 #define STI_UNXPBE 11 /* unexpected bus error */ 75 #define STI_UNXHWF 12 /* unexpected hardware failure */ 76 #define STI_NEGCFG 13 /* no ext global config struct */ 77 #define STI_NEIG 14 /* no ext init struct */ 78 #define STI_ILLSCME 15 /* invalid set cmap entry */ 79 #define STI_ILLCMVAL 16 /* invalid cmap value */ 80 #define STI_NORESMEM 17 /* no requested global memory */ 81 #define STI_RESMEMCORR 18 /* reserved memory corrupted */ 82 #define STI_ILLNTBLKMV 19 /* invalid non-text blkmv */ 83 #define STI_ILLMONITOR 20 /* monitor selection is out of range */ 84 #define STI_ILLEXCADDR 21 /* invalid excpt handler addr */ 85 #define STI_ILLEXCFLAGS 22 /* invalid excpt handler flags */ 86 #define STI_NOEHE 23 /* no ext exhdl struct */ 87 #define STI_NOINQCE 24 /* no ext inq cfg struct */ 88 #define STI_ILLRGNPTR 25 /* invalid region pointer */ 89 #define STI_ILLUTLOP 26 /* invalid util opcode */ 90 #define STI_UNKNOWN 250 /* unknown error */ 91 #define STI_NOCFGPTR 251 /* no config ptr defined */ 92 #define STI_NOFLPTR 252 /* no flag ptr defined */ 93 #define STI_NOINPTR 253 /* no in ptr defined */ 94 #define STI_NOOUTPTR 254 /* no way you can get it */ 95 #define STI_NOLOCK 255 /* kernel dishonour graphics lock */ 96 97 /* colours */ 98 #define STI_COLOUR_BLACK 0 99 #define STI_COLOUR_WHITE 1 100 #define STI_COLOUR_RED 2 101 #define STI_COLOUR_YELLOW 3 102 #define STI_COLOUR_GREEN 4 103 #define STI_COLOUR_CYAN 5 104 #define STI_COLOUR_BLUE 6 105 #define STI_COLOUR_MAGENTA 7 106 107 #pragma pack(1) 108 109 /* LSB high */ 110 struct sti_dd { 111 u_int32_t dd_type; /* 0x00 device type */ 112 #define STI_DEVTYPE1 1 113 #define STI_DEVTYPE4 3 114 u_int8_t dd_unused; 115 u_int8_t dd_nmon; /* 0x05 number monitor rates */ 116 u_int8_t dd_grrev; /* 0x06 global rom revision */ 117 u_int8_t dd_lrrev; /* 0x07 local rom revision */ 118 u_int8_t dd_grid[8]; /* 0x08 graphics id */ 119 u_int32_t dd_fntaddr; /* 0x10 font start address */ 120 u_int32_t dd_maxst; /* 0x14 max state storage */ 121 u_int32_t dd_romend; /* 0x18 rom last address */ 122 u_int32_t dd_reglst; /* 0x1c device region list */ 123 u_int16_t dd_maxreent; /* 0x20 max reent storage */ 124 u_int16_t dd_maxtimo; /* 0x22 max execution timeout .1 sec */ 125 u_int32_t dd_montbl; /* 0x24 mon table address, array of 126 names num of dd_nmon */ 127 u_int32_t dd_udaddr; /* 0x28 user data address */ 128 u_int32_t dd_stimemreq; /* 0x2c sti memory request */ 129 u_int32_t dd_udsize; /* 0x30 user data size */ 130 u_int16_t dd_pwruse; /* 0x34 power usage */ 131 u_int8_t dd_bussup; /* 0x36 bus support */ 132 #define STI_BUSSUPPORT_GSCINTL 0x01 /* supports pulling INTL for int */ 133 #define STI_BUSSUPPORT_GSC15X 0x02 /* supports GSC 1.5X */ 134 #define STI_BUSSUPPORT_GSC2X 0x04 /* supports GSC 2.X */ 135 #define STI_BUSSUPPORT_PCIIOEIM 0x08 /* will use directed int */ 136 #define STI_BUSSUPPORT_PCISTD 0x10 /* will use std PCI int */ 137 #define STI_BUSSUPPORT_ILOCK 0x20 /* supports implicit locking */ 138 #define STI_BUSSUPPORT_ROMMAP 0x40 /* rom is only in pci erom space */ 139 #define STI_BUSSUPPORT_2DECODE 0x80 /* single address decoder */ 140 u_int8_t dd_ebussup; /* 0x37 extended bus support */ 141 #define STI_EBUSSUPPORT_DMA 0x01 /* supports dma */ 142 #define STI_EBUSSUPPORT_PIOLOCK 0x02 /* no implicit locking for dma */ 143 u_int8_t dd_altcodet; /* 0x38 alternate code type */ 144 #define STI_ALTCODE_UNKNOWN 0x00 145 #define STI_ALTCODE_PA64 0x01 /* alt code is in pa64 */ 146 u_int8_t dd_eddst[3]; /* 0x39 extended DD struct */ 147 u_int32_t dd_cfbaddr; /* 0x3c CFB address, location of 148 X11 driver to be used for 149 servers w/o accel */ 150 u_int32_t dd_pacode[16]; /* 0x40 routines for pa-risc */ 151 u_int32_t dd_altcode[16]; /* 0x80 routines for m68k/i386 */ 152 }; 153 154 /* after the last region there is one indirect list ptr */ 155 struct sti_region { 156 u_int offset :14; /* page offset dev io space relative */ 157 u_int sys_only: 1; /* whether allow user access */ 158 u_int cache : 1; /* map in cache */ 159 u_int btlb : 1; /* should use BTLB if available */ 160 u_int last : 1; /* last region in the list */ 161 u_int length :14; /* size in pages */ 162 }; 163 164 struct sti_font { 165 u_int16_t first; 166 u_int16_t last; 167 u_int8_t width; 168 u_int8_t height; 169 u_int8_t type; 170 #define STI_FONT_HPROMAN8 1 171 #define STI_FONT_KANA8 2 172 u_int8_t bpc; 173 u_int32_t next; 174 u_int8_t uheight; 175 u_int8_t uoffset; 176 u_int8_t unused[2]; 177 }; 178 179 struct sti_fontcfg { 180 u_int16_t first; 181 u_int16_t last; 182 u_int8_t width; 183 u_int8_t height; 184 u_int8_t type; 185 u_int8_t bpc; 186 u_int8_t uheight; 187 u_int8_t uoffset; 188 }; 189 190 typedef struct sti_ecfg { 191 u_int8_t current_monitor; 192 u_int8_t uf_boot; 193 u_int16_t power; /* power dissipation Watts */ 194 u_int32_t freq_ref; 195 u_int32_t *addr; /* memory block of size dd_stimemreq */ 196 void *future; 197 } *sti_ecfg_t; 198 199 typedef struct sti_cfg { 200 u_int32_t text_planes; 201 u_int16_t scr_width; 202 u_int16_t scr_height; 203 u_int16_t oscr_width; 204 u_int16_t oscr_height; 205 u_int16_t fb_width; 206 u_int16_t fb_height; 207 u_int32_t regions[STI_REGION_MAX]; 208 u_int32_t reent_level; 209 u_int32_t *save_addr; 210 sti_ecfg_t ext_cfg; 211 } *sti_cfg_t; 212 213 214 /* routine types */ 215 #define STI_DEP(n) \ 216 typedef int (*sti_##n##_t)( \ 217 sti_##n##flags_t, sti_##n##in_t, sti_##n##out_t, sti_cfg_t); 218 219 typedef struct sti_initflags { 220 u_int32_t flags; 221 #define STI_INITF_WAIT 0x80000000 222 #define STI_INITF_RESET 0x40000000 223 #define STI_INITF_TEXT 0x20000000 224 #define STI_INITF_NTEXT 0x10000000 225 #define STI_INITF_CLEAR 0x08000000 226 #define STI_INITF_CMB 0x04000000 /* non-text planes cmap black */ 227 #define STI_INITF_EBET 0x02000000 /* enable bus error timer */ 228 #define STI_INITF_EBETI 0x01000000 /* enable bus error timer interrupt */ 229 #define STI_INITF_PTS 0x00800000 /* preserve text settings */ 230 #define STI_INITF_PNTS 0x00400000 /* preserve non-text settings */ 231 #define STI_INITF_PBET 0x00200000 /* preserve BET settings */ 232 #define STI_INITF_PBETI 0x00100000 /* preserve BETI settings */ 233 #define STI_INITF_ICMT 0x00080000 /* init cmap for text planes */ 234 #define STI_INITF_SCMT 0x00040000 /* change current monitor type */ 235 #define STI_INITF_RIE 0x00020000 /* retain int enables */ 236 void *future; 237 } *sti_initflags_t; 238 239 typedef struct sti_einitin { 240 u_int8_t mon_type; 241 u_int8_t pad; 242 u_int16_t inflight; /* possible on pci */ 243 void *future; 244 } *sti_einitin_t; 245 246 typedef struct sti_initin { 247 u_int32_t text_planes; /* number of planes for text */ 248 sti_einitin_t ext_in; 249 } *sti_initin_t; 250 251 typedef struct sti_initout { 252 int32_t errno; 253 u_int32_t text_planes; /* number of planes used for text */ 254 void *future; 255 } *sti_initout_t; 256 257 STI_DEP(init); 258 259 typedef struct sti_mgmtflags { 260 u_int32_t flags; 261 #define STI_MGMTF_WAIT 0x80000000 262 #define STI_MGMTF_SAVE 0x40000000 263 #define STI_MGMTF_RALL 0x20000000 /* restore all display planes */ 264 void *future; 265 } *sti_mgmtflags_t; 266 267 typedef struct sti_mgmtin { 268 void *addr; 269 void *future; 270 } *sti_mgmtin_t; 271 272 typedef struct sti_mgmtout { 273 int32_t errno; 274 void *future; 275 } *sti_mgmtout_t; 276 277 STI_DEP(mgmt); 278 279 typedef struct sti_unpmvflags { 280 u_int32_t flags; 281 #define STI_UNPMVF_WAIT 0x80000000 282 #define STI_UNPMVF_NTXT 0x40000000 /* intp non-text planes */ 283 void *future; 284 } *sti_unpmvflags_t; 285 286 typedef struct sti_unpmvin { 287 u_int32_t *font_addr; /* font */ 288 u_int16_t index; /* character index in the font */ 289 u_int8_t fg_colour; 290 u_int8_t bg_colour; 291 u_int16_t x, y; 292 void *future; 293 } *sti_unpmvin_t; 294 295 typedef struct sti_unpmvout { 296 u_int32_t errno; 297 void *future; 298 } *sti_unpmvout_t; 299 300 STI_DEP(unpmv); 301 302 typedef struct sti_blkmvflags { 303 u_int32_t flags; 304 #define STI_BLKMVF_WAIT 0x80000000 305 #define STI_BLKMVF_COLR 0x40000000 /* change colour on move */ 306 #define STI_BLKMVF_CLR 0x20000000 /* clear on move */ 307 #define STI_BLKMVF_NTXT 0x10000000 /* move in non-text planes */ 308 void *future; 309 } *sti_blkmvflags_t; 310 311 typedef struct sti_blkmvin { 312 u_int8_t fg_colour; 313 u_int8_t bg_colour; 314 u_int16_t srcx, srcy, dstx, dsty; 315 u_int16_t width, height; 316 u_int16_t pad; 317 void *future; 318 } *sti_blkmvin_t; 319 320 typedef struct sti_blkmvout { 321 u_int32_t errno; 322 void *future; 323 } *sti_blkmvout_t; 324 325 STI_DEP(blkmv); 326 327 typedef struct sti_testflags { 328 u_int32_t flags; 329 #define STI_TESTF_WAIT 0x80000000 330 #define STI_TESTF_ETST 0x40000000 331 void *future; 332 } *sti_testflags_t; 333 334 typedef struct sti_testin { 335 void *future; 336 } *sti_testin_t; 337 338 typedef struct sti_testout { 339 u_int32_t errno; 340 u_int32_t result; 341 void *future; 342 } *sti_testout_t; 343 344 STI_DEP(test); 345 346 typedef struct sti_exhdlflags { 347 u_int32_t flags; 348 #define STI_EXHDLF_WAIT 0x80000000 349 #define STI_EXHDLF_CINT 0x40000000 /* clear int */ 350 #define STI_EXHDLF_CBE 0x20000000 /* clear BE */ 351 #define STI_EXHDLF_PINT 0x10000000 /* preserve int */ 352 #define STI_EXHDLF_RINT 0x08000000 /* restore int */ 353 #define STI_EXHDLF_WEIM 0x04000000 /* write eim w/ sti_eexhdlin */ 354 #define STI_EXHDLF_REIM 0x02000000 /* read eim to sti_eexhdlout */ 355 #define STI_EXHDLF_GIE 0x01000000 /* global int enable */ 356 #define STI_EXHDLF_PGIE 0x00800000 357 #define STI_EXHDLF_WIEM 0x00400000 358 #define STI_EXHDLF_EIEM 0x00200000 359 #define STI_EXHDLF_BIC 0x00100000 /* begin int cycle */ 360 #define STI_EXHDLF_EIC 0x00080000 /* end int cycle */ 361 #define STI_EXHDLF_RIE 0x00040000 /* reset do not clear int enables */ 362 void *future; 363 } *sti_exhdlflags_t; 364 365 typedef struct sti_eexhdlin { 366 u_int32_t eim_addr; 367 u_int32_t eim_data; 368 u_int32_t iem; /* enable mask */ 369 u_int32_t icm; /* clear mask */ 370 void *future; 371 } *sti_eexhdlin_t; 372 373 typedef struct sti_exhdlint { 374 u_int32_t flags; 375 #define STI_EXHDLINT_BET 0x80000000 /* bus error timer */ 376 #define STI_EXHDLINT_HW 0x40000000 /* high water */ 377 #define STI_EXHDLINT_LW 0x20000000 /* low water */ 378 #define STI_EXHDLINT_TM 0x10000000 /* texture map */ 379 #define STI_EXHDLINT_VB 0x08000000 /* vertical blank */ 380 #define STI_EXHDLINT_UDC 0x04000000 /* unbuffered dma complete */ 381 #define STI_EXHDLINT_BDC 0x02000000 /* buffered dma complete */ 382 #define STI_EXHDLINT_UDPC 0x01000000 /* unbuf priv dma complete */ 383 #define STI_EXHDLINT_BDPC 0x00800000 /* buffered priv dma complete */ 384 } *sti_exhdlint_t; 385 386 typedef struct sti_exhdlin { 387 sti_exhdlint_t addr; 388 sti_eexhdlin_t ext; 389 } *sti_exhdlin_t; 390 391 typedef struct sti_eexhdlout { 392 u_int32_t eim_addr; 393 u_int32_t eim_data; 394 u_int32_t iem; /* enable mask */ 395 u_int32_t icm; /* clear mask */ 396 void *future; 397 } *sti_eexhdlout_t; 398 399 typedef struct sti_exhdlout { 400 u_int32_t errno; 401 u_int32_t flags; 402 #define STI_EXHDLO_BE 0x80000000 /* BE was intercepted */ 403 #define STI_EXHDLO_IP 0x40000000 /* there is int pending */ 404 #define STI_EXHDLO_IE 0x20000000 /* global enable set */ 405 sti_eexhdlout_t ext; 406 } *sti_exhdlout_t; 407 408 STI_DEP(exhdl); 409 410 typedef struct sti_inqconfflags { 411 u_int32_t flags; 412 #define STI_INQCONFF_WAIT 0x80000000 413 void *future; 414 } *sti_inqconfflags_t; 415 416 typedef struct sti_inqconfin { 417 void *future; 418 } *sti_inqconfin_t; 419 420 typedef struct sti_einqconfout { 421 u_int32_t crt_config[3]; 422 u_int32_t crt_hw[3]; 423 void *future; 424 } *sti_einqconfout_t; 425 426 typedef struct sti_inqconfout { 427 u_int32_t errno; 428 u_int16_t width, height, owidth, oheight, fbwidth, fbheight; 429 u_int32_t bpp; /* bits per pixel */ 430 u_int32_t bppu; /* accessible bpp */ 431 u_int32_t planes; 432 u_int8_t name[STI_DEVNAME_LEN]; 433 u_int32_t attributes; 434 #define STI_INQCONF_Y2X 0x0001 /* pixel is higher tan wider */ 435 #define STI_INQCONF_HWBLKMV 0x0002 /* hw blkmv is present */ 436 #define STI_INQCONF_AHW 0x0004 /* adv hw accel */ 437 #define STI_INQCONF_INT 0x0008 /* can interrupt */ 438 #define STI_INQCONF_GONOFF 0x0010 /* supports on/off */ 439 #define STI_INQCONF_AONOFF 0x0020 /* supports alpha on/off */ 440 #define STI_INQCONF_VARY 0x0040 /* variable fb height */ 441 #define STI_INQCONF_ODDBYTES 0x0080 /* use only odd fb bytes */ 442 #define STI_INQCONF_FLUSH 0x0100 /* fb cache requires flushing */ 443 #define STI_INQCONF_DMA 0x0200 /* supports dma */ 444 #define STI_INQCONF_VDMA 0x0400 /* supports vdma */ 445 #define STI_INQCONF_YUV1 0x2000 /* supports YUV type 1 */ 446 #define STI_INQCONF_YUV2 0x4000 /* supports YUV type 2 */ 447 #define STI_INQCONF_BITS \ 448 "\020\001y2x\002hwblkmv\003ahw\004int\005gonoff\006aonoff\007vary"\ 449 "\010oddb\011flush\012dma\013vdma\016yuv1\017yuv2" 450 sti_einqconfout_t ext; 451 } *sti_inqconfout_t; 452 453 STI_DEP(inqconf); 454 455 typedef struct sti_scmentflags { 456 u_int32_t flags; 457 #define STI_SCMENTF_WAIT 0x80000000 458 void *future; 459 } *sti_scmentflags_t; 460 461 typedef struct sti_scmentin { 462 u_int32_t entry; 463 u_int32_t value; 464 void *future; 465 } *sti_scmentin_t; 466 467 typedef struct sti_scmentout { 468 u_int32_t errno; 469 void *future; 470 } *sti_scmentout_t; 471 472 STI_DEP(scment); 473 474 typedef struct sti_dmacflags { 475 u_int32_t flags; 476 #define STI_DMACF_WAIT 0x80000000 477 #define STI_DMACF_PRIV 0x40000000 /* priv dma */ 478 #define STI_DMACF_DIS 0x20000000 /* disable */ 479 #define STI_DMACF_BUF 0x10000000 /* buffered */ 480 #define STI_DMACF_MRK 0x08000000 /* write a marker */ 481 #define STI_DMACF_ABRT 0x04000000 /* abort dma xfer */ 482 void *future; 483 } *sti_dmacflags_t; 484 485 typedef struct sti_dmacin { 486 u_int32_t pa_upper; 487 u_int32_t pa_lower; 488 u_int32_t len; 489 u_int32_t mrk_data; 490 u_int32_t mrk_off; 491 void *future; 492 } *sti_dmacin_t; 493 494 typedef struct sti_dmacout { 495 u_int32_t errno; 496 void *future; 497 } *sti_dmacout_t; 498 499 STI_DEP(dmac); 500 501 typedef struct sti_flowcflags { 502 u_int32_t flags; 503 #define STI_FLOWCF_WAIT 0x80000000 504 #define STI_FLOWCF_CHW 0x40000000 /* check high water */ 505 #define STI_FLOWCF_WHW 0x20000000 /* write high water */ 506 #define STI_FLOWCF_WLW 0x10000000 /* write low water */ 507 #define STI_FLOWCF_PCSE 0x08000000 /* preserve cse */ 508 #define STI_FLOWCF_CSE 0x04000000 509 #define STI_FLOWCF_CSWF 0x02000000 /* cs write fine */ 510 #define STI_FLOWCF_CSWC 0x01000000 /* cs write coarse */ 511 #define STI_FLOWCF_CSWQ 0x00800000 /* cs write fifo */ 512 void *future; 513 } *sti_flowcflags_t; 514 515 typedef struct sti_flowcin { 516 u_int32_t retry; 517 u_int32_t bufz; 518 u_int32_t hwcnt; 519 u_int32_t lwcnt; 520 u_int32_t csfv; /* cs fine value */ 521 u_int32_t cscv; /* cs coarse value */ 522 u_int32_t csqc; /* cs fifo count */ 523 void *future; 524 } *sti_flowcin_t; 525 526 typedef struct sti_flowcout { 527 u_int32_t errno; 528 u_int32_t retry_result; 529 u_int32_t fifo_size; 530 void *future; 531 } *sti_flowcout_t; 532 533 STI_DEP(flowc); 534 535 typedef struct sti_utimingflags { 536 u_int32_t flags; 537 #define STI_UTIMF_WAIT 0x80000000 538 #define STI_UTIMF_HKS 0x40000000 /* has kbuf_size */ 539 void *future; 540 } *sti_utimingflags_t; 541 542 typedef struct sti_utimingin { 543 void *data; 544 void *kbuf; 545 void *future; 546 } *sti_utimingin_t; 547 548 typedef struct sti_utimingout { 549 u_int32_t errno; 550 u_int32_t kbuf_size; /* buffer required size */ 551 void *future; 552 } *sti_utimingout_t; 553 554 STI_DEP(utiming); 555 556 typedef struct sti_pmgrflags { 557 u_int32_t flags; 558 #define STI_UTIMF_WAIT 0x80000000 559 #define STI_UTIMOP_CLEANUP 0x00000000 560 #define STI_UTIMOP_BAC 0x10000000 561 #define STI_UTIMF_CRIT 0x04000000 562 #define STI_UTIMF_BUFF 0x02000000 563 #define STI_UTIMF_IBUFF 0x01000000 564 void *future; 565 } *sti_pmgrflags_t; 566 567 typedef struct sti_pmgrin { 568 u_int32_t reserved[4]; 569 void *future; 570 } *sti_pmgrin_t; 571 572 typedef struct sti_pmgrout { 573 int32_t errno; 574 void *future; 575 } *sti_pmgrout_t; 576 577 STI_DEP(pmgr); 578 579 typedef struct sti_utilflags { 580 u_int32_t flags; 581 #define STI_UTILF_ROOT 0x80000000 /* was called as root */ 582 void *future; 583 } *sti_utilflags_t; 584 585 typedef struct sti_utilin { 586 u_int32_t in_size; 587 u_int32_t out_size; 588 u_int8_t *buf; 589 } *sti_utilin_t; 590 591 typedef struct sti_utilout { 592 int32_t errno; 593 void *future; 594 } *sti_utilout_t; 595 596 STI_DEP(util); 597 598 #pragma pack() 599 600 #endif /* _IC_STIREG_H_ */ 601