Re: [Xen-devel] [PATCH v2 05/29] ArmVirtualizationPkg: allow patchable PCD for device tree base address
On 01/26/15 20:03, Ard Biesheuvel wrote: > To allow a runtime self relocating PrePi instance to discover the base > address of the device tree at runtime, allow the use of a patchable PCD > for gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress. > We will not be using the build time patch tool in this case, but using > a patchable PCD will make the build system aware that its value is not > a compile time constant. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec >| 2 +- > > ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c > | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > index 99411548aff6..d83117fc6abe 100644 > --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > @@ -34,7 +34,7 @@ >gArmVirtualizationTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, > 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } } >gEarlyPL011BaseAddressGuid = { 0xB199DEA9, 0xFD5C, 0x4A84, { 0x80, > 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } } > > -[PcdsFixedAtBuild] > +[PcdsFixedAtBuild, PcdsPatchableInModule] ># ># This is the physical address where the device tree is expected to be > stored ># upon first entry into UEFI. This needs to be a FixedAtBuild PCD, so that > we > diff --git > a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c > > b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c > index aa4ced4582e8..3e3074af72f1 100644 > --- > a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c > +++ > b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c > @@ -96,7 +96,7 @@ ArmPlatformInitializeSystemMemory ( >ASSERT (HobData != NULL); >*HobData = 0; > > - DeviceTreeBase = (VOID *)(UINTN)FixedPcdGet64 > (PcdDeviceTreeInitialBaseAddress); > + DeviceTreeBase = (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress); >ASSERT (DeviceTreeBase != NULL); > >// > Reviewed-by: Laszlo Ersek ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
Re: [Xen-devel] [PATCH v2 05/29] ArmVirtualizationPkg: allow patchable PCD for device tree base address
Reviewed-By: Olivier Martin > -Original Message- > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > Sent: 26 January 2015 19:03 > To: edk2-de...@lists.sourceforge.net; ler...@redhat.com; Olivier > Martin; roy.fr...@linaro.org; leif.lindh...@linaro.org; > stefano.stabell...@eu.citrix.com; ian.campb...@citrix.com; > anthony.per...@citrix.com; christoffer.d...@linaro.org; xen- > de...@lists.xen.org; ilias.bi...@linaro.org > Cc: Ard Biesheuvel > Subject: [PATCH v2 05/29] ArmVirtualizationPkg: allow patchable PCD for > device tree base address > > To allow a runtime self relocating PrePi instance to discover the base > address of the device tree at runtime, allow the use of a patchable PCD > for gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress. > We will not be using the build time patch tool in this case, but using > a patchable PCD will make the build system aware that its value is not > a compile time constant. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel > --- > ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > | 2 +- > > ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLi > b/Virt.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git > a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > index 99411548aff6..d83117fc6abe 100644 > --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec > @@ -34,7 +34,7 @@ >gArmVirtualizationTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { > 0xB7, 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } } >gEarlyPL011BaseAddressGuid = { 0xB199DEA9, 0xFD5C, 0x4A84, { > 0x80, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } } > > -[PcdsFixedAtBuild] > +[PcdsFixedAtBuild, PcdsPatchableInModule] ># ># This is the physical address where the device tree is expected to > be stored ># upon first entry into UEFI. This needs to be a FixedAtBuild PCD, > so that we > diff --git > a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatform > Lib/Virt.c > b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatform > Lib/Virt.c > index aa4ced4582e8..3e3074af72f1 100644 > --- > a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatform > Lib/Virt.c > +++ > b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatform > Lib/Virt.c > @@ -96,7 +96,7 @@ ArmPlatformInitializeSystemMemory ( >ASSERT (HobData != NULL); >*HobData = 0; > > - DeviceTreeBase = (VOID *)(UINTN)FixedPcdGet64 > (PcdDeviceTreeInitialBaseAddress); > + DeviceTreeBase = (VOID *)(UINTN)PcdGet64 > (PcdDeviceTreeInitialBaseAddress); >ASSERT (DeviceTreeBase != NULL); > >// > -- > 1.8.3.2 > ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel
[Xen-devel] [PATCH v2 05/29] ArmVirtualizationPkg: allow patchable PCD for device tree base address
To allow a runtime self relocating PrePi instance to discover the base address of the device tree at runtime, allow the use of a patchable PCD for gArmVirtualizationTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress. We will not be using the build time patch tool in this case, but using a patchable PCD will make the build system aware that its value is not a compile time constant. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec | 2 +- ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec index 99411548aff6..d83117fc6abe 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec +++ b/ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec @@ -34,7 +34,7 @@ gArmVirtualizationTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } } gEarlyPL011BaseAddressGuid = { 0xB199DEA9, 0xFD5C, 0x4A84, { 0x80, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } } -[PcdsFixedAtBuild] +[PcdsFixedAtBuild, PcdsPatchableInModule] # # This is the physical address where the device tree is expected to be stored # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, so that we diff --git a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c index aa4ced4582e8..3e3074af72f1 100644 --- a/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c +++ b/ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c @@ -96,7 +96,7 @@ ArmPlatformInitializeSystemMemory ( ASSERT (HobData != NULL); *HobData = 0; - DeviceTreeBase = (VOID *)(UINTN)FixedPcdGet64 (PcdDeviceTreeInitialBaseAddress); + DeviceTreeBase = (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress); ASSERT (DeviceTreeBase != NULL); // -- 1.8.3.2 ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel