[PATCH 1/1] arm-bsp/u-boot: corstone1000: Reserve memory for RSS comm pointer access protocol

[email protected]
Newsgroups org.yoctoproject.lists.meta-arm
Message-ID <[email protected]>
From: Philip Puk <[email protected]>

This memory was used by OpenAMP to establish communication between
the Secure Enclave and Trusted Services. After transitioning from
OpenAMP to RSE_COMMS, this shared memory is now configured for the
pointer access protocol in RSE_COMMS.

Since this memory may be still used by a user-space application
in linux as U-Boot is passing an EFI memory map starting from
0x80000000, this memory range should be reserved as the
pointer access protocol may be enabled on corstone1000 in the future.

Signed-off-by: Philip Puk <[email protected]>
---
 .../u-boot/u-boot-corstone1000.inc            |  1 +
 .../0052-reserve-memory-for-se-comm.patch     | 46 +++++++++++++++++++
 2 files changed, 47 insertions(+)
 create mode 100644 meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0052-reserve-memory-for-se-comm.patch

diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc
index 2470db02..bb9da10d 100644
--- a/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot-corstone1000.inc
@@ -68,6 +68,7 @@ SRC_URI:append = " \
     file://0050-fwu-Use-metadata-v2.patch	  \
     ${@bb.utils.contains('MACHINE_FEATURES', 'corstone1000-extsys', \
                          '', 'file://0051-corstone1000-purge-remoteproc-dts-node.patch' , d)} \
+    file://0052-reserve-memory-for-se-comm.patch \
     "
 
 do_configure:append() {
diff --git a/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0052-reserve-memory-for-se-comm.patch b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0052-reserve-memory-for-se-comm.patch
new file mode 100644
index 00000000..73fdc4bd
--- /dev/null
+++ b/meta-arm-bsp/recipes-bsp/u-boot/u-boot/corstone1000/0052-reserve-memory-for-se-comm.patch
@@ -0,0 +1,46 @@
+From 8fdd91630f335b71e55e570a011f07b083c47dd6 Mon Sep 17 00:00:00 2001
+From: Emekcan Aras <[email protected]>
+Date: Mon, 10 Jul 2023 19:00:43 +0100
+Subject: [PATCH] arm-bsp/u-boot: Reserve memory for RSS comm pointer access protocol
+
+This memory was used by OpenAMP to establish communication between
+the Secure Enclave and Trusted Services. After transitioning from
+OpenAMP to RSE_COMMS, this shared memory is now configured for the
+pointer access protocol in RSE_COMMS.
+
+Since this memory may be still used by a user-space application
+in linux as U-Boot is passing an EFI memory map starting from
+0x80000000, this memory range should be reserved as the
+pointer access protocol may be enabled on corstone1000 in the future.
+
+Upstream-Status: Pending [Not submitted to upstream yet]
+Signed-off-by: Emekcan Aras <[email protected]>
+
+---
+ arch/arm/dts/corstone1000.dtsi | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/arch/arm/dts/corstone1000.dtsi b/arch/arm/dts/corstone1000.dtsi
+index 0f8ad255ce..a71b89c025 100644
+--- a/arch/arm/dts/corstone1000.dtsi
++++ b/arch/arm/dts/corstone1000.dtsi
+@@ -45,6 +45,17 @@
+ 		lba = <65536>;
+ 	};
+ 
++	reserved-memory {
++		#address-cells = <2>;
++		#size-cells = <2>;
++		ranges;
++
++		smem_mem: smem_region@88000000 {
++			reg = <0x0 0x88000000 0x0 0x100000>;
++			no-map;
++		};
++	};
++
+ 	gic: interrupt-controller@1c000000 {
+ 		compatible = "arm,gic-400";
+ 		#interrupt-cells = <3>;
+-- 
+2.17.1
-- 
2.25.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.