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 smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9891CCA5FD4 for ; Thu, 1 Oct 2026 16:27:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 4D33660A41; Thu, 1 Oct 2026 16:27:27 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id rANaWApFB4Mz; Thu, 1 Oct 2026 16:27:26 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp3.osuosl.org 1F55360B26 Authentication-Results: smtp3.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 ARC-Seal: i=2; d=osuosl.org; s=arc; a=rsa-sha256; cv=pass; t=1790872046; b=h81kecU+Wd4tWIXQlc198YvH48HHUU97hOBbiR2sChdfXC+yxC8EidQzJ8RaEjO6ClvH DhusGJQ0gjxZmjlho6aETrJU05Xx/h1Ohk604qdoa9/bVFRZKMQuuqgA2DhGn+v6MDont Ly7yvOWcUpB0OMsCa8OyoF7JwuNfDmAI1KB+Wz+/rhO9LWScIW5wz1Hj41G6NV0U8xl0E 9ZcGqeYrtZ/i/4bCzPlK/KkfdVLw/L8uMMomBSGywCvX8DQcEHLIzwfG0hmeIl31ud4+4 hwlxxP1EyjmlS5OSU9z454V/MkuYbovgYVbMnXiX2Q+b7WAxjElHXSjNWUe3yP+MJCA== ARC-Message-Signature: i=2; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1790872046; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:Received:DKIM-Signature:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer:X-Developer-Signature:X-Developer-Key: X-Last-TLS-Session-Version:X-BeenThere:X-Mailman-Version:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=Mt3Zk14EgXUmpOGbyzGpffuzggL8Z9rWYTET2E7Q8og=; b=OptBnr6Rl5DR3ziAxzGok91dFYm/OJnyGKL4JH8yjYKCkcRgHRiKzmUPUUr2FAt3/T03 OOjuPvXNl9QqtK2QqMYp4oV+msbbDSnpylkNH1prBc3gSNgY1HR/UQojwWh+Hk8uJ0LsN Ax96REZfr+VTqsCdvmlvjQI/75Yn9/ZxsJ5oh/jEOM3Ej5Zq3Y3yJtHlsGMKksTCyXodj hsgAfEj7zrPEnZIvpAoGLR3ByfTssUvzvoLbp8rRYkpLs54M1wk/bWNheS83fjqpKT4B0 XWt6GeqB0FgQ9bh8g6o6KoIeKTSZs1oC3T6nC1j9/jWTkr7xJhCfcw3I1ZFNkwGCyNA== ARC-Authentication-Results: i=2; smtp3.osuosl.org; arc=pass header.oldest-pass=0 smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=u-boot-bounces@lists.u-boot-project.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lists.u-boot-project.org; s=default; t=1790872046; bh=Mt3Zk14EgXUmpOGbyzGpffuzggL8Z9rWYTET2E7Q8og=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DlPC7vWWLUTD4PmvSFGT9Afmvq+A7PFII7a2lto/PwNZAmlijFyKj+CgtUK99ZORi MNZ8N5Yq7APztLVruLmw9JxY/rkTdxbF+or4TSK48N+eEV9o+QRocrFQl4Om/Qlfd1 xlnGfKDsBW9ts6Ss6/FZp3kyM1MrNrzRjn8GaWlg+ces7xiNhtX5fiIIp8rqTDKUha BAU2H75BimXdePtJ/wfucR4h/64k+dph35gBkOq5fVA3r7vXW/XfqZbv/qX1w4BYaX ldFLHFGRg46k6RTcqXpoEzho1a/csD4Au3rpw7oeLodA1M147tV9W45tZ/Az7ZhWfV HboPSP7G9DJ9g== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 1F55360B26; Thu, 1 Oct 2026 16:27:26 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 6E61A263 for ; Thu, 1 Oct 2026 16:27:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 1C01F403A1 for ; Thu, 1 Oct 2026 16:27:22 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id 7kGmlCqGgq9U for ; Thu, 1 Oct 2026 16:27:20 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.0 smtp4.osuosl.org 4178D40D06 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=185.246.84.56 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1790872037; b=ZNIpoCdCaWtw2jCuClUiSTwnwKaNIPMOesOdt5Owr7AFHBCrXGlNw8wMW9GKD0ZETz6g W6m+a0c76GUYXDTfVOSg3772gpBYWKwesuKEcnQrFFHWuiuNn2gqgrx7WRULAhQ23zmac cb4WtoOVMv6CX1ynh2Mv3/1Tdbf7JyFBC0h6x6XmYmEzn5o6uE8cZls9MdfMOaVqmfQOB hJWuqJX2x1RJQp/RTaYJKqkr+PLUwQSeWmXDDuOLsE2RZE1cDOxfA517lPpSImuOdQP4z zLaiyMeyyULVgK4dkzNJife4NpXktLdvYab7vxFEFjlU3aQ0bG8jB/gK/B8+vM0iY3w== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1790872037; h=Received-SPF:Received:Received:Received:DKIM-Signature:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Last-TLS-Session-Version; bh=Mt3Zk14EgXUmpOGbyzGpffuzggL8Z9rWYTET2E7Q8og=; b=sBOiRFWmyjTj7XzwD+S8XBmk3XRYi3+bJRjnbjRr2Ibst1po7yEiGXF/8TJznOX3oFIP 5/VXuZNDhSC8tZ/MKnApVMOtN0+oknhIv+utGKDK190LCM7+4oJH1nhWW2I98RLk4m82R Yu8Q+MrecdTfEmEtS4ehU77wbRU1m/mpKCjtWmwu5mlxaeO9R/0jIDUxsCw8iRm8ofBYf +HgmDBNXWBu7n8AZ8eI+JZFnjWWX2YbuhU+LctE6U8Hr9S9CXh6r0/34HA0q0rm44QWSR 2nT/PXdyFwBkYiMdg8Kxw+V37ig21F9R4vMO97GFDBPOVedzjmEVOhQ781fTY9O79Bw== ARC-Authentication-Results: i=1; smtp4.osuosl.org; dmarc=pass header.from=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=u4yt4IKM; arc=none smtp.remote-ip=185.246.84.56 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=185.246.84.56; helo=smtpout-02.galae.net; envelope-from=jeremie.dautheribes@bootlin.com; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=u4yt4IKM Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 4178D40D06 for ; Thu, 1 Oct 2026 16:27:16 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 3AF371A18B1; Thu, 1 Oct 2026 16:27:15 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0B20760343; Thu, 1 Oct 2026 16:27:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C9D5A10328310; Thu, 1 Oct 2026 18:27:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790872029; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Mt3Zk14EgXUmpOGbyzGpffuzggL8Z9rWYTET2E7Q8og=; b=u4yt4IKMhQTSZqmEXeqUvzbMqwtv/D3OzrnwMtOwRL2ltka8bzgRJXDRR77311ExGy2XKw 5yv+VM91WPKVn7oYYawIENUD0fHsusLpjN50ULk8y65VnM9WzrorMDhiBTDlbe2GTx2kre NUJ/cnQ6hlTLSwj47d/iVMCOybleRfbIyAh3ydRXwe9NQtq5DMTm3pLBGOqN6O83x9GRey IOyPFHTvDj4nhoJtc+M1gd1LshPS5dPWRZ9s8/EmAa5S5xV7cuAlIJv3hf6Gd/ocEuPC8A 9+BqZcxY/+v1S6wB8Mv7fvoK/YDIyL9PDQ4lyiAXjr3xr1hngtotrqf/hEAk8A== From: =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes_=28Schneider_Electric=29?= Date: Thu, 01 Oct 2026 18:26:23 +0200 Subject: [PATCH v5 6/9] doc: imx: ahab: add i.MX93 secure boot guide MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20261001-imx93-secureboot-v5-6-d97dea41bd1f@bootlin.com> References: <20261001-imx93-secureboot-v5-0-d97dea41bd1f@bootlin.com> In-Reply-To: <20261001-imx93-secureboot-v5-0-d97dea41bd1f@bootlin.com> To: "NXP i.MX U-Boot Team" , u-boot@lists.u-boot-project.org Cc: =?utf-8?q?J=C3=A9r=C3=A9mie_Dautheribes_=28Schneider_Electric=29?= , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Thomas Petazzoni , Tom Rini , Simon Glass , Alper Nebi Yasak , Stefano Babic , Fabio Estevam , Marek Vasut , Denis Mukhin , Rasmus Villemoes , Ilias Apalodimas , =?utf-8?q?Krzysztof_Drobi=C5=84ski?= , Peng Fan , Alice Guo , Simona Toaca , Ye Li , Quentin Schulz , Christophe Guerreiro , Thomas Bonnefille , Marek Vasut , Mathieu Dubois-Briand , Lei Xu , Joseph Guo , Vincent Jardin X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=14044; i=jeremie.dautheribes@bootlin.com; h=from:subject:message-id; bh=NbEFq+/P0mRWstGEJfshs1yEMGhSwFRaU93eLEBm+fs=; b=owEBbQKS/ZANAwAKASsAXqAbWo8DAcsmYgBqvom47v36U/oy1uFQY+hr1bc8k3cjIbCD3m3P8 tUrBUNhw8eJAjMEAAEKAB0WIQT7FK2Qhtu4QpBIBAkrAF6gG1qPAwUCar6JuAAKCRArAF6gG1qP A9B0EACwpSkAMRCZ6gAFqVwIYmqymoUmL0QkId7udo7yvXCUPLOL/ia551X3G+T6bKYSI0bMaM1 6KFKsDdmbxp72YZyzD5q6kHhnstihuoshWwD3W7BDpIo2ilNdR/libCE9BrIi/6x6PWt9Od0rj4 DiWCT60SX/iXIO/0fistMN/pieV6sdkZWQrUyZgO2OZOY5DaVqTNx5CqBLSiJNGewiGlYCjsFOw 64Znuof7wYnJ3zjeR1K+b4jcKg0eCrY4nUC+z06kBK65f1EqjBp0c1tFgCFG7NqtKeCQ8LIU+6M UMwPYhKiLyT9UYPpaT/Lj0gwgJlvtw28HzY1IXTKmbwbi3ZPmzi/mimnJpAToESqcooMWWDH4du ejqVJ2OD66lauTrIsBPIEJ+uJEG0lXoTiKEfu3J9Gyp9s88j1QVXU5u/0VHbS4Wshic8AFZxLOY SA3LAhv7Rn6Umz/331fUrLrPLTH4ryBWLwC/idrKjfKAXdV/ZCAOW0+wwrNqOp2D+yDSUod+YwE +SVU35oBpTz8OlaMxep9x2sI08P8K7+N9NjzBkWG2DtTn2rsD7GLAWMBkkDjSfqS5G1nJdxAKA0 daNovnnS3RlIJk2WFh5BokfzJkk1g2e4fRyPHI/J7r3VAKWA23FiUtysrkN2tf9SG+8TZyqA5kl ap+8bgbN0JL4C8g== X-Developer-Key: i=jeremie.dautheribes@bootlin.com; a=openpgp; fpr=FB14AD9086DBB842904804092B005EA01B5A8F03 X-Last-TLS-Session-Version: TLSv1.3 X-BeenThere: u-boot@lists.u-boot-project.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.u-boot-project.org Add a step-by-step guide describing how to securely boot an i.MX93 image using AHAB. This guide is largely based on the following documents: - doc/imx/ahab/guides/mx8ulp_9x_secure_boot.txt, from uboot-imx (lf_v2026.04), originally written by Utkarsh Gupta - doc/imx/habv4/guides/mx8m_spl_secure_boot.txt, from this tree, originally written by Marek Vasut Reviewed-by: Simon Glass Signed-off-by: Jérémie Dautheribes (Schneider Electric) --- doc/imx/ahab/guides/mx93_secure_boot.rst | 297 +++++++++++++++++++++++++++++++ doc/imx/ahab/introduction_ahab.rst | 3 +- doc/imx/index.rst | 1 + 3 files changed, 300 insertions(+), 1 deletion(-) diff --git a/doc/imx/ahab/guides/mx93_secure_boot.rst b/doc/imx/ahab/guides/mx93_secure_boot.rst new file mode 100644 index 00000000000..bfc17b7ad79 --- /dev/null +++ b/doc/imx/ahab/guides/mx93_secure_boot.rst @@ -0,0 +1,297 @@ +.. SPDX-License-Identifier: GPL-2.0+ + +i.MX93 Secure boot guide using AHAB +=================================== + +This document provides a step-by-step guide on how to securely boot an +i.MX93 boot image. It is assumed that the reader is familiar with basic +AHAB concepts and with the PKI tree generation. Details about AHAB can be +found in the :doc:`AHAB introduction <../introduction_ahab>` document and +in the processor Security Reference Manual (SRM). The i.MX93 signing +procedure is integrated in the U-Boot build thanks to binman. + +1. Preparing the environment to build a secure boot image +--------------------------------------------------------- + +Secure boot image preparation requires the U-Boot build system to build +the image and the Code Signing Tool (CST) to sign it. + +The following files are needed to prepare the boot image: + + - EdgeLock secure enclave Firmware (ELE) (Optional). + - DDR PHY initialization firmware. + - U-Boot proper and SPL. + - ARM Trusted Firmware (ATF). + - OPTEE (Optional) + +The ELE FW is distributed by NXP and is already signed using NXP keys. +In the following sections, designates the repository where all +parts have been downloaded and built. + +2. Preparing U-Boot to support AHAB secure boot features +-------------------------------------------------------- + +The U-Boot/SPL provides extra AHAB supported functionalities that include +extension of Root of Trust, checking any events(issues) after image +authentication, chip lifecycle status, securing the target etc. + +The support is enabled by adding CONFIG_AHAB_BOOT to the defconfig file +used by your target: + + - Defconfig: + CONFIG_AHAB_BOOT=y + - Kconfig: + ARM architecture -> Support i.MX9 AHAB features + +Enabling this feature allows the SPL and U-Boot images to extend the Root +of Trust by using the AHAB API call via ELE FW. It also enables binman to +automatically sign the SPL and U-Boot containers while building +flash.bin, as described in the next sections. + +3. i.MX93 AHAB image layout +--------------------------- + +The i.MX93 flash.bin image is built by binman and is composed of up to +three containers. The ELE FW container is optional and is provided by NXP, +it is appended at the beginning of the image when the file +mx93a1-ahab-container.img is present in the build directory. The SPL and +U-Boot containers are built by the nxp-imx9image etype and signed by the +nxp-imx93cst etype. + +.. code-block:: text + + *start ----> +---------------------------+ --------- + | 1st Container header | ^ + | and signature | | Authenticated at + +---------------------------+ | ELE ROM/FW Level + | Padding | | + +---------------------------+ | + | ELE FW | v + *start + 0x400 ---> +---------------------------+ --------- + | 2nd Container header | ^ + | and signature | | Authenticated at + +---------------------------+ | ELE ROM/FW Level + | Padding | | + +---------------------------+ | + | SPL | v + +---------------------------+ --------- + | 3rd Container header | ^ + | and signature | | Authenticated at + +---------------------------+ | SPL Level + | Padding | | + +---------------------------+ | + | ARM Trusted FW (ATF) | | + +---------------------------+ | + | U-Boot proper | | + +---------------------------+ | + | OPTEE (optional) | v + +---------------------------+ --------- + +The first container includes the ELE FW which is signed using NXP keys, +this container is authenticated by ELE ROM. + +The second container includes the SPL which is signed using OEM keys, +this container is authenticated at ELE FW level. + +The third container includes the U-Boot proper and the ATF. The SPL is in +charge to load this container and also to interface with ELE FW to +authenticate the additional container. + +The signing procedure is slightly different when compared with HABv4 +series. On AHAB the signature is directly included in the container, the +CST is responsible to sign and handle the "Signature Block": + +.. code-block:: text + + +----------------------------+ --------- + | | ^ + | | | + | Container header | | + | | | + | | | + +---+------------------------+ | + | S | Signature block header | | Signed + | i +------------------------+ | + | g | | | + | n | | | + | a | SRK table | | + | t | | | + | u | | v + | r +------------------------+ --------- + | e | Signature | + | +------------------------+ + | B | | + | l | SGK Key | + | o | Certificate (optional) | + | c | | + | k | | + +---+------------------------+ + +The certificate block is divided into: + +.. code-block:: text + + +---------------+ ^ + | Public key | | Signed + | Permission | | + +---------------+ v + | Signature | + +---------------+ + +The first block (public key permission) verifies the Signature block +preceding (between SRK table and Certificate blocks), while the second +block (signature) is verified by the SRK table block. + +In case not using the subordinate key, the container signature is +verified against the SRK keys directly. + +4. Signing the images +--------------------- + +Internally, Command Sequence Files (CSF) are used. The CSF files contain +all the commands that the AHAB executes during the secure boot. These +commands instruct the AHAB code on which memory areas of the image to +authenticate, which keys to install and use, and so on. The CSF is generated +using the CST Code Signing Tool based on input configuration file. This +tool input configuration file is generated using binman, and the tool +is invoked from binman as well. + +The SPL and U-Boot containers built by the nxp-imx9image etype are each +wrapped in their own nxp-imx93cst node and signed individually by the CST +tool. For each container, the container header address and the signature +block offset are read from the i.MX container header itself, so the offsets +in the CST configuration file are always correct, whether the ELE FW is +bundled in the SPL container or not. + +Per default the AHAB keys and certificates need to be located in the +build directory, this means creating a symbolic link or copying the +following files from the AHAB PKI tree directory into the u-boot build +directory for the CST Code Signing Tool to locate them: + +- ``crts/SRK_1_2_3_4_table.bin`` +- ``crts/SRK1_sha384_secp384r1_v3_usr_crt.pem`` +- ``keys/SRK1_sha384_secp384r1_v3_usr_key.pem`` +- ``keys/key_pass.txt`` + +See the :doc:`AHAB introduction <../introduction_ahab>` document for the +PKI tree generation procedure (ahab_pki_tree tool) and for the SRK Table +generation (srktool). + +The nxp-imx93cst etype is configurable using either DT properties or +environment variables. The following DT properties and environment +variables are supported. Note that environment variables override DT +properties. + +.. list-table:: + :header-rows: 1 + + * - DT property + - Variable + - Description + * - ``nxp,srk-table`` + - ``SRK_TABLE`` + - full path to ``SRK_1_2_3_4_table.bin`` + * - ``nxp,srk-crt`` + - ``SRK_KEY`` + - full path to the SRK certificate ``SRK1_sha384_secp384r1_v3_usr_crt.pem`` + + +The SRK private key (``SRK1_sha384_secp384r1_v3_usr_key.pem``) and the +``key_pass.txt`` file, which contains the passphrase protecting the private +keys, are required by the CST tool as well, and will be searched for in +relation to the SRK table and certificate paths. + +When the key material is not located in the build directory, environment +variables can be set to point the build process to it. In the example +below, CST_DIR designates the CST installation directory, that is the +directory holding the crts/ and keys/ directories generated when creating +the PKI tree: + +.. code-block:: console + + $ export CST_DIR= + $ export SRK_TABLE=$CST_DIR/crts/SRK_1_2_3_4_table.bin + $ export SRK_KEY=$CST_DIR/crts/SRK1_sha384_secp384r1_v3_usr_crt.pem + $ make flash.bin + +5. Programming SRK Hash +----------------------- + +As explained in the :doc:`AHAB introduction <../introduction_ahab>` +document, the SRK Hash fuse values are generated by the srktool and +should be programmed in the SoC SRK_HASH[255:0] fuses. + +Be careful when programming these values, as this data is the basis for +the root of trust. An error in SRK Hash results in a part that does not +boot. + +The U-Boot fuse tool can be used for programming eFuses on i.MX SoCs. + +- Dump SRK Hash fuses values in host machine: + + On i.MX93 family, the SRK Hash uses sha256 and dump 8 words fuses: + + .. code-block:: console + + $ od -t x4 SRK_1_2_3_4_fuse.bin + 0000000 db2959f2 90dfc39c 53394566 e0b75829 + 0000020 85e6f3b1 af00983d e5e804fe 7a451024 + +- Program SRK_HASH[255:0] fuses: + +On i.MX93: + +.. code-block:: console + + => fuse prog 16 0 0xdb2959f2 + => fuse prog 16 1 0x90dfc39c + => fuse prog 16 2 0x53394566 + => fuse prog 16 3 0xe0b75829 + => fuse prog 16 4 0x85e6f3b1 + => fuse prog 16 5 0xaf00983d + => fuse prog 16 6 0xe5e804fe + => fuse prog 16 7 0x7a451024 + +6. Verify AHAB events +--------------------- + +If the fuses have been burned properly, there should be no AHAB events +after boot. To validate this, power on the board, and run ahab_status +command on U-Boot terminal. + +No events should be returned after this command: + +.. code-block:: console + + => ahab_status + Lifecycle: 0x00000008, OEM Open + + No Events Found! + +7. Close the device +------------------- +.. warning:: + + Before closing the device, please ensure your sample is in OEM Open state, + OEM SRK hash has been fused, and you are able to boot a signed image + successfully without any AHAB events reported . If not, your sample will be + unrecoverable. + +After the device successfully boots a signed image without generating any +AHAB security events, it is safe to close the device. The chip lifecycle +should be changed from OEM open to OEM closed. Be aware this step can +damage your board if a previous step failed. It is also irreversible. Run +on the U-Boot terminal: + +.. code-block:: console + + => ahab_close + +Now reboot the target, and run: + +.. code-block:: console + + => ahab_status + Lifecycle: 0x00000020, OEM Closed + + No Events Found! diff --git a/doc/imx/ahab/introduction_ahab.rst b/doc/imx/ahab/introduction_ahab.rst index e6376229383..621724711fb 100644 --- a/doc/imx/ahab/introduction_ahab.rst +++ b/doc/imx/ahab/introduction_ahab.rst @@ -292,7 +292,8 @@ scenario in i.MX 9x: │ │ │ │ │ More details on the boot flow can be found in respective Security Reference -Manual (SRM). +Manual (SRM) and in the :doc:`i.MX93 Secure boot guide +`. 2. Generating a PKI tree ------------------------ diff --git a/doc/imx/index.rst b/doc/imx/index.rst index cc5f427de92..daf846947cc 100644 --- a/doc/imx/index.rst +++ b/doc/imx/index.rst @@ -11,3 +11,4 @@ architecture introduction and the i.MX93 secure boot guide. :maxdepth: 2 ahab/introduction_ahab + ahab/guides/mx93_secure_boot -- 2.55.0