From patchwork Sat Dec 24 01:15:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 1719261 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=U9IpeWS1; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nf5hn0rpTz23dZ for ; Sat, 24 Dec 2022 12:15:53 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7E61C854BD; Sat, 24 Dec 2022 02:15:44 +0100 (CET) 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="U9IpeWS1"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C4C5C854C3; Sat, 24 Dec 2022 02:15:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,UPPERCASE_50_75 autolearn=no autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 0912B851DF for ; Sat, 24 Dec 2022 02:15:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bb@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1FdwA074418; Fri, 23 Dec 2022 19:15:39 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1671844539; bh=3GuVLltnaDg/w3xmyIWGCxS5+fAkPE9yzuarR9hjT5o=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=U9IpeWS1/XHSih9Kn6Q0DuDIxViadoF8S+EIZ6/YT5/bf/KRpDU0VK+YbSJoLhug7 H33TxwS+rihIVaiZCAElfMikms2LtXvCxgyY8ZMZbk2VWaYhWhA45+HWnGwxVikPI4 686tfX9y2vQt0VFy9cb15c8VuLvfFTIeoX+wTatA= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BO1FcLR000480 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Dec 2022 19:15:39 -0600 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 23 Dec 2022 19:15:38 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 23 Dec 2022 19:15:38 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1Fcls088871; Fri, 23 Dec 2022 19:15:38 -0600 From: Bryan Brattlof To: Tom Rini , Vignesh Raghavendra , Andrew Davis , Judith Mendez , Kamlesh Gurudasani CC: UBoot Mailing List , Bryan Brattlof Subject: [PATCH 1/5] configs: restrict am62ax wakup SPL size Date: Fri, 23 Dec 2022 19:15:21 -0600 Message-ID: <20221224011525.4696-2-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221224011525.4696-1-bb@ti.com> References: <20221224011525.4696-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1605; i=bb@ti.com; h=from:subject; bh=n7ohZHPYUsE/Ix7np5p9fHKcyaim3Ro7vTxcicB1JHY=; b=owNCWmg5MUFZJlNZnKflQwAAZf////Zfpv1uvPbjC5u/eHW/uXr27/2H32q/T7/P0/Z623+wARtq oYoAGgBoaPUDQAZDTTI0A0A9QAAHpA0GIaaA0yAAGmnpNAPUNDR6jQNP1J7VENBo0eiaADRoyAND1A 0GJk0YmgGgBoNAyGhoMCZPUHqNGhhGhoBtQ2poyNNGjQgHpqBo00GjI0YQ0DJppiZGQBpkBoBgmRky NAMJkwgGQDJkYRoNADRkaAAA1JW49wcgAMxBCh4tUI4Rg2U6Lzs1YoZYioprFnZ+ejAeqNzvih0hik 3SmPzyGUtXVJE3TiKERYy6l04WejNWx7bBa4vZP84rZoumHLtkTHg3WWwg4FwpDJnAtdjSTwS8JJwk 4vUX7GmQkSx8WhGez+s7M9TqlZyjwTy7TpagomOSp6xJNiDkhM3Jy9P7vawXLRraGNJGkhbrQAzCHT FQvuS/PUWx+/JHuD427h4WYiYcLBR98h3ge/S4fHSo5G5RHZTENZoclBSnGfRkvB/rhi2k4Iyc5ITn GtpkUzzKAwXIBdatE4MJ/4qRIgyNb6798OA+jsZsonHwvwXWiXBdqAPukZL9pqXHWQ+ArTnRhxtgMG otpYe6utA4v/Bth3VmdKWi/vSn+Au4MdK47htNEBuaowmLR6cWxCH5M/Az40Va/4u5IpwoSE5T8qGA X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 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.6 at phobos.denx.de X-Virus-Status: Clean In its current form, the am62a's wakeup SPL is fairly small, however this will not remain as more boot modes are eventually added. To protect us from overflowing our ~256k of HSM SRAM, add limits and check during the wakeup SPL build. Signed-off-by: Bryan Brattlof --- configs/am62ax_evm_r5_defconfig | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig index 59d5f4f80eb8d..bfffb8eef77d8 100644 --- a/configs/am62ax_evm_r5_defconfig +++ b/configs/am62ax_evm_r5_defconfig @@ -13,7 +13,9 @@ CONFIG_SPL_TEXT_BASE=0x43c00000 CONFIG_SPL_MMC=y CONFIG_SPL_SERIAL=y CONFIG_SPL_STACK_R_ADDR=0x82000000 -CONFIG_SPL_SIZE_LIMIT=0x40000 +CONFIG_SPL_SYS_MALLOC_F_LEN=0x7145 +CONFIG_SPL_SIZE_LIMIT=0x3A7F0 +CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y @@ -22,11 +24,14 @@ CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y # CONFIG_DISPLAY_CPUINFO is not set -CONFIG_SPL_MAX_SIZE=0x58000 +CONFIG_SPL_SIZE_LIMIT_SUBTRACT_GD=y +CONFIG_SPL_SIZE_LIMIT_SUBTRACT_MALLOC=y +CONFIG_SPL_MAX_SIZE=0x3B000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y -CONFIG_SPL_BSS_START_ADDR=0x43c37800 -CONFIG_SPL_BSS_MAX_SIZE=0x5000 +CONFIG_SPL_BSS_START_ADDR=0x43c3b000 +CONFIG_SPL_BSS_MAX_SIZE=0x3000 +CONFIG_SPL_SYS_REPORT_STACK_F_USAGE=y CONFIG_SPL_SYS_MALLOC_SIMPLE=y CONFIG_SPL_STACK_R=y CONFIG_SPL_SEPARATE_BSS=y From patchwork Sat Dec 24 01:15:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 1719264 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=UIKTJRIl; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nf5jM4FB3z23dZ for ; Sat, 24 Dec 2022 12:16:23 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 15A21854D0; Sat, 24 Dec 2022 02:15:52 +0100 (CET) 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="UIKTJRIl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 369178523F; Sat, 24 Dec 2022 02:15:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 1960C854B2 for ; Sat, 24 Dec 2022 02:15:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bb@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1Fd7O074419; Fri, 23 Dec 2022 19:15:39 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1671844539; bh=Gbj9U4Ax4ZANSEIferKcGLuf+gw80f8ZJfofacy+IGc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UIKTJRIl4OvOD1wNXg4KpBrZxB+N/z+0Et0fulgP+2H9A0uQDPiLpfXtawROutttR 41Me7ssHRAiC0JPmdic07IHFwFClUj3D+i11uyIBpcL1B/1zceUuovCjScFAY/f0RA wHtq/rDVlwDkUuliDsQBhVPVmNCVE2b6sHAhS0Fk= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BO1FdLl028618 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Dec 2022 19:15:39 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 23 Dec 2022 19:15:38 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 23 Dec 2022 19:15:38 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1FcP3078690; Fri, 23 Dec 2022 19:15:38 -0600 From: Bryan Brattlof To: Tom Rini , Vignesh Raghavendra , Andrew Davis , Judith Mendez , Kamlesh Gurudasani CC: UBoot Mailing List , Bryan Brattlof Subject: [PATCH 2/5] configs: am62a: move stack and heap to HSM RAM Date: Fri, 23 Dec 2022 19:15:22 -0600 Message-ID: <20221224011525.4696-3-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221224011525.4696-1-bb@ti.com> References: <20221224011525.4696-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1296; i=bb@ti.com; h=from:subject; bh=xZXm7Ky0uwGvkBaoNyPfaF06gAxt6YvAQw2OVe6N7ko=; b=owNCWmg5MUFZJlNZDHmXOwAAbX/////Zm3/xv/6de7fZ+uvu79Hr7/23+0v/5s0qt1XrteewARtW CHqA9TIBkAAAADQBoAAeoAABo0Gg9IZAaabUaAGQDQAaDQeoNPU9T1GntFEBoNBoNNGmmQNDQA0MjC BkNGmmQaeoAAB6T0mmgzUAGjJo00xNGQyYjIABpkAdBkNGmmjTQAaGhoDEDQZBk0aAAxNAaYgNNojB Mg9QYQNAAZAxqBoDCaADh9aGtgoLLN8juDGwIEQLHQGKUSzImjdtdO9YgxNeMjA1W+kTIT9nlK0LMn HG74PtNYkcRIyTxonRTQhnCB1zwWcWz6Cy6jM4Bu5NtyWoByF1rMm6zQViwZwV6hLOqn/yZkAOpwz9 AI9DSmejfBGfcm0Wp0+j9C4e4fUgLWYaBjdAxekP6p10t/LWMeAlC5VczpJqqL32AcihVK+YJUhKfi /yDiZ+b9eg8LBcTvC56Rn66YUIaRwaUbg1sjV1gdM9XCpNEcJxipAQiI5FpQOy/GnUqhgm41/VpnGD LwAP43K9YKzD3ncrFWs55CUSuCTpEJqoBg4Cff0k6gDElIbGn6L7T0oPlqcrI0UOrEIb+39MQIH9EE f/lAUWbnjFrDBIr6ZChQCXoDyzuNpF5xeyudgHfww1TfFhIx0BQnqeaYlsN/xdyRThQkAx5lzs X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 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.6 at phobos.denx.de X-Virus-Status: Clean Texas Instruments has begun enabling security setting on the SoCs they produce to instruct ROM and TIFS to begin protecting the Security Management Subsystem (SMS) from other binaries we load into the chip by default. One way ROM does this is by enabling firewalls to protect the OCSRAM region it's using during bootup. Only after TIFS has started (and had time to disable the OCSRAM firewall region) will we have write access to the region. This means we will need to move the stack & heap from OCSRAM to HSM RAM and reduce the size of BSS and the SPL to allow it to fit properly. Signed-off-by: Bryan Brattlof --- configs/am62ax_evm_r5_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configs/am62ax_evm_r5_defconfig b/configs/am62ax_evm_r5_defconfig index bfffb8eef77d8..0e48f0afa20a5 100644 --- a/configs/am62ax_evm_r5_defconfig +++ b/configs/am62ax_evm_r5_defconfig @@ -19,7 +19,7 @@ CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0x3500 CONFIG_SPL_FS_FAT=y CONFIG_SPL_LIBDISK_SUPPORT=y CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y -CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7000ffff +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x43c3a7f0 CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x80080000 CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y From patchwork Sat Dec 24 01:15:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 1719263 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=yglL7NUy; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nf5j74nnsz23dZ for ; Sat, 24 Dec 2022 12:16:11 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 56C35854C2; Sat, 24 Dec 2022 02:15:50 +0100 (CET) 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="yglL7NUy"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1D69B854C7; Sat, 24 Dec 2022 02:15:46 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 0919E8523F for ; Sat, 24 Dec 2022 02:15:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bb@ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1Fc6L074414; Fri, 23 Dec 2022 19:15:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1671844539; bh=Myzw3zdIyhInvQZKh0K83zcPMeKY3QRgg2DIEywnoeI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yglL7NUy54bPVYhmPo5v9EkCNU2v2CVk0lzI7YZz1/yT0CUVmvopkkaZXMknOj6+X Lp4WP7zG4+E64eQoMnE0y46LgwYFeGucLrDFv6R24iNiMmUEITJv36dDMBdRovmsPf FWwadCUXZArddBOYsdVGl/06zv5CGsTV3jjid/oI= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BO1FcTu028614 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Dec 2022 19:15:38 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 23 Dec 2022 19:15:38 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 23 Dec 2022 19:15:38 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1FcFB127889; Fri, 23 Dec 2022 19:15:38 -0600 From: Bryan Brattlof To: Tom Rini , Vignesh Raghavendra , Andrew Davis , Judith Mendez , Kamlesh Gurudasani CC: UBoot Mailing List , Bryan Brattlof Subject: [PATCH 3/5] arm: mach-k3: copy bootindex to OCRAM for main domain SPL Date: Fri, 23 Dec 2022 19:15:23 -0600 Message-ID: <20221224011525.4696-4-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221224011525.4696-1-bb@ti.com> References: <20221224011525.4696-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=4035; i=bb@ti.com; h=from:subject; bh=kZ6T9X3cjG2w6812VaUkpCNmuFJCQHOiiykVLYO/Xvg=; b=owNCWmg5MUFZJlNZm0VYuwAAZX///rbt/vf3PIP//727v57m7g//+/W5nv/3dH9/w/741XWwARsY HagB6mhoAAANAAAyNBoADQAAAGIAAAPUAANAGho2o09RtRpieSZPJ6ogDRoNNAHqA9TQGgaAAaBp6h o0ANPUaBkDT1DQaepkGQA9EBptQNNDTQAHqAHqHqCGh6mjTRkGjINGQNNGRo00YEBoNAwE0ZAAaGjI AMjQ00GQMgAaGgBhBiNAAALQlavBpwIUKGISICbMS4ASVYxIZ8bdoLGX8UdqJCzYFqkXq6aYRrNnPa FUtfEzM7KMEhE0COyFQiqmzcHT0cJBF5CMs9q938XYZuVyByKFp4M4MIhVGqsczbic4fKrPBz5r6J5 tdcbOyfU1MWiPIgBqKdIIutFcpZA5yvr1AT4iDJ/ofEFhccDMGeFhcqDKXgt5NqlC07tL2Gz6elRLF A4QBIXjmoLhiGvOGVpSL30qZhKmym5L50oO86GOacSc9ApT++HUpkLpDnXoXmrRTBIZiGRoghj/XCT 6cYQzZJWUleVjrTUT8ezfLpFDXN3SjUkV6uSZnbYXZrCQNrFK4uMDLRpB7co5sj2zHyCPuqrSeFQX5 c5Qn8cWjEYpDUFFq8ZehtDL9UEgKBYiV9csYEICheEsATJZ3Y8UBiiTHgf4u5IpwoSE2irF2A= X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 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.6 at phobos.denx.de X-Virus-Status: Clean Texas Instruments has begun enabling security settings on the SoCs it produces to instruct ROM and TIFS to begin protecting the Security Management Subsystem (SMS) from other binaries we load into the chip by default. One way ROM and TIFS do this is by enabling firewalls to protect the OCSRAM and HSM RAM regions they're using during bootup. The HSM RAM the wakeup SPL is in is firewalled by TIFS to protect itself from the main domain applications. This means the 'bootindex' value in HSM RAM, left by ROM to indicate if we're using the primary or secondary boot-method, must be moved to OCSRAM (that TIFS has open for us) before we make the jump to the main domain so the main domain's bootloaders can keep access to this information. Signed-off-by: Bryan Brattlof --- arch/arm/mach-k3/Kconfig | 4 +++- arch/arm/mach-k3/am62a7_init.c | 16 ++++++++++++++-- arch/arm/mach-k3/include/mach/am62a_hardware.h | 17 ++++++++++++++++- 3 files changed, 33 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-k3/Kconfig b/arch/arm/mach-k3/Kconfig index 87da6b49ee6b7..a8c3a593d5704 100644 --- a/arch/arm/mach-k3/Kconfig +++ b/arch/arm/mach-k3/Kconfig @@ -69,7 +69,9 @@ config SYS_K3_BOOT_PARAM_TABLE_INDEX default 0x41cffbfc if SOC_K3_J721E default 0x41cfdbfc if SOC_K3_J721S2 default 0x701bebfc if SOC_K3_AM642 - default 0x43c3f290 if SOC_K3_AM625 || SOC_K3_AM62A7 + default 0x43c3f290 if SOC_K3_AM625 + default 0x43c3f290 if SOC_K3_AM62A7 && CPU_V7R + default 0x7000f290 if SOC_K3_AM62A7 && ARM64 help Address at which ROM stores the value which determines if SPL is booted up by primary boot media or secondary boot media. diff --git a/arch/arm/mach-k3/am62a7_init.c b/arch/arm/mach-k3/am62a7_init.c index e9569f0d26418..02da24a3d6f0d 100644 --- a/arch/arm/mach-k3/am62a7_init.c +++ b/arch/arm/mach-k3/am62a7_init.c @@ -25,8 +25,11 @@ static struct rom_extended_boot_data bootdata __section(".data"); static void store_boot_info_from_rom(void) { bootindex = *(u32 *)(CONFIG_SYS_K3_BOOT_PARAM_TABLE_INDEX); - memcpy(&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO, - sizeof(struct rom_extended_boot_data)); + + if (IS_ENABLED(CONFIG_CPU_V7R)) { + memcpy(&bootdata, (uintptr_t *)ROM_ENTENDED_BOOT_DATA_INFO, + sizeof(struct rom_extended_boot_data)); + } } static void ctrl_mmr_unlock(void) @@ -123,6 +126,15 @@ void board_init_f(ulong dummy) k3_sysfw_loader(true, NULL, NULL); #endif +#if defined(CONFIG_CPU_V7R) + /* + * Relocate boot information to OCRAM (after TIFS has opend this + * region for us) so the next bootloader stages can keep access to + * primary vs backup bootmodes. + */ + writel(bootindex, K3_BOOT_PARAM_TABLE_INDEX_OCRAM); +#endif + /* * Force probe of clk_k3 driver here to ensure basic default clock * configuration is always done. diff --git a/arch/arm/mach-k3/include/mach/am62a_hardware.h b/arch/arm/mach-k3/include/mach/am62a_hardware.h index 52b0d9b3cb95c..13bf50f147b1e 100644 --- a/arch/arm/mach-k3/include/mach/am62a_hardware.h +++ b/arch/arm/mach-k3/include/mach/am62a_hardware.h @@ -68,7 +68,22 @@ #define ROM_ENTENDED_BOOT_DATA_INFO 0x43c3f1e0 -/* Use Last 2K as Scratch pad */ +#define K3_BOOT_PARAM_TABLE_INDEX_OCRAM 0x7000F290 + +/* + * During the boot process ROM will kill anything that writes to OCSRAM. + * This means the wakeup SPL cannot use this region during boot. To + * complicate things, TIFS will set a firewall between HSM RAM and the + * main domain. + * + * So, during the wakeup SPL, we will need to store the EEPROM data + * somewhere in HSM RAM, and the main domain's SPL will need to store it + * somewhere in OCSRAM + */ +#ifdef CONFIG_CPU_V7R +#define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x43c30000 +#else #define TI_SRAM_SCRATCH_BOARD_EEPROM_START 0x70000001 +#endif /* CONFIG_CPU_V7R */ #endif /* __ASM_ARCH_AM62A_HARDWARE_H */ From patchwork Sat Dec 24 01:15:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 1719262 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=nRDJMLq0; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nf5ht5cCpz23dZ for ; Sat, 24 Dec 2022 12:15:58 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1B1798523F; Sat, 24 Dec 2022 02:15:48 +0100 (CET) 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="nRDJMLq0"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E0B0E854BE; Sat, 24 Dec 2022 02:15:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) (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 1714C854AE for ; Sat, 24 Dec 2022 02:15:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bb@ti.com Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1FdMJ074426; Fri, 23 Dec 2022 19:15:39 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1671844539; bh=KNLXyX32r1rgy8hDrKgih5SFvC5sDO6lJ3joC4xZjj0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nRDJMLq0XouG+6K7uet2oG8/OA2VIiCMPQGQycwidP2YuJTzLfIEzpdO3dVF9abpp scFtc9pqnB6iCZYuCbtYBc4uEY8iX8zOml5xCfXwG44Midh/UxahxJ4bP/vWUe4zHz Sii54Hh0kj6Zd06WETG8IEbhM2hnLeFCApjgUIpQ= Received: from DFLE109.ent.ti.com (dfle109.ent.ti.com [10.64.6.30]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BO1Fdqs000483 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Dec 2022 19:15:39 -0600 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE109.ent.ti.com (10.64.6.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 23 Dec 2022 19:15:38 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 23 Dec 2022 19:15:38 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1FcDt016195; Fri, 23 Dec 2022 19:15:38 -0600 From: Bryan Brattlof To: Tom Rini , Vignesh Raghavendra , Andrew Davis , Judith Mendez , Kamlesh Gurudasani CC: UBoot Mailing List , Bryan Brattlof Subject: [PATCH 4/5] configs: am62a: convert bootcmd to distro_bootcmd Date: Fri, 23 Dec 2022 19:15:24 -0600 Message-ID: <20221224011525.4696-5-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221224011525.4696-1-bb@ti.com> References: <20221224011525.4696-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2688; i=bb@ti.com; h=from:subject; bh=qCjgDBis6c5bLBlk0qaJVN59jFiuZJjLabG7xIbujTo=; b=owNCWmg5MUFZJlNZp5RUugAAbP///77/77v+7l//d/r7/8R659er/S/53+5L/fyutdXrrPawARsz aQaGjRoGg00aaA000DJpoAyaZAA0NAMI0YQGhoaDTRoaAAND1NPUA0APSbUHqDQaDtTQPUBoAANABk DQADTQA00aA9QANAAyNDTQGmagPUYm1AGmnqaAAD0mQxqCqQ09RoxNAGgADQaA0MQBoAANANAGg00w QNGTCGjQDQGjQGgNBpoyaMg2kEidR2LtAjrCoCeRj0ZmCEaFldhLkd30cC2qltxcrhGcZzwykX6GFn sIuqcVulbucQmAuGg4goGMS906iLGRh+/6TCW3g6KdxYbShHV8GKCwoisxcLlYY6YQ4R13KpOoK+is ojqMIIaXszbYgxy54VDHb/safeCkfE4xLN6ZsuKsBMaYuWjLKj+c4aUcuz8OspMo05tfQJhwLgqM8J HstdUIGjktFmy7WLxz4FRZcYyN3/rhid27B+QrYGxOwwfgxU8jscWo1Pd1ULTm5doRs282dSAMpvJp FPchLGTJT4+wwHc8cagDLClS8DYAPpey0lkDYEz8EgVAXFWEKOTJUfyWtUTl6v/wNbObQ2QpuPhG8Q Y7E+AdOMFwGZXIqOwcPlBqAfx5aGvW0oKkoz0Xb7UbNoIZ8SPxjnQpDM0QA3LkpY2G3u/8XckU4UJC nlFS6A== X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 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.6 at phobos.denx.de X-Virus-Status: Clean We're currently using CONFIG_BOOTCOMMAND to run custom boot scripts to jump into linux. While this works, let's begin the transition to more distribution friendly jumps to linux by enabling distro_bootcmd. Convert the custom bootcmd to a distro_bootcmd Signed-off-by: Judith Mendez Signed-off-by: Bryan Brattlof --- configs/am62ax_evm_a53_defconfig | 1 - include/configs/am62ax_evm.h | 29 ++++++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/configs/am62ax_evm_a53_defconfig b/configs/am62ax_evm_a53_defconfig index 0c2cf945c62bf..6e97fd4060e05 100644 --- a/configs/am62ax_evm_a53_defconfig +++ b/configs/am62ax_evm_a53_defconfig @@ -20,7 +20,6 @@ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x80480000 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set CONFIG_SPL_LOAD_FIT=y CONFIG_SPL_LOAD_FIT_ADDRESS=0x81000000 -CONFIG_BOOTCOMMAND="run findfdt; run envboot; run init_${boot}; run get_kern_${boot}; run get_fdt_${boot}; run get_overlay_${boot}; run run_kern" CONFIG_SPL_MAX_SIZE=0x58000 CONFIG_SPL_PAD_TO=0x0 CONFIG_SPL_HAS_BSS_LINKER_SECTION=y diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 5406c39350f64..0bc0b13922f0f 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -9,7 +9,6 @@ #define __CONFIG_AM62AX_EVM_H #include -#include #include #include @@ -55,12 +54,36 @@ "${bootdir}/${name_fit}\0" \ "partitions=" PARTS_DEFAULT +#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \ + DEFAULT_MMC_TI_ARGS \ + EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ + "bootcmd_ti_mmc=" \ + "run findfdt; run envboot; run init_mmc;" \ + "run get_kern_mmc; run get_fdt_mmc;" \ + "run get_overlay_mmc;" \ + "run run_kern;\0" + +#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ + "ti_mmc " + +#if CONFIG_IS_ENABLED(CMD_MMC) + #define BOOT_TARGET_MMC(func) \ + func(TI_MMC, ti_mmc, na) +#else + #define BOOT_TARGET_MMC(func) +#endif /* CONFIG_IS_ENABLED(CMD_MMC) */ + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC(func) + +#include + /* Incorporate settings into the U-Boot environment */ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ - DEFAULT_MMC_TI_ARGS \ + DEFAULT_FIT_TI_ARGS \ EXTRA_ENV_AM62A7_BOARD_SETTINGS \ - EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ + BOOTENV /* Now for the remaining common defines */ #include From patchwork Sat Dec 24 01:15:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Brattlof X-Patchwork-Id: 1719266 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.a=rsa-sha256 header.s=ti-com-17Q1 header.b=F3uQjts4; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Nf5jr1Xzrz23dZ for ; Sat, 24 Dec 2022 12:16:48 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 96FFB854D4; Sat, 24 Dec 2022 02:15:58 +0100 (CET) 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="F3uQjts4"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6E8B2851DF; Sat, 24 Dec 2022 02:15:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) (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 1C47D854B3 for ; Sat, 24 Dec 2022 02:15:40 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=bb@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1FdUY115366; Fri, 23 Dec 2022 19:15:39 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1671844539; bh=VMMen7NXaarntDwcClDfY6oJ3+tNlueXo7p7CiB2Pwo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=F3uQjts4LZFD+UQmsvsN7kjLCzSxAi5FeU5bjLWuXa2yySeTXhvguyR4l5mINXyaH ZFBoqwkX9jqMOMGgZb/rBxcCpr/RnNCUF5vZH45TpqnegwmH8DtKma6R/r6D3V8E7T G+8AWTe5wifZbbm7S9LIHvfwKZraAhP5cGNkUvY0= Received: from DLEE110.ent.ti.com (dlee110.ent.ti.com [157.170.170.21]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2BO1FdDH055391 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 23 Dec 2022 19:15:39 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 23 Dec 2022 19:15:38 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 23 Dec 2022 19:15:38 -0600 Received: from localhost (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2BO1Fcdf088874; Fri, 23 Dec 2022 19:15:38 -0600 From: Bryan Brattlof To: Tom Rini , Vignesh Raghavendra , Andrew Davis , Judith Mendez , Kamlesh Gurudasani CC: UBoot Mailing List , Bryan Brattlof Subject: [PATCH 5/5] configs: am62a: use kernel fitImage when using secure bootflow Date: Fri, 23 Dec 2022 19:15:25 -0600 Message-ID: <20221224011525.4696-6-bb@ti.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20221224011525.4696-1-bb@ti.com> References: <20221224011525.4696-1-bb@ti.com> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1420; i=bb@ti.com; h=from:subject; bh=A06cacN7b1ZUFf1kynBHHcXt6F1TTc95Dbtk/18G8ww=; b=owNCWmg5MUFZJlNZRHagVwAAX3///n7vc7Vy+yvfs5+f/u+7427/9W/33ffN/pn75/7fwv8wARmw Hamj1DQNAAA0A0NADIAAAaaABo0NNAADRoNAaaGQeoBpo0BtEMTQ0emk2REAAaaaaaNNDQBo0DQGjC aBoaaaMmQMgaBoDRkepkMQZGjTQZGTEMgyAGJkaAAhoxMJoGhk0aaDQAANGExNAaNAGJoAMmhhqABp kMmgA9IDQyAyaaBoAMmgDBlooCoFiEod+GP9NJxIdwkcihox4BaBMNMlIUAJ/vCN+j5sKmXLt0l479 0w/QOkLIo9IjBo1/NBHDm5DGOKCTqJdtDyMpwcdjbJxuBBKFvXbmJCYB/NhGjkQAJAouysLuvF71ba qfjAOyjNRCUhFmpKfB1tZ0xKPcfuCDUJy4jTaosdSfmPkDNASAmIfX+jrfV5QSIJSLJHFHIf3U3Y0Y +QZIEotC+/74UqfkQYUyQ4raPDKKVBf1DWs1lqWLaOxX4UBQIzSdyxz732oyBVpTGFQhxOuCFYWdgG CBMkCNz27fjU0r4Z9WKtC+gsvdKg4Jd5cC7I2kYSxpYElSK3tCMq9hMwu0c5FAuO/q/EHUNbokTA6B Z0Atht/eyrjeKRxrNNbAfLBe+CphLuKGGHJmWQoxwqemETM86gZ2BDaQ447VqSJf4u5IpwoSCI7UCu X-Developer-Key: i=bb@ti.com; a=openpgp; fpr=D3D177E40A38DF4D1853FEEF41B90D5D71D56CE0 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.6 at phobos.denx.de X-Virus-Status: Clean In order to maintain the chain of trust, each stage of the boot process will first authenticate each binary it loads before continuing. To extend this to the kernal and its dtbs we can package the kernal and its dtbs into another fitImage for Uboot to authenticate and extend the chain of trust all the way to the kernel. When 'boot_fit' is set, indicating we're using the secure bootflow, look for and authenticate the kernel's fitImage. Signed-off-by: Judith Mendez Signed-off-by: Bryan Brattlof --- include/configs/am62ax_evm.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 0bc0b13922f0f..ce5dcd34787fa 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -59,9 +59,14 @@ EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ "bootcmd_ti_mmc=" \ "run findfdt; run envboot; run init_mmc;" \ - "run get_kern_mmc; run get_fdt_mmc;" \ - "run get_overlay_mmc;" \ - "run run_kern;\0" + "if test ${boot_fit} -eq 1; then;" \ + "run get_fit_mmc; run get_overlaystring;" \ + "run run_fit;" \ + "else;" \ + "run get_kern_mmc; run get_fdt_mmc;" \ + "run get_overlay_mmc;" \ + "run run_kern;" \ + "fi;\0" #define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ "ti_mmc "