summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2004-06-07 10:25:42 +0000
committerStefan Reinauer <stepan@openbios.org>2004-06-07 10:25:42 +0000
commit0b607b39baa652ada1f749e4f4488d6bf450d3c0 (patch)
tree31afafc9a67c3973bb7ad511e176bd5c75156f92 /src/arch
parentab8ff84402e97d544b519ec17a2ee184651b8af6 (diff)
downloadcoreboot-0b607b39baa652ada1f749e4f4488d6bf450d3c0.tar.xz
simplify pirq handling. Only apply consistency fixes on the copied version
of the pirq table. git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1604 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/i386/boot/pirq_routing.c28
-rw-r--r--src/arch/i386/boot/tables.c1
-rw-r--r--src/arch/i386/include/arch/pirq_routing.h6
3 files changed, 13 insertions, 22 deletions
diff --git a/src/arch/i386/boot/pirq_routing.c b/src/arch/i386/boot/pirq_routing.c
index 52e76a77eb..f1119025c8 100644
--- a/src/arch/i386/boot/pirq_routing.c
+++ b/src/arch/i386/boot/pirq_routing.c
@@ -3,29 +3,24 @@
#include <string.h>
#if (DEBUG==1 && HAVE_PIRQ_TABLE==1)
-void check_pirq_routing_table(void)
+static void check_pirq_routing_table(struct irq_routing_table *rt)
{
- const uint8_t *addr;
- const struct irq_routing_table *rt;
+ uint8_t *addr = (uint8_t *)rt;
+ uint8_t sum=0;
int i;
- uint8_t sum;
- printk_info("Checking IRQ routing tables...\n");
+ printk_info("Checking IRQ routing table consistency...\n");
#if defined(IRQ_SLOT_COUNT)
- if (sizeof(intel_irq_routing_table) != intel_irq_routing_table.size) {
+ if (sizeof(struct irq_routing_table) != rt->size) {
printk_warning("Inconsistent IRQ routing table size (0x%x/0x%x)\n",
- sizeof(intel_irq_routing_table),
- intel_irq_routing_table.size
+ sizeof(struct irq_routing_table),
+ rt->size
);
- intel_irq_routing_table.size=sizeof(intel_irq_routing_table);
+ rt->size=sizeof(struct irq_routing_table);
}
#endif
- rt = &intel_irq_routing_table;
- addr = (uint8_t *)rt;
-
- sum = 0;
for (i = 0; i < rt->size; i++)
sum += addr[i];
@@ -43,7 +38,7 @@ void check_pirq_routing_table(void)
}
if (rt->signature != PIRQ_SIGNATURE || rt->version != PIRQ_VERSION ||
- rt->size % 16 || rt->size < sizeof(struct irq_routing_table)) {
+ rt->size % 16 ) {
printk_warning("%s:%6d:%s() - "
"Interrupt Routing Table not valid\n",
__FILE__, __LINE__, __FUNCTION__);
@@ -63,7 +58,7 @@ void check_pirq_routing_table(void)
printk_info("done.\n");
}
-int verify_copy_pirq_routing_table(unsigned long addr)
+static int verify_copy_pirq_routing_table(unsigned long addr)
{
int i;
uint8_t *rt_orig, *rt_curr;
@@ -78,6 +73,9 @@ int verify_copy_pirq_routing_table(unsigned long addr)
}
}
printk_info("done\n");
+
+ check_pirq_routing_table((struct irq_routing_table *)addr);
+
return 0;
}
#else
diff --git a/src/arch/i386/boot/tables.c b/src/arch/i386/boot/tables.c
index b7e4024f5d..c7dcb030a3 100644
--- a/src/arch/i386/boot/tables.c
+++ b/src/arch/i386/boot/tables.c
@@ -46,7 +46,6 @@ struct lb_memory *write_tables(struct mem_range *mem, unsigned long *processor_m
low_table_end = 16;
post_code(0x9a);
- check_pirq_routing_table();
/* This table must be betweeen 0xf0000 & 0x100000 */
rom_table_end = copy_pirq_routing_table(rom_table_end);
diff --git a/src/arch/i386/include/arch/pirq_routing.h b/src/arch/i386/include/arch/pirq_routing.h
index 9f7059f27c..f4dbe78b19 100644
--- a/src/arch/i386/include/arch/pirq_routing.h
+++ b/src/arch/i386/include/arch/pirq_routing.h
@@ -39,12 +39,6 @@ struct irq_routing_table {
extern const struct irq_routing_table intel_irq_routing_table;
-#if (DEBUG==1 && HAVE_PIRQ_TABLE==1)
-void check_pirq_routing_table(void);
-#else
-#define check_pirq_routing_table() do {} while(0)
-#endif
-
#if HAVE_PIRQ_TABLE==1
unsigned long copy_pirq_routing_table(unsigned long start);
#else