Re: [PATCH v2 2/4 gnumach] Add HPET timer for small accurate delays

2024-02-06 Thread Samuel Thibault
Damien Zammit, le mar. 06 févr. 2024 03:06:20 +, a ecrit: > +us = (us * NSEC_PER_USEC) / hpet_period_nsec; > + > +start = HPET32(HPET_COUNTER); > + > +while (1) { > +now = HPET32(HPET_COUNTER); > + > +if (now < start) { > +/* handle timer overflow within

[PATCH v2 2/4 gnumach] Add HPET timer for small accurate delays

2024-02-05 Thread Damien Zammit
TESTED: This works in qemu correctly TESTED: This works on an AMD board with ACPI v2.0 correctly --- i386/i386/apic.c | 97 +++ i386/i386/apic.h | 5 ++ i386/i386at/acpi_parse_apic.c | 35 ++--- i386/i386at/acpi_parse_apic.h | 23 +