Hi,

The current AARCH64 UEFI is designed to run entirely in EL2 with the assumption 
that the ARM Trusted FW (ATF) running in EL3 and launching
UEFI in EL2.

As a result if we try to use the UEFI bootloader as a bare-metal debug tool 
(w/o the ATF, BootROM and so on..), we get an assertion failure in
ArmConfigureMmu call (PEI phase). 

"UEFI should not run in EL3".

However when I look at 'ArmPkg/Library/ArmLib/Common/AArch64/ArmLibSupport.S', 
I see some function implementations support UEFI running in EL3...

ASM_PFX(ArmSetTTBR0):
  EL1_OR_EL2_OR_EL3(x1)
1:msr     ttbr0_el1, x0      // Translation Table Base Reg 0 (TTBR0)
  b       4f
2:msr     ttbr0_el2, x0      // Translation Table Base Reg 0 (TTBR0)
  b       4f
3:msr     ttbr0_el3, x0      // Translation Table Base Reg 0 (TTBR0)
4:isb
  ret

...But others in the same file, don't seem to support UEFI running in EL3:

ASM_PFX(ArmGetTTBR0BaseAddress):
  EL1_OR_EL2(x1)
1:mrs     x0, ttbr0_el1
  b       3f
2:mrs     x0, ttbr0_el2
3:LoadConstantToReg(0xFFFFFFFFFFFF, x1) /* Look at bottom 48 bits */
  and     x0, x0, x1
  isb
  ret
 
Does UEFI provide some placeholders to make vendor specific changes in the SEC 
or PEI phase to enable execution in EL3 mode? 

Last I gathered from the discussions on the UEFI mailing lists, it seems that 
the some changes in PEI specs is required to accommodate ARM
Trusted Firmware (ATF) and UEFI running in EL2. Where can I get more 
information on the same

Regards,
Bhupesh


_______________________________________________
boot-architecture mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/boot-architecture

Reply via email to