On Wed, 15 Apr 2020 at 15:04, Manish Pandey2 Manish.Pandey2@arm.com wrote:
As of now ARM_LINUX_KERNEL_AS_BL33 is only supported when RESET_TO_BL31=1, along with it you need to pass PRELOADED_BL33_BASE as well as ARM_PRELOADED_DTB_BASE. AFAIK This feature is not tested for platforms which uses all the BL(1/2/31) stages from TF-A . The most likely reason for this is loading and authentication of Linux Image. BL2 which is responsible for loading of various images, does not have support to load linux image. With platforms having RESET_TO_BL31, TF-A relies on prior loader which loads kernel and device tree blobs at respective address.
In short, if your platform has RESET_TO_BL31=1, it will be quite easy else you need to understand the BL2 loading mechanism and see if you can extend it for loading Linux and DTB.
If I say things differently, ARM_LINUX_KERNEL_AS_BL33 currently works on virtual platforms that can position the kernel and the DTB where they need to be so that TFA can just execute what was positioned before by the virtualization technology. If I understand properly, the Macchiatobin BL2 actually loads a FIP into memory. That fip currently has a U-Boot as a BL33 payload and the DTB. So I assume can replace that payload with a Kernel. I'll need to change the ARM_LINUX_KERNEL_AS_BL33 behavior in TFA so that it does not need RESET_TO_BL31=1,PRELOADED_BL33_BASE and ARM_PRELOADED_DTB_BASE. Find the start address from the FIP and set x0 with the DTB of the FIP. Does it look feasible?
Kernel Output format zImage/Image should work.
Hope this helps! ________________________________ From: TF-A tf-a-bounces@lists.trustedfirmware.org on behalf of François Ozog via TF-A tf-a@lists.trustedfirmware.org Sent: 15 April 2020 13:31 To: tf-a@lists.trustedfirmware.org tf-a@lists.trustedfirmware.org Subject: [TF-A] Linux as BL33
I want to use Linux as BL33 on a Marvell Macchiatobin.
Currently I have the successful boot flow: TFA (mainline v2.2) -> U-Boot (Mainline 2020.04rc5) -> Kernel (5.6.3) with U-root initrd (6.0.0, https://github.com/u-root/u-root ) -> Ubuntu 19.10
The 5.6.3 "intermediary" kernel is 5.5MB uncompressed , u-root initrd is 3.5MB compressed (some form of golang based busybox).
I was pointed to the ARM_LINUX_KERNEL_AS_BL33 option which is not supported on the Macchiatobin.
It does not look too difficult to add, but I'd like to have some feedback/guidance on how to do it:
- how to add the option to the TFA platform
- how to generate a usable kernel (compile options? non relocatable
kernel? output format, i.e. Image, zImage, uImage...)
Thanks for your help
-FF
TF-A mailing list TF-A@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-a IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.