* [PATCH] arm64: dts: qcom: pad sa8155p-adp DTB file
@ 2023-10-11 11:19 Dmitry Baryshkov
2023-10-11 12:56 ` Stephan Gerhold
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-10-11 11:19 UTC (permalink / raw)
To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski
Cc: linux-arm-msm, devicetree
On sa8155p-adp platfor the bootloader (ABL) fails to reserve enough
memory for updating the DTB:
Cmdline: console=tty0 console=ttyMSM0,115200n8 androidboot.verifiedbootstate
Error adding node
Error carving out UEFI memory: FFFFFFFF
Adding `--pad 1024' to DTC_FLAGS for this board fixes the issue by
providing enough empty space for node creation.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
This replaces my previous attempt, which added DTC_FLAGS globally ([1]),
which was rejected.
[1] https://lore.kernel.org/linux-arm-msm/20231009172717.2695854-1-dmitry.baryshkov@linaro.org/
---
arch/arm64/boot/dts/qcom/Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index d6cb840b7050..606ca0d97cc2 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -96,6 +96,9 @@ dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5.dtb
dtb-$(CONFIG_ARCH_QCOM) += qrb5165-rb5-vision-mezzanine.dtb
dtb-$(CONFIG_ARCH_QCOM) += qru1000-idp.dtb
dtb-$(CONFIG_ARCH_QCOM) += sa8155p-adp.dtb
+
+DTC_FLAGS_sa8155p-adp := --pad 1024
+
dtb-$(CONFIG_ARCH_QCOM) += sa8295p-adp.dtb
dtb-$(CONFIG_ARCH_QCOM) += sa8540p-ride.dtb
dtb-$(CONFIG_ARCH_QCOM) += sa8775p-ride.dtb
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: qcom: pad sa8155p-adp DTB file
2023-10-11 11:19 [PATCH] arm64: dts: qcom: pad sa8155p-adp DTB file Dmitry Baryshkov
@ 2023-10-11 12:56 ` Stephan Gerhold
2023-10-12 16:43 ` Konrad Dybcio
0 siblings, 1 reply; 3+ messages in thread
From: Stephan Gerhold @ 2023-10-11 12:56 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
Krzysztof Kozlowski, linux-arm-msm, devicetree
On Wed, Oct 11, 2023 at 02:19:36PM +0300, Dmitry Baryshkov wrote:
> On sa8155p-adp platfor the bootloader (ABL) fails to reserve enough
> memory for updating the DTB:
>
> Cmdline: console=tty0 console=ttyMSM0,115200n8 androidboot.verifiedbootstate
> Error adding node
> Error carving out UEFI memory: FFFFFFFF
>
> Adding `--pad 1024' to DTC_FLAGS for this board fixes the issue by
> providing enough empty space for node creation.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>
> This replaces my previous attempt, which added DTC_FLAGS globally ([1]),
> which was rejected.
>
> [1] https://lore.kernel.org/linux-arm-msm/20231009172717.2695854-1-dmitry.baryshkov@linaro.org/
>
Thanks for making this specific to sa8155p-adp. I completely agree that
this workaround might be needed for devices that are locked down (with
no way to update the bootloader).
But is this really the case here? As far as I understand, the SA8155P
ADP is the "Automotive Development Platform", i.e. a developer board
where I would expect that secure boot is not enabled (just like on the
DragonBoards and RoboticBoards).
Fixing this properly in the bootloader would be very easy, you just need
to increase the DTB_PAD_SIZE I linked [1] by 1024 like in this patch.
This would fix the issue properly, with no change needed in Linux. And
if you have some way to communicate/contribute this back to Qualcomm
somehow we could reduce the chance to see this problem on actually
locked down devices in the future.
Thanks,
Stephan
[1]: https://git.codelinaro.org/clo/la/abl/tianocore/edk2/-/blob/LA.AU.1.4.1.r2-05100-sa8155.0/QcomModulePkg/Include/Library/LocateDeviceTree.h#L59
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: qcom: pad sa8155p-adp DTB file
2023-10-11 12:56 ` Stephan Gerhold
@ 2023-10-12 16:43 ` Konrad Dybcio
0 siblings, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2023-10-12 16:43 UTC (permalink / raw)
To: Stephan Gerhold, Dmitry Baryshkov
Cc: Andy Gross, Bjorn Andersson, Rob Herring, Krzysztof Kozlowski,
linux-arm-msm, devicetree
On 10/11/23 14:56, Stephan Gerhold wrote:
> On Wed, Oct 11, 2023 at 02:19:36PM +0300, Dmitry Baryshkov wrote:
>> On sa8155p-adp platfor the bootloader (ABL) fails to reserve enough
>> memory for updating the DTB:
>>
>> Cmdline: console=tty0 console=ttyMSM0,115200n8 androidboot.verifiedbootstate
>> Error adding node
>> Error carving out UEFI memory: FFFFFFFF
>>
>> Adding `--pad 1024' to DTC_FLAGS for this board fixes the issue by
>> providing enough empty space for node creation.
>>
>> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
>> ---
>>
>> This replaces my previous attempt, which added DTC_FLAGS globally ([1]),
>> which was rejected.
>>
>> [1] https://lore.kernel.org/linux-arm-msm/20231009172717.2695854-1-dmitry.baryshkov@linaro.org/
>>
>
> Thanks for making this specific to sa8155p-adp. I completely agree that
> this workaround might be needed for devices that are locked down (with
> no way to update the bootloader).
>
> But is this really the case here? As far as I understand, the SA8155P
> ADP is the "Automotive Development Platform", i.e. a developer board
> where I would expect that secure boot is not enabled (just like on the
> DragonBoards and RoboticBoards).
>
> Fixing this properly in the bootloader would be very easy, you just need
> to increase the DTB_PAD_SIZE I linked [1] by 1024 like in this patch.
> This would fix the issue properly, with no change needed in Linux. And
> if you have some way to communicate/contribute this back to Qualcomm
> somehow we could reduce the chance to see this problem on actually
> locked down devices in the future.
>
> Thanks,
> Stephan
>
> [1]: https://git.codelinaro.org/clo/la/abl/tianocore/edk2/-/blob/LA.AU.1.4.1.r2-05100-sa8155.0/QcomModulePkg/Include/Library/LocateDeviceTree.h#L59
I'm not sure how productized this platform is, but I'd be skewing
towards Stephan's solution, Qualcomm should fix the bootloader if it's
not EOL yet.
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-12 16:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 11:19 [PATCH] arm64: dts: qcom: pad sa8155p-adp DTB file Dmitry Baryshkov
2023-10-11 12:56 ` Stephan Gerhold
2023-10-12 16:43 ` Konrad Dybcio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).