diff --git a/src/arch/i386/include/arch/pirq_routing.h b/src/arch/i386/include/arch/pirq_routing.h index 3ebabcfb37..0660b7f8ef 100644 --- a/src/arch/i386/include/arch/pirq_routing.h +++ b/src/arch/i386/include/arch/pirq_routing.h @@ -26,11 +26,15 @@ struct irq_routing_table { u32 miniport_data; /* Crap */ u8 rfu[11]; u8 checksum; /* Modulo 256 checksum must give zero */ -#if GCC_VERSION < 3000 +#ifndef IRQ_SLOT_COUNT +#if (__GNUC__ < 3) struct irq_info slots[1]; #else struct irq_info slots[]; -#endif +#endif // __GNUC__ < 3 +#else + struct irq_info slots[IRQ_SLOT_COUNT]; +#endif // ! IRQ_SLOT_COUNT } __attribute__((packed)); extern const struct irq_routing_table intel_irq_routing_table; diff --git a/src/arch/i386/lib/Config b/src/arch/i386/lib/Config index ae927bec89..3503bd1fb6 100644 --- a/src/arch/i386/lib/Config +++ b/src/arch/i386/lib/Config @@ -1,6 +1,7 @@ object i386_subr.o object params.o object hardwaremain.o +object c_start.S object pirq_routing.o HAVE_PIRQ_TABLE object vgabios.o CONFIG_VGABIOS object idt.o CONFIG_REALMODE_IDT diff --git a/src/mainboard/supermicro/p4dpr/irq_tables.c b/src/mainboard/supermicro/p4dpr/irq_tables.c index 0c23b742a9..eb23d3710d 100644 --- a/src/mainboard/supermicro/p4dpr/irq_tables.c +++ b/src/mainboard/supermicro/p4dpr/irq_tables.c @@ -1,5 +1,5 @@ /* PCI: Interrupt Routing Table found at 0x4011ce40 size = 416 */ - +#define IRQ_SLOT_COUNT 24 #include const struct irq_routing_table intel_irq_routing_table = { diff --git a/util/getpir/checkpir.c b/util/getpir/checkpir.c index abe2d65d6d..3a88e05566 100644 --- a/util/getpir/checkpir.c +++ b/util/getpir/checkpir.c @@ -16,7 +16,7 @@ #define PIRQ_SIGNATURE (('$' << 0) + ('P' << 8) + ('I' << 16) + ('R' << 24)) #define PIRQ_VERS 0x0100 -extern struct irq_routing_table intel_irq_routing_table; +//extern struct irq_routing_table intel_irq_routing_table; struct irq_info se_arr[50]; struct irq_routing_table *rt; diff --git a/util/mptable/mptable.c b/util/mptable/mptable.c index a1b9f2b167..c6d50d4053 100644 --- a/util/mptable/mptable.c +++ b/util/mptable/mptable.c @@ -83,6 +83,8 @@ static const char rcsid[] = #define MAXPNSTR 132 +#define LINUXBIOS_MP_TABLE 0 + enum busTypes { CBUS = 1, CBUSII = 2, @@ -342,7 +344,7 @@ char *postamble[] = { " /* Compute the checksums */", " mc->mpe_checksum = smp_compute_checksum(smp_next_mpc_entry(mc), mc->mpe_length);", " mc->mpc_checksum = smp_compute_checksum(mc, mc->mpc_length);", -" printk_debug(\"Wrote the mp table end at: %p - %p\n\",", +" printk_debug(\"Wrote the mp table end at: %p - %p\\n\",", " mc, smp_next_mpe_entry(mc));", " return smp_next_mpe_entry(mc);", "}", @@ -531,6 +533,23 @@ apic_probe( vm_offset_t* paddr, int* where ) printf( "NOT found\n" ); } + target = 0; + segment = 0; + if ( verbose ) + printf( " searching for LinuxBIOS MP table @ 0x%08x (%dK)\n", + target, segment ); + seekEntry( target ); + readEntry( buffer, ONE_KBYTE ); + + for ( x = 0; x < ONE_KBYTE / sizeof ( unsigned int ); NEXT(x) ) { + if ( buffer[ x ] == MP_SIG ) { + *where = 2; + *paddr = (x * sizeof( unsigned int )) + target; + return; + } + } + + /* read CMOS for real top of mem */ seekEntry( (vm_offset_t)TOPOFMEM_POINTER ); readEntry( &segment, 2 );