We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi there,
I want to verify whether FVP Base RecV (version 1125) supports the ARMv8.9-A Permission Indirection Extension (PIE) and Permission Overlay Extension (POE).
For the quick verification, I decided to run edk2 (UEFI) on FVP only.
The FVP options that I use:
$ Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3/FVP_Base_RevC-2xAEMvA \ -C pctl.startup=0.0.0.0 \ -C bp.secure_memory=0 \ -C cluster0.NUM_CORES=1 \ -C cluster1.NUM_CORES=1 \ -C cluster0.has_permission_indirection_s1=2 \ -C cluster0.has_permission_indirection_s2=2 \ -C cluster0.has_permission_overlay_s1=2 \ -C cluster0.has_permission_overlay_s2=2 \ -C cluster1.has_permission_indirection_s1=2 \ -C cluster1.has_permission_indirection_s2=2 \ -C cluster1.has_permission_overlay_s1=2 \ -C cluster1.has_permission_overlay_s2=2 \ -C cache_state_modelled=0 \ -C bp.pl011_uart0.untimed_fifos=1 \ -C bp.pl011_uart0.unbuffered_output=1 \ -C bp.pl011_uart0.out_file=uart/uart0.log \ -C bp.pl011_uart1.out_file=uart/uart1.log \ -C bp.secureflashloader.fname=bl1.bin \ -C bp.flashloader0.fname=fip.bin \ -C bp.ve_sysregs.mmbSiteDefault=0 \ -C bp.ve_sysregs.exit_on_shutdown=1
To this end, I added code to the edk2/ShellPkg/Application/Shell/Shell.c to read PIE-POE related system registers and print their value, as illustrated bellow:
edk2/ShellPkg/Application/Shell/Shell.c
EFI_STATUS EFIAPI UefiMain ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) { EFI_STATUS Status; CHAR16 *TempString; UINTN Size; EFI_HANDLE ConInHandle; EFI_SIMPLE_TEXT_INPUT_PROTOCOL *OldConIn; SPLIT_LIST *Split; UINT64 REG_ID_AA64MMFR3_EL1 = 0; UINT64 REG_PIR_EL1 = 0; UINT64 REG_POR_EL1 = 0; if (PcdGet8 (PcdShellSupportLevel) > 3) { return (EFI_UNSUPPORTED); } __asm__ volatile ("mrs %0, ID_AA64MMFR3_EL1" : "=r" (REG_ID_AA64MMFR3_EL1)); Print(L"ID_AA64MMFR3_EL1: 0x%016x\n", REG_ID_AA64MMFR3_EL1); __asm__ volatile ("mrs %0, PIR_EL1" : "=r" (REG_PIR_EL1)); Print(L"PIR_EL1: 0x%016x\n", REG_PIR_EL1); __asm__ volatile ("mrs %0, POR_EL1" : "=r" (REG_POR_EL1)); Print(L"POR_EL1: 0x%016x\n", REG_POR_EL1); }
Results:
ID_AA64MMFR3_EL1: 0x0000000000111101
According to ID_AA64MMFR3_EL1, AArch64 Memory Model Feature Register 3, the value of ID_AA64MMFAR3_EL1 indicates that FVP_Base_RecV supports both PIE and POE.
ID_AA64MMFAR3_EL1
However, the program gets stuck when it further reads PIR_EL1 and POR_EL1. If I remove related code of reading these two registers, the program executes normally.
PIR_EL1
POR_EL1
My questions are:
Does FVP Base RecV (version 1125) really support PIE-POE?
If so, how can we read and write PIE-POE related system registers?
Hi RustyCohle,
Thank you for the updates. I am glad that you could access the PIE/POE registers.
Kind regards,
Toshi