From a92a07d9c0a6079818385de78930a69459e4ee8a Mon Sep 17 00:00:00 2001 From: Ronald G Minnich Date: Thu, 9 Jul 2020 08:23:58 -0700 Subject: libpayload: allow nonblocking delay and more than one delay Extend the local APIC timer delay so that it can be started, and waited for, independently. Add an EOI so that more than one APIC timer interrupt is possible. Previous to this, because there was no EOI, the first timer interrupt the CPU took was also the last it would take -- apic_delay would only work one time. Change-Id: Ib11aeee5b7da81287166ac68fc327e7ae62d1b84 Signed-off-by: Ronald G Minnich Reviewed-on: https://review.coreboot.org/c/coreboot/+/43323 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks Reviewed-by: Philipp Deppenwiese --- payloads/libpayload/include/x86/arch/apic.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'payloads/libpayload/include') diff --git a/payloads/libpayload/include/x86/arch/apic.h b/payloads/libpayload/include/x86/arch/apic.h index 3c9877cb54..eedf1b4b2b 100644 --- a/payloads/libpayload/include/x86/arch/apic.h +++ b/payloads/libpayload/include/x86/arch/apic.h @@ -40,5 +40,7 @@ uint8_t apic_id(void); void apic_eoi(uint8_t vector); void apic_delay(unsigned int usec); +void apic_start_delay(unsigned int usec); +void apic_wait_delay(void); #endif /* __ARCH_X86_INCLUDES_ARCH_APIC_H__ */ -- cgit v1.2.3