From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web10.74790.1674743731005787065 for ; Thu, 26 Jan 2023 06:35:31 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@linux.microsoft.com header.s=default header.b=s1Pp6Lk7; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from [192.168.4.22] (unknown [47.201.8.94]) by linux.microsoft.com (Postfix) with ESMTPSA id F15F220DFE6C; Thu, 26 Jan 2023 06:35:29 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com F15F220DFE6C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1674743730; bh=Fo7zuVdQgSeodiW0tBv7Beb451TMWDsKA/4NxETp8y4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=s1Pp6Lk7OeqR8HudvEffM+RxPl7ChkaAUXg6o4RI3g4B3cKwHrPbFH77wse98fDjd 3darn2drUxiEalT6nM0CB10xdkjZAt7nokkyYj+NddYBGNrP0swFfkv6Q27TJeaTFS ctuB//1hbWyYdqrfNUk1tsrliEWLHmLRahbuyzas= Message-ID: <9b7ee586-f478-fcd4-f2dc-10004e56144e@linux.microsoft.com> Date: Thu, 26 Jan 2023 09:35:28 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.13.1 Subject: Re: [edk2-devel] [PATCH v2 5/6] ArmVirtPkg/PlatformCI: Add CI coverage for ArmVirtQemuKernel To: devel@edk2.groups.io, ardb@kernel.org Cc: Gerd Hoffmann , Michael Kubacki , Jiewen Yao , Oliver Steffen References: <20230124163417.584727-1-ardb@kernel.org> <20230124163417.584727-6-ardb@kernel.org> From: "Michael Kubacki" In-Reply-To: <20230124163417.584727-6-ardb@kernel.org> Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reviewed-by: Michael Kubacki On 1/24/2023 11:34 AM, Ard Biesheuvel wrote: > 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 > --- > ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml | 43 ++++++++++++++++++++ > ArmVirtPkg/PlatformCI/PlatformBuildLib.py | 4 +- > ArmVirtPkg/PlatformCI/QemuBuild.py | 3 ++ > ArmVirtPkg/PlatformCI/{QemuBuild.py => QemuKernelBuild.py} | 6 ++- > 4 files changed, 53 insertions(+), 3 deletions(-) > > diff --git a/ArmVirtPkg/PlatformCI/.azurepipelines/Ubuntu-GCC5.yml b/ArmVirtPkg/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) > > > > + 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 > > > > diff --git a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py > index 91aa9b31d3c5..405817cae785 100644 > --- a/ArmVirtPkg/PlatformCI/PlatformBuildLib.py > +++ b/ArmVirtPkg/PlatformCI/PlatformBuildLib.py > @@ -226,13 +226,13 @@ class PlatformBuilder(UefiBuilder, BuildSettingsManager): > args += " -cpu cortex-a57" # emulate cpu > > elif(self.env.GetValue("TARGET_ARCH").upper() == "ARM"): > > cmd = "qemu-system-arm" > > - args = "-M virt" > > + args = "-M virt,highmem=off" > > args += " -cpu cortex-a15" # emulate cpu > > else: > > raise NotImplementedError() > > > > # Common Args > > - args += " -pflash " + Built_FV # path to fw > > + args += CommonPlatform.FvQemuArg + Built_FV # path to fw > > args += " -m 1024" # 1gb memory > > # turn off network > > args += " -net none" > > diff --git a/ArmVirtPkg/PlatformCI/QemuBuild.py b/ArmVirtPkg/PlatformCI/QemuBuild.py > index f4dcc1d1d245..c651a9501fcf 100644 > --- a/ArmVirtPkg/PlatformCI/QemuBuild.py > +++ b/ArmVirtPkg/PlatformCI/QemuBuild.py > @@ -27,5 +27,8 @@ class CommonPlatform(): > > > DscName = os.path.join("ArmVirtPkg", "ArmVirtQemu.dsc") > > > > + # this platform produces a bootable NOR flash image > > + FvQemuArg = " -pflash " > > + > > import PlatformBuildLib > > PlatformBuildLib.CommonPlatform = CommonPlatform > > diff --git a/ArmVirtPkg/PlatformCI/QemuBuild.py b/ArmVirtPkg/PlatformCI/QemuKernelBuild.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 = os.path.realpath(os.path.join( > > os.path.dirname(os.path.abspath(__file__)), "..", "..")) > > > > - DscName = os.path.join("ArmVirtPkg", "ArmVirtQemu.dsc") > > + DscName = os.path.join("ArmVirtPkg", "ArmVirtQemuKernel.dsc") > > + > > + # this platform produces an executable image that is invoked using > > + # the Linux/arm64 kernel boot protocol > > + FvQemuArg = " -kernel " > > > > import PlatformBuildLib > > PlatformBuildLib.CommonPlatform = CommonPlatform >