On 11.08.20 09:54, Peng Fan wrote: >> Subject: Re: [PATCH 00/10] ARM64: boot jailhouse before root cell linux >> >> On 07.08.20 05:06, peng....@nxp.com wrote: >>> From: Peng Fan <peng....@nxp.com> >>> >>> This patchset is to support boot jailhouse before Linux. >>> The previous RFC patchset: >>> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgrou >>> >> ps.google.com%2Fg%2Fjailhouse-dev%2Fc%2FIZEFz-e2lh4%2Fm%2FBBmGI_s >> pIQAJ >>> >> &data=02%7C01%7Cpeng.fan%40nxp.com%7Cfd19d34344a04a8e00690 >> 8d83dca6 >>> >> d2b%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637327286910 >> 022610&am >>> >> p;sdata=LWalmGgc5itX1A9VYPlJHE8zRst1XiL2lSilgI2z%2F4U%3D&reserv >> ed= >>> 0 >>> >>> Patch 1~6 is to create an new folder libbaremetal to hold files that >>> could shared between inmates and new bootloader. >>> >>> Patch 9 is the central part to boot jailhouse with a baremetal >>> bootloader, which only support ARM64 + GIC_V3 now. It will use psci to >>> power up secondary cores, do GIC_V3 dist initialization, Then kick >>> inmate cell. >>> >>> Images/cells loading is done by U-Boot bootm command to boot a fit image. >>> >>> Patch 10 is to support using jailhouse userspace tool even boot >>> jailhouse before linux, just do as "insmod jailhouse.ko >>> early_loader=1", then it will bypass fw loading and etc, but setup >> information for linux usage. >>> >> >> I'm missing the big picture description here: >> - how is the memory structure that the boot loader needs to set up? > > Nothing special, just put the cells/inmates to the fit file, as 8mm.its. > >> - how is the handover between loader and root linux? > > Nothing special, the boot args are reserved when U-Boot kick the loader, > the loader will pass the args to Linux after jailhouse initialization done. > >> - how are things configured? >> >> From a first glance at the code, it seems a lot of things are still >> hard-coded, >> likely imx8-specific. That may mean we need to work on the user story >> further. > > I use bootloader/include/config.h to define some addresses. Since I using > Fit image, do you think it is good to parse fit image to get out the info? > This will need porting code from U-Boot or write from scratch.
Try porting your concept to a second target. Then you will see if it can easily be adopted, or if the user needs to tune even more constants across multiple files. I suspect the latter, and that should be avoided. FIT image parsing for addresses could be a way to go, but I need to get the full picture. > >> >> Also, a qemu-arm64 target would be good. > > Per my understanding, qemu-arm64 to run jailhouse not have U-Boot. > I need to let U-Boot boot Linux, then could add the feature. There is configs/qemu_arm64_defconfig in U-Boot. Didn't try it, but I would be surprised if that doesn't work. Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/7425864d-0f70-b6e4-71c9-b688d5c6565d%40siemens.com.