diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2013-09-14 22:22:28 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2013-09-18 20:48:34 -0400 |
commit | c5e06fb2452476e45dbae2d9f72bec7d2e874266 (patch) | |
tree | 682e705e74fce3876efddb87539b1b771cebe9d7 | |
parent | 836ec5cd0066188e191c892b87cb473221a0b570 (diff) | |
download | seabios-c5e06fb2452476e45dbae2d9f72bec7d2e874266.tar.gz |
Move pirtable definitions from hw/pci.h to std/pirtable.h and util.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r-- | src/fw/biostables.c | 2 | ||||
-rw-r--r-- | src/fw/pirtable.c | 2 | ||||
-rw-r--r-- | src/hw/pci.h | 40 | ||||
-rw-r--r-- | src/pcibios.c | 1 | ||||
-rw-r--r-- | src/std/pirtable.h | 35 | ||||
-rw-r--r-- | src/util.h | 4 |
6 files changed, 42 insertions, 42 deletions
diff --git a/src/fw/biostables.c b/src/fw/biostables.c index 8fa9fac6..a51e8eeb 100644 --- a/src/fw/biostables.c +++ b/src/fw/biostables.c @@ -6,11 +6,11 @@ #include "acpi.h" // struct rsdp_descriptor #include "config.h" // CONFIG_* -#include "hw/pci.h" // struct pir_header #include "malloc.h" // malloc_fseg #include "mptable.h" // MPTABLE_SIGNATURE #include "output.h" // dprintf #include "smbios.h" // struct smbios_entry_point +#include "std/pirtable.h" // struct pir_header #include "string.h" // memcpy #include "util.h" // copy_table diff --git a/src/fw/pirtable.c b/src/fw/pirtable.c index bd4a6aa4..ee2659dd 100644 --- a/src/fw/pirtable.c +++ b/src/fw/pirtable.c @@ -6,8 +6,8 @@ // This file may be distributed under the terms of the GNU LGPLv3 license. #include "config.h" // CONFIG_* -#include "hw/pci.h" // struct pir_header #include "output.h" // dprintf +#include "std/pirtable.h" // struct pir_header #include "string.h" // checksum struct pir_header *PirAddr VARFSEG; diff --git a/src/hw/pci.h b/src/hw/pci.h index 7760d212..8fccefcf 100644 --- a/src/hw/pci.h +++ b/src/hw/pci.h @@ -118,44 +118,4 @@ void pci_reboot(void); u32 pci_readl(u32 addr); void pci_writel(u32 addr, u32 val); -// pirtable.c -void pirtable_setup(void); - - -/**************************************************************** - * PIR table - ****************************************************************/ - -struct link_info { - u8 link; - u16 bitmap; -} PACKED; - -struct pir_slot { - u8 bus; - u8 dev; - struct link_info links[4]; - u8 slot_nr; - u8 reserved; -} PACKED; - -struct pir_header { - u32 signature; - u16 version; - u16 size; - u8 router_bus; - u8 router_devfunc; - u16 exclusive_irqs; - u32 compatible_devid; - u32 miniport_data; - u8 reserved[11]; - u8 checksum; - struct pir_slot slots[0]; -} PACKED; - -extern struct pir_header *PirAddr; - -#define PIR_SIGNATURE 0x52495024 // $PIR - - #endif diff --git a/src/pcibios.c b/src/pcibios.c index 8e7e1f97..7e5d972d 100644 --- a/src/pcibios.c +++ b/src/pcibios.c @@ -10,6 +10,7 @@ #include "hw/pci.h" // pci_config_readl #include "hw/pci_regs.h" // PCI_VENDOR_ID #include "output.h" // dprintf +#include "std/pirtable.h" // struct pir_header #include "string.h" // checksum #include "util.h" // handle_1ab1 diff --git a/src/std/pirtable.h b/src/std/pirtable.h new file mode 100644 index 00000000..9de3a438 --- /dev/null +++ b/src/std/pirtable.h @@ -0,0 +1,35 @@ +#ifndef __PIRTABLE_H +#define __PIRTABLE_H + +#include "types.h" // u32 + +struct link_info { + u8 link; + u16 bitmap; +} PACKED; + +struct pir_slot { + u8 bus; + u8 dev; + struct link_info links[4]; + u8 slot_nr; + u8 reserved; +} PACKED; + +struct pir_header { + u32 signature; + u16 version; + u16 size; + u8 router_bus; + u8 router_devfunc; + u16 exclusive_irqs; + u32 compatible_devid; + u32 miniport_data; + u8 reserved[11]; + u8 checksum; + struct pir_slot slots[0]; +} PACKED; + +#define PIR_SIGNATURE 0x52495024 // $PIR + +#endif // pirtable.h @@ -60,6 +60,10 @@ void qemu_prep_reset(void); extern const u8 pci_irqs[4]; void pci_setup(void); +// fw/pirtable.c +extern struct pir_header *PirAddr; +void pirtable_setup(void); + // fw/smm.c void smm_device_setup(void); void smm_setup(void); |