public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Alper Nebi Yasak <alpernebiyasak@gmail.com>
To: Neha Malcom Francis <n-francis@ti.com>
Cc: sjg@chromium.org, marek.behun@nic.cz, xypron.glpk@gmx.de,
	vigneshr@ti.com, a-govindraju@ti.com, kristo@kernel.org,
	s-anna@ti.com, kishon@ti.com, joel.peshkin@broadcom.com,
	patrick.delaunay@foss.st.com, mr.nuke.me@gmail.com, nm@ti.com,
	u-boot@lists.denx.de
Subject: Re: [RESEND, RFC 7/8] binman: etype: dm: Add entry type for TI DM
Date: Mon, 18 Apr 2022 22:56:50 +0300	[thread overview]
Message-ID: <38adacd6-2fba-516d-0b40-15e41f4fcc1a@gmail.com> (raw)
In-Reply-To: <20220406122919.6104-8-n-francis@ti.com>

On 06/04/2022 15:29, Neha Malcom Francis wrote:
> 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 <n-francis@ti.com>
> ---
>  Makefile                        |  1 +
>  tools/binman/entries.rst        | 10 ++++++++++
>  tools/binman/etype/ti_dm.py     | 22 ++++++++++++++++++++++
>  tools/binman/ftest.py           |  7 +++++++
>  tools/binman/test/225_ti_dm.dts | 13 +++++++++++++
>  5 files changed, 53 insertions(+)
>  create mode 100644 tools/binman/etype/ti_dm.py
>  create mode 100644 tools/binman/test/225_ti_dm.dts
> 
> diff --git a/Makefile b/Makefile
> index 4672147318..dd3403f912 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1328,6 +1328,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=${DM} \
>  		-a opensbi-path=${OPENSBI} \
>  		-a default-dt=$(default_dt) \
>  		-a scp-path=$(SCP) \
> diff --git a/tools/binman/entries.rst b/tools/binman/entries.rst
> index 7c95bbfbec..cf392b6e32 100644
> --- a/tools/binman/entries.rst
> +++ b/tools/binman/entries.rst
> @@ -1030,6 +1030,16 @@ devices.
>  
>  
>  
> +Entry: ti-dm: Texas Instruments Device Manager (DM) blob
> +-----------------------------------------------------------------

Run `binman entry-docs` for this as well, but copy this title to the
docstring below.

> +
> +Properties / Entry arguments:
> +    - ti-dm-path: Filename of file to read into the entry, typically dm.bin
> +
> +This entry holds the device manager responsible for resource and power management in K3 devices.
> +
> +
> +
>  Entry: section: Entry that contains other entries
>  -------------------------------------------------
>  
> diff --git a/tools/binman/etype/ti_dm.py b/tools/binman/etype/ti_dm.py
> new file mode 100644
> index 0000000000..f44ee21777
> --- /dev/null
> +++ b/tools/binman/etype/ti_dm.py
> @@ -0,0 +1,22 @@
> +# SPDX-License-Identifier: GPL-2.0+
> +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/
> +#
> +# Entry type for TI Device Manager
> +
> +from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
> +import os

Put 'os' before 'binman', and an empty line between them.

> +
> +
> +class Entry_ti_dm(Entry_blob_named_by_arg):
> +    """Entry containing a Device Manager (DM)
> +
> +    Properties / Entry arguments:
> +        - ti-dm-path: Filename of file to read into the entry, typically dm.bin
> +
> +    This entry holds the device manager responsible for resource and power management
> +    in K3 devices.
> +    """
> +
> +    def __init__(self, section, etype, node):
> +        super().__init__(section, etype, node, 'ti-dm')
> +        self.external = True
> diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
> index 7c12058fe4..52bfbe792c 100644
> --- a/tools/binman/ftest.py
> +++ b/tools/binman/ftest.py
> @@ -85,6 +85,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'
>  SYSFW_DATA            = b'sysfw'
> @@ -191,6 +192,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('sysfw.bin', SYSFW_DATA)
> @@ -5305,6 +5307,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 = {
> diff --git a/tools/binman/test/225_ti_dm.dts b/tools/binman/test/225_ti_dm.dts
> new file mode 100644
> index 0000000000..3ab754131e
> --- /dev/null
> +++ b/tools/binman/test/225_ti_dm.dts
> @@ -0,0 +1,13 @@
> +// SPDX-License-Identifier: GPL-2.0+
> +
> +/dts-v1/;
> +
> +/ {
> +	#address-cells = <1>;
> +	#size-cells = <1>;
> +	binman {
> +		ti-dm {
> +			filename = "dm.bin";
> +		};
> +	};
> +};

  reply	other threads:[~2022-04-18 19:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-06 12:29 [RESEND, RFC 0/8] Integration of sysfw and tispl with U-Boot Neha Malcom Francis
2022-04-06 12:29 ` [RESEND, RFC 1/8] tools: config: yaml: Add board config class to generate config binaries Neha Malcom Francis
2022-04-18 19:55   ` Alper Nebi Yasak
2022-04-19  2:49     ` Neha Malcom Francis
2022-04-06 12:29 ` [RESEND, RFC 2/8] binman: etype: sysfw: Add entry type for sysfw Neha Malcom Francis
2022-04-18 19:56   ` Alper Nebi Yasak
2022-04-19  2:49     ` Neha Malcom Francis
2022-04-06 12:29 ` [RESEND, RFC 3/8] schema: yaml: Add board config schema Neha Malcom Francis
2022-04-06 12:29 ` [RESEND, RFC 4/8] config: yaml: j721e_evm: Add board config for J721E EVM Neha Malcom Francis
2022-04-06 12:29 ` [RESEND, RFC 5/8] binman: sysfw: Add support for packaging tiboot3.bin and sysfw.itb Neha Malcom Francis
2022-04-18 19:56   ` Alper Nebi Yasak
2022-04-06 12:29 ` [RESEND, RFC 6/8] binman: dtsi: sysfw: j721e: Use binman to package sysfw.itb Neha Malcom Francis
2022-04-18 19:56   ` Alper Nebi Yasak
2022-04-06 12:29 ` [RESEND, RFC 7/8] binman: etype: dm: Add entry type for TI DM Neha Malcom Francis
2022-04-18 19:56   ` Alper Nebi Yasak [this message]
2022-04-06 12:29 ` [RESEND, RFC 8/8] binman: dtsi: tispl: j721e: Use binman to package tispl.bin Neha Malcom Francis
2022-04-18 19:57   ` Alper Nebi Yasak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=38adacd6-2fba-516d-0b40-15e41f4fcc1a@gmail.com \
    --to=alpernebiyasak@gmail.com \
    --cc=a-govindraju@ti.com \
    --cc=joel.peshkin@broadcom.com \
    --cc=kishon@ti.com \
    --cc=kristo@kernel.org \
    --cc=marek.behun@nic.cz \
    --cc=mr.nuke.me@gmail.com \
    --cc=n-francis@ti.com \
    --cc=nm@ti.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=s-anna@ti.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=vigneshr@ti.com \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox