summaryrefslogtreecommitdiff
path: root/arch/arm64/boot/dts/qcom
diff options
context:
space:
mode:
authorStephan Gerhold <stephan@gerhold.net>2023-09-11 20:41:47 +0300
committerBjorn Andersson <andersson@kernel.org>2023-09-20 19:27:44 +0300
commitb4f3a410061bf5a8cc148c9435479da580abf85b (patch)
tree315e1fccc1905dc0b36f890977a79a4d3a06572d /arch/arm64/boot/dts/qcom
parent0ed3d82862e8451cc2b14ddb1b064e72ba3e5a60 (diff)
downloadlinux-b4f3a410061bf5a8cc148c9435479da580abf85b.tar.xz
arm64: dts: qcom: msm8916: Reserve MBA memory dynamically
At a first glance the MBA memory region on MSM8916 looks intentionally placed at the fixed address 0x8ea00000. This is what the ELF headers of the firmware specify as base address, and the typical Qualcomm-specific bits suggest the binary is not relocatable. However, on a closer look this is pointless: Unlike other firmware images the hardware expects to have the raw ELF image loaded to the MBA region, including the ELF header (without parsing it at all). This means that we actually just load the ELF header (not the code!) at 0x8ea00000. The real LOAD segments follow at arbitrary aligned addresses depending on the structure of the ELF binary. In practice it looks like we can use an arbitrary 1 MiB-aligned region for MBA. The downstream/vendor kernel just allocates this dynamically at an arbitrary (aligned) address. Drop the pointless fixed address and use the new dynamic reserved memory mechanism to allocate a region close to the others. This reduces gaps in the memory map and provides Linux with more contiguous memory. Signed-off-by: Stephan Gerhold <stephan@gerhold.net> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org> Link: https://lore.kernel.org/r/20230911-msm8916-rmem-v1-5-b7089ec3e3a1@gerhold.net Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Diffstat (limited to 'arch/arm64/boot/dts/qcom')
-rw-r--r--arch/arm64/boot/dts/qcom/msm8916.dtsi6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index 840ae8a19877..018e662aebe6 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -102,9 +102,11 @@
no-map;
};
- mba_mem: mba@8ea00000 {
+ mba_mem: mba {
+ size = <0x0 0x100000>;
+ alignment = <0x0 0x100000>;
+ alloc-ranges = <0x0 0x86800000 0x0 0x8000000>;
no-map;
- reg = <0 0x8ea00000 0 0x100000>;
};
};