From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7026294254479605760 X-Received: by 2002:a2e:860f:: with SMTP id a15mr5038987lji.422.1636437994134; Mon, 08 Nov 2021 22:06:34 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6512:3499:: with SMTP id v25ls104652lfr.0.gmail; Mon, 08 Nov 2021 22:06:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJy4gcKhUBL9D2jVHwi3utXlGUEFKGm3cgdM1PJ+uUYc9nZ58qDd+3AYCV04BS330t9QwpuS X-Received: by 2002:a19:ac46:: with SMTP id r6mr4699834lfc.42.1636437992930; Mon, 08 Nov 2021 22:06:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636437992; cv=none; d=google.com; s=arc-20160816; b=Ur0bJBICQ0mERoKhpVB0He8UY0Eror/pztJ/eTm/XziclH+5Xc80GFUSrFoCe2woJR YSIUtq7PPQXwP3V6gA5L8qOgducQi/92vKR6OQNYbhQ37yQtWxfjXC4fVNCOJi1/BqD/ v1pQOCJovqJUqUxR3O0PK72bGattLOiNx/R7bAZgIUexGcvGu0QBq0QQmukUGktcCzeY x3rHVnmAQTIKlf6Tpi2JqL4VSn7stQtxcl5l0rZSwvBJpNq9TjbQSLhOK3uunpAry7Gs wO1ThBI+CtqU1sWGbGIL8iF0i49RkEOTXrHsJdZ+w3YsPazTEBh1TzPN6cWKmK/9jwIJ 7fyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:to:subject; bh=spTEvQ/UMDv0IeTyzdB6pDRCO7dOw5F0Zue1oxwL/l8=; b=RkuN2FlMkqTzqETm+FHZwc3xSBrF6gRZcsUHFdZrGgrtxJ1gPq2bzylRFU+lkfMFxb K8z/KDiAe6wcHu+zc6U+67jdrVFqVvP+R1UcdJJ54WxgFI4Jy94d6Vl5GaEKkma64A+9 cWx+jDJbYggmbB9nWVUvpuzK+OlVcYOTFUCccb+mm/mKXheJFRwV3NbybjQ7SongDlKg UzNwjtGQMXA1SpPhCsomZBBO85/khraG6sHMdMv9pJXsVfQejQwrRRjFyiKsIZfeRuPq srWnNNzBTJOjbXyEhLNwfOysnso5f4lP7tOsJMWCZghzzH5QppQwleODACRJkfiUIDH+ MgZQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id b29si175319ljf.6.2021.11.08.22.06.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 08 Nov 2021 22:06:32 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 1A966V9o017179 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 9 Nov 2021 07:06:32 +0100 Received: from [167.87.75.31] ([167.87.75.31]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 1A966VB4017856; Tue, 9 Nov 2021 07:06:31 +0100 Subject: Re: [PATCH v3 1/2] meta-isar: u-boot: Update to 2021.10 To: Vijai Kumar K , isar-users@googlegroups.com References: <20211105061521.2142204-2-Vijaikumar_Kanagarajan@mentor.com> <20211106121203.3210294-1-Vijaikumar_Kanagarajan@mentor.com> From: Jan Kiszka Message-ID: <035f0906-3e17-d9a8-f0cb-0cf029753524@siemens.com> Date: Tue, 9 Nov 2021 07:06:30 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20211106121203.3210294-1-Vijaikumar_Kanagarajan@mentor.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: 2lW220SS7n7p On 06.11.21 13:12, Vijai Kumar K wrote: > Update to the latest u-boot. > > Newer versions of u-boot require libssl-dev:native for compilation. > It also needs libssl-dev of the host architecture for cross compilation > of tools. > > Signed-off-by: Vijai Kumar K > --- > > Hi, > > I am not sure why we are not conditionally compiling u-boot tools based > on U_BOOT_TOOLS_PACKAGE. We build tools every time but only package them > once the above variable is set. > > I have left it untouched. When we finally do, we should check if > U_BOOT_TOOLS_PACKAGE is set along with ISAR_CROSS_COMPILE. > > I could send a patch if we agree that the tools should only be compiled > when U_BOOT_TOOLS_PACKAGE is set. I agree that we can safe those few cycles. I suppose I was just too lazy to propaget that variable to the rules file and make things conditional there as well. > > Thanks, > Vijai Kumar K > > > ...y-add-property-no-map-to-created-res.patch | 151 ------------------ > ...rty-no-map-to-secure-reserved-memory.patch | 33 ---- > ...{u-boot-2020.10.inc => u-boot-2021.10.inc} | 5 +- > ...0.10.bb => 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, 10 insertions(+), 195 deletions(-) > delete mode 100644 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-secure-reserved-memory.patch > rename meta-isar/recipes-bsp/u-boot/{u-boot-2020.10.inc => u-boot-2021.10.inc} (50%) > rename meta-isar/recipes-bsp/u-boot/{u-boot-de0-nano-soc_2020.10.bb => u-boot-de0-nano-soc_2021.10.bb} (100%) > delete mode 100644 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 > > diff --git a/meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-property-no-map-to-created-res.patch b/meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-property-no-map-to-created-res.patch > deleted file mode 100644 > index 8a32fc1..0000000 > --- a/meta-isar/recipes-bsp/u-boot/files/0001-fdtdec-optionally-add-property-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 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 added reserved memory node. > - > -Property no-map is used by the Linux kernel to not not map memory > -in its static memory mapping. It is needed for example for the| > -consistency of system non-cached memory and to prevent speculative > -accesses to some firewalled memory. > - > -No functional change. A later change will update to OPTEE library to > -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 > -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, void *dst) > - pmp_mem.start = addr; > - pmp_mem.end = addr + size - 1; > - err = fdtdec_add_reserved_memory(dst, basename, &pmp_mem, > -- &phandle); > -+ &phandle, false); > - if (err < 0 && err != -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 152eb07b9e..62d1660973 100644 > ---- a/include/fdtdec.h > -+++ b/include/fdtdec.h > -@@ -1029,7 +1029,7 @@ static inline int fdtdec_set_phandle(void *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 top-level > - * /reserved-memory node: > -@@ -1056,11 +1056,12 @@ static inline int fdtdec_set_phandle(void *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 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] = {}, *ptr = cells; > - uint32_t upper, lower, phandle; > -@@ -1416,6 +1416,12 @@ int fdtdec_add_reserved_memory(void *blob, const char *basename, > - if (err < 0) > - return err; > - > -+ if (no_map) { > -+ err = 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 = phandle; > -@@ -1481,7 +1487,7 @@ int fdtdec_set_carveout(void *blob, const char *node, const char *prop_name, > - fdt32_t value; > - void *prop; > - > -- err = fdtdec_add_reserved_memory(blob, name, carveout, &phandle); > -+ err = 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 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, void *new_blob) > - ret = fdtdec_add_reserved_memory(new_blob, > - nodename, > - &carveout, > -- NULL); > -+ NULL, false); > - free(oldname); > - > - if (ret < 0) > -diff --git a/test/dm/fdtdec.c b/test/dm/fdtdec.c > -index 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 = 0x1000; > - resv.end = 0x1fff; > - ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region", > -- &resv, &phandle)); > -+ &resv, &phandle, false)); > - > - /* Test /reserve-memory and its subnode should exist */ > - parent = 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 = 0x2000; > - resv.end = 0x2fff; > - ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region1", > -- &resv, &phandle1)); > -+ &resv, &phandle1, false)); > - subnode = 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 = 0x1000; > - resv.end = 0x1fff; > - ut_assertok(fdtdec_add_reserved_memory(blob, "rsvd_region2", > -- &resv, &phandle1)); > -+ &resv, &phandle1, false)); > - subnode = 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 b/meta-isar/recipes-bsp/u-boot/files/0002-optee-add-property-no-map-to-secure-reserved-memory.patch > deleted file mode 100644 > index 6a39968..0000000 > --- 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 > -Linux kernel from mapping secure memory unless what non-secure world > -speculative accesses of the CPU can violate the memory firmware > -configuration. > - > -Fixes: 6ccb05eae01b ("image: fdt: copy possible optee nodes to a loaded devicetree") > -Signed-off-by: Etienne Carriere > -Signed-off-by: Patrice Chotard > ---- > - 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 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, void *new_blob) > - ret = fdtdec_add_reserved_memory(new_blob, > - nodename, > - &carveout, > -- NULL, false); > -+ NULL, true); > - free(oldname); > - > - 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 50% > 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..158c297 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,12 @@ > > require recipes-bsp/u-boot/u-boot-custom.inc > > +DEBIAN_BUILD_DEPENDS += ", libssl-dev:native" > +DEBIAN_BUILD_DEPENDS += "${@', libssl-dev' if d.getVar('ISAR_CROSS_COMPILE') == '1' else ''}" > + > SRC_URI += " \ > https://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \ > " > -SRC_URI[sha256sum] = "0d481bbdc05c0ee74908ec2f56a6daa53166cc6a78a0e4fac2ac5d025770a622" > +SRC_URI[sha256sum] = "cde723e19262e646f2670d25e5ec4b1b368490de950d4e26275a988c36df0bd4" > > S = "${WORKDIR}/u-boot-${PV}" > diff --git 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 meta-isar/recipes-bsp/u-boot/u-boot-de0-nano-soc_2021.10.bb > diff --git 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 file mode 100644 > index 39fceb2..0000000 > --- a/meta-isar/recipes-bsp/u-boot/u-boot-stm32mp15x_2020.10.bb > +++ /dev/null > @@ -1,10 +0,0 @@ > -# > -# Copyright (c) Siemens AG, 2020 > -# > -# SPDX-License-Identifier: MIT > - > -require u-boot-${PV}.inc > - > -SRC_URI += " \ > - 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 mode 100644 > index 0000000..6d95643 > --- /dev/null > +++ 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 > Looks goot to me. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux