Add types and prototypes.

Submitted by: msmith
This commit is contained in:
imp 2000-10-16 19:49:30 +00:00
parent 8e2e4b4cc6
commit e6edbbb1cd
4 changed files with 92 additions and 4 deletions

View File

@ -219,6 +219,51 @@ extern int bios16_call(struct bios_regs *, char *);
extern int bios32(struct bios_regs *, u_int, u_short);
extern void set_bios_selectors(struct bios_segments *, int);
/*
* PCI interrupt routing table.
*
* $PIR in the BIOS segment contains a PIR_table
* int 1a:b106 returns PIR_table in buffer at es:(e)di
* int 1a:b18e returns PIR_table in buffer at es:(e)di
* int 1a:b406 returns es:di pointing to the BIOS PIR_table
*/
struct PIR_header
{
int8_t ph_signature[4];
u_int16_t ph_version;
u_int16_t ph_length;
u_int8_t ph_router_bus;
u_int8_t ph_router_dev_fn;
u_int16_t ph_pci_irqs;
u_int16_t ph_router_vendor;
u_int16_t ph_router_device;
u_int32_t ph_miniport;
u_int8_t ph_res[11];
u_int8_t ph_checksum;
} __attribute__ ((packed));
struct PIR_intpin
{
u_int8_t link;
u_int16_t irqs;
} __attribute__ ((packed));
struct PIR_entry
{
u_int8_t pe_bus;
u_int8_t pe_res1:3;
u_int8_t pe_device:5;
struct PIR_intpin pe_intpin[4];
u_int8_t pe_slot;
u_int8_t pe_res3;
} __attribute__ ((packed));
struct PIR_table
{
struct PIR_header pt_header;
struct PIR_entry pt_entry[0];
} __attribute__ ((packed));
/*
* Int 15:E820 'SMAP' structure
*
@ -230,4 +275,3 @@ struct bios_smap {
u_int64_t length;
u_int32_t type;
} __attribute__ ((packed));

View File

@ -50,4 +50,4 @@
extern int pci_cfgregopen(void);
extern u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes);
extern void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes);
extern int pci_cfgintr(int bus, int device, int pin);

View File

@ -219,6 +219,51 @@ extern int bios16_call(struct bios_regs *, char *);
extern int bios32(struct bios_regs *, u_int, u_short);
extern void set_bios_selectors(struct bios_segments *, int);
/*
* PCI interrupt routing table.
*
* $PIR in the BIOS segment contains a PIR_table
* int 1a:b106 returns PIR_table in buffer at es:(e)di
* int 1a:b18e returns PIR_table in buffer at es:(e)di
* int 1a:b406 returns es:di pointing to the BIOS PIR_table
*/
struct PIR_header
{
int8_t ph_signature[4];
u_int16_t ph_version;
u_int16_t ph_length;
u_int8_t ph_router_bus;
u_int8_t ph_router_dev_fn;
u_int16_t ph_pci_irqs;
u_int16_t ph_router_vendor;
u_int16_t ph_router_device;
u_int32_t ph_miniport;
u_int8_t ph_res[11];
u_int8_t ph_checksum;
} __attribute__ ((packed));
struct PIR_intpin
{
u_int8_t link;
u_int16_t irqs;
} __attribute__ ((packed));
struct PIR_entry
{
u_int8_t pe_bus;
u_int8_t pe_res1:3;
u_int8_t pe_device:5;
struct PIR_intpin pe_intpin[4];
u_int8_t pe_slot;
u_int8_t pe_res3;
} __attribute__ ((packed));
struct PIR_table
{
struct PIR_header pt_header;
struct PIR_entry pt_entry[0];
} __attribute__ ((packed));
/*
* Int 15:E820 'SMAP' structure
*
@ -230,4 +275,3 @@ struct bios_smap {
u_int64_t length;
u_int32_t type;
} __attribute__ ((packed));

View File

@ -50,4 +50,4 @@
extern int pci_cfgregopen(void);
extern u_int32_t pci_cfgregread(int bus, int slot, int func, int reg, int bytes);
extern void pci_cfgregwrite(int bus, int slot, int func, int reg, u_int32_t data, int bytes);
extern int pci_cfgintr(int bus, int device, int pin);