From 529ccd79448e3873cb474fac6860ab74f02da1f3 Mon Sep 17 00:00:00 2001 From: "Zheng, Gen" Date: Mon, 23 Apr 2018 15:49:48 +0800 Subject: [PATCH] UEFI: bug fix on redundant waking up APs Due to redundant waking up APs When rebooting UOS, the crash occurs and fail to reboot UOS. Signed-off-by: Zheng, Gen Acked-by: Eddie Dong --- hypervisor/bsp/uefi/uefi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hypervisor/bsp/uefi/uefi.c b/hypervisor/bsp/uefi/uefi.c index 5d549e511..88514f6bb 100644 --- a/hypervisor/bsp/uefi/uefi.c +++ b/hypervisor/bsp/uefi/uefi.c @@ -104,6 +104,12 @@ void efi_deferred_wakeup_pcpu(int cpu_id) { uint32_t timeout; uint32_t expected_up; + static uint32_t waked_pcpu_bitmap; + + if ((1 << cpu_id) & waked_pcpu_bitmap) + return; + + waked_pcpu_bitmap |= 1 << cpu_id; expected_up = up_count + 1;