]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmVirtualizationPkg: allow patchable PCD for device tree base address
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Sat, 28 Feb 2015 20:25:38 +0000 (20:25 +0000)
committerlersek <lersek@Edk2>
Sat, 28 Feb 2015 20:25:38 +0000 (20:25 +0000)
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
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16957 6f19259b-4bc3-4df7-8a09-765794883524

ArmPlatformPkg/ArmVirtualizationPkg/ArmVirtualizationPkg.dec
ArmPlatformPkg/ArmVirtualizationPkg/Library/ArmVirtualizationPlatformLib/Virt.c

index d53dab9f65e115e6e24e364a14f6bc41b0d93d13..ddb79904fa8571f5536005ea5bff784d26a836d2 100644 (file)
@@ -34,7 +34,7 @@
   gArmVirtualizationTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } }\r
   gEarlyPL011BaseAddressGuid       = { 0xB199DEA9, 0xFD5C, 0x4A84, { 0x80, 0x82, 0x2F, 0x41, 0x70, 0x78, 0x03, 0x05 } }\r
 \r
-[PcdsFixedAtBuild]\r
+[PcdsFixedAtBuild, PcdsPatchableInModule]\r
   #\r
   # This is the physical address where the device tree is expected to be stored\r
   # upon first entry into UEFI. This needs to be a FixedAtBuild PCD, so that we\r
index aa4ced4582e8cfe3566542a80a592964d538d2e5..3e3074af72f105f0ae5c1f9ab9730afb464e42d8 100644 (file)
@@ -96,7 +96,7 @@ ArmPlatformInitializeSystemMemory (
   ASSERT (HobData != NULL);\r
   *HobData = 0;\r
 \r
-  DeviceTreeBase = (VOID *)(UINTN)FixedPcdGet64 (PcdDeviceTreeInitialBaseAddress);\r
+  DeviceTreeBase = (VOID *)(UINTN)PcdGet64 (PcdDeviceTreeInitialBaseAddress);\r
   ASSERT (DeviceTreeBase != NULL);\r
 \r
   //\r