From 8af0fd53c1a6b55fe734b68f3174cdc248e648a3 Mon Sep 17 00:00:00 2001 From: Mikhail Krichanov Date: Wed, 29 May 2024 14:24:52 +0300 Subject: [PATCH] SysCall: Fixed random crashes of QEMU. --- MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S b/MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S index f570b318e6..e0a27b930e 100644 --- a/MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S +++ b/MdeModulePkg/Core/Dxe/SysCall/AARCH64/CoreBootServices.S @@ -112,6 +112,9 @@ ASM_FUNC(ArmCallRing3) ASM_FUNC(ReturnToCore) // Switch to Core Stack. mov sp, x1 + // Zero Exception Syndrome Register to prevent QEMU from random crashing. + mov x1, #0 + msr esr_el1, x1 // Restore Stack. ldp x29, x30, [sp] add sp, sp, #0x10