U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 00/11] Add support to boot TI K3 HSM M4 core
@ 2025-12-31 17:36 Beleswar Padhi
  2025-12-31 17:36 ` [PATCH v3 01/11] spl: Use FIT data address as fallback when 'load' property is absent Beleswar Padhi
                   ` (11 more replies)
  0 siblings, 12 replies; 23+ messages in thread
From: Beleswar Padhi @ 2025-12-31 17:36 UTC (permalink / raw)
  To: trini
  Cc: afd, bb, anshuld, hnagalla, jm, nm, n-francis, u-kumar1, b-padhi,
	u-boot

Some TI K3 SoCs like J721S2, J784S4, and J722S have a HSM (High Security
Module) M4F core in the Wakeup Voltage Domain which could be used to
run secure services like Authentication. Boot flow for HSM M4 core is
different than the general purpose M4F cores, and is as below:

1. Request control of HSM M4F remote processor.
2. Assert Reset on the HSM M4F remote processor.
3. Request Secure Entity to Authenticate and Load HSM firmware into
   core's internal SRAM memory region. For GP device, load the firmware
   manually into core's SRAM region.
4. Deassert Reset on the HSM M4F remote processor.
5. Release control of HSM M4F remote processor.

This series adds support to boot HSM M4 core from R5 SPL stage. The HSM
firmware is packed inside the tispl.bin fit image. The firmware is
unpacked into a temporary DDR address which is then used to load HSM
core. The configs to boot HSM M4 core are disabled by default.

Note:
This series is dependent on the device-tree changes series posted to
Kernel mailing list:
https://lore.kernel.org/all/20251231165102.950644-1-b-padhi@ti.com/

v3: Changelog:
[Andrew]:
 1. Added dedicated remoteproc driver for booting HSM core.
 2. Added support for signing HSM firmware images in U-Boot. [Anshul]
General:
 1. Add support for booting HSM on J722S SoC as well.

Link to v2:
http://lore.kernel.org/all/20250506104202.16741-1-b-padhi@ti.com/

v2: Changelog:
[Andrew]:
 1. Added support in SPL to load FIT images with no 'load' property.
 2. Removed 'default = n' in CONFIG option.
 3. Used __maybe_unused to decrease preprocessing.
 4. Better error messages with error code. 
[Udit]:
 1. Added 'HSM' entries in enum at the last.
 2. Added error condition in if-elseif-else ladder.
 3. Hang System boot when HSM failed to boot properly.

Link to v1:
https://lore.kernel.org/all/20250422095430.363792-1-b-padhi@ti.com/

Testing done:
1. Tested HSM boot across GP, HS-FS, HS-SE device types for J721S2,
J784S4 and J722S SoCs.

Logs after enabling HSM boot configs:
https://gist.github.com/3V3RYONE/ad33683652c8c49e4fedab49f0493e79

Beleswar Padhi (11):
  spl: Use FIT data address as fallback when 'load' property is absent
  arm: mach-k3: Use FIT image data addr as fallback if 'load' prop is
    missing
  arm: mach-k3: Explicitly identify TIFSSTUB images when discarding
    buffers
  arm: mach-k3: Add config option for packaging HSM firmware
  arm: dts: k3-binman: Add template for packing HSM firmware
  arm: dts: k3-{j721s2/j722s/j784s4}-binman: Pack HSM firmware inside
    tispl.bin
  binman: openssl: Add boot and load extensions to x509 cert
  arm: dts: k3-{j721s2/j722s/j784s4}-r5.dtsi: Enable HSM core
  remoteproc: k3-hsm: Introduce a remoteproc driver for K3 HSM core
  arm: mach-k3: r5: common: Invoke boot of HSM M4 core
  configs: j722s_evm_r5_hsmboot: Add new defconfig to show HSM boot

 MAINTAINERS                            |   1 +
 arch/arm/dts/k3-binman.dtsi            |  20 ++
 arch/arm/dts/k3-j721s2-binman.dtsi     |  12 ++
 arch/arm/dts/k3-j721s2-r5.dtsi         |   5 +
 arch/arm/dts/k3-j722s-binman.dtsi      |  12 ++
 arch/arm/dts/k3-j722s-r5-evm.dts       |   5 +
 arch/arm/dts/k3-j784s4-binman.dtsi     |  14 ++
 arch/arm/dts/k3-j784s4-r5.dtsi         |   4 +
 arch/arm/mach-k3/Kconfig               |   7 +
 arch/arm/mach-k3/r5/common.c           |  43 ++++-
 common/spl/spl_fit.c                   |  16 +-
 configs/j722s_evm_r5_hsmboot_defconfig |  41 ++++
 drivers/remoteproc/Kconfig             |  10 +
 drivers/remoteproc/Makefile            |   1 +
 drivers/remoteproc/ti_k3_hsm_rproc.c   | 252 +++++++++++++++++++++++++
 tools/binman/btool/openssl.py          |  49 ++++-
 tools/binman/etype/ti_secure.py        |  18 ++
 tools/binman/etype/x509_cert.py        |   4 +-
 18 files changed, 505 insertions(+), 9 deletions(-)
 create mode 100644 configs/j722s_evm_r5_hsmboot_defconfig
 create mode 100644 drivers/remoteproc/ti_k3_hsm_rproc.c

-- 
2.34.1


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

end of thread, other threads:[~2026-01-06 13:59 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-31 17:36 [PATCH v3 00/11] Add support to boot TI K3 HSM M4 core Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 01/11] spl: Use FIT data address as fallback when 'load' property is absent Beleswar Padhi
2026-01-02 14:47   ` Tom Rini
2026-01-02 14:55     ` Tom Rini
2026-01-05  7:17       ` Padhi, Beleswar
2025-12-31 17:36 ` [PATCH v3 02/11] arm: mach-k3: Use FIT image data addr as fallback if 'load' prop is missing Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 03/11] arm: mach-k3: Explicitly identify TIFSSTUB images when discarding buffers Beleswar Padhi
2026-01-05 16:53   ` Andrew Davis
2025-12-31 17:36 ` [PATCH v3 04/11] arm: mach-k3: Add config option for packaging HSM firmware Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 05/11] arm: dts: k3-binman: Add template for packing " Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 06/11] arm: dts: k3-{j721s2/j722s/j784s4}-binman: Pack HSM firmware inside tispl.bin Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 07/11] binman: openssl: Add boot and load extensions to x509 cert Beleswar Padhi
2026-01-05 23:30   ` Simon Glass
2026-01-06 10:52     ` Beleswar Prasad Padhi
2025-12-31 17:36 ` [PATCH v3 08/11] arm: dts: k3-{j721s2/j722s/j784s4}-r5.dtsi: Enable HSM core Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 09/11] remoteproc: k3-hsm: Introduce a remoteproc driver for K3 " Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 10/11] arm: mach-k3: r5: common: Invoke boot of HSM M4 core Beleswar Padhi
2025-12-31 17:36 ` [PATCH v3 11/11] configs: j722s_evm_r5_hsmboot: Add new defconfig to show HSM boot Beleswar Padhi
2026-01-05 14:11   ` Bryan Brattlof
2026-01-05 17:19     ` Andrew Davis
2026-01-06 10:37       ` Beleswar Prasad Padhi
2026-01-06 13:59         ` Tom Rini
2026-01-02 14:43 ` [PATCH v3 00/11] Add support to boot TI K3 HSM M4 core Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox