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 40B57C433EF for ; Fri, 1 Jul 2022 19:09:54 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 0321B84497; Fri, 1 Jul 2022 21:09:41 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lzmBFvAz"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8F3B1844AC; Fri, 1 Jul 2022 21:09:38 +0200 (CEST) Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 85F2E84497 for ; Fri, 1 Jul 2022 21:09:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=alpernebiyasak@gmail.com Received: by mail-ed1-x52b.google.com with SMTP id o9so4028300edt.12 for ; Fri, 01 Jul 2022 12:09:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject:to:cc :references:content-language:in-reply-to:content-transfer-encoding; bh=J0XItTlVIqplTkK9FrmW0OHjHaoBhiPqNYRAsBwDUUY=; b=lzmBFvAzlsod+1yYGhdZ/CMOEcoT4k2G+yBtdBwAVzRqgwY3jHujfrTNHQgHWWLKmS ukCKZcl2TilCZhhMGfdh2ejkALHWsdxik/Vd5OEKu892+/+eqP3cM764pxIfb/MBo2Cl sS+au7q9OK1j42XIpxtOHwfIRJIXrhgnaxfsLUl30gRU8gPxP3qSXHhBXZbHW5y5bYae Zd0FIg02PJ67GHIXV2uRDxWT+eeidHx4egf06gl17CHA0xQR2DOlKnAtU/K6eOqwI8PI XjkcJJKmaKoGIO0eyT3JscldIqEY9Wos11AyXUpXLTtGUqobS7k7MhyIIz2TjKCQfEs3 vDew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:to:cc:references:content-language:in-reply-to :content-transfer-encoding; bh=J0XItTlVIqplTkK9FrmW0OHjHaoBhiPqNYRAsBwDUUY=; b=VWGW/QittvZKldkkISuNuXmctPpnD3fC+DnfkQ1bBqs5ekg0WrA1oD1EX1uudq8Jbx 3W2fq3TSWQA8SAaRXRQvz99BjNF719wMrliykhLXBdki6c3LR3kN2aDGJ+PpHdU05EAf rMISmakfJwbLoDPUhDTOZ3kaIXil+K3UH4rIRUH2ejzaCKM3TbwTPFwmsynSTZ2+saYT 4p+filwZDoAiujSaOV5HJF6FKonSXGLDqoh8CCHgOLEdTCfMOMeSSoX0yB12AJYWT3v+ p8TEVO6TPG4WzlYx7qWDWNrHPrIm4KBQjxZ0lz1iyo3uSzgPr4MQIJpjpst9S0p75dOW MihQ== X-Gm-Message-State: AJIora/IHnXvgGJjTXrgrAX48gnKLSzEPt0aF4CgqY1QuwLkdEZkEvpZ Sccqxcir8vIhjRQMTphmOLk= X-Google-Smtp-Source: AGRyM1vsNufDvRTkYjylG82X5lvWMLUvMLLNQ/QntqSKOWzML6lH2Lbg/01Rm8unv11FTC+RJayUkg== X-Received: by 2002:a05:6402:c44:b0:431:52cc:f933 with SMTP id cs4-20020a0564020c4400b0043152ccf933mr20764063edb.41.1656702575107; Fri, 01 Jul 2022 12:09:35 -0700 (PDT) Received: from [192.168.0.74] ([178.233.178.185]) by smtp.gmail.com with ESMTPSA id a18-20020a170906671200b00718e4e64b7bsm10756162ejp.79.2022.07.01.12.09.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jul 2022 12:09:34 -0700 (PDT) Message-ID: Date: Fri, 1 Jul 2022 22:07:36 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 From: Alper Nebi Yasak Subject: Re: [PATCH RFC v3 04/11] ti: etype: dm: Add entry type for TI DM To: Neha Malcom Francis Cc: u-boot@lists.denx.de, afd@ti.com, trini@konsulko.com, rogerq@kernel.org, a-govindraju@ti.com, vigneshr@ti.com References: <20220615064804.29553-1-n-francis@ti.com> <20220615064804.29553-5-n-francis@ti.com> Content-Language: en-US In-Reply-To: <20220615064804.29553-5-n-francis@ti.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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.6 at phobos.denx.de X-Virus-Status: Clean On 15/06/2022 09:47, 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 TIFS (TI Foundational Security), I assume. > (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 Reviewed-by: Alper Nebi Yasak Same minor issues as the previous patch. > diff --git a/Makefile b/Makefile > index d20d264c53..9b29e8e6a2 100644 > --- a/Makefile > +++ b/Makefile > @@ -1342,6 +1342,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 9fc5c48c35..b6915ef12e 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 671d083c54..3709b68297 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) > @@ -5307,6 +5309,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"; > + }; > + }; > +};