mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
check supportet LVT level before disabling LVT_TSR & LVT_PMV
This commit is contained in:
parent
63a19ececb
commit
beb86f75a9
1 changed files with 4 additions and 2 deletions
|
@ -1063,8 +1063,10 @@ void shutdown_system(void)
|
|||
if (if_bootprocessor)
|
||||
LOG_INFO("Disable APIC\n");
|
||||
|
||||
lapic_write(APIC_LVT_TSR, 0x10000); // disable thermal sensor interrupt
|
||||
lapic_write(APIC_LVT_PMC, 0x10000); // disable performance counter interrupt
|
||||
if (max_lvt >= 4)
|
||||
lapic_write(APIC_LVT_TSR, 0x10000); // disable thermal sensor interrupt
|
||||
if (max_lvt >= 5)
|
||||
lapic_write(APIC_LVT_PMC, 0x10000); // disable performance counter interrupt
|
||||
lapic_write(APIC_SVR, 0x00); // disable the apic
|
||||
|
||||
// disable x2APIC
|
||||
|
|
Loading…
Add table
Reference in a new issue