X86: Fix the functions that manipulate large bit arrays in the local APIC.

This commit is contained in:
Gabe Black 2009-04-19 13:47:15 -07:00
parent eee74ba427
commit 089b384086

View file

@ -172,19 +172,19 @@ class Interrupts : public BasicPioDevice, IntDev
void
setRegArrayBit(ApicRegIndex base, uint8_t vector)
{
regs[base + (vector % 32)] |= (1 << (vector >> 5));
regs[base + (vector / 32)] |= (1 << (vector % 32));
}
void
clearRegArrayBit(ApicRegIndex base, uint8_t vector)
{
regs[base + (vector % 32)] &= ~(1 << (vector >> 5));
regs[base + (vector / 32)] &= ~(1 << (vector % 32));
}
bool
getRegArrayBit(ApicRegIndex base, uint8_t vector)
{
return bits(regs[base + (vector % 32)], vector >> 5);
return bits(regs[base + (vector / 32)], vector % 5);
}
void requestInterrupt(uint8_t vector, uint8_t deliveryMode, bool level);