From nobody Sat Feb 7 06:27:26 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+72375+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+72375+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1614753909; cv=none; d=zohomail.com; s=zohoarc; b=R/EFO8oNZKesVrdZMWkz6NOv3va45RkNfYGRaCY6GSLPNsKqgRAHxkt/1sYxmq492wTfTyLl0EfZ55lu9j5OCPAaQ2gJRekl0bxznN+96d+/eV8iWIeXKWK4LXVMkQjj2t7pQlZuGGNnD4obvoqa+FHuxLGG7y0zjQ9qBRU1gFg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614753909; 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=z821Fqwc7P2/ZiWLDg2Ou466bAkZZVtgB2dn9FbaxyE=; b=Ybn3qwIMDmHFg2I9017csL9PqgqdpG9C+bYm34RytbmtWXOV6EmQutPN/ligTOkjKDQ541eakTwpZFpvL6sOfpHOj4Pri88GWToa+jsejUwMz468+s25UgJ1gLUVEr1ICVtjQjCcOv+NoByS94OBZO6LyDN8K5rgi7NiH/CXLEM= 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+72375+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 1614753909582946.7938322494788; Tue, 2 Mar 2021 22:45:09 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id fttkYY1788612xu5K0surEPr; Tue, 02 Mar 2021 22:45:09 -0800 X-Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) by mx.groups.io with SMTP id smtpd.web11.3476.1614753903839154446 for ; Tue, 02 Mar 2021 22:45:03 -0800 X-Received: by mail-pj1-f49.google.com with SMTP id i4-20020a17090a7184b02900bfb60fbc6bso2419332pjk.0 for ; Tue, 02 Mar 2021 22:45:03 -0800 (PST) X-Gm-Message-State: DXtwo7IbfA7zMY37le7jrooGx1787277AA= X-Google-Smtp-Source: ABdhPJywZq/L/U1ON8Ip//IRFvQY4RQ8LF2ouENZO34RUyb+c/7t+TYUkr3JZVKiThKGl0jdwpub6g== X-Received: by 2002:a17:90a:c257:: with SMTP id d23mr8266429pjx.102.1614753903359; Tue, 02 Mar 2021 22:45:03 -0800 (PST) X-Received: from localhost.localdomain ([2400:2411:502:a100:82fa:5bff:fe4b:26b1]) by smtp.gmail.com with ESMTPSA id ms21sm5809240pjb.5.2021.03.02.22.45.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Mar 2021 22:45:02 -0800 (PST) From: "Masahisa Kojima" To: devel@edk2.groups.io Cc: Masahisa Kojima , Ard Biesheuvel , Leif Lindholm , Graeme Gregory , Radoslaw Biernacki , Shashi Mallela Subject: [edk2-devel] [PATCH edk2-platforms v3 3/4] SbsaQemu: add standalone MM build instruction Date: Wed, 3 Mar 2021 15:47:46 +0900 Message-Id: <20210303064747.27312-4-masahisa.kojima@linaro.org> In-Reply-To: <20210303064747.27312-1-masahisa.kojima@linaro.org> References: <20210303064747.27312-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=1614753909; bh=BH7gOlLL2AN7JSLOBa9hr2C43AGxkJrplBvLhAkTjRc=; h=Cc:Date:From:Reply-To:Subject:To; b=JvumTv60Z6qzD7GAZCuLmSCIiHuCTbLOIho5uuXUP/cBp0L+SUvPz6emuSK20nNq2SK 7wwDErdvJLQbUU6TyoLeXnl6uhs0s/c5HqkBBpZR1rfYk/VQGX0/yBfgHzoUCUzZlP5J1 X13w3YISheS6SndbrfDQUdZig2QnEZqing0= 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..50f61b6e3bf4 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 EDK2 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 (#72375): https://edk2.groups.io/g/devel/message/72375 Mute This Topic: https://groups.io/mt/81046686/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-