From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7026294254479605760 X-Received: by 2002:a17:90a:5642:: with SMTP id d2mr27646514pji.200.1636092371144; Thu, 04 Nov 2021 23:06:11 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:da8c:: with SMTP id j12ls4237177plx.4.gmail; Thu, 04 Nov 2021 23:06:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZoAx5sbc2CUXCMh+raJH5vXQiQwd51S4cx611/BViTBmgIc1Ed02CucBQLA0L2Thw6snR X-Received: by 2002:a17:902:ee95:b0:141:f28f:7296 with SMTP id a21-20020a170902ee9500b00141f28f7296mr28411133pld.50.1636092369980; Thu, 04 Nov 2021 23:06:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1636092369; cv=none; d=google.com; s=arc-20160816; b=YUgWR2lLFGROtVdvo7vWD272Ij2jAU0tGtyvBnBOGCrYTDRg2NU7CR7PvwFF9BVTOz Cvocx3yHLhxAytn4F8Y02LU+ykVE/eaiAq1tXu9PQSztLdK0mc/OSOv6pRWegLmm9s1x 7t0+wfqNAU1YSi/znLhKkaWy/c3OaoHP1YEEakBlGQlaM4HpFV2e12Ux1i7ty7i4PfG1 pySoPRAF3c5zfvrZhaCSB5mRno77KvGYEBNkJt/9hEe+bA/V6AlXdqiANz5CM2uwsmvw /yE8XX31VX033bO6H1BH7glwP0dvw/5+aXMgMjjw/Aao6hL9D8rS1tSxIbU6YNROmYvq pfBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=ZmZyjI17SsAE7sZeTz8AIoPuis1pMXsmdXWkXNQnkTA=; b=Sw4hV6fWYuvHN72TrGGHOiqYalWf2SU/zrCEKN8XJAKfSt84sMpyexd99q4n7zkiOJ XCJD0AEataYAZJghNxVTE1c7i03Yse+uiYYoRe7W88DaZDoy+WTh8NpHgYVgd2YdDaV3 VvVY2+vTEV5wG22+altGra8a3Q855uTCafyWeheQXQnD1owBZ28azCv4sLCqGb2le+Ct /tOTw5otzDvwO0nZiO0GBlHLpfszoSIpil1fB1h1yXMj2HM8ZFuNRlj6i+wBySgD/7a4 +Zcg6qVXuptMy3g0G71fAa6ZhwKYdmUn0VgBzTcohCm4Kz6op+hq57WUM/YEm+LM2O9Y nOYw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id q21si700486pfj.0.2021.11.04.23.06.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Nov 2021 23:06:09 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: aL7t1x0SLPTiKBOAjRwwLdo+n9DjlYITnI70MgMhkZ6lfpKGYMBh1Ah15oUKyRqixqjJ/9wYYX aHxH02x8h4r994pC8teelWH+WNRvPq/fxmaT9wriNcR+vFp9uiUW7mJach4rV+HL7oQWBmWb+M UkNqE2JXQMN1gjwFeSAlNJUQ3fg8j+5eWwUh/D98tmVry+eNuAF6hLgwrPlWItOc7NbKFG/DYx xOI39EwlUxnWCiRng/lcUrzQyj8F7XDpvRis45LoZQp1B5joW/fUbEdzolB7ItGcp8jDuJFdxd 7fM/XEPD30qZFXAD3TSdfJBq X-IronPort-AV: E=Sophos;i="5.87,210,1631606400"; d="scan'208";a="70576497" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 04 Nov 2021 22:06:10 -0800 IronPort-SDR: 3gA/IfDtXBv6ENgQUbUSH11Y4Kzru+/8RMUtA89Dq2zS3msY2vqw3cHOINjM16Y5+sTwih5E0R JDgRbEjtW19ugJ/U5WW0PTBL6RZf4kAaez77qFk1C3wEhnsoUUgyeqV8Ut47dH+VWJ/VKylsNm iqimMXQ+sDN9aRG0axoBooe8Vqy8IaQhfTc87mOYDyWleRDKvc2A/rSFLjZtQkT9rhuMh92zqe 8nN/MsmXsC3BoKV5acwQ+RqRhFrGwDFA/gqRWQU957RX+bliJJbe03rTIUSogNxiE1pMi3NaVt BJA= From: "Kanagarajan, Vijaikumar" To: Henning Schild CC: "isar-users@googlegroups.com" Subject: RE: [PATCH] meta-isar: u-boot: Update to 2021.10 Thread-Topic: [PATCH] meta-isar: u-boot: Update to 2021.10 Thread-Index: AQHX0KCSx2EZcfma50yabHrV93qsNavylHCAgAHd+GA= Date: Fri, 5 Nov 2021 06:05:38 +0000 Message-ID: <07e7dbd000db4db2b1aa57c039a8e96c@svr-orw-mbx-01.mgc.mentorg.com> References: <20211103104950.2138656-1-Vijaikumar_Kanagarajan@mentor.com> <20211103192527.793e13bb@md1za8fc.ad001.siemens.net> In-Reply-To: <20211103192527.793e13bb@md1za8fc.ad001.siemens.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [147.34.91.1] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TUID: 59vAbC0s5U8q -----Original Message----- From: Henning Schild =20 Sent: 03 November 2021 23:55 To: Kanagarajan, Vijaikumar Cc: isar-users@googlegroups.com Subject: Re: [PATCH] meta-isar: u-boot: Update to 2021.10 Am Wed, 3 Nov 2021 16:19:50 +0530 schrieb Vijai Kumar K : > Update to the latest u-boot. >=20 > Signed-off-by: Vijai Kumar K > --- > Boot tested on de0-nano-soc. >=20 > I donot have a stm32 board. Only build tested for it. >=20 > Thanks, > Vijai Kumar K >=20 > ...y-add-property-no-map-to-created-res.patch | 151 > ------------------ ...rty-no-map-to-secure-reserved-memory.patch | > 33 ---- ...{u-boot-2020.10.inc =3D> u-boot-2021.10.inc} | 4 +- > ...0.10.bb =3D> u-boot-de0-nano-soc_2021.10.bb} | 0 > .../u-boot/u-boot-stm32mp15x_2020.10.bb | 10 -- > .../u-boot/u-boot-stm32mp15x_2021.10.bb | 6 + > 6 files changed, 9 insertions(+), 195 deletions(-) delete mode=20 > 100644=20 > meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-property > -no-map-to-created-res.patch > delete mode 100644 > meta-isar/recipes-bsp/u-boot/files/0002-optee-add-property-no-map-to-s > ecure-reserved-memory.patch rename=20 > meta-isar/recipes-bsp/u-boot/{u-boot-2020.10.inc =3D>=20 > u-boot-2021.10.inc} (64%) rename=20 > meta-isar/recipes-bsp/u-boot/{u-boot-de0-nano-soc_2020.10.bb =3D>=20 > u-boot-de0-nano-soc_2021.10.bb} (100%) delete mode 100644=20 > meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb create mode > 100644 meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb >=20 > diff --git > a/meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-proper > ty-no-map-to-created-res.patch=20 > b/meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-proper > ty-no-map-to-created-res.patch deleted file mode 100644 index=20 > 8a32fc1..0000000 ---=20 > a/meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-proper > ty-no-map-to-created-res.patch > +++ /dev/null @@ -1,151 +0,0 @@ > -From ccaa5747bdeae4261199dd7e80771e4de1c550ca Mon Sep 17 00:00:00 > 2001 -From: Etienne Carriere > -Date: Thu, 10 Sep 2020 10:49:59 +0200 > -Subject: [PATCH] fdtdec: optionally add property no-map to created=20 > reserved > - memory node > - > -Add boolean input argument @no_map to helper function > -fdtdec_add_reserved_memory() to add or not "no-map" property -for an=20 > added reserved memory node. > - > -Property no-map is used by the Linux kernel to not not map memory -in=20 > its static memory mapping. It is needed for example for the|=20 > -consistency of system non-cached memory and to prevent speculative=20 > -accesses to some firewalled memory. > - > -No functional change. A later change will update to OPTEE library to=20 > -add no-map property to OP-TEE reserved memory nodes. > - > -Signed-off-by: Etienne Carriere > -Signed-off-by: Patrice Chotard > -Reviewed-by: Simon Glass > ---- > - arch/riscv/lib/fdt_fixup.c | 2 +- > - include/fdtdec.h | 5 +++-- > - lib/fdtdec.c | 10 ++++++++-- > - lib/optee/optee.c | 2 +- > - test/dm/fdtdec.c | 6 +++--- > - 5 files changed, 16 insertions(+), 9 deletions(-) > - > -diff --git a/arch/riscv/lib/fdt_fixup.c b/arch/riscv/lib/fdt_fixup.c=20 > -index 5b2420243f..d02062fd5b 100644 > ---- a/arch/riscv/lib/fdt_fixup.c > -+++ b/arch/riscv/lib/fdt_fixup.c > -@@ -75,7 +75,7 @@ int riscv_fdt_copy_resv_mem_node(const void *src,=20 > void *dst) > - pmp_mem.start =3D addr; > - pmp_mem.end =3D addr + size - 1; > - err =3D fdtdec_add_reserved_memory(dst, basename, > &pmp_mem, -- > &phandle); -+ > &phandle, false); > - if (err < 0 && err !=3D -FDT_ERR_EXISTS) { > - log_err("failed to add reserved memory: > %d\n", err); > - return err; > -diff --git a/include/fdtdec.h b/include/fdtdec.h -index=20 > 152eb07b9e..62d1660973 100644 > ---- a/include/fdtdec.h > -+++ b/include/fdtdec.h > -@@ -1029,7 +1029,7 @@ static inline int fdtdec_set_phandle(void=20 > *blob, int node, uint32_t phandle) > - * }; > - * uint32_t phandle; > - * > -- * fdtdec_add_reserved_memory(fdt, "framebuffer", &fb, > &phandle); -+ * fdtdec_add_reserved_memory(fdt, "framebuffer", > &fb, &phandle, false); > - * > - * This results in the following subnode being added to the=20 > top-level > - * /reserved-memory node: > -@@ -1056,11 +1056,12 @@ static inline int fdtdec_set_phandle(void=20 > *blob, int node, uint32_t phandle) > - * @param carveout information about the carveout region > - * @param phandlep return location for the phandle of the > carveout region > - * can be NULL if no phandle should be added > -+ * @param no_map add "no-map" property if true > - * @return 0 on success or a negative error code on failure > - */ > - int fdtdec_add_reserved_memory(void *blob, const char *basename, > - const struct fdt_memory *carveout, > -- uint32_t *phandlep); > -+ uint32_t *phandlep, bool no_map); > - > - /** > - * fdtdec_get_carveout() - reads a carveout from an FDT -diff --git=20 > a/lib/fdtdec.c b/lib/fdtdec.c -index 56bf9fcc79..b8fc5e2bff 100644 > ---- a/lib/fdtdec.c > -+++ b/lib/fdtdec.c > -@@ -1316,7 +1316,7 @@ static int fdtdec_init_reserved_memory(void > *blob) > - > - int fdtdec_add_reserved_memory(void *blob, const char *basename, > - const struct fdt_memory *carveout, > -- uint32_t *phandlep) > -+ uint32_t *phandlep, bool no_map) > - { > - fdt32_t cells[4] =3D {}, *ptr =3D cells; > - uint32_t upper, lower, phandle; > -@@ -1416,6 +1416,12 @@ int fdtdec_add_reserved_memory(void *blob,=20 > const char *basename, > - if (err < 0) > - return err; > - > -+ if (no_map) { > -+ err =3D fdt_setprop(blob, node, "no-map", NULL, 0); > -+ if (err < 0) > -+ return err; > -+ } > -+ > - /* return the phandle for the new node for the caller to > use */ > - if (phandlep) > - *phandlep =3D phandle; > -@@ -1481,7 +1487,7 @@ int fdtdec_set_carveout(void *blob, const char=20 > *node, const char *prop_name, > - fdt32_t value; > - void *prop; > -=20 > -- err =3D fdtdec_add_reserved_memory(blob, name, carveout, > &phandle); -+ err =3D fdtdec_add_reserved_memory(blob, name, > carveout, &phandle, false); > - if (err < 0) { > - debug("failed to add reserved memory: %d\n", err); > - return err; > -diff --git a/lib/optee/optee.c b/lib/optee/optee.c -index=20 > 457d4cca8a..963c2ff430 100644 > ---- a/lib/optee/optee.c > -+++ b/lib/optee/optee.c > -@@ -192,7 +192,7 @@ int optee_copy_fdt_nodes(const void *old_blob,=20 > void *new_blob) > - ret =3D > fdtdec_add_reserved_memory(new_blob, > - > nodename, > - > &carveout, -- > NULL); -+ > NULL, false); > - free(oldname); > -=20 > - if (ret < 0) > -diff --git a/test/dm/fdtdec.c b/test/dm/fdtdec.c -index=20 > 716993f706..4119003041 100644 > ---- a/test/dm/fdtdec.c > -+++ b/test/dm/fdtdec.c > -@@ -80,7 +80,7 @@ static int > dm_test_fdtdec_add_reserved_memory(struct unit_test_state *uts) > - resv.start =3D 0x1000; > - resv.end =3D 0x1fff; > - ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region", > -- &resv, &phandle)); > -+ &resv, &phandle, > false)); > -=20 > - /* Test /reserve-memory and its subnode should exist */ > - parent =3D fdt_path_offset(blob, "/reserved-memory"); > -@@ -101,7 +101,7 @@ static int > dm_test_fdtdec_add_reserved_memory(struct unit_test_state *uts) > - resv.start =3D 0x2000; > - resv.end =3D 0x2fff; > - ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region1", > -- &resv, &phandle1)); > -+ &resv, &phandle1, > false)); > - subnode =3D fdt_path_offset(blob, > "/reserved-memory/rsvd_region1"); > - ut_assert(subnode > 0); > - > -@@ -115,7 +115,7 @@ static int > dm_test_fdtdec_add_reserved_memory(struct unit_test_state *uts) > - resv.start =3D 0x1000; > - resv.end =3D 0x1fff; > - ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region2", > -- &resv, &phandle1)); > -+ &resv, &phandle1, > false)); > - subnode =3D fdt_path_offset(blob, > "/reserved-memory/rsvd_region2"); > - ut_assert(subnode < 0); > - > --- > -2.26.2 > - > diff --git > a/meta-isar/recipes-bsp/u-boot/files/0002-optee-add-property-no-map-to > -secure-reserved-memory.patch=20 > b/meta-isar/recipes-bsp/u-boot/files/0002-optee-add-property-no-map-to > -secure-reserved-memory.patch deleted file mode 100644 index=20 > 6a39968..0000000 ---=20 > a/meta-isar/recipes-bsp/u-boot/files/0002-optee-add-property-no-map-to > -secure-reserved-memory.patch > +++ /dev/null @@ -1,33 +0,0 @@ > -From 3e15c315f97401f394ae83ed17fbef72b765222a Mon Sep 17 00:00:00 > 2001 -From: Etienne Carriere > -Date: Thu, 10 Sep 2020 10:50:01 +0200 > -Subject: [PATCH] optee: add property no-map to secure reserved memory > - > -OP-TEE reserved memory node must set property "no-map" to prevent=20 > -Linux kernel from mapping secure memory unless what non-secure world=20 > -speculative accesses of the CPU can violate the memory firmware=20 > -configuration. > - > -Fixes: 6ccb05eae01b ("image: fdt: copy possible optee nodes to a=20 > loaded devicetree") -Signed-off-by: Etienne Carriere=20 > -Signed-off-by: Patrice Chotard=20 > ---- > - lib/optee/optee.c | 2 +- > - 1 file changed, 1 insertion(+), 1 deletion(-) > - > -diff --git a/lib/optee/optee.c b/lib/optee/optee.c -index=20 > 963c2ff430..9e6606568f 100644 > ---- a/lib/optee/optee.c > -+++ b/lib/optee/optee.c > -@@ -192,7 +192,7 @@ int optee_copy_fdt_nodes(const void *old_blob,=20 > void *new_blob) > - ret =3D > fdtdec_add_reserved_memory(new_blob, > - > nodename, > - > &carveout, -- > NULL, false); -+ > NULL, true); > - free(oldname); > -=20 > - if (ret < 0) > --- > -2.26.2 > - > diff --git a/meta-isar/recipes-bsp/u-boot/u-boot-2020.10.inc > b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc similarity index 64%=20 > rename from meta-isar/recipes-bsp/u-boot/u-boot-2020.10.inc > rename to meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc > index 604776a..964ae6d 100644 > --- a/meta-isar/recipes-bsp/u-boot/u-boot-2020.10.inc > +++ b/meta-isar/recipes-bsp/u-boot/u-boot-2021.10.inc > @@ -5,9 +5,11 @@ > =20 > require recipes-bsp/u-boot/u-boot-custom.inc > =20 > +DEBIAN_BUILD_DEPENDS +=3D ", libssl-dev" > + I guess that should go into the inc and not the recipe. If that inc should = still support older u-boots it should be somehow done conditionally dependi= ng on $PV[0] > 2020 My guess is that you have another board for which you can test, and you mig= ht have that very line in another recipe. Yes. Will move to the inc in meta layer.=20 I am not sure if making it conditionally dependent is worth the effort. We = could just add it. I see no harm in having an extra dependency for the olde= r u-boots. Maybe downstream users with frozen base-apts might have an issue, but they = could always remove it in their layer. Thanks, Vijai Kumar K Henning > SRC_URI +=3D " \ > https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ > " > -SRC_URI[sha256sum] =3D > "0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622" > +SRC_URI[sha256sum] =3D > "cde723e19262e646f2670d25e5ec4b1b368490de950d4e26275a988c36df0bd4" S =3D= =20 > "${WORKDIR}/u-boot-${PV}" diff --git=20 > a/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb > b/meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb > similarity index 100% rename from > meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2020.10.bb rename to=20 > meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb diff --git=20 > a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb > b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb deleted=20 > file mode 100644 index 39fceb2..0000000 ---=20 > a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb +++=20 > /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (c) Siemens AG, 2020 -# -#=20 > SPDX-License-Identifier: MIT > - > -require u-boot-${PV}.inc > - > -SRC_URI +=3D " \ > - > file://0001-fdtdec-optionally-add-property-no-map-to-created-res.patch > \ > - > file://0002-optee-add-property-no-map-to-secure-reserved-memory.patch" > diff --git > a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb > b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb new file=20 > mode 100644 index 0000000..6d95643 --- /dev/null +++=20 > b/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2021.10.bb @@ -0,0 > +1,6 @@ +# > +# Copyright (c) Siemens AG, 2020 > +# > +# SPDX-License-Identifier: MIT > + > +require u-boot-${PV}.inc