To be more clear, I wouldn't call this "UEFI in EL3" since UEFI is really the 
OS/driver interface, instead I would call it something like "SEC/PEI in EL3".  
Note that SEC and PEI are described in the PI specification and don't existing 
in the UEFI specification.

We too are looking at this same issue, specifically trying to see if we can the 
SEC and PEI phases at EL3 and bootstrap Trusted Firmware a bit later in boot, 
allowing us to keep the PI-spec ways of doing things (PEI memory init, HOBs, 
PPIs, edk2 build system, etc).

In this case it doesn't seem appropriate for the edk2 ARM support libraries to 
force the ARM Trusted Firmware design onto implementations since it is their 
choice whether to go the TF direction or some other direction so I would 
recommend the code is updated to remove this restriction.

Eugene

-----Original Message-----
From: boot-architecture-boun...@lists.linaro.org 
[mailto:boot-architecture-boun...@lists.linaro.org] On Behalf Of 
bhupesh.sha...@freescale.com
Sent: Monday, August 04, 2014 4:25 AM
To: edk2-devel@lists.sourceforge.net; olivier.mar...@arm.com
Cc: boot-architect...@lists.linaro.org; sakar.ar...@freescale.com
Subject: AARCH64 UEFI and EL3

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
boot-architect...@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/boot-architecture

------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to