mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 08:17:35 +00:00
Kernel: Change the Spurious Interrupt Handler offset in the APIC
The Spurious Interrupt Handler number that is written to APIC_REG_SIV is correct now.
This commit is contained in:
parent
f7b207c7ae
commit
7c859efa85
1 changed files with 2 additions and 1 deletions
|
@ -159,6 +159,7 @@ void eoi()
|
||||||
|
|
||||||
bool init()
|
bool init()
|
||||||
{
|
{
|
||||||
|
// FIXME: Use the ACPI MADT table
|
||||||
if (!MSR::have())
|
if (!MSR::have())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -189,7 +190,7 @@ void enable(u32 cpu)
|
||||||
// dummy read, apparently to avoid a bug in old CPUs.
|
// dummy read, apparently to avoid a bug in old CPUs.
|
||||||
read_register(APIC_REG_SIV);
|
read_register(APIC_REG_SIV);
|
||||||
// set spurious interrupt vector
|
// set spurious interrupt vector
|
||||||
write_register(APIC_REG_SIV, IRQ_APIC_SPURIOUS | 0x100);
|
write_register(APIC_REG_SIV, (IRQ_APIC_SPURIOUS + IRQ_VECTOR_BASE) | 0x100);
|
||||||
|
|
||||||
// local destination mode (flat mode)
|
// local destination mode (flat mode)
|
||||||
write_register(APIC_REG_DF, 0xf0000000);
|
write_register(APIC_REG_DF, 0xf0000000);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue