On 4 November 2015 at 14:33, Yehuda Yitschak yehuday@marvell.com wrote:
-----Original Message----- From: Ard Biesheuvel [mailto:ard.biesheuvel@linaro.org] Sent: Wednesday, November 04, 2015 15:51 To: Yehuda Yitschak Cc: Linaro-uefi@lists.linaro.org; leif.lindholm@linaro.org; Shadi Ammouri Subject: Re: UEFI switch to EL2
On 4 November 2015 at 14:31, Yehuda Yitschak yehuday@marvell.com wrote:
Hello everyone
I am in the process of porting EDK2 to a Quad core Aarch64 based SOC. The SOC has a built-in BootROM running in EL3. When the BootROM completes loading The image it transfers control to the loaded image in EL3 to allow installing a secure monitor Since we have an on chip primary loader (i.e. BootROM) I used the 2nd stage template as a basis for my port
So in my flow BootROM loads FD image to main memory and jumps to the entry point in EL3 I quickly found out however that EDK2 expects to be executed in EL2 or EL1.
It was a bit surprising actually. I expected EDK2 to also act is a secure monitor and handle the PSCI calls as well.
I guess I am missing something in the functional partition.
To get to the point I would like to ask;
Who handles PSCI in Juno. I noticed the existence of ATF binaries
such as bl0 and bl3 under Juno. Does it mean Juno works with combination of ATF and EDK2 ?
Indeed. On the Juno reference platform, UEFI is merely an intermediate stage bootloader that gets loaded to DRAM by the secure firmware and executed in EL2
Is there a simple way to switch to EL2 using EDK2 packages. I
guess the Sec part is supposed to do that, right ?
Yes. ArmPlatformPkg/Sec/Sec.c should cover everything you need, although I must stress that a) this code is unused and thus untested, and b) it is not the recommended approach.
Thanks, I will use the Sec as an intermediate solution.
What is the suggested approach? using ATF together with EDK2 ?
I believe the official line here is yes. ARM are very keen that all Aarch64 devices use ARM-TF. But it isn't mandatory, of course. You'd want to re-sync periodically to make sure you pick up bug fixes either by rebasing your code to the latest or by cherry-picking fixes. But that's normal software engineering.
I'm just a bit worried about the flow of generating a boot image. It looks like it would require constantly syncing ATF binaries into EDK2 source.
Once you have a working set, you don't need to keep updating the ARM-TF binaries.
You do need to update the FIP with your UEFI binary as an extra step, but it's not a large overhead, IMO.
It might not be a real issue if you actually load edk2 from flash but if you compile them together .... im not sure.
Personally, I build them separately.
Isn’t there an intention to make EDK2 a full solution (secure monitor + FW) for ARM platforms ?
Regards
Yehuda
Regards, Ard.
Linaro-uefi mailing list Linaro-uefi@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-uefi