diff options
Diffstat (limited to 'src/arch/x86')
-rw-r--r-- | src/arch/x86/ioapic.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/arch/x86/ioapic.c b/src/arch/x86/ioapic.c index 22d979dfda..d299e6070d 100644 --- a/src/arch/x86/ioapic.c +++ b/src/arch/x86/ioapic.c @@ -35,9 +35,9 @@ unsigned int ioapic_get_max_vectors(void *ioapic_base) u8 count; reg = io_apic_read(ioapic_base, 0x01); - count = reg >> 16; + count = (reg >> 16) & 0xff; - if (!count || count == 0xff) + if (count == 0xff) count = 23; count++; @@ -54,7 +54,7 @@ void ioapic_set_max_vectors(void *ioapic_base, int mre_count) u8 count; reg = io_apic_read(ioapic_base, 0x01); - count = reg >> 16; + count = (reg >> 16) & 0xff; if (mre_count > 0) count = mre_count - 1; reg &= ~(0xff << 16); |