this fixes 3 of 4 mainboards failed by the error on missing IRQ_SLOT_COUNT.
The third, MSI MS9652, creates an IRQ table on the fly, no kidding. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5322 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
parent
8e726b7363
commit
7ac3df8ae2
@ -1,19 +1,20 @@
|
|||||||
#ifndef ARCH_PIRQ_ROUTING_H
|
#ifndef ARCH_PIRQ_ROUTING_H
|
||||||
#define ARCH_PIRQ_ROUTING_H
|
#define ARCH_PIRQ_ROUTING_H
|
||||||
|
|
||||||
|
#if CONFIG_GENERATE_PIRQ_TABLE==1
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
|
#define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24))
|
||||||
#define PIRQ_VERSION 0x0100
|
#define PIRQ_VERSION 0x0100
|
||||||
|
|
||||||
struct irq_info {
|
struct irq_info {
|
||||||
uint8_t bus, devfn; /* Bus, device and function */
|
u8 bus, devfn; /* Bus, device and function */
|
||||||
struct {
|
struct {
|
||||||
uint8_t link; /* IRQ line ID, chipset dependent, 0=not routed */
|
u8 link; /* IRQ line ID, chipset dependent, 0=not routed */
|
||||||
uint16_t bitmap; /* Available IRQs */
|
u16 bitmap; /* Available IRQs */
|
||||||
} __attribute__((packed)) irq[4];
|
} __attribute__((packed)) irq[4];
|
||||||
uint8_t slot; /* Slot number, 0=onboard */
|
u8 slot; /* Slot number, 0=onboard */
|
||||||
uint8_t rfu;
|
u8 rfu;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
#if !defined(CONFIG_IRQ_SLOT_COUNT)
|
#if !defined(CONFIG_IRQ_SLOT_COUNT)
|
||||||
@ -21,29 +22,30 @@ struct irq_info {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct irq_routing_table {
|
struct irq_routing_table {
|
||||||
uint32_t signature; /* PIRQ_SIGNATURE should be here */
|
u32 signature; /* PIRQ_SIGNATURE should be here */
|
||||||
uint16_t version; /* PIRQ_VERSION */
|
u16 version; /* PIRQ_VERSION */
|
||||||
uint16_t size; /* Table size in bytes */
|
u16 size; /* Table size in bytes */
|
||||||
uint8_t rtr_bus, rtr_devfn; /* Where the interrupt router lies */
|
u8 rtr_bus, rtr_devfn; /* Where the interrupt router lies */
|
||||||
uint16_t exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
|
u16 exclusive_irqs; /* IRQs devoted exclusively to PCI usage */
|
||||||
uint16_t rtr_vendor, rtr_device; /* Vendor and device ID of interrupt router */
|
u16 rtr_vendor, rtr_device;/* Vendor/device ID of interrupt router */
|
||||||
uint32_t miniport_data; /* Crap */
|
u32 miniport_data;
|
||||||
uint8_t rfu[11];
|
u8 rfu[11];
|
||||||
uint8_t checksum; /* Modulo 256 checksum must give zero */
|
u8 checksum; /* Modulo 256 checksum must give zero */
|
||||||
struct irq_info slots[CONFIG_IRQ_SLOT_COUNT];
|
struct irq_info slots[CONFIG_IRQ_SLOT_COUNT];
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
|
|
||||||
extern const struct irq_routing_table intel_irq_routing_table;
|
extern const struct irq_routing_table intel_irq_routing_table;
|
||||||
|
|
||||||
#if CONFIG_GENERATE_PIRQ_TABLE==1
|
|
||||||
unsigned long copy_pirq_routing_table(unsigned long start);
|
unsigned long copy_pirq_routing_table(unsigned long start);
|
||||||
unsigned long write_pirq_routing_table(unsigned long start);
|
unsigned long write_pirq_routing_table(unsigned long start);
|
||||||
|
|
||||||
#if CONFIG_PIRQ_ROUTE==1
|
#if CONFIG_PIRQ_ROUTE==1
|
||||||
void pirq_routing_irqs(unsigned long start);
|
void pirq_routing_irqs(unsigned long start);
|
||||||
void pirq_assign_irqs(const unsigned char pIntAtoD[4]);
|
void pirq_assign_irqs(const unsigned char pIntAtoD[4]);
|
||||||
#else
|
#else
|
||||||
#define pirq_routing_irqs(start) {}
|
#define pirq_routing_irqs(start) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define copy_pirq_routing_table(start) (start)
|
#define copy_pirq_routing_table(start) (start)
|
||||||
#define write_pirq_routing_table(start) (start)
|
#define write_pirq_routing_table(start) (start)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user