Update the TSC (and run the timers) on ACPI timer read and RDTSC instruction.

This commit is contained in:
OBattler
2020-05-15 07:25:20 +02:00
parent 3d278b344f
commit 8997159dde
2 changed files with 3 additions and 0 deletions

View File

@@ -125,6 +125,7 @@ acpi_reg_read_intel(int size, uint16_t addr, void *p)
case 0x08: case 0x09: case 0x0a: case 0x0b:
/* PMTMR - Power Management Timer Register (IO) */
ret = (dev->regs.timer_val >> shift32) & 0xff;
update_tsc();
break;
case 0x0c: case 0x0d:
/* GPSTS - General Purpose Status Register (IO) */
@@ -211,6 +212,7 @@ acpi_reg_read_via(int size, uint16_t addr, void *p)
case 0x08: case 0x09: case 0x0a: case 0x0b:
/* PMTMR - Power Management Timer Register (IO) */
ret = (dev->regs.timer_val >> shift32) & 0xff;
update_tsc();
break;
case 0x10: case 0x11: case 0x12: case 0x13:
/* PCNTRL - Processor Control Register (IO) */