linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: qcom: ipq9574: add few more reserved memory region
@ 2023-06-02  8:44 Anusha Rao
  2023-06-02  8:53 ` Kathiravan T
  2023-06-13 22:30 ` Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Anusha Rao @ 2023-06-02  8:44 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_kathirav,
	quic_arajkuma, quic_poovendh

In IPQ SoCs, bootloader will collect the system RAM contents upon crash
for post-morterm analysis. If we don't reserve the memory region used
by bootloader, obviously linux will consume it and upon next boot on
crash, bootloader will be loaded in the same region, which will lead to
loss of some data, sometimes we may miss out critical information.
So lets reserve the region used by the bootloader.

Similarly SBL copies some data into the reserved region and it will be
used in the crash scenario. So reserve 1MB for SBL as well.

While at it, drop the size padding in the reserved memory region,
wherever applicable

Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq9574.dtsi | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
index 0baeb10bbdae..7d21ec0909fb 100644
--- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
+++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
@@ -156,6 +156,16 @@
 		#size-cells = <2>;
 		ranges;
 
+		bootloader@4a100000 {
+			reg = <0x0 0x4a100000 0x0 0x400000>;
+			no-map;
+		};
+
+		sbl@4a500000 {
+			reg = <0x0 0x4a500000 0x0 0x100000>;
+			no-map;
+		};
+
 		tz_region: tz@4a600000 {
 			reg = <0x0 0x4a600000 0x0 0x400000>;
 			no-map;
@@ -163,7 +173,7 @@
 
 		smem@4aa00000 {
 			compatible = "qcom,smem";
-			reg = <0x0 0x4aa00000 0x0 0x00100000>;
+			reg = <0x0 0x4aa00000 0x0 0x100000>;
 			hwlocks = <&tcsr_mutex 0>;
 			no-map;
 		};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: ipq9574: add few more reserved memory region
  2023-06-02  8:44 [PATCH] arm64: dts: qcom: ipq9574: add few more reserved memory region Anusha Rao
@ 2023-06-02  8:53 ` Kathiravan T
  2023-06-13 22:30 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Kathiravan T @ 2023-06-02  8:53 UTC (permalink / raw)
  To: Anusha Rao, agross, andersson, konrad.dybcio, robh+dt,
	krzysztof.kozlowski+dt, conor+dt, linux-arm-msm, devicetree,
	linux-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_arajkuma,
	quic_poovendh


On 6/2/2023 2:14 PM, Anusha Rao wrote:
> In IPQ SoCs, bootloader will collect the system RAM contents upon crash
> for post-morterm analysis. If we don't reserve the memory region used
> by bootloader, obviously linux will consume it and upon next boot on
> crash, bootloader will be loaded in the same region, which will lead to
> loss of some data, sometimes we may miss out critical information.
> So lets reserve the region used by the bootloader.
>
> Similarly SBL copies some data into the reserved region and it will be
> used in the crash scenario. So reserve 1MB for SBL as well.
>
> While at it, drop the size padding in the reserved memory region,
> wherever applicable


LGTM.

Reviewed-by: Kathiravan T <quic_kathirav@quicinc.com>


>
> Signed-off-by: Anusha Rao <quic_anusha@quicinc.com>
> ---
>   arch/arm64/boot/dts/qcom/ipq9574.dtsi | 12 +++++++++++-
>   1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/ipq9574.dtsi b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> index 0baeb10bbdae..7d21ec0909fb 100644
> --- a/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> +++ b/arch/arm64/boot/dts/qcom/ipq9574.dtsi
> @@ -156,6 +156,16 @@
>   		#size-cells = <2>;
>   		ranges;
>   
> +		bootloader@4a100000 {
> +			reg = <0x0 0x4a100000 0x0 0x400000>;
> +			no-map;
> +		};
> +
> +		sbl@4a500000 {
> +			reg = <0x0 0x4a500000 0x0 0x100000>;
> +			no-map;
> +		};
> +
>   		tz_region: tz@4a600000 {
>   			reg = <0x0 0x4a600000 0x0 0x400000>;
>   			no-map;
> @@ -163,7 +173,7 @@
>   
>   		smem@4aa00000 {
>   			compatible = "qcom,smem";
> -			reg = <0x0 0x4aa00000 0x0 0x00100000>;
> +			reg = <0x0 0x4aa00000 0x0 0x100000>;
>   			hwlocks = <&tcsr_mutex 0>;
>   			no-map;
>   		};

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: qcom: ipq9574: add few more reserved memory region
  2023-06-02  8:44 [PATCH] arm64: dts: qcom: ipq9574: add few more reserved memory region Anusha Rao
  2023-06-02  8:53 ` Kathiravan T
@ 2023-06-13 22:30 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2023-06-13 22:30 UTC (permalink / raw)
  To: agross, robh+dt, linux-arm-msm, Anusha Rao,
	krzysztof.kozlowski+dt, conor+dt, konrad.dybcio, devicetree,
	linux-kernel
  Cc: quic_srichara, quic_gokulsri, quic_sjaganat, quic_poovendh,
	quic_kathirav, quic_arajkuma

On Fri, 2 Jun 2023 14:14:31 +0530, Anusha Rao wrote:
> In IPQ SoCs, bootloader will collect the system RAM contents upon crash
> for post-morterm analysis. If we don't reserve the memory region used
> by bootloader, obviously linux will consume it and upon next boot on
> crash, bootloader will be loaded in the same region, which will lead to
> loss of some data, sometimes we may miss out critical information.
> So lets reserve the region used by the bootloader.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: ipq9574: add few more reserved memory region
      commit: f684391e3d323bbdc832569dc685d1289c58d081

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-13 22:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02  8:44 [PATCH] arm64: dts: qcom: ipq9574: add few more reserved memory region Anusha Rao
2023-06-02  8:53 ` Kathiravan T
2023-06-13 22:30 ` Bjorn Andersson

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).