On 14 October 2018 at 05:35, Laszlo Ersek <[email protected]> wrote: > On 10/12/18 16:40, Sami Mujawar wrote: >> Some virtual machine managers provide the base address of the DT >> in memory in the X0 register. Save the DT Base address in the >> PcdDeviceTreeInitialBaseAddress so that the firmware can use the >> PCD to parse the DT and obtain the platform information subsequently. >> >> This change also requires that the PcdDeviceTreeInitialBaseAddress >> be a Dynamic PCD. >> >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Sami Mujawar <[email protected]> >> --- >> The changes can be seen at >> https://github.com/samimujawar/edk2/commit/57ffa0da043fd73907b24a6833d2797ea3dae564 >> >> Notes: >> v1: >> - Enable loading of DT from base address passed in X0. [SAMI] >> >> ArmVirtPkg/ArmVirtPkg.dec | 12 ++++++++---- >> ArmVirtPkg/PrePi/AArch64/ModuleEntryPoint.S | 9 +++++++-- >> 2 files changed, 15 insertions(+), 6 deletions(-) > > This patch seems to overlap with a feature that (I think) Ard, Drew and > Eric have discussed earlier, for QEMU (floating RAM base). I suggest > coordinating as early as possible. >
This is the PrePi code, which we only use currently for ArmVirtQemuKernel and ArmVirtXen. PrePi is a hack which I am only willing to tolerate for legacy platforms, and for platforms that require relocation, i.e., where the runtime address of the SEC module is not known at link time. I have asked Sami [in person] to look into whether we can avoid using this PCD entirely, or at least avoid switching to a dynamic PCD. Instead, I would prefer an approach where we store the value of X0 in a global variable (which is permitted given that a self relocating PrePi can only execute from DRAM anyway), and create the FDT GUID HOB directly once we are running C code. _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

