1
0
Fork 0
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:
Stefan Lankes 2017-07-31 01:23:13 +02:00
parent 5edcde3cd4
commit a992690237

View file

@ -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)