* [PATCH v4 1/7] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
2026-09-22 16:02 ` Rob Herring (Arm)
2026-09-21 14:53 ` [PATCH v4 2/7] remoteproc: k3: skip mapping firewalled lpm-metadata " Richard Genoud (TI)
` (5 subsequent siblings)
6 siblings, 1 reply; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
Declare a carveout memory region to store LPM metadata on Jacinto
devices.
For Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image. This LPM
metadata area is firewalled to be accessed only by TIFS.
U-Boot R5 SPL/TIFS will use this area to save and restore:
- ATF context
- ATF certificate information
- OPTEE certificate information
- DM image (which has been copied in memory at boot time by U-Boot
R5-SPL)
At resume, U-Boot R5 SPL is executed and detects that the board is
resuming (with a flag set in the PMIC), then it:
- brings out of retention the DDR
- retrieves the LPM memory region from DTS
- authenticates certificates from LPM memory region and applies firewalls
- asks TIFS to restore TFA and its own minimal context
- starts TFA on remote proc
- loads back DM image from memory and jumps to DM
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
NB: This memory region is not part of DM memory (which is not retained
at suspend)
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
.../bindings/remoteproc/ti,k3-r5f-rproc.yaml | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
index 14e6b2f817b3..af2acd429974 100644
--- a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
+++ b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
@@ -155,9 +155,10 @@ patternProperties:
description: |
phandle to the reserved memory nodes to be associated with the
remoteproc device. There should be two reserved memory nodes defined
- for the basic layout or 6 partitions for a detailed layout. The
- reserved memory nodes should be carveout nodes, and should be defined
- with a "no-map" property as per the bindings in
+ for the basic layout, three for the Jacinto layout or 6 partitions
+ for a detailed layout. The reserved memory nodes should be carveout
+ nodes, and should be defined with a "no-map" property as per the
+ bindings in
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
oneOf:
- description: Basic layout
@@ -174,6 +175,12 @@ patternProperties:
- description: LPM metadata
- description: LPM FS context data and reserved sections
- description: DM RM/PM trace and firmware code/data
+ - description: Jacinto layout
+ items:
+ - description: region used for dynamic DMA allocations like vrings and
+ vring buffers
+ - description: region reserved for firmware image sections
+ - description: LPM metadata
memory-region-names:
description: |
@@ -192,6 +199,11 @@ patternProperties:
- const: lpm-metadata
- const: lpm-context
- const: dm-firmware
+ - description: Jacinto layout
+ items:
+ - const: dma
+ - const: firmware
+ - const: lpm-metadata
# Optional properties:
# --------------------
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH v4 1/7] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region
2026-09-21 14:53 ` [PATCH v4 1/7] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region Richard Genoud (TI)
@ 2026-09-22 16:02 ` Rob Herring (Arm)
0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring (Arm) @ 2026-09-22 16:02 UTC (permalink / raw)
To: Richard Genoud (TI)
Cc: Beleswar Padhi, Abhash Kumar, Thomas Richard, linux-kernel,
Vignesh Raghavendra, devicetree, Krzysztof Kozlowski,
Gregory CLEMENT, Udit Kumar, Nishanth Menon, Thomas Petazzoni,
Conor Dooley, linux-arm-kernel, Tero Kristo
On Mon, 21 Sep 2026 16:53:19 +0200, Richard Genoud (TI) wrote:
> Declare a carveout memory region to store LPM metadata on Jacinto
> devices.
>
> For Jacinto devices, this memory region is needed for saving ATF context
> and the certificate information of ATF and OPTEE and DM image. This LPM
> metadata area is firewalled to be accessed only by TIFS.
>
> U-Boot R5 SPL/TIFS will use this area to save and restore:
> - ATF context
> - ATF certificate information
> - OPTEE certificate information
> - DM image (which has been copied in memory at boot time by U-Boot
> R5-SPL)
>
> At resume, U-Boot R5 SPL is executed and detects that the board is
> resuming (with a flag set in the PMIC), then it:
> - brings out of retention the DDR
> - retrieves the LPM memory region from DTS
> - authenticates certificates from LPM memory region and applies firewalls
> - asks TIFS to restore TFA and its own minimal context
> - starts TFA on remote proc
> - loads back DM image from memory and jumps to DM
>
> https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
>
> NB: This memory region is not part of DM memory (which is not retained
> at suspend)
>
> Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
> ---
> .../bindings/remoteproc/ti,k3-r5f-rproc.yaml | 18 +++++++++++++++---
> 1 file changed, 15 insertions(+), 3 deletions(-)
>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 2/7] remoteproc: k3: skip mapping firewalled lpm-metadata memory region
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 1/7] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 3/7] arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata Richard Genoud (TI)
` (4 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
The region lpm-metadata is firewalled by TIFS on Jacinto devices, so it
should not be mapped to prevent speculative access crashes
Just skip this memory region during initialization.
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
drivers/remoteproc/ti_k3_common.c | 36 +++++++++++++++++++++----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
index 3cb8ae5d72f6..5158e5e7c816 100644
--- a/drivers/remoteproc/ti_k3_common.c
+++ b/drivers/remoteproc/ti_k3_common.c
@@ -471,7 +471,7 @@ int k3_reserved_mem_init(struct k3_rproc *kproc)
struct device *dev = kproc->dev;
struct device_node *np = dev->of_node;
int num_rmems;
- int ret, i;
+ int ret, i, j;
num_rmems = of_reserved_mem_region_count(np);
if (num_rmems < 0) {
@@ -501,30 +501,44 @@ int k3_reserved_mem_init(struct k3_rproc *kproc)
return -ENOMEM;
/* use remaining reserved memory regions for static carveouts */
- for (i = 0; i < num_rmems; i++) {
+ for (j = 0, i = 0; i < num_rmems; i++) {
struct resource res;
+ const char *region_name;
ret = of_reserved_mem_region_to_resource(np, i + 1, &res);
if (ret)
return ret;
- kproc->rmem[i].bus_addr = res.start;
+ ret = of_property_read_string_index(np, "memory-region-names",
+ i + 1, ®ion_name);
+ /*
+ * lpm-metadata is a firewalled region accessible only by TIFS.
+ * Skip mapping it to avoid speculative access crashes.
+ */
+ if (!ret && !strcmp(region_name, "lpm-metadata")) {
+ dev_dbg(dev, "Skipping firewalled memory region %s @0x%x\n",
+ region_name, (u32)res.start);
+ continue;
+ }
+
+ kproc->rmem[j].bus_addr = res.start;
/* 64-bit address regions currently not supported */
- kproc->rmem[i].dev_addr = (u32)res.start;
- kproc->rmem[i].size = resource_size(&res);
- kproc->rmem[i].cpu_addr = devm_ioremap_resource_wc(dev, &res);
- if (IS_ERR(kproc->rmem[i].cpu_addr)) {
+ kproc->rmem[j].dev_addr = (u32)res.start;
+ kproc->rmem[j].size = resource_size(&res);
+ kproc->rmem[j].cpu_addr = devm_ioremap_resource_wc(dev, &res);
+ if (IS_ERR(kproc->rmem[j].cpu_addr)) {
dev_err(dev, "failed to map reserved memory#%d at %pR\n",
i + 1, &res);
return -ENOMEM;
}
dev_dbg(dev, "reserved memory%d: bus addr %pa size 0x%zx va %p da 0x%x\n",
- i + 1, &kproc->rmem[i].bus_addr,
- kproc->rmem[i].size, kproc->rmem[i].cpu_addr,
- kproc->rmem[i].dev_addr);
+ j + 1, &kproc->rmem[j].bus_addr,
+ kproc->rmem[j].size, kproc->rmem[j].cpu_addr,
+ kproc->rmem[j].dev_addr);
+ j++;
}
- kproc->num_rmems = num_rmems;
+ kproc->num_rmems = j;
return 0;
}
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v4 3/7] arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 1/7] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 2/7] remoteproc: k3: skip mapping firewalled lpm-metadata " Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 4/7] arm64: dts: ti: k3-j721s2-ti-ipc-firmware: " Richard Genoud (TI)
` (3 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
Declare a carveout memory region to store LPM metadata on J7200.
For Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image. This LPM
metadata area is firewalled to be accessed only by TIFS.
U-Boot R5 SPL/TIFS will use this area to save and restore:
- ATF context
- ATF certificate information
- OPTEE certificate information
- DM image (which has been copied in memory at boot time by U-Boot
R5-SPL)
At resume, U-Boot R5 SPL is executed and detects that the board is
resuming (with a flag set in the PMIC), then it:
- brings out of retention the DDR
- retrieves the LPM memory region from DTS
- authenticates certificates from LPM memory region and applies firewalls
- asks TIFS to restore TFA and its own minimal context
- starts TFA on remote proc
- loads back DM image from memory and jumps to DM
As this is used by U-Boot SPL, bootph-pre-ram is added.
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
NB: This memory region is not part of DM memory (which is not retained
at suspend)
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
index d65f68c7d432..a6043970715a 100644
--- a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi
@@ -47,6 +47,12 @@ rtos_ipc_memory_region: memory@a4000000 {
alignment = <0x1000>;
no-map;
};
+
+ lpm_memory_region: memory@a4800000 {
+ reg = <0x00 0xa4800000 0x00 0x00300000>;
+ no-map;
+ bootph-pre-ram;
+ };
};
&mailbox0_cluster0 {
@@ -99,8 +105,10 @@ &mcu_r5fss0 {
&mcu_r5fss0_core0 {
mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>;
memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
- <&mcu_r5fss0_core0_memory_region>;
- memory-region-names = "dma", "firmware";
+ <&mcu_r5fss0_core0_memory_region>,
+ <&lpm_memory_region>;
+ memory-region-names = "dma", "firmware", "lpm-metadata";
+ bootph-pre-ram;
status = "okay";
};
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v4 4/7] arm64: dts: ti: k3-j721s2-ti-ipc-firmware: Reserve memory for LPM metadata
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
` (2 preceding siblings ...)
2026-09-21 14:53 ` [PATCH v4 3/7] arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 5/7] arm64: dts: ti: k3-j784s4-ti-ipc-firmware: " Richard Genoud (TI)
` (2 subsequent siblings)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
Declare a carveout memory region to store LPM metadata on J721S2.
For Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image. This LPM
metadata area is firewalled to be accessed only by TIFS.
U-Boot R5 SPL/TIFS will use this area to save and restore:
- ATF context
- ATF certificate information
- OPTEE certificate information
- DM image (which has been copied in memory at boot time by U-Boot
R5-SPL)
At resume, U-Boot R5 SPL is executed and detects that the board is
resuming (with a flag set in the PMIC), then it:
- brings out of retention the DDR
- retrieves the LPM memory region from DTS
- authenticates certificates from LPM memory region and applies firewalls
- asks TIFS to restore TFA and its own minimal context
- starts TFA on remote proc
- loads back DM image from memory and jumps to DM
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
As this is used by U-Boot SPL, bootph-pre-ram is added.
NB: This memory region is not part of DM memory (which is not retained
at suspend)
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
.../arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi
index 5253d028da09..010d20d56927 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi
@@ -95,6 +95,12 @@ rtos_ipc_memory_region: memory@a8000000 {
alignment = <0x1000>;
no-map;
};
+
+ lpm_memory_region: memory@a9c00000 {
+ reg = <0x00 0xa9c00000 0x00 0x00300000>;
+ no-map;
+ bootph-pre-ram;
+ };
};
&mailbox0_cluster0 {
@@ -189,8 +195,10 @@ &mcu_r5fss0 {
&mcu_r5fss0_core0 {
mboxes = <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>;
memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
- <&mcu_r5fss0_core0_memory_region>;
- memory-region-names = "dma", "firmware";
+ <&mcu_r5fss0_core0_memory_region>,
+ <&lpm_memory_region>;
+ memory-region-names = "dma", "firmware", "lpm-metadata";
+ bootph-pre-ram;
status = "okay";
};
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v4 5/7] arm64: dts: ti: k3-j784s4-ti-ipc-firmware: Reserve memory for LPM metadata
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
` (3 preceding siblings ...)
2026-09-21 14:53 ` [PATCH v4 4/7] arm64: dts: ti: k3-j721s2-ti-ipc-firmware: " Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 6/7] arm64: dts: ti: k3-j722s-ti-ipc-firmware: " Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 7/7] arm64: dts: ti: k3-j742s2-ti-ipc-firmware: " Richard Genoud (TI)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
Declare a carveout memory region to store LPM metadata on J784S4.
For Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image. This LPM
metadata area is firewalled to be accessed only by TIFS.
U-Boot R5 SPL/TIFS will use this area to save and restore:
- ATF context
- ATF certificate information
- OPTEE certificate information
- DM image (which has been copied in memory at boot time by U-Boot
R5-SPL)
At resume, U-Boot R5 SPL is executed and detects that the board is
resuming (with a flag set in the PMIC), then it:
- brings out of retention the DDR
- retrieves the LPM memory region from DTS
- authenticates certificates from LPM memory region and applies firewalls
- asks TIFS to restore TFA and its own minimal context
- starts TFA on remote proc
- loads back DM image from memory and jumps to DM
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
As this is used by U-Boot SPL, bootph-pre-ram is added and the device is
enabled.
NB: This memory region is not part of DM memory (which is not retained
at suspend)
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
.../boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi
index 81b508b9b05e..1c0c1533f0a3 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi
@@ -17,6 +17,12 @@ c71_3_memory_region: memory@ab100000 {
reg = <0x00 0xab100000 0x00 0xf00000>;
no-map;
};
+
+ lpm_memory_region: memory@ac000000 {
+ reg = <0x00 0xac000000 0x00 0x00300000>;
+ no-map;
+ bootph-pre-ram;
+ };
};
&mailbox0_cluster5 {
@@ -27,6 +33,15 @@ mbox_c71_3: mbox-c71-3 {
};
};
+&mcu_r5fss0_core0 {
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>,
+ <&lpm_memory_region>;
+ memory-region-names = "dma", "firmware", "lpm-metadata";
+ bootph-pre-ram;
+ status = "okay";
+};
+
&c71_3 {
mboxes = <&mailbox0_cluster5 &mbox_c71_3>;
memory-region = <&c71_3_dma_memory_region>,
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v4 6/7] arm64: dts: ti: k3-j722s-ti-ipc-firmware: Reserve memory for LPM metadata
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
` (4 preceding siblings ...)
2026-09-21 14:53 ` [PATCH v4 5/7] arm64: dts: ti: k3-j784s4-ti-ipc-firmware: " Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
2026-09-21 14:53 ` [PATCH v4 7/7] arm64: dts: ti: k3-j742s2-ti-ipc-firmware: " Richard Genoud (TI)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
Declare a carveout memory region to store LPM metadata on J722S.
For Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image. This LPM
metadata area is firewalled to be accessed only by TIFS.
U-Boot R5 SPL/TIFS will use this area to save and restore:
- ATF context
- ATF certificate information
- OPTEE certificate information
- DM image (which has been copied in memory at boot time by U-Boot
R5-SPL)
At resume, U-Boot R5 SPL is executed and detects that the board is
resuming (with a flag set in the PMIC), then it:
- brings out of retention the DDR
- retrieves the LPM memory region from DTS
- authenticates certificates from LPM memory region and applies firewalls
- asks TIFS to restore TFA and its own minimal context
- starts TFA on remote proc
- loads back DM image from memory and jumps to DM
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
As this is used by U-Boot SPL, bootph-pre-ram is added.
NB: This memory region is not part of DM memory (which is not retained
at suspend)
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi
index a59c3648d805..5d8499a33fcd 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi
@@ -59,6 +59,12 @@ rtos_ipc_memory_region: memory@a5000000 {
alignment = <0x1000>;
no-map;
};
+
+ lpm_memory_region: memory@a6c00000 {
+ reg = <0x00 0xa6c00000 0x00 0x00300000>;
+ no-map;
+ bootph-pre-ram;
+ };
};
&mailbox0_cluster0 {
@@ -122,8 +128,10 @@ &wkup_r5fss0 {
&wkup_r5fss0_core0 {
mboxes = <&mailbox0_cluster0 &mbox_wkup_r5_0>;
memory-region = <&wkup_r5fss0_core0_dma_memory_region>,
- <&wkup_r5fss0_core0_memory_region>;
- memory-region-names = "dma", "firmware";
+ <&wkup_r5fss0_core0_memory_region>,
+ <&lpm_memory_region>;
+ memory-region-names = "dma", "firmware", "lpm-metadata";
+ bootph-pre-ram;
status = "okay";
};
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH v4 7/7] arm64: dts: ti: k3-j742s2-ti-ipc-firmware: Reserve memory for LPM metadata
2026-09-21 14:53 [PATCH v4 0/7] dts: ti: k3-j7: Reserve memory for LPM metadata Richard Genoud (TI)
` (5 preceding siblings ...)
2026-09-21 14:53 ` [PATCH v4 6/7] arm64: dts: ti: k3-j722s-ti-ipc-firmware: " Richard Genoud (TI)
@ 2026-09-21 14:53 ` Richard Genoud (TI)
6 siblings, 0 replies; 9+ messages in thread
From: Richard Genoud (TI) @ 2026-09-21 14:53 UTC (permalink / raw)
To: Nishanth Menon, Vignesh Raghavendra
Cc: Tero Kristo, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Udit Kumar, Abhash Kumar, Beleswar Padhi, Thomas Richard,
Gregory CLEMENT, Thomas Petazzoni, linux-arm-kernel, devicetree,
linux-kernel, Richard Genoud
Declare a carveout memory region to store LPM metadata on J742S2.
For Jacinto devices, this memory region is needed for saving ATF context
and the certificate information of ATF and OPTEE and DM image. This LPM
metadata area is firewalled to be accessed only by TIFS.
U-Boot R5 SPL/TIFS will use this area to save and restore:
- ATF context
- ATF certificate information
- OPTEE certificate information
- DM image (which has been copied in memory at boot time by U-Boot
R5-SPL)
At resume, U-Boot R5 SPL is executed and detects that the board is
resuming (with a flag set in the PMIC), then it:
- brings out of retention the DDR
- retrieves the LPM memory region from DTS
- authenticates certificates from LPM memory region and applies firewalls
- asks TIFS to restore TFA and its own minimal context
- starts TFA on remote proc
- loads back DM image from memory and jumps to DM
https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-msg-lpm-save-addr
As this is used by U-Boot SPL, bootph-pre-ram is added and the device is
enabled.
NB: This memory region is not part of DM memory (which is not retained
at suspend)
Signed-off-by: Prasanth Babu Mantena <p-mantena@ti.com>
Signed-off-by: Richard Genoud (TI) <richard.genoud@bootlin.com>
---
arch/arm64/boot/dts/ti/k3-j742s2-evm.dts | 2 ++
.../dts/ti/k3-j742s2-ti-ipc-firmware.dtsi | 24 +++++++++++++++++++
2 files changed, 26 insertions(+)
create mode 100644 arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi
diff --git a/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts b/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts
index fcb7f05d7faf..583b672ef8e9 100644
--- a/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts
+++ b/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts
@@ -24,3 +24,5 @@ memory@80000000 {
bootph-all;
};
};
+
+#include "k3-j742s2-ti-ipc-firmware.dtsi"
diff --git a/arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi b/arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi
new file mode 100644
index 000000000000..d66bcd2f4e19
--- /dev/null
+++ b/arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: GPL-2.0-only OR MIT
+/**
+ * Device Tree Source for enabling IPC using TI SDK firmware on J42S2 SoCs
+ *
+ * Copyright (C) 2026 Texas Instruments Incorporated - https://www.ti.com/
+ * Copyright (C) 2026 Bootlin
+ */
+
+&reserved_memory {
+ lpm_memory_region: memory@ab000000 {
+ reg = <0x00 0xab000000 0x00 0x00300000>;
+ no-map;
+ bootph-pre-ram;
+ };
+};
+
+&mcu_r5fss0_core0 {
+ memory-region = <&mcu_r5fss0_core0_dma_memory_region>,
+ <&mcu_r5fss0_core0_memory_region>,
+ <&lpm_memory_region>;
+ memory-region-names = "dma", "firmware", "lpm-metadata";
+ bootph-pre-ram;
+ status = "okay";
+};
^ permalink raw reply [flat|nested] 9+ messages in thread