Low Power Mode: Package TIFS Stub in BeaglePlay
v6 cover Low Power Mode: Package TIFS Stub in BeaglePlay
Hi,
This series aims to add documentation around the boot flow and tispl packaging details regarding the TIFS Stub. While at it, also refactors the k3 common docs to add more labels to provide more granularity on how we include chunks from common docs into SoC specific docs.
This series also includes the binman related changes required to package TIFS Stub to support Low Power Modes on BeaglePlay.
Changelog:
**********
* Reorder and fixup patches as per comments from Nishanth on v5.
* Add more labels in k3.rst that can be included to provide more granularity in how we include firmware documentation in each soc.
* Reword the TIFS Stub documentation slightly to show that DM can be built by customers and is open source.
Link to v5:
https://lore.kernel.org/all/[email protected]/
Dhruva Gole (6):
MAINTAINERS: Include the TI docs under ARM TI
doc: ti: k3: Add TIFS Stub documentation
doc: board: ti: Update to use the new boot firmware labels
doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
arm: dts: k3-am625-beagleplay: Package TIFS Stub
doc: beagle: am62x_beagleplay: Document the use of TIFS Stub
MAINTAINERS | 1 + arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +- doc/board/beagle/am62x_beagleplay.rst | 8 +- doc/board/beagle/j721e_beagleboneai64.rst | 4 + doc/board/phytec/phycore-am62x.rst | 4 + doc/board/phytec/phycore-am64x.rst | 4 + doc/board/ti/am62ax_sk.rst | 8 +- doc/board/ti/am62px_sk.rst | 8 +- doc/board/ti/am62x_sk.rst | 8 +- doc/board/ti/am64x_evm.rst | 4 + doc/board/ti/am65x_evm.rst | 4 + doc/board/ti/img/boot_diagram_am62.svg | 1983 ++++++++++++++++++ doc/board/ti/img/tifsstub_dm_tispl.bin.svg | 353 ++++ doc/board/ti/j7200_evm.rst | 4 + doc/board/ti/j721e_evm.rst | 4 + doc/board/ti/j721s2_evm.rst | 4 + doc/board/ti/j722s_evm.rst | 4 + doc/board/ti/j784s4_evm.rst | 4 + doc/board/ti/k3.rst | 55 +- doc/board/toradex/verdin-am62.rst | 4 + 20 files changed, 2476 insertions(+), 25 deletions(-) create mode 100644 doc/board/ti/img/boot_diagram_am62.svg create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg
base-commit: 459560000736ac7c9c8b04522789c20fb45ff95a
Signature · 1 line
2.34.1
PATCH v6 1/6 MAINTAINERS: Include the TI docs under ARM TI
Add entry for the TI boards documentation under ARM TI
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -732,6 +732,7 @@ F: arch/arm/mach-omap2/ F: arch/arm/include/asm/arch-omap*/ F: arch/arm/include/asm/ti-common/ F: board/ti/ +F: doc/board/ti/ F: drivers/dma/ti* F: drivers/dma/ti*/ F: drivers/firmware/ti_sci.*
Signature · 1 line
2.34.1
PATCH v6 2/6 doc: ti: k3: Add TIFS Stub documentation
In reply to Dhruva Gole* Add documentation to briefly explain the role of TIFS Stub in relevant K3 SoC's.
* Shed light on why TIFS Stub isn't package with the DM firmware itself.
* Modify the platform docs wherever the TIFS Stub documentation applies.
* Also, refactor and add a few new labels to help split the firmware documentation chunks. This will make it easier to include them one by one wherever applicable
--- doc/board/ti/am62ax_sk.rst | 4 +++ doc/board/ti/am62px_sk.rst | 4 +++ doc/board/ti/am62x_sk.rst | 4 +++ doc/board/ti/k3.rst | 55 ++++++++++++++++++++++--------- doc/board/toradex/verdin-am62.rst | 4 +++ 5 files changed, 55 insertions(+), 16 deletions(-)
doc/board/ti/am62ax_sk.rst +4 -0
@@ -60,6 +60,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_lpm_firmware + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/ti/am62px_sk.rst +4 -0
@@ -68,6 +68,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_lpm_firmware + Build procedure: ----------------
doc/board/ti/am62x_sk.rst +4 -0
@@ -59,6 +59,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_lpm_firmware + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/ti/k3.rst +39 -16
64 lines not on this page · raw message
doc/board/toradex/verdin-am62.rst +4 -0
@@ -29,6 +29,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_lpm_firmware + Build procedure: ----------------
Signature · 1 line
2.34.1
Re: [PATCH V6 2/6] doc: ti: k3: Add TIFS Stub documentation
Quoted 3 lines · Dhruva Gole
+
+..k3_rst_include_end_boot_firmwares
+..k3_rst_include_start_lpm_firmware
s/lpm/tifsstub ?
doc/board/ti/k3.rst online · line 214
Quoted 12 lines
doc/board/ti/k3.rst +12
-0+ +* **TIFS Stub** - A small piece of code that helps restore the remaining + context and resume the TIFS firmware when resuming from Low Power Modes + like Suspend-to-RAM/ Deep Sleep. It is loaded into the ATCM (Tightly + Coupled Memory 'A' of the DM R5) during DM startup. The reason it isn't + merged with DM is because in HS devices we need to sign the tifs-stub with + customer key. The DM cannot have a component signed using a customer key + because a HS device customer owns the customer key and only customer + has the access for the customer key. Since TIFS Stub signing has to happen + from the customer side but the DM is released by TI or built by customer + optionally using publicly available sources, we need to allow binman to + sign the TIFS Stub and only then package it alongside other firmwares.
How about:
The TIFS stub is a small piece of binary designed to help restore the required security context and resume the TIFS firmware when the system resumes from low-power modes such as suspend-to-RAM/Deep Sleep. This stub uses the same encryption and customer key signing model as TIFS and is loaded into the ATCM (Tightly Coupled Memory 'A' of the DM R5) during DM startup. Due to the independent certificate signing process, the stub is maintained separately from DM.
Quoted 2 lines
+
+..k3_rst_include_end_lpm_firmware
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
PATCH v6 3/6 doc: board: ti: Update to use the new boot firmware labels
In reply to Dhruva GoleUse the new boot_firmwares labels that help make documentation more specific as to which firmwares are used in which devices
--- doc/board/beagle/j721e_beagleboneai64.rst | 4 ++++ doc/board/phytec/phycore-am62x.rst | 4 ++++ doc/board/phytec/phycore-am64x.rst | 4 ++++ doc/board/ti/am64x_evm.rst | 4 ++++ doc/board/ti/am65x_evm.rst | 4 ++++ doc/board/ti/j7200_evm.rst | 4 ++++ doc/board/ti/j721e_evm.rst | 4 ++++ doc/board/ti/j721s2_evm.rst | 4 ++++ doc/board/ti/j722s_evm.rst | 4 ++++ doc/board/ti/j784s4_evm.rst | 4 ++++ 10 files changed, 40 insertions(+)
doc/board/beagle/j721e_beagleboneai64.rst +4 -0
@@ -42,6 +42,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/phytec/phycore-am62x.rst +4 -0
@@ -30,6 +30,10 @@ Sources :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure ---------------
doc/board/phytec/phycore-am64x.rst +4 -0
@@ -30,6 +30,10 @@ Sources :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure ---------------
doc/board/ti/am64x_evm.rst +4 -0
@@ -48,6 +48,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares_sysfw + :end-before: .. k3_rst_include_end_boot_firmwares_sysfw + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/ti/am65x_evm.rst +4 -0
@@ -58,6 +58,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares_sysfw + :end-before: .. k3_rst_include_end_boot_firmwares_sysfw + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/ti/j7200_evm.rst +4 -0
@@ -47,6 +47,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/ti/j721e_evm.rst +4 -0
@@ -52,6 +52,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure: ---------------- 0. Setup the environment variables:
doc/board/ti/j721s2_evm.rst +4 -0
@@ -60,6 +60,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure: ----------------
doc/board/ti/j722s_evm.rst +4 -0
@@ -45,6 +45,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure: ----------------
doc/board/ti/j784s4_evm.rst +4 -0
@@ -60,6 +60,10 @@ Sources :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_boot_firmwares + Build procedure --------------- 0. Setup the environment variables:
Signature · 1 line
2.34.1
PATCH v6 4/6 doc: ti: am62*: Mention TIFS Stub in img fmts and boot flow
In reply to Dhruva GoleSince AM62x, AM62P and AM62A all use similar boot flows and their low power mode s/w ARCH is also similar in the way that they make use of the TIFS Stub, update their documentation to show where TIFS Stub is.
--- doc/board/ti/am62ax_sk.rst | 4 +- doc/board/ti/am62px_sk.rst | 4 +- doc/board/ti/am62x_sk.rst | 4 +- doc/board/ti/img/boot_diagram_am62.svg | 1983 ++++++++++++++++++++ doc/board/ti/img/tifsstub_dm_tispl.bin.svg | 353 ++++ 5 files changed, 2342 insertions(+), 6 deletions(-) create mode 100644 doc/board/ti/img/boot_diagram_am62.svg create mode 100644 doc/board/ti/img/tifsstub_dm_tispl.bin.svg
doc/board/ti/am62ax_sk.rst +2 -2
@@ -47,7 +47,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. image:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -148,7 +148,7 @@ Image formats: - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. image:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Switch Setting for Boot Mode
doc/board/ti/am62px_sk.rst +2 -2
@@ -55,7 +55,7 @@ Boot Flow: The bootflow is exactly the same as all SoCs in the am62xxx extended SoC family. Below is the pictorial representation: -.. image:: img/boot_diagram_k3_current.svg +.. image:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -157,7 +157,7 @@ Image formats: - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. image:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format OSPI:
doc/board/ti/am62x_sk.rst +2 -2
@@ -46,7 +46,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: img/boot_diagram_k3_current.svg +.. image:: img/boot_diagram_am62.svg :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53
@@ -165,7 +165,7 @@ Image formats: - tispl.bin -.. image:: img/dm_tispl.bin.svg +.. image:: img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format OSPI:
doc/board/ti/img/boot_diagram_am62.svg new file +1983 -0
1,983 lines not on this page · raw message
doc/board/ti/img/tifsstub_dm_tispl.bin.svg new file +353 -0
353 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v6 5/6 arm: dts: k3-am625-beagleplay: Package TIFS Stub
In reply to Dhruva GoleAdd support for packaging the TIFS Stub as it's required for basic Low Power Modes like Deep Sleep.
The reason it is packaged using binman and not inherently as part of the DM firmware is because for HS devices, customer owns the customer key and only customer has access to it.
DM is release by TI, Since TI doesn't have access to the customer key it cannot have a component that is signed by customer key. Hence, it's left as part of binman to be signed and packaged.
--- arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi | 33 +++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-)
arch/arm/dts/k3-am625-beagleplay-u-boot.dtsi +32 -1
@@ -78,6 +78,23 @@ }; }; + tifsstub-gp { + filename = "tifsstub.bin_gp"; + ti-secure-rom { + content = <&tifsstub_gp>; + core = "secure"; + load = <0x60000>; + sw-rev = <CONFIG_K3_X509_SWRV>; + keyfile = "ti-degenerate-key.pem"; + tifsstub; + }; + tifsstub_gp: tifsstub-gp.bin { + filename = "ti-sysfw/ti-fs-stub-firmware-am62x-gp.bin"; + type = "blob-ext"; + optional; + }; + }; + ti-spl_unsigned { filename = "tispl.bin_unsigned"; symlink = "tispl.bin";
@@ -115,6 +132,19 @@ }; }; + tifsstub-gp { + description = "tifsstub"; + type = "firmware"; + arch = "arm32"; + compression = "none"; + os = "tifsstub-gp"; + load = <0x9dc00000>; + entry = <0x9dc00000>; + blob-ext { + filename = "tifsstub.bin_gp"; + }; + }; + dm { description = "DM binary"; type = "firmware";
@@ -158,7 +188,8 @@ conf-0 { description = "k3-am625-beagleplay"; firmware = "atf"; - loadables = "tee", "dm", "spl"; + loadables = "tee", "dm", "spl", + "tifsstub-gp"; fdt = "fdt-0"; }; };
Signature · 1 line
2.34.1
PATCH v6 6/6 doc: beagle: am62x_beagleplay: Document the use of TIFS Stub
In reply to Dhruva Gole* Include the actual common documentation about the TIFS Stub and role it plays to enable Low Power Modes in the platform.
* Add the AM62x boot flow to show at which point the TIFS Stub actually gets loaded.
* Mention the TIFS Stub in the TISPL image format.
--- doc/board/beagle/am62x_beagleplay.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
doc/board/beagle/am62x_beagleplay.rst +6 -2
@@ -23,7 +23,7 @@ Boot Flow: ---------- Below is the pictorial representation of boot flow: -.. image:: ../ti/img/boot_diagram_k3_current.svg +.. image:: ../ti/img/boot_diagram_am62.svg :alt: Boot flow diagram - On this platform, 'TI Foundational Security' (TIFS) functions as the
@@ -38,6 +38,10 @@ Sources: :start-after: .. k3_rst_include_start_boot_sources :end-before: .. k3_rst_include_end_boot_sources +.. include:: ../ti/k3.rst + :start-after: .. k3_rst_include_start_boot_firmwares + :end-before: .. k3_rst_include_end_lpm_firmware + Build procedure: ---------------- 0. Setup the environment variables:
@@ -86,7 +90,7 @@ Image formats - tispl.bin -.. image:: ../ti/img/dm_tispl.bin.svg +.. image:: ../ti/img/tifsstub_dm_tispl.bin.svg :alt: tispl.bin image format Additional hardware for U-Boot development
Signature · 1 line
2.34.1