From nobody Sun May 19 06:50:56 2024 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+98980+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+98980+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674578073; cv=none; d=zohomail.com; s=zohoarc; b=Rc0iDu9F0b/xy7JrpqjloBWG8V+wZYaqV/vQeFCCisbN3s3emiqpW+OwWR7v6ZEl9RIrhXOaftPITI1+HxPDcXX9GTF/dO9iDe0x9APQhfxRmi84r8WoRGl99USOqVfZ6QePvzFu1FbwSq71CxveXvKRaa/4ZWodQrhaieZqWek= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674578073; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ycI48rgUIyyljSbz/ioZRIDJZfAckcTJlhVbzzrkSIo=; b=k28CAxGalQrZeCy4QpsOwfelS3GHpjcykk3/h7z0M7mBeNgb8iRYCw42WehO8UtMFkAyEZ5+V/oZLU7fxTxoDHx1z8Tagb+ypS8lwjHHnPDJ8ALCt5Q39/F6JCGsZiQk9+MYrHg1OKBOLyDCCqfN/MovARTmdgtW6wxAQJvzC0w= 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+98980+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674578073162204.84533874654187; Tue, 24 Jan 2023 08:34:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id 0OQqYY1788612xXOK4Bg4weB; Tue, 24 Jan 2023 08:34:32 -0800 X-Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web11.20018.1674578071514241107 for ; Tue, 24 Jan 2023 08:34:31 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id B4F58CE1B8C; Tue, 24 Jan 2023 16:34:27 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8BBF3C4339C; Tue, 24 Jan 2023 16:34:24 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen Subject: [edk2-devel] [PATCH v2 1/6] ArmVirtPkg/PrePi: Ensure timely execution of library constructors Date: Tue, 24 Jan 2023 17:34:12 +0100 Message-Id: <20230124163417.584727-2-ardb@kernel.org> In-Reply-To: <20230124163417.584727-1-ardb@kernel.org> References: <20230124163417.584727-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: 0cpfjXu3uda28Jux23KPja2zx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674578072; bh=Sc2KzmD8X25sfLGv0ZkBxhNUF7d4VbGbRlBfgKQcfmw=; h=Cc:Date:From:Reply-To:Subject:To; b=EfyJzww57vDZahHB4iaQbti/VE88zsfXpRrLbU0FpVoqvT/Zqsc6y6JBSC5b9CqoPmT Ze5VdFMZsHeypGDmwsG16h3uushaNUXlnPNWB8KPt8C2g4RnIVyL0SWJY9hbAJ05MqKIe iilj8BCilDY6CZhgIWiwZyBHLkKO9edRyek= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674578073997100007 Content-Type: text/plain; charset="utf-8" PrePi has a bare metal entry point, and so it is in charge of calling the library constructors once the C runtime has been initialized sufficiently. However, we are now relying on a HOB to have been constructed by the time the MMU code runs, and so the constructors should be run before that. Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann --- ArmVirtPkg/PrePi/PrePi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArmVirtPkg/PrePi/PrePi.c b/ArmVirtPkg/PrePi/PrePi.c index c15dc305fced..3d943b2138d3 100755 --- a/ArmVirtPkg/PrePi/PrePi.c +++ b/ArmVirtPkg/PrePi/PrePi.c @@ -60,6 +60,9 @@ PrePiMain ( // InvalidateDataCacheRange ((VOID *)(UINTN)PcdGet64 (PcdFdBaseAddress), Pc= dGet32 (PcdFdSize)); =20 + // SEC phase needs to run library constructors by hand. + ProcessLibraryConstructorList (); + // Initialize MMU and Memory HOBs (Resource Descriptor HOBs) Status =3D MemoryPeim (UefiMemoryBase, FixedPcdGet32 (PcdSystemMemoryUef= iRegionSize)); ASSERT_EFI_ERROR (Status); @@ -93,9 +96,6 @@ PrePiMain ( // Now, the HOB List has been initialized, we can register performance i= nformation PERF_START (NULL, "PEI", NULL, StartTimeStamp); =20 - // SEC phase needs to run library constructors by hand. - ProcessLibraryConstructorList (); - // Assume the FV that contains the SEC (our code) also contains a compre= ssed FV. Status =3D DecompressFirstFv (); ASSERT_EFI_ERROR (Status); --=20 2.39.0 -=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 (#98980): https://edk2.groups.io/g/devel/message/98980 Mute This Topic: https://groups.io/mt/96501368/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- From nobody Sun May 19 06:50:56 2024 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+98979+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+98979+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674578070; cv=none; d=zohomail.com; s=zohoarc; b=KGXl1isVanmfY1+RuP5uZZ8bp2dwOWczH+Vsecw7qFgP9f94gSPKjdzX4NvAijUnCIfR5AkXF7oI7OpdxRIA28zKk14WKZtDhpIBPEdEUzTHYSyT/DvVGUTE7wqSgoefMhtyJ+fK/MFOK5E0uHYgKvCXy0lo/wclkyPVV5rQ/Ac= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674578070; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=uKuNMextrvXU+GYff+FPtd7tjBxAZB4nDQlfX0L7qyA=; b=SQELRnlUefFS66nyVbebi1BmPFgUluX1b39k57kpzfZDjpH8Zk+G5qjHQ4pgF1gFX2MvRLdrcjtmOZaw9D/uqaxeS+JXfQx5p/tIG1CvbdvmxgxTogPEJWVB1LGlTXdIwtB3u3hPqAiMPacW+iFdfCg1MQkZZqKm3LepYmmretM= 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+98979+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674578069956681.0410227725121; Tue, 24 Jan 2023 08:34:29 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id RPJJYY1788612xtU8ABzwig2; Tue, 24 Jan 2023 08:34:29 -0800 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.20016.1674578068866737267 for ; Tue, 24 Jan 2023 08:34:29 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3E44A612A8; Tue, 24 Jan 2023 16:34:28 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52EE0C4339B; Tue, 24 Jan 2023 16:34:26 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen Subject: [edk2-devel] [PATCH v2 2/6] ArmVirtPkg/ArmVirtQemu: enlarge initial flash mapping Date: Tue, 24 Jan 2023 17:34:13 +0100 Message-Id: <20230124163417.584727-3-ardb@kernel.org> In-Reply-To: <20230124163417.584727-1-ardb@kernel.org> References: <20230124163417.584727-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: cFHAdL170VdTr2OgbELsSi3fx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674578069; bh=haWX4gst/nlxyP6aBbhYkvie2q5nw5oJciQk0j1NZQA=; h=Cc:Date:From:Reply-To:Subject:To; b=AOZ/c+FtPYkBi8UZlX0BGURHpmIqn5QcX8CaDAgM9E3m6nI+PE+I5L9KWYKsNoNVC7+ 5blnjWnEaijcsbmAv8AQhYnLtVzqdCduoanYG1w+HXtpmTHSEpaiW56GzEpjhEHtImFHl uPSzVNkA/EudfDL9aHdvCKyeovw+6/VXBBU= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674578071977100001 Content-Type: text/plain; charset="utf-8" The initial ID map used by ArmVirtQemu only covers 2 MiB of NOR flash, while the NOOPT build can be up to 3 MiB in size, resulting in a crash if the unmapped 1 MiB is accessed before the real page tables are up. So increate the initial flash mapping to 4 MiB. Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann --- ArmVirtPkg/Library/ArmPlatformLibQemu/IdMap.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/Library/ArmPlatformLibQemu/IdMap.S b/ArmVirtPkg/Lib= rary/ArmPlatformLibQemu/IdMap.S index 4a4b7b77ed83..584ffcb3ebe2 100644 --- a/ArmVirtPkg/Library/ArmPlatformLibQemu/IdMap.S +++ b/ArmVirtPkg/Library/ArmPlatformLibQemu/IdMap.S @@ -15,6 +15,7 @@ .set TT_MT_MEM, (0x3 << 2) | (0x3 << 8) // MAIR #3 =20 .set PAGE_XIP, TT_TYPE_PAGE | TT_MT_MEM | TT_AF | TT_RO | TT_NG + .set BLOCK_XIP, TT_TYPE_BLOCK | TT_MT_MEM | TT_AF | TT_RO | TT_NG .set BLOCK_DEV, TT_TYPE_BLOCK | TT_MT_DEV | TT_AF | TT_XN | TT_NG .set BLOCK_MEM, TT_TYPE_BLOCK | TT_MT_MEM | TT_AF | TT_XN | TT_NG =20 @@ -33,7 +34,8 @@ idmap: /* level 0 */ =20 20: /* level 2 */ .quad 3f + TT_TYPE_TABLE // up to 2 MB of flash - .fill 63, 8, 0x0 // 126 MB of unused flash + .quad BLOCK_XIP | (0x1 << 21) // another 2 MB of flash + .fill 62, 8, 0x0 // 124 MB of unused flash .set idx, 64 .rept 448 .quad BLOCK_DEV | (idx << 21) // 896 MB of RW- device mappings --=20 2.39.0 -=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 (#98979): https://edk2.groups.io/g/devel/message/98979 Mute This Topic: https://groups.io/mt/96501365/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- From nobody Sun May 19 06:50:56 2024 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+98982+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+98982+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674578074; cv=none; d=zohomail.com; s=zohoarc; b=fLwARQ3xNw0r8Qgm/6VfbEH8lryc1fwv6P5vUStgo/ZMgOgfDWu8pK6zwZMVyFCsjobegZFxESsbSmyw2iBdRNSqZhAJrjrnEN0cAL28jUu6D7JCwOXjNmYya0QxIQzd4ty1d8KUwXoc5lXc5AeVpjYTYdmobHiH5LIs0MyEXaM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674578074; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=yGeE10cZDBIyx+fIqlAbmLVIjlKdB4hu8gzjGgkFffg=; b=KHipNHYu1d8n0nbvhjVAWVIQf/iBnlrREfDzaBF+C943Yzq6ixx40gbWpFXg3Hj+HxEe7BIJX2ApPRMVytts3Ra9VDGtAlPfM6YJ4IZn+blY9z5JM6WzpLPlaV2i+UNnEtD9+xUWja7VBPe/DKhi+MRQCo0zKwdlbmphcHeP9RM= 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+98982+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674578073994404.0703819284546; Tue, 24 Jan 2023 08:34:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id NHf7YY1788612xJwmccGf4VV; Tue, 24 Jan 2023 08:34:33 -0800 X-Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by mx.groups.io with SMTP id smtpd.web11.20020.1674578072686155617 for ; Tue, 24 Jan 2023 08:34:33 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id BC285B8129F; Tue, 24 Jan 2023 16:34:30 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1872EC433EF; Tue, 24 Jan 2023 16:34:27 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen Subject: [edk2-devel] [PATCH v2 3/6] ArmVirtPkg/PlatformCI: factor out reusable PlatformBuildLib.py Date: Tue, 24 Jan 2023 17:34:14 +0100 Message-Id: <20230124163417.584727-4-ardb@kernel.org> In-Reply-To: <20230124163417.584727-1-ardb@kernel.org> References: <20230124163417.584727-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: IEuJlny4tPkQYBxQnyWhs0wxx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674578073; bh=wfj5eXsIDov0VPrxN0W8OvZn+yKFQqwCuJW2OUXC6iE=; h=Cc:Date:From:Reply-To:Subject:To; b=Dd0IMzIFOBmeilTu6TE5vWUyv4FSZGf7gJsecAuwWkkJY4cnPr2fXcI+t8LcMhKrNsW Z4deB6UaYWiPDmCO8ypn2/J9POamykxyRtyKf5wvzp+ff3EzZ6Xf3piS3h8txFE1hFGwa B/N+vTuSio47FR3Z2EcSRdJajhlSfmppiRE= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674578076039100016 Content-Type: text/plain; charset="utf-8" In order to reduce the amount of code duplication, refactor the PlatformBuild.py script that builds ArmVirtQemu.dsc into a reusable PlatformBuildLib.py containing most of the bits and pieces, and a small QemuBuild.py which is specific to the DSC in question. Suggested-by: Gerd Hoffmann Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann Reviewed-by: Michael Kubacki --- ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 12 ++++-= --- ArmVirtPkg/PlatformCI/{PlatformBuild.py =3D> PlatformBuildLib.py} | 19 ++-= --------- ArmVirtPkg/PlatformCI/QemuBuild.py | 31 +++++= +++++++++++++++ 3 files changed, 39 insertions(+), 23 deletions(-) diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVir= tPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index 5fa7518d2c5e..b1526ae8e50b 100644 --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -30,42 +30,42 @@ jobs: strategy: matrix: QEMU_AARCH64_DEBUG: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "AARCH64" Build.Flags: "" Build.Target: "DEBUG" Run.Flags: $(run_flags) Run: $(should_run) QEMU_AARCH64_RELEASE: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "AARCH64" Build.Flags: "" Build.Target: "RELEASE" Run.Flags: $(run_flags) Run: $(should_run) QEMU_AARCH64_NOOPT: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "AARCH64" Build.Flags: "" Build.Target: "NOOPT" Run.Flags: $(run_flags) Run: $(should_run) QEMU_ARM_DEBUG: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "ARM" Build.Flags: "" Build.Target: "DEBUG" Run.Flags: $(run_flags) Run: $(should_run) QEMU_ARM_RELEASE: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "ARM" Build.Flags: "" Build.Target: "RELEASE" Run.Flags: $(run_flags) Run: $(should_run) QEMU_ARM_NOOPT: - Build.File: "$(package)/PlatformCI/PlatformBuild.py" + Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "ARM" Build.Flags: "" Build.Target: "NOOPT" diff --git a/ArmVirtPkg/PlatformCI/PlatformBuild.py b/ArmVirtPkg/PlatformCI= /PlatformBuildLib.py similarity index 90% rename from ArmVirtPkg/PlatformCI/PlatformBuild.py rename to ArmVirtPkg/PlatformCI/PlatformBuildLib.py index dff653e919eb..91aa9b31d3c5 100644 --- a/ArmVirtPkg/PlatformCI/PlatformBuild.py +++ b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py @@ -17,21 +17,6 @@ from edk2toolext.invocables.edk2_pr_eval import PrEvalSe= ttingsManager from edk2toollib.utility_functions import RunCmd from edk2toollib.utility_functions import GetHostInfo =20 -# ########################################################################= ############### # -# Common Configuration = # -# ########################################################################= ############### # - - -class CommonPlatform(): - ''' Common settings for this platform. Define static data here and use - for the different parts of stuart - ''' - PackagesSupported =3D ("ArmVirtPkg",) - ArchSupported =3D ("AARCH64", "ARM") - TargetsSupported =3D ("DEBUG", "RELEASE", "NOOPT") - Scopes =3D ('armvirt', 'edk2-build') - WorkspaceRoot =3D os.path.realpath(os.path.join( - os.path.dirname(os.path.abspath(__file__)), "..", "..")) =20 # ####################################################################= ################### # # Configuration for Update & Setup = # @@ -139,7 +124,7 @@ class SettingsManager(UpdateSettingsManager, SetupSetti= ngsManager, PrEvalSetting =20 The tuple should be (, ) ''' - return (os.path.join("ArmVirtPkg", "ArmVirtQemu.dsc"), {}) + return (CommonPlatform.DscName, {}) =20 =20 # ####################################################################= ################### # @@ -163,7 +148,7 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager= ): "TARGET_ARCH", args.build_arch.upper(), "From CmdLine") =20 shell_environment.GetBuildVars().SetValue( - "ACTIVE_PLATFORM", "ArmVirtPkg/ArmVirtQemu.dsc", "From CmdLine= ") + "ACTIVE_PLATFORM", CommonPlatform.DscName, "From CmdLine") =20 def GetWorkspaceRoot(self): ''' get WorkspacePath ''' diff --git a/ArmVirtPkg/PlatformCI/QemuBuild.py b/ArmVirtPkg/PlatformCI/Qem= uBuild.py new file mode 100644 index 000000000000..f4dcc1d1d245 --- /dev/null +++ b/ArmVirtPkg/PlatformCI/QemuBuild.py @@ -0,0 +1,31 @@ +# @file +# Script to Build OVMF UEFI firmware +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +import os +import sys + +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +from PlatformBuildLib import SettingsManager +from PlatformBuildLib import PlatformBuilder + + # ####################################################################= ################### # + # Common Configuration = # + # ####################################################################= ################### # +class CommonPlatform(): + ''' Common settings for this platform. Define static data here and use + for the different parts of stuart + ''' + PackagesSupported =3D ("ArmVirtPkg",) + ArchSupported =3D ("AARCH64", "ARM") + TargetsSupported =3D ("DEBUG", "RELEASE", "NOOPT") + Scopes =3D ('armvirt', 'edk2-build') + WorkspaceRoot =3D os.path.realpath(os.path.join( + os.path.dirname(os.path.abspath(__file__)), "..", "..")) + + DscName =3D os.path.join("ArmVirtPkg", "ArmVirtQemu.dsc") + +import PlatformBuildLib +PlatformBuildLib.CommonPlatform =3D CommonPlatform --=20 2.39.0 -=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 (#98982): https://edk2.groups.io/g/devel/message/98982 Mute This Topic: https://groups.io/mt/96501370/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- From nobody Sun May 19 06:50:56 2024 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+98981+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+98981+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674578073; cv=none; d=zohomail.com; s=zohoarc; b=I/qWXphLt8UsydXDqX4ExxTrYbScWbrnvinoaQAStF6ab+xXay9xGGe2xV3/N3EbiLCpgm1KW4L85gJCvkJtO+sfQbtWh0uZpenI7FFSr4U7pTPVWre5cpBzqyFaMok2qt/H4K283PTiJiMU7o4e3ZCbsJfj1AJdLJN7/s1W41E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674578073; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=rC66hNELmrBY2IuAo9o1T+9IPGj3qclAZyCPLaLUowE=; b=KW0wgejHHvncPSHNMhVPRU+6SgoGwTMb3EDnQo6Ur7hcy3qpKmEuhykzNlMzeXWtfwoa1JnPRD9VkD8hzxt2cjPfWvlHFmZd3BUbCiyd/WZEuC7Q4B8D1ZHmCTOWOvF1rafrRb0o/yANzxBYgLebc9nUs9fCuGnEnUFE8YVg7k4= 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+98981+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674578073217878.0057920527055; Tue, 24 Jan 2023 08:34:33 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id rdlrYY1788612xmXzB9ooyMy; Tue, 24 Jan 2023 08:34:32 -0800 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.19953.1674578072214945898 for ; Tue, 24 Jan 2023 08:34:32 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BA663612A8; Tue, 24 Jan 2023 16:34:31 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id D14F1C4339B; Tue, 24 Jan 2023 16:34:29 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen Subject: [edk2-devel] [PATCH v2 4/6] ArmVirtPkg/PlatformCI: Enable optional features on Qemu AARCH64 builds Date: Tue, 24 Jan 2023 17:34:15 +0100 Message-Id: <20230124163417.584727-5-ardb@kernel.org> In-Reply-To: <20230124163417.584727-1-ardb@kernel.org> References: <20230124163417.584727-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: TTfMB9eQWi3PMj3oBPGXjn0Fx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674578072; bh=SE0mwy72Sy8jlF1V8EKYTpK9kjiGuxgkHCl7OyIEjLM=; h=Cc:Date:From:Reply-To:Subject:To; b=R6vYDe5b/+pJcaB0wJAtE3OUoCHBtN1V38SogZ+Mvh76XQhc76P65i9oNibqA3ahqWS 75TraUZs8zYK1KApDSQ4jweAwcypWivVq8oKdIMH4XLHnJRhvI2IxM/eA8wFIsxiFYjgH NQe9K3ZSdSy1NIOOkLdmm0ZC/bfshxTwJXw= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674578074003100008 Content-Type: text/plain; charset="utf-8" To increase the CI coverage, enable secure boot, TPM2 support and HTTPS boot on ArmVirtQemu builds used in CI. Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann Reviewed-by: Michael Kubacki --- ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVir= tPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index b1526ae8e50b..44a1d3da6742 100644 --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -32,21 +32,21 @@ jobs: QEMU_AARCH64_DEBUG: Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "AARCH64" - Build.Flags: "" + Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=3D1 BLD_*_TPM2_ENABLE= =3D1 BLD_*_NETWORK_TLS_ENABLE=3D1 BLD_*_NETWORK_IP6_ENABLE=3D1 BLD_*_NETWOR= K_HTTP_BOOT_ENABLE=3D1" Build.Target: "DEBUG" Run.Flags: $(run_flags) Run: $(should_run) QEMU_AARCH64_RELEASE: Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "AARCH64" - Build.Flags: "" + Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=3D1 BLD_*_TPM2_ENABLE= =3D1 BLD_*_NETWORK_TLS_ENABLE=3D1 BLD_*_NETWORK_IP6_ENABLE=3D1 BLD_*_NETWOR= K_HTTP_BOOT_ENABLE=3D1" Build.Target: "RELEASE" Run.Flags: $(run_flags) Run: $(should_run) QEMU_AARCH64_NOOPT: Build.File: "$(package)/PlatformCI/QemuBuild.py" Build.Arch: "AARCH64" - Build.Flags: "" + Build.Flags: "BLD_*_SECURE_BOOT_ENABLE=3D1 BLD_*_TPM2_ENABLE= =3D1 BLD_*_NETWORK_TLS_ENABLE=3D1 BLD_*_NETWORK_IP6_ENABLE=3D1 BLD_*_NETWOR= K_HTTP_BOOT_ENABLE=3D1" Build.Target: "NOOPT" Run.Flags: $(run_flags) Run: $(should_run) --=20 2.39.0 -=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 (#98981): https://edk2.groups.io/g/devel/message/98981 Mute This Topic: https://groups.io/mt/96501369/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- From nobody Sun May 19 06:50:56 2024 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+98983+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+98983+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674578075; cv=none; d=zohomail.com; s=zohoarc; b=QHrJmMSKip3bYTv2V2k0SI74WhKaQi5y7f6b3Y3ljjzg+eg1TJ7DwLXidHgwsAmCjx/chngT4k8tQwc8PdsxhWjA9ratrasxsrm1N4q0iDVSrBSLMiDpho0hyzVkNOQEW1Hy+2eP6SeTVKWHpnZLZsbLuctXIBcUDdpN+A6aRqA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674578075; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=isXWk3zHuNthLEIPOuvrCWD4BsDXPJ20kEZu1J38f7g=; b=jyqGhV705/D4orklSE1/kklbJRXhd23/ueGNpTc/it8el2XDYQr2+Yx68NSVhybj4lFIkznBn68fwTeAQkXOqIOdnjR/BvoGXl4IEXnk5y8qdTbatMPqRYK54340dCcFZVdWMCfdBB4MlZS+vwTIOOe09F5YVdmWgUVvprFE3Fc= 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+98983+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674578075173343.76652799469355; Tue, 24 Jan 2023 08:34:35 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id jiNkYY1788612xU83L7J360E; Tue, 24 Jan 2023 08:34:34 -0800 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web11.20022.1674578074009902071 for ; Tue, 24 Jan 2023 08:34:34 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8626D612AF; Tue, 24 Jan 2023 16:34:33 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 97C89C433A4; Tue, 24 Jan 2023 16:34:31 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen Subject: [edk2-devel] [PATCH v2 5/6] ArmVirtPkg/PlatformCI: Add CI coverage for ArmVirtQemuKernel Date: Tue, 24 Jan 2023 17:34:16 +0100 Message-Id: <20230124163417.584727-6-ardb@kernel.org> In-Reply-To: <20230124163417.584727-1-ardb@kernel.org> References: <20230124163417.584727-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: fEy98nlW2W7mPObB5oZdKNXwx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674578074; bh=y0//FF2fmuRCTHu4VCRdsjpArIgBQO6IWnswUeV8vLk=; h=Cc:Date:From:Reply-To:Subject:To; b=N+RFX7ehg97xmRJFME8/eB6PoZVlXfS8NGTXnZVoBbOv2NpWzstSeFnjwCuz3P7wJJS nIOxVTH6CohdEYnOlxPpl7QjTJcFcbMJBs3Pxn29YAkkj+Io9EHnycasgWU2Uo+r7JVGM /A28oWF4GhPk8kyR3zxAuUKxkuKLKPxvOYc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674578076020100014 Content-Type: text/plain; charset="utf-8" ArmVirtQemuKernel.dsc describes a firmware build that is loadable at arbitrary address and can be invoked using the Linux/arm64 kernel boot protocol. The early code deviates significantly from ArmVirtQemu, and so it makes sense to cover this platform in CI even if it is not widely used. This ensures that the relocatable PrePi and other components in EmbeddedPkg don't regress on ARM as they are being updated for use on TDVF. Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann Reviewed-by: Michael Kubacki --- ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 43 ++++++++++= ++++++++++ ArmVirtPkg/PlatformCI/PlatformBuildLib.py | 4 +- ArmVirtPkg/PlatformCI/QemuBuild.py | 3 ++ ArmVirtPkg/PlatformCI/{QemuBuild.py =3D> QemuKernelBuild.py} | 6 ++- 4 files changed, 53 insertions(+), 3 deletions(-) diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVir= tPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index 44a1d3da6742..2b6cc119167b 100644 --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -72,6 +72,49 @@ jobs: Run.Flags: $(run_flags) Run: $(should_run) =20 + QEMU_KERNEL_AARCH64_DEBUG: + Build.File: "$(package)/PlatformCI/QemuKernelBuild.py" + Build.Arch: "AARCH64" + Build.Flags: "" + Build.Target: "DEBUG" + Run.Flags: $(run_flags) + Run: $(should_run) + QEMU_KERNEL_AARCH64_RELEASE: + Build.File: "$(package)/PlatformCI/QemuKernelBuild.py" + Build.Arch: "AARCH64" + Build.Flags: "" + Build.Target: "RELEASE" + Run.Flags: $(run_flags) + Run: $(should_run) + QEMU_KERNEL_AARCH64_NOOPT: + Build.File: "$(package)/PlatformCI/QemuKernelBuild.py" + Build.Arch: "AARCH64" + Build.Flags: "" + Build.Target: "NOOPT" + Run.Flags: $(run_flags) + Run: $(should_run) + QEMU_KERNEL_ARM_DEBUG: + Build.File: "$(package)/PlatformCI/QemuKernelBuild.py" + Build.Arch: "ARM" + Build.Flags: "" + Build.Target: "DEBUG" + Run.Flags: $(run_flags) + Run: $(should_run) + QEMU_KERNEL_ARM_RELEASE: + Build.File: "$(package)/PlatformCI/QemuKernelBuild.py" + Build.Arch: "ARM" + Build.Flags: "" + Build.Target: "RELEASE" + Run.Flags: $(run_flags) + Run: $(should_run) + QEMU_KERNEL_ARM_NOOPT: + Build.File: "$(package)/PlatformCI/QemuKernelBuild.py" + Build.Arch: "ARM" + Build.Flags: "" + Build.Target: "NOOPT" + Run.Flags: $(run_flags) + Run: $(should_run) + workspace: clean: all =20 diff --git a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py b/ArmVirtPkg/Platfor= mCI/PlatformBuildLib.py index 91aa9b31d3c5..405817cae785 100644 --- a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py +++ b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py @@ -226,13 +226,13 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManag= er): args +=3D " -cpu cortex-a57" = # emulate cpu elif(self.env.GetValue("TARGET_ARCH").upper() =3D=3D "ARM"): cmd =3D "qemu-system-arm" - args =3D "-M virt" + args =3D "-M virt,highmem=3Doff" args +=3D " -cpu cortex-a15" = # emulate cpu else: raise NotImplementedError() =20 # Common Args - args +=3D " -pflash " + Built_FV = # path to fw + args +=3D CommonPlatform.FvQemuArg + Built_FV = # path to fw args +=3D " -m 1024" = # 1gb memory # turn off network args +=3D " -net none" diff --git a/ArmVirtPkg/PlatformCI/QemuBuild.py b/ArmVirtPkg/PlatformCI/Qem= uBuild.py index f4dcc1d1d245..c651a9501fcf 100644 --- a/ArmVirtPkg/PlatformCI/QemuBuild.py +++ b/ArmVirtPkg/PlatformCI/QemuBuild.py @@ -27,5 +27,8 @@ class CommonPlatform(): =20 DscName =3D os.path.join("ArmVirtPkg", "ArmVirtQemu.dsc") =20 + # this platform produces a bootable NOR flash image + FvQemuArg =3D " -pflash " + import PlatformBuildLib PlatformBuildLib.CommonPlatform =3D CommonPlatform diff --git a/ArmVirtPkg/PlatformCI/QemuBuild.py b/ArmVirtPkg/PlatformCI/Qem= uKernelBuild.py similarity index 81% copy from ArmVirtPkg/PlatformCI/QemuBuild.py copy to ArmVirtPkg/PlatformCI/QemuKernelBuild.py index f4dcc1d1d245..f340dfac8843 100644 --- a/ArmVirtPkg/PlatformCI/QemuBuild.py +++ b/ArmVirtPkg/PlatformCI/QemuKernelBuild.py @@ -25,7 +25,11 @@ class CommonPlatform(): WorkspaceRoot =3D os.path.realpath(os.path.join( os.path.dirname(os.path.abspath(__file__)), "..", "..")) =20 - DscName =3D os.path.join("ArmVirtPkg", "ArmVirtQemu.dsc") + DscName =3D os.path.join("ArmVirtPkg", "ArmVirtQemuKernel.dsc") + + # this platform produces an executable image that is invoked using + # the Linux/arm64 kernel boot protocol + FvQemuArg =3D " -kernel " =20 import PlatformBuildLib PlatformBuildLib.CommonPlatform =3D CommonPlatform --=20 2.39.0 -=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 (#98983): https://edk2.groups.io/g/devel/message/98983 Mute This Topic: https://groups.io/mt/96501371/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- From nobody Sun May 19 06:50:56 2024 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+98984+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+98984+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; t=1674578077; cv=none; d=zohomail.com; s=zohoarc; b=KvFWC/kHtpewAUd3m8Q+Yey9SXRjUfmWWTrof0s2bmf8GB6gufXjgH2o/+RWTMHDAIPFRB9L6JJ0e4LVb1WZhSH6/1TZuk/kmWulvLNaHeP2pUS9JbD+/97ELBjUCzTk51tQH/kwWWoAl3+K2gcF91lJi/Z04jR4jRvwIWAQQS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1674578077; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=e/Qk4dJj7V+QChiuN1tySk4DNbVte9lfoqkV/T1sv0A=; b=glOMwgCF7xP/b6XdHucXdMaOXZQltn9az2kl7FCawhEAVeiec8CSbNCn0C5Tf8T3z8QdUQ4CrQIv5AnAbTMm6ZwWfgN6YFaeOhzErvD09MLU6rsmCLToHYMDx/5obseln1MeFdhl8Fz9h+DiEtWYsGhyPfG4ISQOfNy+r1rb+MA= 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+98984+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1674578077195509.4551362020568; Tue, 24 Jan 2023 08:34:37 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id M2yjYY1788612x5oZkaCCEA1; Tue, 24 Jan 2023 08:34:36 -0800 X-Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by mx.groups.io with SMTP id smtpd.web10.19957.1674578075564225736 for ; Tue, 24 Jan 2023 08:34:35 -0800 X-Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DDD75612A8; Tue, 24 Jan 2023 16:34:34 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E3C3C4339E; Tue, 24 Jan 2023 16:34:33 +0000 (UTC) From: "Ard Biesheuvel" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen Subject: [edk2-devel] [PATCH v2 6/6] ArmVirtPkg/PlatformCI: Perform build test of ArmVirtKvmTool Date: Tue, 24 Jan 2023 17:34:17 +0100 Message-Id: <20230124163417.584727-7-ardb@kernel.org> In-Reply-To: <20230124163417.584727-1-ardb@kernel.org> References: <20230124163417.584727-1-ardb@kernel.org> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: 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,ardb@kernel.org X-Gm-Message-State: JIUwpeAvtcJf0WGph5GinKZwx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1674578076; bh=EoeVhgulcyXHKzDKdukR0YrxJJbkeCPibfd0a4cTYUQ=; h=Cc:Date:From:Reply-To:Subject:To; b=Veil5OxWDHiBhANTVuVjk9hFNx7P5rr9j12UglvFUw9yvqyTZeurGfm/mwFNI3iRfoJ k9UJ60VZS6FzHGJhoCx6DoH6v4KMHTYYsrI3l5yJakd3nAHKSWfnWKbsxh5Gi6QlW2ziN X3BGFkn83oTtmrFiMDNafqML1HDWuVCIICI= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1674578078229100023 Content-Type: text/plain; charset="utf-8" Signed-off-by: Ard Biesheuvel Acked-by: Gerd Hoffmann Reviewed-by: Michael Kubacki --- ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 25 +++++++++++++++ ArmVirtPkg/PlatformCI/KvmToolBuild.py | 32 +++++++++++++++= +++++ 2 files changed, 57 insertions(+) diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVir= tPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml index 2b6cc119167b..d1772a65fc3a 100644 --- a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml +++ b/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml @@ -115,6 +115,31 @@ jobs: Run.Flags: $(run_flags) Run: $(should_run) =20 + KVMTOOL_AARCH64_DEBUG: + Build.File: "$(package)/PlatformCI/KvmToolBuild.py" + Build.Arch: "AARCH64" + Build.Flags: "" + Build.Target: "DEBUG" + Run: false + KVMTOOL_AARCH64_RELEASE: + Build.File: "$(package)/PlatformCI/KvmToolBuild.py" + Build.Arch: "AARCH64" + Build.Flags: "" + Build.Target: "RELEASE" + Run: false + KVMTOOL_ARM_DEBUG: + Build.File: "$(package)/PlatformCI/KvmToolBuild.py" + Build.Arch: "ARM" + Build.Flags: "" + Build.Target: "DEBUG" + Run: false + KVMTOOL_ARM_RELEASE: + Build.File: "$(package)/PlatformCI/KvmToolBuild.py" + Build.Arch: "ARM" + Build.Flags: "" + Build.Target: "RELEASE" + Run: false + workspace: clean: all =20 diff --git a/ArmVirtPkg/PlatformCI/KvmToolBuild.py b/ArmVirtPkg/PlatformCI/= KvmToolBuild.py new file mode 100644 index 000000000000..4d02dba124ac --- /dev/null +++ b/ArmVirtPkg/PlatformCI/KvmToolBuild.py @@ -0,0 +1,32 @@ +# @file +# Script to Build ArmVirtPkg UEFI firmware +# +# Copyright (c) Microsoft Corporation. +# SPDX-License-Identifier: BSD-2-Clause-Patent +## +import os +import sys + +sys.path.append(os.path.dirname(os.path.abspath(__file__))) +from PlatformBuildLib import SettingsManager +from PlatformBuildLib import PlatformBuilder + + # ####################################################################= ################### # + # Common Configuration = # + # ####################################################################= ################### # +class CommonPlatform(): + ''' Common settings for this platform. Define static data here and use + for the different parts of stuart + ''' + PackagesSupported =3D ("ArmVirtPkg",) + ArchSupported =3D ("AARCH64", "ARM") + TargetsSupported =3D ("DEBUG", "RELEASE") + Scopes =3D ('armvirt', 'edk2-build') + WorkspaceRoot =3D os.path.realpath(os.path.join( + os.path.dirname(os.path.abspath(__file__)), "..", "..")) + + DscName =3D os.path.join("ArmVirtPkg", "ArmVirtKvmTool.dsc") + FvQemuArg =3D "" # ignored + +import PlatformBuildLib +PlatformBuildLib.CommonPlatform =3D CommonPlatform --=20 2.39.0 -=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 (#98984): https://edk2.groups.io/g/devel/message/98984 Mute This Topic: https://groups.io/mt/96501372/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-