summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/pci_x86.h
diff options
context:
space:
mode:
authorMaciej W. Rozycki <macro@orcam.me.uk>2022-03-31 08:11:05 +0100
committerThomas Gleixner <tglx@linutronix.de>2022-04-10 12:48:14 +0200
commitb584db0c84db5ed9230356d5fa6610de55d297e6 (patch)
treeb6a5142e0028459c49f7eae029d95ac4b2f1e3ff /arch/x86/include/asm/pci_x86.h
parentac7cd5e16df8696c39e29b03dfedf069a025b822 (diff)
x86/PCI: Add $IRT PIRQ routing table support
Handle the $IRT PCI IRQ Routing Table format used by AMI for its BCP (BIOS Configuration Program) external tool meant for tweaking BIOS structures without the need to rebuild it from sources[1]. The $IRT format has been invented by AMI before Microsoft has come up with its $PIR format and a $IRT table is therefore there in some systems that lack a $PIR table, such as the DataExpert EXP8449 mainboard based on the ALi FinALi 486 chipset (M1489/M1487), which predates DMI 2.0 and cannot therefore be easily identified at run time. Unlike with the $PIR format there is no alignment guarantee as to the placement of the $IRT table, so scan the whole BIOS area bytewise. Credit to Michal Necasek for helping me chase documentation for the format. References: [1] "What is BCP? - AMI", <https://www.ami.com/what-is-bcp/> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> # crosvm Link: https://lore.kernel.org/r/alpine.DEB.2.21.2203302228410.9038@angie.orcam.me.uk
Diffstat (limited to 'arch/x86/include/asm/pci_x86.h')
-rw-r--r--arch/x86/include/asm/pci_x86.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h
index a0627dfae541..1307cd689d2a 100644
--- a/arch/x86/include/asm/pci_x86.h
+++ b/arch/x86/include/asm/pci_x86.h
@@ -93,6 +93,15 @@ struct irq_routing_table {
struct irq_info slots[];
} __attribute__((packed));
+struct irt_routing_table {
+ u32 signature; /* IRT_SIGNATURE should be here */
+ u8 size; /* Number of entries provided */
+ u8 used; /* Number of entries actually used */
+ u16 exclusive_irqs; /* IRQs devoted exclusively to
+ PCI usage */
+ struct irq_info slots[];
+} __attribute__((packed));
+
extern unsigned int pcibios_irq_mask;
extern raw_spinlock_t pci_config_lock;