mirror of
https://github.com/memtest86plus/memtest86plus.git
synced 2024-11-27 01:50:20 -06:00
Fix APIC Timer detection fail on some modern mobile/embedded PCH
On some modern ULV cores (eg: Gracemont), the 2 following I/O reads to check APIC Timer working status are fused in the frontend, leading to the same value being reported twice and the code falling back to the (unusually disabled on these platforms) PIT timer. Whether this behavior is intentional or not is unknown. As usleep/sleep is not available at this point, a dirty delay is added between the two reads.
This commit is contained in:
parent
bfbb167a72
commit
fa4e903509
@ -18,7 +18,6 @@
|
||||
|
||||
#define PIT_TICKS_50mS 59659 // PIT clock is 1.193182MHz
|
||||
#define APIC_TICKS_50mS 178977 // APIC clock is 3.579545MHz
|
||||
#define BENCH_MIN_START_ADR 0x1000000 // 16MB
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Private Functions
|
||||
@ -39,6 +38,9 @@ static void correct_tsc(void)
|
||||
|
||||
counter = inl(acpi_config.pm_addr);
|
||||
|
||||
// Generate a dirty delay
|
||||
for(volatile uint8_t i=0; i<100u; i++);
|
||||
|
||||
// Make sure counter is incrementing
|
||||
if (inl(acpi_config.pm_addr) > counter) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user