From: Gabe Black Date: Mon, 17 Nov 2014 08:17:06 +0000 (-0800) Subject: x86: APIC: Fix the getRegArrayBit function. X-Git-Tag: stable_2015_04_15~126 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=79e7ca307e0bb05a967652a54206d96d023c9231;p=gem5.git x86: APIC: Fix the getRegArrayBit function. The getRegArrayBit function extracts a bit from a series of registers which are treated as a single large bit array. A previous change had modified the logic which figured out which bit to extract from ">> 5" to "% 5" which seems wrong, especially when other, similar functions were changed to use "% 32". --- diff --git a/src/arch/x86/interrupts.hh b/src/arch/x86/interrupts.hh index dabee5441..b584c234b 100644 --- a/src/arch/x86/interrupts.hh +++ b/src/arch/x86/interrupts.hh @@ -180,7 +180,7 @@ class Interrupts : public BasicPioDevice, IntDevice bool getRegArrayBit(ApicRegIndex base, uint8_t vector) { - return bits(regs[base + (vector / 32)], vector % 5); + return bits(regs[base + (vector / 32)], vector % 32); } void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level);