From nobody Tue Feb 10 01:33:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+69323+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69323+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1608555188; cv=none; d=zohomail.com; s=zohoarc; b=L0t3jEFSGdqlDLguo0qJVwWeB7ggZtQC7wgYZpp+eIdK6isXIyyX3lMaH9g9xJ1MW05E2gGDejqhq0fk3xN8Q6l24Jj3NVuYPxExp2PGcW66ahznQO+/OAJnCni4TB/kk2p3Ah4O86tIufDDfO4iPGAPTzqnKjIhmLKOO5tskTg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608555188; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=LDvrqJmNZgberXq1Lff+RKtHxXOUHv5DO918SAD4yRg=; b=AFQKhOxGEq/wmT1Rro20onHZoMmTaoDu4bbMfz8oQ5cuwR7UyX4tLXI4bMYSSN6Hf9VW7xVzVzqP4BMd5nP3XOTZTDI3xzFfNlXHoHyCga+behbxWJ43FAFwqi3zkouj6YoIILECFN8q21e7VkgZcC0UZVQAIJ0nuigycGGdkTY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69323+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1608555188502990.714976005688; Mon, 21 Dec 2020 04:53:08 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id y9uKYY1788612xgcITAnUaC1; Mon, 21 Dec 2020 04:53:08 -0800 X-Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mx.groups.io with SMTP id smtpd.web09.39237.1608555187648488286 for ; Mon, 21 Dec 2020 04:53:07 -0800 X-Received: by mail-pf1-f169.google.com with SMTP id t22so6421645pfl.3 for ; Mon, 21 Dec 2020 04:53:07 -0800 (PST) X-Gm-Message-State: gXDz1Che938JevXvZtkipNOdx1787277AA= X-Google-Smtp-Source: ABdhPJyMSRYcyyZjmObEl4Z3zRGkH4UJufYboyRmPdUPUp0YWhTjogHtC48RF3Kb0wdg9rl51FUIFQ== X-Received: by 2002:aa7:8550:0:b029:19e:46e7:913b with SMTP id y16-20020aa785500000b029019e46e7913bmr14875863pfn.58.1608555186599; Mon, 21 Dec 2020 04:53:06 -0800 (PST) X-Received: from localhost ([121.95.100.191]) by smtp.gmail.com with ESMTPSA id s7sm16380517pfh.207.2020.12.21.04.53.05 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 21 Dec 2020 04:53:05 -0800 (PST) From: "Masahisa Kojima" To: devel@edk2.groups.io Cc: Masahisa Kojima , Ard Biesheuvel , Leif Lindholm , Graeme Gregory , Radoslaw Biernacki , Tanmay Jagdale , Shashi Mallela Subject: [edk2-devel] [PATCH edk2-platforms 3/4] SbsaQemu: add standalone MM build instruction Date: Mon, 21 Dec 2020 21:53:56 +0900 Message-Id: <20201221125357.17744-4-masahisa.kojima@linaro.org> In-Reply-To: <20201221125357.17744-1-masahisa.kojima@linaro.org> References: <20201221125357.17744-1-masahisa.kojima@linaro.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,masahisa.kojima@linaro.org Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608555188; bh=77spJloAKQV+LLxaB9bkCWQTMBA9Dmio1ArmzZtlPoI=; h=Cc:Date:From:Reply-To:Subject:To; b=gvprSvJCMs+1ZUZnwYJmdSKqrBh05e7VD1PNgq0t8hOd5fPQnYf+z964XVLLuul657l c3u68Ll2d4pgptPKqjX614VJ91JPDzR8uRhsPR1Litqp+PAcnzUGKVvElVZUqUrGsz1sl c+WwwLudm3HsDW3mtWZUSFP+TAjR0J1Qdg4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" This commit adds the standalone MM build instruction to enable UEFI secure boot. Signed-off-by: Masahisa Kojima --- Platform/Qemu/SbsaQemu/Readme.md | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Platform/Qemu/SbsaQemu/Readme.md b/Platform/Qemu/SbsaQemu/Read= me.md index 63786d9d0fd3..cdee8b41507e 100644 --- a/Platform/Qemu/SbsaQemu/Readme.md +++ b/Platform/Qemu/SbsaQemu/Readme.md @@ -104,6 +104,41 @@ Create a directory $WORKSPACE that would hold source c= ode of the components. truncate -s 256M SBSA_FLASH[01].fd ``` =20 +## Build UEFI with standalone MM based UEFI secure boot + +1. Compile standalone MM image + + ``` + cd $WORKSPACE + build -b RELEASE -a AARCH64 -t GCC5 -p edk2-platforms/Platform/Qemu/Sbsa= Qemu/SbsaQemuStandaloneMM.dsc + ``` + +2. Compile TF-A with BL32(Secure Payload) + + Detailed build instructions can be found on the following link: + https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/tree/docs/pl= at/qemu-sbsa.rst + + Then copy `bl1.bin` and `fip.bin` to the the edk2-non-osi directory: + +3. Compile UEFI with UEFI secure boot enabled + + ``` + cd $WORKSPACE + build -b RELEASE -a AARCH64 -t GCC5 -p edk2-platforms/Platform/Qemu/Sbsa= Qemu/SbsaQemu.dsc -DSECURE_BOOT_ENABLE=3DTRUE + ``` + + Copy SBSA_FLASH0.fd and SBSA_FLASH1.fd to top $WORKSPACE directory. + Then extend the file size to match the machine flash size. + ``` + cp Build/SbsaQemu/RELEASE_GCC5/FV/SBSA_FLASH[01].fd . + truncate -s 256M SBSA_FLASH[01].fd + ``` + + To keep the UEFI variable storage after the succeeding build, use `dd` i= nstead of `cp`. + ``` + dd if=3D./Build/SbsaQemu/RELEASE_GCC5/FV/SBSA_FLASH0.fd of=3D./SBSA_FLAS= H0.fd conv=3Dnotrunc bs=3D2M count=3D8 + ``` + # Running =20 The resulting SBSA_FLASH0.fd file will contain Secure flash0 image (TF-A= code). --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69323): https://edk2.groups.io/g/devel/message/69323 Mute This Topic: https://groups.io/mt/79124576/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-