mirror of
https://github.com/hermitcore/libhermit.git
synced 2025-03-09 00:00:03 +01:00
determine the current LVT level before checking the level
This commit is contained in:
parent
5edcde3cd4
commit
a992690237
1 changed files with 2 additions and 0 deletions
|
@ -1041,6 +1041,7 @@ static void apic_err_handler(struct state *s)
|
|||
void shutdown_system(void)
|
||||
{
|
||||
int if_bootprocessor = (boot_processor == apic_cpu_id());
|
||||
uint32_t max_lvt;
|
||||
|
||||
irq_disable();
|
||||
|
||||
|
@ -1063,6 +1064,7 @@ void shutdown_system(void)
|
|||
if (if_bootprocessor)
|
||||
LOG_INFO("Disable APIC\n");
|
||||
|
||||
max_lvt = apic_lvt_entries();
|
||||
if (max_lvt >= 4)
|
||||
lapic_write(APIC_LVT_TSR, 0x10000); // disable thermal sensor interrupt
|
||||
if (max_lvt >= 5)
|
||||
|
|
Loading…
Add table
Reference in a new issue