binman: Add support for TI_DM entry
Subsystems (2)
v2 cover binman: Add support for TI_DM entry
This series adds support for the TI_DM entry and moves all K3 platforms to using the same. With this feature introduced, if TI_DM argument is provided binman picks the pathname it provides; else, it defaults to picking up the ti-dm.bin file. This makes it flexible for users to build tispl.bin with custom DM binaries.
Boot logs:
https://gist.github.com/nehamalcom/37ce8a32e37ddf3e1afcc4c8bd941159
---
Changes from v1:
https://lore.kernel.org/all/[email protected]/
- s/ti-linux-firmware/BINMAN_INDIRS in documentation (Andrew)
- No change to boot logs since only doc change
Neha Malcom Francis (3):
binman: etype: dm: Add entry type for TI DM
arm: dts: k3-*-binman: Move to using ti-dm entry type
doc: board: ti: k3: Mention TI_DM argument
Makefile | 1 + arch/arm/dts/k3-am625-sk-binman.dtsi | 4 ++-- .../dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 ++-- arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-j7200-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721e-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721s2-binman.dtsi | 4 ++-- doc/board/ti/k3.rst | 7 ++++++ tools/binman/entries.rst | 14 ++++++++++++ tools/binman/etype/ti_dm.py | 22 +++++++++++++++++++ tools/binman/ftest.py | 7 ++++++ tools/binman/test/225_ti_dm.dts | 13 +++++++++++ 12 files changed, 76 insertions(+), 12 deletions(-) create mode 100644 tools/binman/etype/ti_dm.py create mode 100644 tools/binman/test/225_ti_dm.dts
Signature · 1 line
2.34.1
PATCH v2 1/3 binman: etype: dm: Add entry type for TI DM
K3 devices introduces the concept of centralized power, resource and security management to System Firmware. This is to overcome challenges by the traditional approach that implements system control functions on each of the processing units.
The software interface for System Firmware is split into TIFS and DM. DM (Device Manager) is responsible for resource and power management from secure and non-secure hosts. This additional binary is necessary for specific platforms' ROM boot images and is to be packaged into tispl.bin
Add an entry for DM. The entry can be used for the packaging of tispl.bin by binman along with ATF and TEE.
--- Makefile | 1 + tools/binman/entries.rst | 14 ++++++++++++++ tools/binman/etype/ti_dm.py | 22 ++++++++++++++++++++++ tools/binman/ftest.py | 7 +++++++ tools/binman/test/225_ti_dm.dts | 13 +++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 tools/binman/etype/ti_dm.py create mode 100644 tools/binman/test/225_ti_dm.dts
Makefile +1 -0
@@ -1349,6 +1349,7 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \ $(foreach f,$(BINMAN_INDIRS),-I $(f)) \ -a atf-bl31-path=${BL31} \ -a tee-os-path=${TEE} \ + -a ti-dm-path=${TI_DM} \ -a opensbi-path=${OPENSBI} \ -a default-dt=$(default_dt) \ -a scp-path=$(SCP) \
tools/binman/entries.rst +14 -0
@@ -1906,6 +1906,20 @@ the included board config binaries. Example:: +.. _etype_ti_dm: + +Entry: ti-dm: TI Device Manager (DM) blob +----------------------------------------- + +Properties / Entry arguments: + - ti-dm-path: Filename of file to read into the entry, typically ti-dm.bin + +This entry holds the device manager responsible for resource and power management +in K3 devices. See https://software-dl.ti.com/tisci/esd/latest/ for more information +about TI DM. + + + .. _etype_ti_secure: Entry: ti-secure: Entry containing a TI x509 certificate binary
tools/binman/etype/ti_dm.py new file +22 -0
@@ -0,0 +1,22 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ +# Written by Neha Malcom Francis <[email protected]> +# +# Entry-type module for TI Device Manager (DM) +# + +from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg + +class Entry_ti_dm(Entry_blob_named_by_arg): + """TI Device Manager (DM) blob + + Properties / Entry arguments: + - ti-dm-path: Filename of file to read into the entry, typically ti-dm.bin + + This entry holds the device manager responsible for resource and power management + in K3 devices. See https://software-dl.ti.com/tisci/esd/latest/ for more information + about TI DM. + """ + def __init__(self, section, etype, node): + super().__init__(section, etype, node, 'ti-dm') + self.external = True
tools/binman/ftest.py +7 -0
@@ -88,6 +88,7 @@ FSP_S_DATA = b'fsp_s' FSP_T_DATA = b'fsp_t' ATF_BL31_DATA = b'bl31' TEE_OS_DATA = b'this is some tee OS data' +TI_DM_DATA = b'tidmtidm' ATF_BL2U_DATA = b'bl2u' OPENSBI_DATA = b'opensbi' SCP_DATA = b'scp'
@@ -221,6 +222,7 @@ class TestFunctional(unittest.TestCase): TestFunctional._MakeInputFile('compress_big', COMPRESS_DATA_BIG) TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA) TestFunctional._MakeInputFile('tee-pager.bin', TEE_OS_DATA) + TestFunctional._MakeInputFile('dm.bin', TI_DM_DATA) TestFunctional._MakeInputFile('bl2u.bin', ATF_BL2U_DATA) TestFunctional._MakeInputFile('fw_dynamic.bin', OPENSBI_DATA) TestFunctional._MakeInputFile('scp.bin', SCP_DATA)
@@ -5455,6 +5457,11 @@ fdt fdtmap Extract the devicetree blob from the fdtmap data = self._DoReadFile('222_tee_os.dts') self.assertEqual(TEE_OS_DATA, data[:len(TEE_OS_DATA)]) + def testPackTiDm(self): + """Test that an image with a TI DM binary can be created""" + data = self._DoReadFile('225_ti_dm.dts') + self.assertEqual(TI_DM_DATA, data[:len(TI_DM_DATA)]) + def testFitFdtOper(self): """Check handling of a specified FIT operation""" entry_args = {
tools/binman/test/225_ti_dm.dts new file +13 -0
@@ -0,0 +1,13 @@ +// SPDX-License-Identifier: GPL-2.0+ + +/dts-v1/; + +/ { + #address-cells = <1>; + #size-cells = <1>; + binman { + ti-dm { + filename = "dm.bin"; + }; + }; +};
Signature · 1 line
2.34.1
Re: [PATCH v2 1/3] binman: etype: dm: Add entry type for TI DM
Quoted 16 lines · Neha Malcom Francis
K3 devices introduces the concept of centralized power, resource and security management to System Firmware. This is to overcome challenges by the traditional approach that implements system control functions on each of the processing units.
The software interface for System Firmware is split into TIFS and DM. DM (Device Manager) is responsible for resource and power management from secure and non-secure hosts. This additional binary is necessary for specific platforms' ROM boot images and is to be packaged into tispl.bin
Add an entry for DM. The entry can be used for the packaging of tispl.bin by binman along with ATF and TEE.
Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>
Quoted 10 lines
--- Makefile | 1 + tools/binman/entries.rst | 14 ++++++++++++++ tools/binman/etype/ti_dm.py | 22 ++++++++++++++++++++++ tools/binman/ftest.py | 7 +++++++ tools/binman/test/225_ti_dm.dts | 13 +++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 tools/binman/etype/ti_dm.py create mode 100644 tools/binman/test/225_ti_dm.dts
Is there a doc/ update somewhere about TI_DM ?
Regards,
Simon
Re: [PATCH v2 1/3] binman: etype: dm: Add entry type for TI DM
Hi Simon,
Quoted 28 lines · Simon Glass
Quoted 23 lines · Neha Malcom Francis
K3 devices introduces the concept of centralized power, resource and security management to System Firmware. This is to overcome challenges by the traditional approach that implements system control functions on each of the processing units.
The software interface for System Firmware is split into TIFS and DM. DM (Device Manager) is responsible for resource and power management from secure and non-secure hosts. This additional binary is necessary for specific platforms' ROM boot images and is to be packaged into tispl.bin
Add an entry for DM. The entry can be used for the packaging of tispl.bin by binman along with ATF and TEE.
Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>--- Makefile | 1 + tools/binman/entries.rst | 14 ++++++++++++++ tools/binman/etype/ti_dm.py | 22 ++++++++++++++++++++++ tools/binman/ftest.py | 7 +++++++ tools/binman/test/225_ti_dm.dts | 13 +++++++++++++ 5 files changed, 57 insertions(+)Quoted 3 lines
create mode 100644
tools/binman/etype/ti_dm.pycreate mode 100644tools/binman/test/225_ti_dm.dts
Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>Is there a doc/ update somewhere about
TI_DM?
Yes, it's patch 3/3 in this series.
Quoted 2 lines
Regards,
Simon
Signature · 2 lines
Thanking You Neha Malcom Francis
Re: [PATCH v2 1/3] binman: etype: dm: Add entry type for TI DM
Hi Simon,
Quoted 28 lines · Simon Glass
Quoted 23 lines · Neha Malcom Francis
K3 devices introduces the concept of centralized power, resource and security management to System Firmware. This is to overcome challenges by the traditional approach that implements system control functions on each of the processing units.
The software interface for System Firmware is split into TIFS and DM. DM (Device Manager) is responsible for resource and power management from secure and non-secure hosts. This additional binary is necessary for specific platforms' ROM boot images and is to be packaged into tispl.bin
Add an entry for DM. The entry can be used for the packaging of tispl.bin by binman along with ATF and TEE.
Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>--- Makefile | 1 + tools/binman/entries.rst | 14 ++++++++++++++ tools/binman/etype/ti_dm.py | 22 ++++++++++++++++++++++ tools/binman/ftest.py | 7 +++++++ tools/binman/test/225_ti_dm.dts | 13 +++++++++++++ 5 files changed, 57 insertions(+)Quoted 3 lines
create mode 100644
tools/binman/etype/ti_dm.pycreate mode 100644tools/binman/test/225_ti_dm.dts
Quoted 4 lines
Reviewed-by Simon Glass <[email protected]>Is there a doc/ update somewhere about
TI_DM?
Yes, it's patch 3/3 in this series.
Quoted 2 lines
Regards,
Simon
Signature · 4 lines
Thanking You Neha Malcom Francis Applied to u-boot-dm/next, thanks!
PATCH v2 2/3 arm: dts: k3-*-binman: Move to using ti-dm entry type
In reply to Neha Malcom FrancisMove the DM entry in tispl.bin FIT image from default fetching an external blob entry to fetching using ti-dm entry type. This way, the DM entry will be populated by the TI_DM pathname if provided. Else it will resort to the ti-dm.bin file.
--- arch/arm/dts/k3-am625-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 ++-- arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-j7200-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721e-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721s2-binman.dtsi | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/dts/k3-am625-sk-binman.dtsi +2 -2
@@ -161,7 +161,7 @@ content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { + dm: ti-dm { filename = "ti-dm.bin"; }; };
@@ -248,7 +248,7 @@ images { dm { - blob-ext { + ti-dm { filename = "ti-dm.bin"; }; };
arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi +2 -2
@@ -227,7 +227,7 @@ content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { + dm: ti-dm { filename = "ti-dm.bin"; }; };
@@ -310,7 +310,7 @@ fit { images { dm { - blob-ext { + ti-dm { filename = "ti-dm.bin"; }; };
arch/arm/dts/k3-am62a-sk-binman.dtsi +2 -2
@@ -164,7 +164,7 @@ content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { + dm: ti-dm { filename = "ti-dm.bin"; }; };
@@ -250,7 +250,7 @@ fit { images { dm { - blob-ext { + ti-dm { filename = "ti-dm.bin"; }; };
arch/arm/dts/k3-j7200-binman.dtsi +2 -2
@@ -200,7 +200,7 @@ content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { + dm: ti-dm { filename = "ti-dm.bin"; }; };
@@ -285,7 +285,7 @@ fit { images { dm { - blob-ext { + ti-dm { filename = "ti-dm.bin"; }; };
arch/arm/dts/k3-j721e-binman.dtsi +2 -2
@@ -151,7 +151,7 @@ content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { + dm: ti-dm { filename = "ti-dm.bin"; }; };
@@ -282,7 +282,7 @@ fit { images { dm { - blob-ext { + ti-dm { filename = "ti-dm.bin"; }; };
arch/arm/dts/k3-j721s2-binman.dtsi +2 -2
@@ -164,7 +164,7 @@ content = <&dm>; keyfile = "custMpk.pem"; }; - dm: blob-ext { + dm: ti-dm { filename = "ti-dm.bin"; }; };
@@ -296,7 +296,7 @@ fit { images { dm { - blob-ext { + ti-dm { filename = "ti-dm.bin"; }; };
Signature · 1 line
2.34.1
Re: [PATCH v2 2/3] arm: dts: k3-*-binman: Move to using ti-dm entry type
Quoted 8 lines · Neha Malcom Francis
Move the DM entry in tispl.bin FIT image from default fetching an external blob entry to fetching using ti-dm entry type. This way, the DM entry will be populated by the
TI_DMpathname if provided. Else it will resort to the ti-dm.bin file.Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>
Quoted 8 lines
--- arch/arm/dts/k3-am625-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 ++-- arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-j7200-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721e-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721s2-binman.dtsi | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-)
Simon Glass
Reviewed-byRe: [PATCH v2 2/3] arm: dts: k3-*-binman: Move to using ti-dm entry type
Quoted 8 lines · Neha Malcom Francis
Move the DM entry in tispl.bin FIT image from default fetching an external blob entry to fetching using ti-dm entry type. This way, the DM entry will be populated by the
TI_DMpathname if provided. Else it will resort to the ti-dm.bin file.Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>
Quoted 8 lines
--- arch/arm/dts/k3-am625-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-am625-verdin-wifi-dev-binman.dtsi | 4 ++-- arch/arm/dts/k3-am62a-sk-binman.dtsi | 4 ++-- arch/arm/dts/k3-j7200-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721e-binman.dtsi | 4 ++-- arch/arm/dts/k3-j721s2-binman.dtsi | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-)
Applied to u-boot-dm/next, thanks!
PATCH v2 3/3 doc: board: ti: k3: Mention TI_DM argument
In reply to Neha Malcom FrancisMention TI_DM argument can be used to fetch a custom DM binary in the A72 build instructions for K3 devices.
--- doc/board/ti/k3.rst | 7 +++++++ 1 file changed, 7 insertions(+)
doc/board/ti/k3.rst +7 -0
@@ -320,6 +320,13 @@ use the `lite` option. make CROSS_COMPILE=$CC64 BINMAN_INDIRS=$LNX_FW_PATH \ BL31=$TFA_PATH/build/k3/$TFA_BOARD/release/bl31.bin \ TEE=$OPTEE_PATH/out/arm-plat-k3/core/tee-raw.bin + +.. note:: + It is also possible to pick up a custom DM binary by adding TI_DM argument + pointing to the file. If not provided, it defaults to picking up the DM + binary from BINMAN_INDIRS. This is only applicable to devices that utilize + split firmware. + .. k3_rst_include_end_build_steps_uboot At this point you should have every binary needed initialize both the
Signature · 1 line
2.34.1
Re: [PATCH v2 3/3] doc: board: ti: k3: Mention TI_DM argument
Hi Neha,
Quoted 30 lines · Neha Malcom Francis
Mention
TI_DMargument can be used to fetch a custom DM binary in the A72 build instructions for K3 devices.Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>--- doc/board/ti/k3.rst | 7 +++++++ 1 file changed, 7 insertions(+)doc/board/ti/k3.rst +7
-0@@ -320,6 +320,13 @@ use the `lite` option. make CROSS_COMPILE=$CC64 BINMAN_INDIRS=$LNX_FW_PATH \ BL31=$TFA_PATH/build/k3/$TFA_BOARD/release/bl31.bin \ TEE=$OPTEE_PATH/out/arm-plat-k3/core/tee-raw.bin + +.. note:: + It is also possible to pick up a custom DM binary by adding TI_DM argument + pointing to the file. If not provided, it defaults to picking up the DM + binary from BINMAN_INDIRS. This is only applicable to devices that utilize + split firmware. + .. k3_rst_include_end_build_steps_uboot At this point you should have every binary needed initialize both theSignature · 1 line
2.34.1
For the series
Regards,
Manorit
Re: [PATCH v2 3/3] doc: board: ti: k3: Mention TI_DM argument
Hi Neha,
Quoted 9 lines · Neha Malcom Francis
Mention
TI_DMargument can be used to fetch a custom DM binary in the A72 build instructions for K3 devices.Signed-off-by Neha Malcom Francis <[email protected]>Reviewed-by Andrew Davis <[email protected]>--- doc/board/ti/k3.rst | 7 +++++++ 1 file changed, 7 insertions(+)
Applied to u-boot-dm/next, thanks!