From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2FA78C433EF for ; Fri, 6 May 2022 04:39:12 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AE5E4840EC; Fri, 6 May 2022 06:38:27 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="eegxdQB9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 230B684128; Fri, 6 May 2022 06:38:19 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id B3AAB84093 for ; Fri, 6 May 2022 06:38:12 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=n-francis@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2464cBdB026091 for ; Thu, 5 May 2022 23:38:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1651811891; bh=fvlKk5GMntT/hEs11m4zSOOcydqJ0+r8YGZX55ka9J0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=eegxdQB9rsz68QKMEiuNqcAfIsoOEQXQG7Y8K8QpNjxO640XmIuGXvrR6THDfPR9i me43FDEoijfEPhMe8Taf+M5FPSK79xIIlKYByk9t15Q7a/0Y80S7d8PDjJpI0T0HM+ DJVNeq6/iylchk5rSG2i4kMwPd5Wdpz9K5UCNWWE= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2464cBNd108051 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 May 2022 23:38:11 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 5 May 2022 23:38:10 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Thu, 5 May 2022 23:38:10 -0500 Received: from ula0497641.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2464bxmN032170; Thu, 5 May 2022 23:38:09 -0500 From: Neha Malcom Francis To: CC: Subject: [PATCH RFC v2 04/11] ti: etype: dm: Add entry type for TI DM Date: Fri, 6 May 2022 10:07:52 +0530 Message-ID: <20220506043759.8193-5-n-francis@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220506043759.8193-1-n-francis@ti.com> References: <20220506043759.8193-1-n-francis@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 --- Makefile | 1 + tools/binman/entries.rst | 10 ++++++++++ tools/binman/etype/ti_dm.py | 23 +++++++++++++++++++++++ tools/binman/ftest.py | 7 +++++++ tools/binman/test/225_ti_dm.dts | 13 +++++++++++++ 5 files changed, 54 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 581fbba4c3..7e9c8272c3 100644 --- a/Makefile +++ b/Makefile @@ -1335,6 +1335,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 6c0f03b34f..0c6d82fce8 100644 --- a/tools/binman/entries.rst +++ b/tools/binman/entries.rst @@ -1214,6 +1214,16 @@ devices. +Entry: ti-dm: Texas Instruments Device Manager (DM) blob +----------------------------------------------------------------- + +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..4203fff36e --- /dev/null +++ b/tools/binman/etype/ti_dm.py @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (C) 2022 Texas Instruments Incorporated - https://www.ti.com/ +# +# Entry type for TI Device Manager + +import os + +from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg + + +class Entry_ti_dm(Entry_blob_named_by_arg): + """Entry containing a Texas Instruments 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 ec408de334..5ff294a386 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' TI_SYSFW_DATA = b'sysfw' @@ -194,6 +195,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', TI_SYSFW_DATA) @@ -5300,6 +5302,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"; + }; + }; +}; -- 2.17.1