Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [aarch64][QEMU_EFI] After CoreExitBootServices execution, the following error occurred: Instruction abort: Translation fault, third level #10656

Open
2 of 5 tasks
sprdcyp opened this issue Jan 22, 2025 · 0 comments
Labels
package:armvirtpkg priority:high Significant impact. Should be fixed as soon as possible. state:needs-maintainer-feedback state:needs-triage type:bug Something isn't working

Comments

@sprdcyp
Copy link

sprdcyp commented Jan 22, 2025

Is there an existing issue for this?

  • I have searched existing issues

Bug Type

  • Firmware
  • Tool
  • Unit Test

Code first?

  • Yes

What packages are impacted?

ArmVirtPkg

Which targets are impacted by this bug?

No response

Current Behavior

I use QEMU_EFI to start xen, and when xen calls:
status = SystemTable->BootServices->ExitBootServices(ImageHandle,
map_key);

DxeMain.c CoreExitBootServices function execution and the Status is 0, and then happen Synchronous Exception, the log as follow:

CoreExitBootServices
SetUefiImageMemoryAttributes - 0x00000000BFE60000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BF5C0000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BF570000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BF400000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BF280000 - 0x0000000000040000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BFE20000 - 0x0000000000030000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BF1A0000 - 0x0000000000030000 (0x0000000000000008)
SetUefiImageMemoryAttributes - 0x00000000BF160000 - 0x0000000000030000 (0x0000000000000008)
CoreExitBootServices end Status :0.

Synchronous Exception at 0x0000000000000000
PC 0x000000000000
PC 0x0000BE673BE4 (0x0000BE660000+0x00013BE4) [ 1] Shell.dll
PC 0x0000BE48EAF4
PC 0x0000BE48ED08
PC 0x0000BE492418
PC 0x00004781844C (0x000047811000+0x0000744C) [ 2] DxeCore.dll
PC 0x0000BE6652F0 (0x0000BE660000+0x000052F0) [ 3] Shell.dll
PC 0x0000BE666FCC (0x0000BE660000+0x00006FCC) [ 3] Shell.dll
PC 0x0000BE6681F8 (0x0000BE660000+0x000081F8) [ 3] Shell.dll
PC 0x00004781844C (0x000047811000+0x0000744C) [ 4] DxeCore.dll
PC 0x0000BE8345D8 (0x0000BE82A000+0x0000A5D8) [ 5] UiApp.dll
PC 0x0000BE838C20 (0x0000BE82A000+0x0000EC20) [ 5] UiApp.dll
PC 0x0000BF54D4F4 (0x0000BF537000+0x000164F4) [ 6] SetupBrowser.dll
PC 0x0000BF542858 (0x0000BF537000+0x0000B858) [ 6] SetupBrowser.dll
PC 0x0000BE832064 (0x0000BE82A000+0x00008064) [ 7] UiApp.dll
PC 0x00004781844C (0x000047811000+0x0000744C) [ 8] DxeCore.dll
PC 0x0000BF2ED6F4 (0x0000BF2E6000+0x000076F4) [ 9] BdsDxe.dll
PC 0x0000BF2EF824 (0x0000BF2E6000+0x00009824) [ 9] BdsDxe.dll
PC 0x00004781BE94 (0x000047811000+0x0000AE94) [ 10] DxeCore.dll
[ 1] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll
[ 2] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 3] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/ShellPkg/Application/Shell/Shell/DEBUG/Shell.dll
[ 4] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 5] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/DEBUG/UiApp.dll
[ 6] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe/DEBUG/SetupBrowser.dll
[ 7] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Application/UiApp/UiApp/DEBUG/UiApp.dll
[ 8] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll
[ 9] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Universal/BdsDxe/BdsDxe/DEBUG/BdsDxe.dll
[ 10] /home/code/1-qemu-uefi/Build/ArmVirtQemu-AARCH64/DEBUG_GCC5/AARCH64/MdeModulePkg/Core/Dxe/DxeMain/DEBUG/DxeCore.dll

X0 0x0000000000000000 X1 0x00000000BE72C278 X2 0x000000004780FEB8 X3 0x0000000000000000
X4 0x0000000000000001 X5 0x0000000000000001 X6 0x0000000000000000 X7 0x0000000000000000
X8 0x00600000BF16070F X9 0x00000000BF160000 X10 0x0000000000000003 X11 0x00000000BEF8EFFF
X12 0x0000000000000002 X13 0x0000000000000000 X14 0x6300000008000000 X15 0x0000000000000000
X16 0x00000000BF51D280 X17 0x0000000000687010 X18 0x0000000000000000 X19 0x00000000BE6DA1E0
X20 0x00000000BE81F198 X21 0x00000000BE4A3A88 X22 0x0000000050000000 X23 0x0000000000000001
X24 0x00000000BE73A000 X25 0x00000000BE7C3000 X26 0x00000000BE4BE8E8 X27 0x0000000000000002
X28 0x0000000000000000 FP 0x000000004780FE50 LR 0x00000000BE673BE4

V0 0x0000000000000000 0000000000000000 V1 0x0000000000000000 0000000000000000
V2 0x0000000000000000 0000000000000000 V3 0x0000000000000000 0000000000000000
V4 0x0000000000000000 0000000000000000 V5 0x0000000000000000 0000000000000000
V6 0x0000000000000000 0000000000000000 V7 0x0000000000000000 0000000000000000
V8 0x0000000000000000 0000000000000000 V9 0x0000000000000000 0000000000000000
V10 0x0000000000000000 0000000000000000 V11 0x0000000000000000 0000000000000000
V12 0x0000000000000000 0000000000000000 V13 0x0000000000000000 0000000000000000
V14 0x0000000000000000 0000000000000000 V15 0x0000000000000000 0000000000000000
V16 0x0000000000000000 0000000000000000 V17 0x0000000000000000 0000000000000000
V18 0x0000000000000000 0000000000000000 V19 0x0000000000000000 0000000000000000
V20 0x0000000000000000 0000000000000000 V21 0x0000000000000000 0000000000000000
V22 0x0000000000000000 0000000000000000 V23 0x0000000000000000 0000000000000000
V24 0x0000000000000000 0000000000000000 V25 0x0000000000000000 0000000000000000
V26 0x0000000000000000 0000000000000000 V27 0x0000000000000000 0000000000000000
V28 0x0000000000000000 0000000000000000 V29 0x0000000000000000 0000000000000000
V30 0x0000000000000000 0000000000000000 V31 0x0000000000000000 0000000000000000

SP 0x000000004780FE50 ELR 0x0000000000000000 SPSR 0x60000AC5 FPSR 0x00000000
ESR 0x86000007 FAR 0x0000000000000000

ESR : EC 0x21 IL 0x1 ISS 0x00000007

Instruction abort: Translation fault, third level

Stack dump:
000004780FD50: 000000004780FE80 00000000FFFFFFD0 000000004780FEB0 000000004780FEB0
000004780FD70: 000000004780FE80 00000000FFFFFFD0 7469784565726F43 76726553746F6F42
000004780FD90: 6E65202073656369 7375746174532064 000A0D202E303A20 000000000000070D
000004780FDB0: 0000002700000001 00000000BF5229D6 0000000000030000 00000000478329F0
000004780FDD0: 000000004780FE30 0000000047817B8C 0000000000000008 000000004783C000
000004780FDF0: 00000000BF160000 0000000000030000 0000000000000001 0000000000030000
000004780FE10: 0000000000000008 00000000BF160000 0000000000010000 006000000000070C
000004780FE30: 000000004780FEB0 000000004781C6AC 000000004780FE60 00000000BFE7042C

000004780FE50: 000000004780FEE0 00000000BE48EAF4 0000000000000000 0000000030000000
000004780FE70: 00000000BE7C1018 0000000050000000 00000000BFFD0018 0000000001000000
000004780FE90: 00000000BE7C3000 00000000BE4BE8E8 0000000000000002 0000000000000000
000004780FEB0: 000000004780FF00 00000000BE492408 0000000000000000 0000000030000000
000004780FED0: 00000000BE7C1018 0000000050000000 000000004780FEF0 00000000BE48ED08
000004780FEF0: 000000004780FF00 00000000BE492418 0000000047810010 000000004781844C
000004780FF10: 0000000000000000 00000000BE818798 00000000BE73A000 0000000000000001
000004780FF30: 00000000BE72C248 00000000478102A8 00000000BE6DA000 0000000000000000
ASSERT [ArmCpuDxe] /home/code/1-qemu-uefi/edk2/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(340): ((BOOLEAN)(0==1))

Expected Behavior

DxeMain.c CoreExitBootServices function execution and the Status is 0 , and xen should start.

Steps To Reproduce

1.QEMU emulator version 9.0.4 (v9.0.4)
qemu-system-aarch64 -M virt -cpu max -m 2048 -bios QEMU_EFI.fd -drive if=none,file=xen-uefi.img,format=raw,id=efidisk -device virtio-blk-device,drive=efidisk -serial mon:stdio -nographic
2. QEMU_EFI is built using the latest code , build -a AARCH64 -t GCC5 -p ./edk2/ArmVirtPkg/ArmVirtQemu.dsc -b DEBUG ; xen version has tried version 4.9, 4.17.4.19
3. enter UEFI shell and execute xen.efi

Build Environment

- OS(s): the os is 140~20.04.1-Ubuntu x86_64, installed in a VMware Ubuntu virtual machine on Windows 10.
- Tool Chain(s):

Version Information

commit 139cbb266b4847d1b63a20c568a5df9b26f7489b

Urgency

High

Are you going to fix this?

I will fix it

Do you need maintainer feedback?

Maintainer feedback requested

Anything else?

No response

@sprdcyp sprdcyp added state:needs-triage type:bug Something isn't working labels Jan 22, 2025
@github-actions github-actions bot added package:armvirtpkg priority:high Significant impact. Should be fixed as soon as possible. state:needs-maintainer-feedback labels Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:armvirtpkg priority:high Significant impact. Should be fixed as soon as possible. state:needs-maintainer-feedback state:needs-triage type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant