diff options
author | Damien Zammit <damien@zamaudio.com> | 2024-02-07 05:02:19 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-02-08 00:28:25 +0100 |
commit | 25315a5716c70922ba8fd2c821b70abd101f80f5 (patch) | |
tree | 87e7269fb89eeaa8b6eb0353406e0f0342b0922a /i386 | |
parent | caa07fdb903c6d533ce6dad1a66907d862e162ad (diff) | |
download | gnumach-25315a5716c70922ba8fd2c821b70abd101f80f5.tar.gz gnumach-25315a5716c70922ba8fd2c821b70abd101f80f5.tar.bz2 gnumach-25315a5716c70922ba8fd2c821b70abd101f80f5.zip |
smp: Use HPET instead of pit one-shot that is unreliable
NB: Every x86 board that uses ACPI most likely has a HPET since 2005.
We can roll back to PIT in the cases where its not present,
but the PIT one shot code is definitely currently broken.
Message-ID: <20240207050158.1640853-4-damien@zamaudio.com>
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/smp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/i386/i386/smp.c b/i386/i386/smp.c index fb43ecb6..87f59913 100644 --- a/i386/i386/smp.c +++ b/i386/i386/smp.c @@ -21,7 +21,6 @@ #include <i386/apic.h> #include <i386/smp.h> #include <i386/cpu.h> -#include <i386/pit.h> #include <i386at/idt.h> #include <i386at/acpi_parse_apic.h> #include <kern/printf.h> @@ -101,7 +100,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector) } while(lapic->icr_low.delivery_status == SEND_PENDING); /* Wait 10 msec */ - pit_mdelay(10); + hpet_mdelay(10); /* Clear APIC errors */ lapic->error_status.r = 0; @@ -110,7 +109,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector) apic_send_ipi(NO_SHORTHAND, STARTUP, PHYSICAL, ASSERT, LEVEL, vector >> 12, apic_id); /* Wait 200 usec */ - pit_udelay(200); + hpet_udelay(200); /* Wait for delivery */ do { @@ -121,7 +120,7 @@ void smp_startup_cpu(unsigned apic_id, unsigned vector) apic_send_ipi(NO_SHORTHAND, STARTUP, PHYSICAL, ASSERT, LEVEL, vector >> 12, apic_id); /* Wait 200 usec */ - pit_udelay(200); + hpet_udelay(200); /* Wait for delivery */ do { |