[coreboot] New patch to review for coreboot: 91f016f Fix reading of number of interrupts for IO-APICs
Patrick Georgi (patrick@georgi-clan.de)
gerrit at coreboot.org
Fri Oct 26 15:26:15 CEST 2012
Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1624
-gerrit
commit 91f016fb77ca94e50ecb6723035bf29b1547aaf8
Author: Nico Huber <nico.huber at secunet.com>
Date: Mon Sep 24 10:48:43 2012 +0200
Fix reading of number of interrupts for IO-APICs
The number read from the io-apic register represents the index of the
highest interrupt redirection entry, i.e. the number of interrupts
minus one.
Change-Id: I54c992e4ff400de24bb9fef5d82251078f92c588
Signed-off-by: Nico Huber <nico.huber at secunet.com>
---
src/arch/x86/lib/ioapic.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/arch/x86/lib/ioapic.c b/src/arch/x86/lib/ioapic.c
index 57b99e2..018a42c 100644
--- a/src/arch/x86/lib/ioapic.c
+++ b/src/arch/x86/lib/ioapic.c
@@ -85,8 +85,11 @@ void setup_ioapic(u32 ioapic_base, u8 ioapic_id)
/* Read the available number of interrupts. */
ioapic_interrupts = (io_apic_read(ioapic_base, 0x01) >> 16) & 0xff;
- if (!ioapic_interrupts || ioapic_interrupts == 0xff)
- ioapic_interrupts = 24;
+ if (ioapic_interrupts == 0xff)
+ ioapic_interrupts = 23;
+ ioapic_interrupts += 1; /* Bits 23-16 specify the maximum redirection
+ entry, which is the number of interrupts
+ minus 1. */
printk(BIOS_DEBUG, "IOAPIC: %d interrupts\n", ioapic_interrupts);
#if CONFIG_IOAPIC_INTERRUPTS_ON_FSB
More information about the coreboot
mailing list