From 8dc1d36bab69feae8068dbba097199075044fdfc Mon Sep 17 00:00:00 2001 From: BigfootACA Date: Mon, 7 Feb 2022 22:00:59 +0800 Subject: [PATCH] sdm845Pkg: Library: sdm845Lib: sdm845Helper.S: save fdt address --- sdm845Pkg/Library/sdm845Lib/sdm845Helper.S | 2 ++ sdm845Pkg/Library/sdm845Lib/sdm845Lib.inf | 1 + sdm845Pkg/sdm845Pkg.dec | 2 ++ 3 files changed, 5 insertions(+) diff --git a/sdm845Pkg/Library/sdm845Lib/sdm845Helper.S b/sdm845Pkg/Library/sdm845Lib/sdm845Helper.S index 487d06d..1f27486 100644 --- a/sdm845Pkg/Library/sdm845Lib/sdm845Helper.S +++ b/sdm845Pkg/Library/sdm845Lib/sdm845Helper.S @@ -26,6 +26,8 @@ startlabel: bne docopy ret docopy: + mov x10, FixedPcdGet64 (DeviceTreeStore) + str x0, [x10] // oh my fdt // find our start address by getting our expected offset, then subtracting it from our actual address ldr x6, =FixedPcdGet64 (PcdFdBaseAddress) sub x5, x5, x6 // x5 now holds offset of ArmPlatformPeiBootAction from start of FD base diff --git a/sdm845Pkg/Library/sdm845Lib/sdm845Lib.inf b/sdm845Pkg/Library/sdm845Lib/sdm845Lib.inf index 3473413..856d5df 100644 --- a/sdm845Pkg/Library/sdm845Lib/sdm845Lib.inf +++ b/sdm845Pkg/Library/sdm845Lib/sdm845Lib.inf @@ -44,3 +44,4 @@ gArmTokenSpaceGuid.PcdSystemMemorySize gArmTokenSpaceGuid.PcdFdBaseAddress gArmTokenSpaceGuid.PcdFdSize + gsdm845PkgTokenSpaceGuid.DeviceTreeStore diff --git a/sdm845Pkg/sdm845Pkg.dec b/sdm845Pkg/sdm845Pkg.dec index 09633a4..ca903a9 100644 --- a/sdm845Pkg/sdm845Pkg.dec +++ b/sdm845Pkg/sdm845Pkg.dec @@ -63,3 +63,5 @@ gsdm845PkgTokenSpaceGuid.PcdDeviceVendor|"Qualcomm"|VOID*|0x0000a301 gsdm845PkgTokenSpaceGuid.PcdDeviceProduct|"Snapdragon 845 Device"|VOID*|0x0000a302 gsdm845PkgTokenSpaceGuid.PcdDeviceCodeName|"sdm845"|VOID*|0x0000a303 + + gsdm845PkgTokenSpaceGuid.DeviceTreeStore|0x83300000|UINT64|0x0000a501