1 typedef struct PCIDev PCIDev;
2 typedef struct PCICap PCICap;
3 typedef struct PCIBar PCIBar;
4 typedef struct Region Region;
36 #define RFLAGS "flags"
47 REGALLOC = 1, /* allocate memory for region */
48 REGR = 2, /* can read */
49 REGW = 4, /* can write */
50 REGX = 8, /* can execute */
52 REGRWX = REGR|REGW|REGX,
55 /* E820 types, 0 == omitted from memory map */
56 REGFREE = 1<<8, /* report to OS as free */
57 REGRES = 2<<8, /* report to OS as reserved */
63 int (*mmio)(uintptr, void *, int, int);
68 #define BDF(b,d,f) ((b)<<16&0xff0000|(d)<<11&0xf800|(f)<<8&0x700)
74 PCIBar *busnext, *busprev;
75 u32int (*io)(int, u16int, u32int, int, void *);
88 u32int bdf, viddid, clrev, subid;
90 u8int irqno, irqactive;
101 u32int (*read)(PCICap *, u8int);
102 void (*write)(PCICap *, u8int, u32int, u32int);
107 /* irqline argument */
115 typedef struct VgaMode VgaMode;
118 int w, h, hbytes, sz;
123 extern uchar cmos[0x30];
125 extern void (*kconfig)(void);
127 /* arguments for x86access */
142 ACCSAFE = 0x100, /* don't post exceptions on fault */
145 /* used to speed up consecutive x86access calls */
146 typedef struct TLB TLB;