Use C99 types.
MFC after: 3 weeks
This commit is contained in:
parent
6774121741
commit
842259405d
@ -48,34 +48,34 @@
|
||||
#define PIR_FUNC(x) ((x) & 0x7)
|
||||
|
||||
typedef struct {
|
||||
u_int8_t bus; /* bus number of this device */
|
||||
u_int8_t devfunc; /* only upper 5 device bits valid */
|
||||
u_int8_t inta_link; /* how INTA is linked */
|
||||
u_int16_t inta_irqs; /* how INTA may be routed (bitset) */
|
||||
u_int8_t intb_link;
|
||||
u_int16_t intb_irqs;
|
||||
u_int8_t intc_link;
|
||||
u_int16_t intc_irqs;
|
||||
u_int8_t intd_link;
|
||||
u_int16_t intd_irqs; /* how this pin may be routed */
|
||||
u_int8_t slot; /* physical slot number on bus,
|
||||
uint8_t bus; /* bus number of this device */
|
||||
uint8_t devfunc; /* only upper 5 device bits valid */
|
||||
uint8_t inta_link; /* how INTA is linked */
|
||||
uint16_t inta_irqs; /* how INTA may be routed (bitset) */
|
||||
uint8_t intb_link;
|
||||
uint16_t intb_irqs;
|
||||
uint8_t intc_link;
|
||||
uint16_t intc_irqs;
|
||||
uint8_t intd_link;
|
||||
uint16_t intd_irqs; /* how this pin may be routed */
|
||||
uint8_t slot; /* physical slot number on bus,
|
||||
* slot 0 if motherboard */
|
||||
u_int8_t reserved00; /* must be zero */
|
||||
uint8_t reserved00; /* must be zero */
|
||||
} __packed pir_entry_t;
|
||||
|
||||
typedef struct {
|
||||
u_int32_t signature; /* $PIR */
|
||||
u_int8_t minor; /* minor version (0) */
|
||||
u_int8_t major; /* major version (1) */
|
||||
u_int16_t size; /* total size of table */
|
||||
u_int8_t bus; /* Bus number of router */
|
||||
u_int8_t devfunc; /* Dev/Func of router */
|
||||
u_int16_t excl_irqs; /* PCI Exclusive IRQs */
|
||||
u_int32_t compatible; /* Device/Vendor ID of a register
|
||||
uint32_t signature; /* $PIR */
|
||||
uint8_t minor; /* minor version (0) */
|
||||
uint8_t major; /* major version (1) */
|
||||
uint16_t size; /* total size of table */
|
||||
uint8_t bus; /* Bus number of router */
|
||||
uint8_t devfunc; /* Dev/Func of router */
|
||||
uint16_t excl_irqs; /* PCI Exclusive IRQs */
|
||||
uint32_t compatible; /* Device/Vendor ID of a register
|
||||
* compatible PCI IRQ router device */
|
||||
u_int32_t miniport_data; /* Windows specific */
|
||||
u_int8_t reserved00[11]; /* Must be zero */
|
||||
u_int8_t checksum; /* Inverse mod-256 sum of table bytes */
|
||||
uint32_t miniport_data; /* Windows specific */
|
||||
uint8_t reserved00[11]; /* Must be zero */
|
||||
uint8_t checksum; /* Inverse mod-256 sum of table bytes */
|
||||
pir_entry_t entry[1]; /* 1..N device entries */
|
||||
} __packed pir_table_t;
|
||||
|
||||
|
@ -56,10 +56,10 @@ void usage(void);
|
||||
void banner(void);
|
||||
pir_table_t *find_pir_table(unsigned char *base);
|
||||
void dump_pir_table(pir_table_t *pir, char *map_addr);
|
||||
void pci_print_irqmask(u_int16_t irqs);
|
||||
void print_irq_line(int entry, pir_entry_t *p, char line, u_int8_t link,
|
||||
u_int16_t irqs);
|
||||
char *lookup_southbridge(u_int32_t id);
|
||||
void pci_print_irqmask(uint16_t irqs);
|
||||
void print_irq_line(int entry, pir_entry_t *p, char line, uint8_t link,
|
||||
uint16_t irqs);
|
||||
char *lookup_southbridge(uint32_t id);
|
||||
|
||||
char *progname = NULL;
|
||||
|
||||
@ -182,7 +182,7 @@ find_pir_table(unsigned char *base)
|
||||
}
|
||||
|
||||
void
|
||||
pci_print_irqmask(u_int16_t irqs)
|
||||
pci_print_irqmask(uint16_t irqs)
|
||||
{
|
||||
int i, first;
|
||||
|
||||
@ -215,7 +215,7 @@ dump_pir_table(pir_table_t *pir, char *map_addr)
|
||||
"0x%02x: Version: %u.%u\r\n"
|
||||
"0x%02x: Size: %u bytes (%u entries)\r\n"
|
||||
"0x%02x: Device: %u:%u:%u\r\n",
|
||||
(u_int32_t)(((char *)pir - map_addr) + PIR_BASE),
|
||||
(uint32_t)(((char *)pir - map_addr) + PIR_BASE),
|
||||
offsetof(pir_table_t, signature),
|
||||
((char *)&pir->signature)[0],
|
||||
((char *)&pir->signature)[1],
|
||||
@ -262,8 +262,8 @@ dump_pir_table(pir_table_t *pir, char *map_addr)
|
||||
* Print interrupt map for a given PCI interrupt line.
|
||||
*/
|
||||
void
|
||||
print_irq_line(int entry, pir_entry_t *p, char line, u_int8_t link,
|
||||
u_int16_t irqs)
|
||||
print_irq_line(int entry, pir_entry_t *p, char line, uint8_t link,
|
||||
uint16_t irqs)
|
||||
{
|
||||
|
||||
if (link == 0)
|
||||
@ -285,7 +285,7 @@ print_irq_line(int entry, pir_entry_t *p, char line, u_int8_t link,
|
||||
* Lookup textual descriptions for commonly-used south-bridges.
|
||||
*/
|
||||
char *
|
||||
lookup_southbridge(u_int32_t id)
|
||||
lookup_southbridge(uint32_t id)
|
||||
{
|
||||
|
||||
switch (id) {
|
||||
|
Loading…
Reference in New Issue
Block a user