Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ovmf for openSUSE:Factory checked in at 2023-03-17 17:01:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ovmf (Old) and /work/SRC/openSUSE:Factory/.ovmf.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ovmf" Fri Mar 17 17:01:07 2023 rev:89 rq:1072341 version:202302 Changes: -------- --- /work/SRC/openSUSE:Factory/ovmf/ovmf.changes 2023-02-17 16:43:51.470475006 +0100 +++ /work/SRC/openSUSE:Factory/.ovmf.new.31432/ovmf.changes 2023-03-17 17:01:09.380703962 +0100 @@ -1,0 +2,382 @@ +Thu Mar 16 08:17:08 UTC 2023 - Joey Lee <j...@suse.com> + +- Removed patches which are merged to edk2-stable202302 (bsc#1209266): + - ovmf-tools_def-add-fno-omit-frame-pointer-to-GCC48_-IA32-.patch + tools_def: add -fno-omit-frame-pointer to GCC48_{IA32,X64}_CC_FLAGS + (bsc#1199597) + - 129404f6e4 edk2-stable202302~200 + - ovmf-OvmfPkg-PlatformInitLib-Fix-integrity-checking-faile.patch + OvmfPkg/PlatformInitLib: Fix integrity checking failed of NvVarStore + (bsc#1206078) + - ceb52713b0 edk2-stable202302~226 + +------------------------------------------------------------------- +Wed Mar 15 05:40:30 UTC 2023 - Joey Lee <j...@suse.com> + +- Update to edk2-stable202302 (bsc#1209266) + - Features (https://github.com/tianocore/edk2/releases): + Add support for RISC-V qemu virt machine + Add RPMB related commands and DCB definition for NVMe + SecurityBoot - remove self-signed PK requirement in SetupMode + SecurityBoot - support Authenticated SetVariable with ContentInfo + TDVF Optimization - Enable Separate-Fv in OvmfPkg/IntelTdx + TDVF Optimization - Pre-alloc shared memory for TDVF DMA + TDVF Optimization - Enable Multi-core based lazy-accept + TDVF - Fix Instruction Pointer Incrementation by TD #VE MMIO Handler + TDVF - Incorrect implementation in the TDX RTMR implementation + TDVF - Incorrect protocol and structure version in the TDX CC measurement + TDVF - TdTcg2Dxe lives in the Ovmfpkg instead of the SecurityPkg + TDVF - need measurement VMM input ACPI table before register + TDVF - need integrate feature in config-B to config-A + - Patches (git log --oneline --date-order edk2-stable202211..edk2-stable202302): + f80f052277 OvmfPkg/RiscVVirt: Add Stack HOB + 1eeca0750a UefiPayloadPkg: remove the change that get platform specific logic + bc82574de4 OvmfPkg/RiscVVirt: Fix SCT memory allocation test case failure + 2c5961cccf BaseTools/tools_def.template: Update -march parameter for RISC-V + 02fcfdce1e BaseTools: Update WindowsVsToolChain plugin + 5c551d6d91 Maintainers.txt: Add entry for OvmfPkg/RiscVVirt + 92b27c2e6a OvmfPkg/RiscVVirt: Add build files for Qemu Virt platform + e1aaef001f OvmfPkg/RiscVVirt: Add SEC module + a43a62f9b0 OvmfPkg/RiscVVirt: Add PciCpuIo2Dxe module + 6d5ae344cd OvmfPkg/RiscVVirt: Add VirtNorFlashPlatformLib library + c126e3588d OvmfPkg/RiscVVirt: Add ResetSystemLib library + 6720b8e46f OvmfPkg/RiscVVirt: Add PrePiHobListPointerLib library + d78df93863 OvmfPkg/RiscVVirt: Add PlatformBootManagerLib library + f13264b340 ArmVirtPkg: Fix up the location of PlatformHasAcpiDtDxe + 09cd17b0de ArmVirtPkg/PlatformHasAcpiDtDxe: Move to OvmfPkg + a7dec790dc UefiCpuPkg/UefiCpuPkg.ci.yaml: Ignore RISC-V file + c27cdc941d UefiCpuPkg: Add CpuDxeRiscV64 module + 98fa877efd UefiCpuPkg: Add CpuTimerDxeRiscV64 module + 705c3469b5 UefiCpuPkg: Add BaseRiscV64CpuTimerLib library + cbac2c74e8 UefiCpuPkg: Add BaseRiscV64CpuExceptionHandlerLib + d6017bca19 UefiCpuPkg: Add RISCV_EFI_BOOT_PROTOCOL related definitions + 76e956547e MdePkg: Add BaseRiscVSbiLib Library for RISC-V + 550f196e82 MdePkg/BaseLib: RISC-V: Add few more helper functions + 8aeb405466 MdePkg/Register: Add register definition header files for RISC-V + 38da9606f7 MdePkg: Added Call for AfterReadyToBoot Event + 419c0aafa6 MdePkg: Add After Ready To Boot Event Definition from UEFI 2.9 + 77d6772708 MdeModulePkg/Library: PcdAcpiS3Enable set FALSE cause Assert + 68c1bedbf2 MdeModulePkg/Variable: Attribute combination should return EFI_UNSUPPORTED + 090642db7a MdeModulePkg/EsrtFmpDxe: Support multiple devices with 0 HardwareInstance + f9c6b5134e MdeModulePkg/Pci: Display more information of PCIe devices + 1b5420e807 OvmfPkg/AmdSevDxe: Close mAcceptAllMemoryEvent + f67ec87704 OvmfPkg: Fix SevMemoryAcceptance memory attributes + 540522fec0 .devcontainer/devcontainer.json: Add devcontainer file + b3f321f2d7 .mergify/config.yml: Remove rebase_fallback attribute (deprecated) + 93a21b465b MdePkg: Add NVMe boot partition header definition + 069703228c MdePkg: Add RPMB related commands and DCB definition for NVMe + 39254d922e RedfishPkg/RedfishRestExDxe: Two PCDs for controlling the requests + 289d93b79c StandaloneMmPkg/StandaloneMmMemLib: Change max address computation + 173a7a7daa OvmfPkg: Update build.sh to allow building OVMF then running QEMU + f6ce1a5cd8 EmulatorPkg/PeiTimerLib: Bug fix in NanoSecondDelay + b59e6fdae2 .pytool/Plugin/EccCheck: Add PACKAGES_PATH support + 5db84c85c3 MdePkg:IORT header update for IORT Rev E.e spec + 96192ba5bd MdeModulePkg: EfiUnacceptedMemoryType is not allowed in AllocatePool + 8a763b533b MdeModulePkg: Disambiguate the meaning of PcdDxeIplSwitchToLongMode + aef0061ac2 BaseTools: remove useless dependency on libuuid + aea8a9c954 RedfishPkg: fix multiple SMBIOS type 42 version issue + b98e2113b5 ArmPkg/ArmScmiDxe: Fix the calculation of RequiredArraySize + 9d669016d9 OvmfPkg/IntelTdx: Update README + ff8485179c SecurityPkg/TdTcg2Dxe: td-guest shall halt when CcMeasurement install fail + cc18c503e0 SecurityPkg: don't require PK to be self-signed by default + f6e4824533 OvmfPkg: require self-signed PK when secure boot is enabled + 566cdfc675 SecurityPkg: limit verification of enrolled PK in setup mode + 7c138e4008 EmbeddedPkg/PrePiLib: Drop unused PCD PcdPrePiCpuIoSize + 4d37059d8e OvmfPkg: Support Tdx measurement in OvmfPkgX64 + 1f9bd937b3 OvmfPkg/PlatformPei: Build GuidHob for Tdx measurement + 6ea50514c1 OvmfPkg/OvmfPkgX64: Measure TdHob and Configuration FV in SecMain + d92db8a086 OvmfPkg/IntelTdx: Add PeiTdxHelperLib + 019621d078 OvmfPkg/IntelTdx: Measure TdHob and Configuration FV in SecMain + c0984d1ff2 OvmfPkg: Refactor ProcessHobList + 852ae4cd80 OvmfPkg: Refactor MeaureFvImage + f41acc651f OvmfPkg: Refactor MeasureHobList + d59279f8ce OvmfPkg/PeilessStartupLib: Update the define of FV_HANDOFF_TABLE_POINTERS2 + d09c1d4b88 OvmfPkg/IntelTdx: Add SecTdxHelperLib + d3109e5f18 OvmfPkg/IntelTdx: Add TdxHelperLibNull + 6ba931bebf OvmfPkg: Add Tdx measurement data structure in WorkArea + 935343cf16 OvmfPkg/AcpiPlatformDxe: Measure ACPI table from QEMU in TDVF + 7623b4bf6a MdeModulePkg: ScsiDiskDxe: clean up comment in ScsiDisk.c + 13b97736c8 UefiCpuPkg: Fix SMM code hangs when InitPaging + 11f0014c0e MdePkg: Label CreateEvent NotifyFunction and NotifyContext optional + ae6e470252 MdeModulePkg/Bus/Ata/AhciPei: Fix DEADCODE Coverity issue + 558b37b49b ShellPkg/AcpiView: ERST Parser + d375273c89 MdeModulePkg: ScsiBusDxe: Refactor DiscoverScsiDevice() + bda715bf6d MdePkg: Fix UINT64 and INT64 word length for LoongArch64 + 2f2fd79fc4 UefiPayloadPkg: Set RTC dynamic PCD to PeiPCDdatabase + 3509103132 MdePkg: Added serveral tables to MATD used by LoongArch64 + c5ef1f01a1 MdePkg: Add ACPI 6.5 header + 620cddb1e0 MdePkg: Add Acpi65.h to IgnoreFiles area + c59230bce1 ArmVirtPkg: Remove RealView Debugger lines from ArmVirtPkg.dsc.inc + 8c170ad491 ArmPkg: Remove RealView Debugger support + 15f98047d2 BaseTools: Remove CYGWIN_NT-5.1-i686 ref from Scripts/PatchCheck.py + cdcee3d17b BaseTools: Delete Bin/{CYGWIN_NT-5.1-i686,Darwin-i386} directories + 4b384c21ad MdeModulePkg: Correct memory type in PrePiDxeCis.h + bb13762548 tools_def: Remove duplicated -Os + e7aac7fc13 ArmPkg: implement EFI_MP_SERVICES_PROTOCOL based on PSCI calls + d1855afc6e ArmPkg: Add GET_MPIDR_AFFINITY_BITS and MPIDR_MT_BIT to ArmLib.h + 0d129ef7c3 OvmfPkg/PlatformPei: SEV-SNP make >=4GB unaccepted + 466d8f65e3 OvmfPkg: Implement AcceptAllUnacceptedMemory in AmdSevDxe + 26847fb6be OvmfPkg: Introduce the OvmfSevMemoryAcceptance protocol + a00e2e5513 OvmfPkg: Add memory acceptance event in AmdSevDxe + ca573b8615 ArmVirtPkg/PlatformCI: Perform build test of ArmVirtKvmTool + 0eda253317 ArmVirtPkg/PlatformCI: Add CI coverage for ArmVirtQemuKernel + ed1806b2c0 ArmVirtPkg/PlatformCI: Enable optional features on Qemu AARCH64 builds + 01a06884a1 ArmVirtPkg/PlatformCI: factor out reusable PlatformBuildLib.py + 619f077252 ArmVirtPkg/ArmVirtQemu: enlarge initial flash mapping + 6c8a08bd8a ArmVirtPkg/PrePi: Ensure timely execution of library constructors + d0ff1cae3a CryptoPkg/Library: Reinstate ARM/AARCH64 sections in SmmCryptLib.inf + f25ee54763 OvmfPkg: fix BuildResourceDescriptorHob call in PlatformAddHobCB() + 37d3eb026a SecurityPkg/AuthVariableLib: Check SHA-256 OID with ContentInfo present + 7afef31b2b MdeModulePkg: remove garbage pixels in LaffStd glyphs + e96a5734f6 ShellPkg: Export default shell delay as PCD + bf5678b580 OvmfPkg/PlatformInitLib: catch QEMU's CPU hotplug reg block regression + c3e128a4cd OvmfPkg/PlatformInitLib: factor out PlatformCpuCountBugCheck() + 3beb8c9654 OvmfPkg/PlatformCI VS2019: Enable temporary workaround for cpuhp bugfix + 51411435d5 EmbeddedPkg: Add back FfsFindSectionData + 0826808d4f EmbeddedPkg: Rename FfsFindSectionData as FfsFindSectionDataWithHook + 18df11da8c MdeModulePkg: Add IpmiCommandLib + ae55e9fca6 MdeModulePkg/IpmiCommandLib: Add NULL instance library + bde407db51 MdeModulePkg/Include: Add IpmiCommandLib header file + 426efcc374 RedfishPkg/Include: Redfish USB Interface V2 update + 663e70851c RedfishPkg/Include: Add Redfish IPMI definitions + cabcc6851b MdePkg/IndustryStandard: Update IPMI definitions + 998ebe5ca0 OvmfPkg/CcExitLib: Initialize Status in IoExit + 5c7a611353 OvmfPkg/BaseMemEncryptTdxLib: Refactor error handle of SetOrClearSharedBit + e0dcfb31fb SecurityPkg/TdTcg2Dxe: Extend EFI boot variable to PCR[1] + e05132aaa0 OvmfPkg/CcExitLib: Refactor TDX MmioExit + c01622057c OvmfPkg/CcExitLib: Move common X86 instruction code to separate file + 70d1481b55 OvmfPkg/PeilessStartupLib: Find NCCFV in non-td guest + c3f4f5a949 OvmfPkg/IntelTdx: Enable separate-fv in IntelTdx/IntelTdxX64.fdf + 066d3c8004 OvmfPkg: Add PCDs/GUID for NCCFV + c673216f53 EmbeddedPkg/PrePiLib: Add FFS_CHECK_SECTION_HOOK when finding section + 6c1988af76 ShellPkg: Display SMBIOS Type38 fields in smbiosview in formatted view + ea382b3b21 CI: use ubuntu-22.04 image (Linux only) + 7edf120150 OvmfPkg: CI: use ubuntu-22.04 vm_image (Linux only) + 5f8b749c73 EmulatorPkg: CI: use ubuntu-22.04 vm_image (Linux only) + 7e88204fe1 ArmVirtPkg: CI: use ubuntu-22.04 vm_image (Linux only) + 84cb35232d BaseTools: remove ext_dep files for gcc + 5d25638e1b .pytool: CISettings.py: don't add scopes for GCC + 7fab007f33 OvmfPkg: CI: Use Fedora 35 container (Linux only) + 32c76a8cd4 EmulatorPkg: CI: Use Fedora 35 container (Linux only) + 7cddfae1e8 ArmVirtPkg: CI: Use Fedora 35 container (Linux only) + ef09160098 CI: Use Fedora 35 container (Linux only) + 36d7626a37 CI: Allow running in a container. + becff4f473 CI: add ~/.local/bin to PATH (Linux only) + 65cc189414 OvmfPkg: CI: use Python version from defaults template + 7d62df623f EmulatorPkg: CI: use Python version from defaults template + 89ed7e4795 ArmVirtPkg: CI: use Python version from defaults template + 3579551734 CI: make Python version configurable + 015a001b03 OvmfPkg/PlatformInitLib: reorder PlatformQemuUc32BaseInitialization + c0a0b9bc35 OvmfPkg/PlatformInitLib: Add PlatformReservationConflictCB + 328076cfdf OvmfPkg/PlatformInitLib: Add PlatformAddHobCB + 124b765051 OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB + e037530468 OvmfPkg/PlatformInitLib: Add PlatformScanE820 and GetFirstNonAddressCB + a107ad0f62 BaseTools/tools_def CLANG38: Suppress unaligned access warning + 021930d7c2 BaseTools/tools_def ARM: Make choice for soft float ABI explicit + e974064303 BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flags + 096cd41ce7 BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only + d05739a3ff Fix cyclic dependency error on OptionROM build + 987cc09c7c ArmVirt: don't use unaligned CopyMem () on NOR flash + 47ab397011 MdeModulePkg/XhciPei: Unlinked XhciPei memory block + be8d6ef385 MdeModulePkg/Usb: Read a large number of blocks + 8147fe090f MdeModulePkg/Xhci: Initial XHCI DCI slot's Context value + 7cd55f3009 OvmfPkg/AcpiPlatformDxe: Return error if installing NotifyProtocol failed + 66f18fde49 OvmfPkg/AcpiPlatformDxe: Refactor QemuAcpiTableNotifyProtocol + 2ef0ff39e5 OvmfPkg/AcpiPlatformDxe: Add log to show the installed tables + 165f1e4936 OvmfPkg/AcpiPlatformDxe: Use local variable in QemuFwCfgAcpi.c + f81273f7fb OvmfPkg/AcpiPlatformDxe: Use local variable in CloudHvAcpi.c + 43b3ca6b7f OvmfPkg/AcpiPlatformDxe: Remove QEMU_ACPI_TABLE_NOTIFY_PROTOCOL + ba08910df1 OvmfPkg: fix OvmfTpmSecurityStub.dsc.inc include + 9d70d8f20d MdeModulePkg: Notify BeforeExitBootServices in CoreExitBootServices + 82b0ee8354 MdePkg: Add EFI_EVENT_BEFORE_EXIT_BOOT_SERVICES_GUID + 59aa48bb7d OvmfPkg: Realize EfiMemoryAcceptProtocol in AmdSevDxe + e5ec3ba409 OvmfPkg/VirtNorFlashDxe: map flash memory as uncacheable + 85fd05ab97 OvmfPkg/PlatformInitLib: fix comment about uncacheable MTRRs + fe405f08a0 NetworkPkg: Add WiFi profile sync protocol support + ec54ce1f1a ArmVirtPkg/ArmVirtQemu: Avoid early ID map on ThunderX + 5ee17c5418 ArmVirtPkg/ArmPlatformLibQemu: Ensure that VFP is on before running C code ++++ 185 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/ovmf/ovmf.changes ++++ and /work/SRC/openSUSE:Factory/.ovmf.new.31432/ovmf.changes Old: ---- edk2-edk2-stable202211.tar.gz fix-aarch64.patch ovmf-OvmfPkg-PlatformInitLib-Fix-integrity-checking-faile.patch ovmf-Revert-MdeModulePkg-Replace-Opcode-with-the-correspo.patch ovmf-Revert-MdePkg-Remove-the-macro-definitions-regarding.patch ovmf-Revert-MdePkg-Replace-Opcode-with-the-corresponding-.patch ovmf-Revert-SourceLevelDebugPkg-Replace-Opcode-with-the-c.patch ovmf-Revert-UefiCpuPkg-Replace-Opcode-with-the-correspond.patch ovmf-tools_def-add-fno-omit-frame-pointer-to-GCC48_-IA32-.patch New: ---- edk2-stable202302.tar.gz ovmf-Revert-ArmVirtPkg-make-EFI_LOADER_DATA-non-executabl.patch ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformAddHobCB.patch ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformGetLowMem.patch ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformReservati.patch ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformScanE820-.patch ovmf-Revert-OvmfPkg-PlatformInitLib-reorder-PlatformQemuU.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ovmf.spec ++++++ --- /var/tmp/diff_new_pack.fx8unH/_old 2023-03-17 17:01:11.204713519 +0100 +++ /var/tmp/diff_new_pack.fx8unH/_new 2023-03-17 17:01:11.208713540 +0100 @@ -22,13 +22,13 @@ %global softfloat_version b64af41c3276f Name: ovmf -Version: 202211 +Version: 202302 Release: 0 Summary: Open Virtual Machine Firmware License: BSD-2-Clause-Patent Group: System/Emulators/PC URL: https://github.com/tianocore/edk2 -Source0: edk2-edk2-stable%{version}.tar.gz +Source0: edk2-stable%{version}.tar.gz Source1: https://www.openssl.org/source/openssl-%{openssl_version}.tar.gz Source111: https://www.openssl.org/source/openssl-%{openssl_version}.tar.gz.asc Source112: openssl.keyring @@ -51,21 +51,17 @@ Patch4: %{name}-set-fixed-enroll-time.patch Patch5: %{name}-disable-brotli.patch Patch6: %{name}-ignore-spurious-GCC-12-warning.patch -Patch7: %{name}-tools_def-add-fno-omit-frame-pointer-to-GCC48_-IA32-.patch -# PED-1359, because nasm-2.14 doesn't support corresponding instructions. -Patch8: %{name}-Revert-MdePkg-Remove-the-macro-definitions-regarding.patch -Patch9: %{name}-Revert-UefiCpuPkg-Replace-Opcode-with-the-correspond.patch -Patch10: %{name}-Revert-SourceLevelDebugPkg-Replace-Opcode-with-the-c.patch -Patch11: %{name}-Revert-MdePkg-Replace-Opcode-with-the-corresponding-.patch -Patch12: %{name}-Revert-MdeModulePkg-Replace-Opcode-with-the-correspo.patch # Bug 1205978 - Got Page-Fault exception when VM is booting with edk2-stable202211 ovmf -Patch13: %{name}-Revert-OvmfPkg-PlatformInitLib-dynamic-mmio-window-s.patch -# Bug 1206078 - qemu-ovmf-x86_64-202211 is broken: NvVarStore Variable header State was invalid -Patch14: %{name}-OvmfPkg-PlatformInitLib-Fix-integrity-checking-faile.patch -# Bug 1207095 -Patch15: fix-aarch64.patch +Patch7: %{name}-Revert-OvmfPkg-PlatformInitLib-reorder-PlatformQemuU.patch +Patch8: %{name}-Revert-OvmfPkg-PlatformInitLib-Add-PlatformReservati.patch +Patch9: %{name}-Revert-OvmfPkg-PlatformInitLib-Add-PlatformAddHobCB.patch +Patch10: %{name}-Revert-OvmfPkg-PlatformInitLib-Add-PlatformGetLowMem.patch +Patch11: %{name}-Revert-OvmfPkg-PlatformInitLib-Add-PlatformScanE820-.patch +Patch12: %{name}-Revert-OvmfPkg-PlatformInitLib-dynamic-mmio-window-s.patch +# Bug 1207095 - ASSERT [ArmCpuDxe] /home/abuild/rpmbuild/BUILD/edk2-edk2-stable202211/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(333): ((BOOLEAN)(0==1)) +Patch13: %{name}-Revert-ArmVirtPkg-make-EFI_LOADER_DATA-non-executabl.patch # Bug 1205613 - L3: win 2k22 UEFI xen VMs cannot boot in xen after upgrade -Patch16: %{name}-Revert-OvmfPkg-OvmfXen-Set-PcdFSBClock.patch +Patch14: %{name}-Revert-OvmfPkg-OvmfXen-Set-PcdFSBClock.patch BuildRequires: bc BuildRequires: cross-arm-binutils BuildRequires: cross-arm-gcc%{gcc_version} @@ -182,17 +178,13 @@ %patch5 -p1 %patch6 -p1 %patch7 -p1 -%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150500 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 -%endif %patch13 -p1 %patch14 -p1 -%patch15 -p1 -%patch16 -p1 # add openssl pushd CryptoPkg/Library/OpensslLib/openssl ++++++ edk2-edk2-stable202211.tar.gz -> edk2-stable202302.tar.gz ++++++ /work/SRC/openSUSE:Factory/ovmf/edk2-edk2-stable202211.tar.gz /work/SRC/openSUSE:Factory/.ovmf.new.31432/edk2-stable202302.tar.gz differ: char 14, line 1 ++++++ ovmf-Revert-ArmVirtPkg-make-EFI_LOADER_DATA-non-executabl.patch ++++++ Index: edk2-edk2-stable202302/ArmVirtPkg/ArmVirt.dsc.inc =================================================================== --- edk2-edk2-stable202302.orig/ArmVirtPkg/ArmVirt.dsc.inc +++ edk2-edk2-stable202302/ArmVirtPkg/ArmVirt.dsc.inc @@ -361,7 +361,7 @@ # reserved ones, with the exception of LoaderData regions, of which OS loaders # (i.e., GRUB) may assume that its contents are executable. # - gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD5 + gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xC000000000007FD1 [Components.common] # ++++++ ovmf-Revert-OvmfPkg-OvmfXen-Set-PcdFSBClock.patch ++++++ --- /var/tmp/diff_new_pack.fx8unH/_old 2023-03-17 17:01:11.364714357 +0100 +++ /var/tmp/diff_new_pack.fx8unH/_new 2023-03-17 17:01:11.364714357 +0100 @@ -10,11 +10,11 @@ OvmfPkg/XenPlatformPei/XenPlatformPei.inf | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) -Index: edk2-edk2-stable202208/OvmfPkg/OvmfXen.dsc +Index: edk2-edk2-stable202302/OvmfPkg/OvmfXen.dsc =================================================================== ---- edk2-edk2-stable202208.orig/OvmfPkg/OvmfXen.dsc -+++ edk2-edk2-stable202208/OvmfPkg/OvmfXen.dsc -@@ -455,6 +455,9 @@ +--- edk2-edk2-stable202302.orig/OvmfPkg/OvmfXen.dsc ++++ edk2-edk2-stable202302/OvmfPkg/OvmfXen.dsc +@@ -456,6 +456,9 @@ # Point to the MdeModulePkg/Application/UiApp/UiApp.inf gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile|{ 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 } @@ -24,7 +24,7 @@ # We populate DXE IPL tables with 1G pages preferably on Xen gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable|TRUE -@@ -485,7 +488,6 @@ +@@ -486,7 +489,6 @@ gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0 gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x800000000 @@ -32,10 +32,10 @@ gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0 # Set video resolution for text setup. -Index: edk2-edk2-stable202208/OvmfPkg/XenPlatformPei/Xen.c +Index: edk2-edk2-stable202302/OvmfPkg/XenPlatformPei/Xen.c =================================================================== ---- edk2-edk2-stable202208.orig/OvmfPkg/XenPlatformPei/Xen.c -+++ edk2-edk2-stable202208/OvmfPkg/XenPlatformPei/Xen.c +--- edk2-edk2-stable202302.orig/OvmfPkg/XenPlatformPei/Xen.c ++++ edk2-edk2-stable202302/OvmfPkg/XenPlatformPei/Xen.c @@ -634,9 +634,5 @@ CalibrateLapicTimer ( Freq = DivU64x64Remainder (Dividend, TscTick2 - TscTick, NULL); DEBUG ((DEBUG_INFO, "APIC Freq % 8lu Hz\n", Freq)); @@ -46,10 +46,10 @@ - UnmapXenPage (SharedInfo); } -Index: edk2-edk2-stable202208/OvmfPkg/XenPlatformPei/XenPlatformPei.inf +Index: edk2-edk2-stable202302/OvmfPkg/XenPlatformPei/XenPlatformPei.inf =================================================================== ---- edk2-edk2-stable202208.orig/OvmfPkg/XenPlatformPei/XenPlatformPei.inf -+++ edk2-edk2-stable202208/OvmfPkg/XenPlatformPei/XenPlatformPei.inf +--- edk2-edk2-stable202302.orig/OvmfPkg/XenPlatformPei/XenPlatformPei.inf ++++ edk2-edk2-stable202302/OvmfPkg/XenPlatformPei/XenPlatformPei.inf @@ -86,7 +86,6 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdDxeIplSwitchToLongMode gEfiMdeModulePkgTokenSpaceGuid.PcdUse1GPageTable ++++++ ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformAddHobCB.patch ++++++ >From 1a77f2e654bd791e645743254c37cd912261099e Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" <j...@suse.com> Date: Wed, 15 Mar 2023 17:20:23 +0800 Subject: [PATCH 3/6] Revert "OvmfPkg/PlatformInitLib: Add PlatformAddHobCB" This reverts commit 328076cfdf4560aed3ae83bfb0f013e8da827ed5. --- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 186 +++++++++++++++----- 1 file changed, 138 insertions(+), 48 deletions(-) diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c index ec2a1e9e37..57feeb6dab 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -112,6 +112,143 @@ PlatformQemuUc32BaseInitialization ( } } +/** + Iterate over the RAM entries in QEMU's fw_cfg E820 RAM map that start outside + of the 32-bit address range. + + Find the highest exclusive >=4GB RAM address, or produce memory resource + descriptor HOBs for RAM entries that start at or above 4GB. + + @param[out] MaxAddress If MaxAddress is NULL, then PlatformScanOrAdd64BitE820Ram() + produces memory resource descriptor HOBs for RAM + entries that start at or above 4GB. + + Otherwise, MaxAddress holds the highest exclusive + >=4GB RAM address on output. If QEMU's fw_cfg E820 + RAM map contains no RAM entry that starts outside of + the 32-bit address range, then MaxAddress is exactly + 4GB on output. + + @retval EFI_SUCCESS The fw_cfg E820 RAM map was found and processed. + + @retval EFI_PROTOCOL_ERROR The RAM map was found, but its size wasn't a + whole multiple of sizeof(EFI_E820_ENTRY64). No + RAM entry was processed. + + @return Error codes from QemuFwCfgFindFile(). No RAM + entry was processed. +**/ +STATIC +EFI_STATUS +PlatformScanOrAdd64BitE820Ram ( + IN BOOLEAN AddHighHob, + OUT UINT64 *LowMemory OPTIONAL, + OUT UINT64 *MaxAddress OPTIONAL + ) +{ + EFI_STATUS Status; + FIRMWARE_CONFIG_ITEM FwCfgItem; + UINTN FwCfgSize; + EFI_E820_ENTRY64 E820Entry; + UINTN Processed; + + Status = QemuFwCfgFindFile ("etc/e820", &FwCfgItem, &FwCfgSize); + if (EFI_ERROR (Status)) { + return Status; + } + + if (FwCfgSize % sizeof E820Entry != 0) { + return EFI_PROTOCOL_ERROR; + } + + if (LowMemory != NULL) { + *LowMemory = 0; + } + + if (MaxAddress != NULL) { + *MaxAddress = BASE_4GB; + } + + QemuFwCfgSelectItem (FwCfgItem); + for (Processed = 0; Processed < FwCfgSize; Processed += sizeof E820Entry) { + QemuFwCfgReadBytes (sizeof E820Entry, &E820Entry); + DEBUG (( + DEBUG_VERBOSE, + "%a: Base=0x%Lx Length=0x%Lx Type=%u\n", + __FUNCTION__, + E820Entry.BaseAddr, + E820Entry.Length, + E820Entry.Type + )); + if (E820Entry.Type == EfiAcpiAddressRangeMemory) { + if (AddHighHob && (E820Entry.BaseAddr >= BASE_4GB)) { + UINT64 Base; + UINT64 End; + + // + // Round up the start address, and round down the end address. + // + Base = ALIGN_VALUE (E820Entry.BaseAddr, (UINT64)EFI_PAGE_SIZE); + End = (E820Entry.BaseAddr + E820Entry.Length) & + ~(UINT64)EFI_PAGE_MASK; + if (Base < End) { + PlatformAddMemoryRangeHob (Base, End); + DEBUG (( + DEBUG_VERBOSE, + "%a: PlatformAddMemoryRangeHob [0x%Lx, 0x%Lx)\n", + __FUNCTION__, + Base, + End + )); + } + } + + if (MaxAddress || LowMemory) { + UINT64 Candidate; + + Candidate = E820Entry.BaseAddr + E820Entry.Length; + if (MaxAddress && (Candidate > *MaxAddress)) { + *MaxAddress = Candidate; + DEBUG (( + DEBUG_VERBOSE, + "%a: MaxAddress=0x%Lx\n", + __FUNCTION__, + *MaxAddress + )); + } + + if (LowMemory && (Candidate > *LowMemory) && (Candidate < BASE_4GB)) { + *LowMemory = Candidate; + DEBUG (( + DEBUG_VERBOSE, + "%a: LowMemory=0x%Lx\n", + __FUNCTION__, + *LowMemory + )); + } + } + } else if (E820Entry.Type == EfiAcpiAddressRangeReserved) { + if (AddHighHob) { + DEBUG (( + DEBUG_INFO, + "%a: Reserved: Base=0x%Lx Length=0x%Lx\n", + __FUNCTION__, + E820Entry.BaseAddr, + E820Entry.Length + )); + BuildResourceDescriptorHob ( + EFI_RESOURCE_MEMORY_RESERVED, + 0, + E820Entry.BaseAddr, + E820Entry.Length + ); + } + } + } + + return EFI_SUCCESS; +} + typedef VOID (*E820_SCAN_CALLBACK) ( EFI_E820_ENTRY64 *E820Entry, EFI_HOB_PLATFORM_INFO *PlatformInfoHob @@ -169,53 +306,6 @@ PlatformGetLowMemoryCB ( } } -/** - Create HOBs for reservations and RAM (except low memory). -**/ -STATIC -VOID -PlatformAddHobCB ( - IN EFI_E820_ENTRY64 *E820Entry, - IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob - ) -{ - UINT64 Base, End; - - Base = E820Entry->BaseAddr; - End = E820Entry->BaseAddr + E820Entry->Length; - - switch (E820Entry->Type) { - case EfiAcpiAddressRangeMemory: - if (Base >= BASE_4GB) { - // - // Round up the start address, and round down the end address. - // - Base = ALIGN_VALUE (Base, (UINT64)EFI_PAGE_SIZE); - End = End & ~(UINT64)EFI_PAGE_MASK; - if (Base < End) { - DEBUG ((DEBUG_INFO, "%a: HighMemory [0x%Lx, 0x%Lx)\n", __FUNCTION__, Base, End)); - PlatformAddMemoryRangeHob (Base, End); - } - } - - break; - case EfiAcpiAddressRangeReserved: - BuildResourceDescriptorHob (EFI_RESOURCE_MEMORY_RESERVED, 0, Base, End - Base); - DEBUG ((DEBUG_INFO, "%a: Reserved [0x%Lx, 0x%Lx)\n", __FUNCTION__, Base, End)); - break; - default: - DEBUG (( - DEBUG_WARN, - "%a: Type %u [0x%Lx, 0x%Lx) (NOT HANDLED)\n", - __FUNCTION__, - E820Entry->Type, - Base, - End - )); - break; - } -} - /** Iterate over the entries in QEMU's fw_cfg E820 RAM map, call the passed callback for each entry. @@ -961,7 +1051,7 @@ PlatformQemuInitializeRam ( // entries. Otherwise, create a single memory HOB with the flat >=4GB // memory size read from the CMOS. // - Status = PlatformScanE820 (PlatformAddHobCB, PlatformInfoHob); + Status = PlatformScanOrAdd64BitE820Ram (TRUE, NULL, NULL); if (EFI_ERROR (Status)) { UpperMemorySize = PlatformGetSystemMemorySizeAbove4gb (); if (UpperMemorySize != 0) { -- 2.35.3 ++++++ ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformGetLowMem.patch ++++++ >From 04b5515d31f9754a661bbe000093b0feb9ef6d65 Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" <j...@suse.com> Date: Wed, 15 Mar 2023 17:20:57 +0800 Subject: [PATCH 4/6] Revert "OvmfPkg/PlatformInitLib: Add PlatformGetLowMemoryCB" This reverts commit 124b765051333010a3cf1038c601568001e39574. --- OvmfPkg/Include/Library/PlatformInitLib.h | 3 +- OvmfPkg/Library/PeilessStartupLib/Hob.c | 3 +- .../PeilessStartupLib/PeilessStartup.c | 7 +- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 70 ++++++------------- OvmfPkg/Library/PlatformInitLib/Platform.c | 7 +- OvmfPkg/PlatformPei/MemDetect.c | 3 +- 6 files changed, 33 insertions(+), 60 deletions(-) diff --git a/OvmfPkg/Include/Library/PlatformInitLib.h b/OvmfPkg/Include/Library/PlatformInitLib.h index 57b18b94d9..67403a1dd9 100644 --- a/OvmfPkg/Include/Library/PlatformInitLib.h +++ b/OvmfPkg/Include/Library/PlatformInitLib.h @@ -26,7 +26,6 @@ typedef struct { BOOLEAN Q35SmramAtDefaultSmbase; UINT16 Q35TsegMbytes; - UINT32 LowMemory; UINT64 FirstNonAddress; UINT8 PhysMemAddressWidth; UINT32 Uc32Base; @@ -145,7 +144,7 @@ PlatformQemuUc32BaseInitialization ( IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob ); -VOID +UINT32 EFIAPI PlatformGetSystemMemorySizeBelow4gb ( IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob diff --git a/OvmfPkg/Library/PeilessStartupLib/Hob.c b/OvmfPkg/Library/PeilessStartupLib/Hob.c index 318b74c95d..630ce445eb 100644 --- a/OvmfPkg/Library/PeilessStartupLib/Hob.c +++ b/OvmfPkg/Library/PeilessStartupLib/Hob.c @@ -42,8 +42,7 @@ ConstructSecHobList ( ZeroMem (&PlatformInfoHob, sizeof (PlatformInfoHob)); PlatformInfoHob.HostBridgeDevId = PciRead16 (OVMF_HOSTBRIDGE_DID); - PlatformGetSystemMemorySizeBelow4gb (&PlatformInfoHob); - LowMemorySize = PlatformInfoHob.LowMemory; + LowMemorySize = PlatformGetSystemMemorySizeBelow4gb (&PlatformInfoHob); ASSERT (LowMemorySize != 0); LowMemoryStart = FixedPcdGet32 (PcdOvmfDxeMemFvBase) + FixedPcdGet32 (PcdOvmfDxeMemFvSize); LowMemorySize -= LowMemoryStart; diff --git a/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c b/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c index 164aa2d619..922a083225 100644 --- a/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c +++ b/OvmfPkg/Library/PeilessStartupLib/PeilessStartup.c @@ -42,7 +42,8 @@ InitializePlatform ( EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { - VOID *VariableStore; + UINT32 LowerMemorySize; + VOID *VariableStore; DEBUG ((DEBUG_INFO, "InitializePlatform in Pei-less boot\n")); PlatformDebugDumpCmos (); @@ -70,14 +71,14 @@ InitializePlatform ( PlatformInfoHob->PcdCpuBootLogicalProcessorNumber )); - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); + LowerMemorySize = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); PlatformQemuUc32BaseInitialization (PlatformInfoHob); DEBUG (( DEBUG_INFO, "Uc32Base = 0x%x, Uc32Size = 0x%x, LowerMemorySize = 0x%x\n", PlatformInfoHob->Uc32Base, PlatformInfoHob->Uc32Size, - PlatformInfoHob->LowMemory + LowerMemorySize )); VariableStore = PlatformReserveEmuVariableNvStore (); diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c index 57feeb6dab..fdfe134247 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -51,16 +51,18 @@ PlatformQemuUc32BaseInitialization ( IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { + UINT32 LowerMemorySize; + if (PlatformInfoHob->HostBridgeDevId == 0xffff /* microvm */) { return; } if (PlatformInfoHob->HostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); + LowerMemorySize = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); ASSERT (PcdGet64 (PcdPciExpressBaseAddress) <= MAX_UINT32); - ASSERT (PcdGet64 (PcdPciExpressBaseAddress) >= PlatformInfoHob->LowMemory); + ASSERT (PcdGet64 (PcdPciExpressBaseAddress) >= LowerMemorySize); - if (PlatformInfoHob->LowMemory <= BASE_2GB) { + if (LowerMemorySize <= BASE_2GB) { // Newer qemu with gigabyte aligned memory, // 32-bit pci mmio window is 2G -> 4G then. PlatformInfoHob->Uc32Base = BASE_2GB; @@ -90,8 +92,8 @@ PlatformQemuUc32BaseInitialization ( // variable MTRR suffices by truncating the size to a whole power of two, // while keeping the end affixed to 4GB. This will round the base up. // - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); - PlatformInfoHob->Uc32Size = GetPowerOfTwo32 ((UINT32)(SIZE_4GB - PlatformInfoHob->LowMemory)); + LowerMemorySize = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); + PlatformInfoHob->Uc32Size = GetPowerOfTwo32 ((UINT32)(SIZE_4GB - LowerMemorySize)); PlatformInfoHob->Uc32Base = (UINT32)(SIZE_4GB - PlatformInfoHob->Uc32Size); // // Assuming that LowerMemorySize is at least 1 byte, Uc32Size is at most 2GB. @@ -99,13 +101,13 @@ PlatformQemuUc32BaseInitialization ( // ASSERT (PlatformInfoHob->Uc32Base >= BASE_2GB); - if (PlatformInfoHob->Uc32Base != PlatformInfoHob->LowMemory) { + if (PlatformInfoHob->Uc32Base != LowerMemorySize) { DEBUG (( DEBUG_VERBOSE, "%a: rounded UC32 base from 0x%x up to 0x%x, for " "an UC32 size of 0x%x\n", __FUNCTION__, - PlatformInfoHob->LowMemory, + LowerMemorySize, PlatformInfoHob->Uc32Base, PlatformInfoHob->Uc32Size )); @@ -278,34 +280,6 @@ PlatformGetFirstNonAddressCB ( } } -/** - Store the low (below 4G) memory size in - PlatformInfoHob->LowMemory -**/ -STATIC -VOID -PlatformGetLowMemoryCB ( - IN EFI_E820_ENTRY64 *E820Entry, - IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob - ) -{ - UINT64 Candidate; - - if (E820Entry->Type != EfiAcpiAddressRangeMemory) { - return; - } - - Candidate = E820Entry->BaseAddr + E820Entry->Length; - if (Candidate >= BASE_4GB) { - return; - } - - if (PlatformInfoHob->LowMemory < Candidate) { - DEBUG ((DEBUG_INFO, "%a: LowMemory=0x%Lx\n", __FUNCTION__, Candidate)); - PlatformInfoHob->LowMemory = (UINT32)Candidate; - } -} - /** Iterate over the entries in QEMU's fw_cfg E820 RAM map, call the passed callback for each entry. @@ -422,13 +396,14 @@ GetHighestSystemMemoryAddressFromPvhMemmap ( return HighestAddress; } -VOID +UINT32 EFIAPI PlatformGetSystemMemorySizeBelow4gb ( IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { EFI_STATUS Status; + UINT64 LowerMemorySize = 0; UINT8 Cmos0x34; UINT8 Cmos0x35; @@ -436,13 +411,12 @@ PlatformGetSystemMemorySizeBelow4gb ( (CcProbe () != CcGuestTypeIntelTdx)) { // Get the information from PVH memmap - PlatformInfoHob->LowMemory = (UINT32)GetHighestSystemMemoryAddressFromPvhMemmap (TRUE); - return; + return (UINT32)GetHighestSystemMemoryAddressFromPvhMemmap (TRUE); } - Status = PlatformScanE820 (PlatformGetLowMemoryCB, PlatformInfoHob); - if (!EFI_ERROR (Status) && (PlatformInfoHob->LowMemory > 0)) { - return; + Status = PlatformScanOrAdd64BitE820Ram (FALSE, &LowerMemorySize, NULL); + if ((Status == EFI_SUCCESS) && (LowerMemorySize > 0)) { + return (UINT32)LowerMemorySize; } // @@ -457,7 +431,7 @@ PlatformGetSystemMemorySizeBelow4gb ( Cmos0x34 = (UINT8)PlatformCmosRead8 (0x34); Cmos0x35 = (UINT8)PlatformCmosRead8 (0x35); - PlatformInfoHob->LowMemory = (UINT32)(((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); + return (UINT32)(((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB); } STATIC @@ -993,6 +967,7 @@ PlatformQemuInitializeRam ( IN EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { + UINT64 LowerMemorySize; UINT64 UpperMemorySize; MTRR_SETTINGS MtrrSettings; EFI_STATUS Status; @@ -1002,7 +977,7 @@ PlatformQemuInitializeRam ( // // Determine total memory size available // - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); + LowerMemorySize = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); if (PlatformInfoHob->BootMode == BOOT_ON_S3_RESUME) { // @@ -1036,14 +1011,14 @@ PlatformQemuInitializeRam ( UINT32 TsegSize; TsegSize = PlatformInfoHob->Q35TsegMbytes * SIZE_1MB; - PlatformAddMemoryRangeHob (BASE_1MB, PlatformInfoHob->LowMemory - TsegSize); + PlatformAddMemoryRangeHob (BASE_1MB, LowerMemorySize - TsegSize); PlatformAddReservedMemoryBaseSizeHob ( - PlatformInfoHob->LowMemory - TsegSize, + LowerMemorySize - TsegSize, TsegSize, TRUE ); } else { - PlatformAddMemoryRangeHob (BASE_1MB, PlatformInfoHob->LowMemory); + PlatformAddMemoryRangeHob (BASE_1MB, LowerMemorySize); } // @@ -1221,10 +1196,9 @@ PlatformQemuInitializeRamForS3 ( // Make sure the TSEG area that we reported as a reserved memory resource // cannot be used for reserved memory allocations. // - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); TsegSize = PlatformInfoHob->Q35TsegMbytes * SIZE_1MB; BuildMemoryAllocationHob ( - PlatformInfoHob->LowMemory - TsegSize, + PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob) - TsegSize, TsegSize, EfiReservedMemoryType ); diff --git a/OvmfPkg/Library/PlatformInitLib/Platform.c b/OvmfPkg/Library/PlatformInitLib/Platform.c index 9fee6e4810..d99b239b27 100644 --- a/OvmfPkg/Library/PlatformInitLib/Platform.c +++ b/OvmfPkg/Library/PlatformInitLib/Platform.c @@ -131,6 +131,7 @@ PlatformMemMapInitialization ( { UINT64 PciIoBase; UINT64 PciIoSize; + UINT32 TopOfLowRam; UINT64 PciExBarBase; UINT32 PciBase; UINT32 PciSize; @@ -152,7 +153,7 @@ PlatformMemMapInitialization ( return; } - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); + TopOfLowRam = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); PciExBarBase = 0; if (PlatformInfoHob->HostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { // @@ -160,11 +161,11 @@ PlatformMemMapInitialization ( // the base of the 32-bit PCI host aperture. // PciExBarBase = PcdGet64 (PcdPciExpressBaseAddress); - ASSERT (PlatformInfoHob->LowMemory <= PciExBarBase); + ASSERT (TopOfLowRam <= PciExBarBase); ASSERT (PciExBarBase <= MAX_UINT32 - SIZE_256MB); PciBase = (UINT32)(PciExBarBase + SIZE_256MB); } else { - ASSERT (PlatformInfoHob->LowMemory <= PlatformInfoHob->Uc32Base); + ASSERT (TopOfLowRam <= PlatformInfoHob->Uc32Base); PciBase = PlatformInfoHob->Uc32Base; } diff --git a/OvmfPkg/PlatformPei/MemDetect.c b/OvmfPkg/PlatformPei/MemDetect.c index 41d186986b..3d8375320d 100644 --- a/OvmfPkg/PlatformPei/MemDetect.c +++ b/OvmfPkg/PlatformPei/MemDetect.c @@ -271,8 +271,7 @@ PublishPeiMemory ( UINT32 S3AcpiReservedMemoryBase; UINT32 S3AcpiReservedMemorySize; - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); - LowerMemorySize = PlatformInfoHob->LowMemory; + LowerMemorySize = PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); if (PlatformInfoHob->SmmSmramRequire) { // // TSEG is chipped from the end of low RAM -- 2.35.3 ++++++ ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformReservati.patch ++++++ >From f4abfc909103eda354a96a9aa579a80f74cbb80e Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" <j...@suse.com> Date: Wed, 15 Mar 2023 17:17:16 +0800 Subject: [PATCH 2/6] Revert "OvmfPkg/PlatformInitLib: Add PlatformReservationConflictCB" This reverts commit c0a0b9bc3534b71ad90c022b0cab10910697de69. --- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 46 --------------------- 1 file changed, 46 deletions(-) diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c index 1f0344e47f..ec2a1e9e37 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -216,51 +216,6 @@ PlatformAddHobCB ( } } -/** - Check whenever the 64bit PCI MMIO window overlaps with a reservation - from qemu. If so move down the MMIO window to resolve the conflict. - - This happens on (virtual) AMD machines with 1TB address space, - because the AMD IOMMU uses an address window just below 1TB. -**/ -STATIC -VOID -PlatformReservationConflictCB ( - IN EFI_E820_ENTRY64 *E820Entry, - IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob - ) -{ - UINT64 IntersectionBase; - UINT64 IntersectionEnd; - UINT64 NewBase; - - IntersectionBase = MAX ( - E820Entry->BaseAddr, - PlatformInfoHob->PcdPciMmio64Base - ); - IntersectionEnd = MIN ( - E820Entry->BaseAddr + E820Entry->Length, - PlatformInfoHob->PcdPciMmio64Base + - PlatformInfoHob->PcdPciMmio64Size - ); - - if (IntersectionBase >= IntersectionEnd) { - return; // no overlap - } - - NewBase = E820Entry->BaseAddr - PlatformInfoHob->PcdPciMmio64Size; - NewBase = NewBase & ~(PlatformInfoHob->PcdPciMmio64Size - 1); - - DEBUG (( - DEBUG_INFO, - "%a: move mmio: 0x%Lx => %Lx\n", - __FUNCTION__, - PlatformInfoHob->PcdPciMmio64Base, - NewBase - )); - PlatformInfoHob->PcdPciMmio64Base = NewBase; -} - /** Iterate over the entries in QEMU's fw_cfg E820 RAM map, call the passed callback for each entry. @@ -698,7 +653,6 @@ PlatformDynamicMmioWindow ( DEBUG ((DEBUG_INFO, "%a: MMIO Space 0x%Lx (%Ld GB)\n", __func__, MmioSpace, RShiftU64 (MmioSpace, 30))); PlatformInfoHob->PcdPciMmio64Size = MmioSpace; PlatformInfoHob->PcdPciMmio64Base = AddrSpace - MmioSpace; - PlatformScanE820 (PlatformReservationConflictCB, PlatformInfoHob); } else { DEBUG ((DEBUG_INFO, "%a: using classic mmio window\n", __func__)); } -- 2.35.3 ++++++ ovmf-Revert-OvmfPkg-PlatformInitLib-Add-PlatformScanE820-.patch ++++++ >From 7dcc332174fa4332924a2bffba7b2e892b8f0f32 Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" <j...@suse.com> Date: Wed, 15 Mar 2023 17:21:06 +0800 Subject: [PATCH 5/6] Revert "OvmfPkg/PlatformInitLib: Add PlatformScanE820 and GetFirstNonAddressCB" This reverts commit e0375304682683f6e5c466fba948619bc6e6f377. --- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 116 ++++---------------- 1 file changed, 23 insertions(+), 93 deletions(-) diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c index fdfe134247..882805269b 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -251,84 +251,6 @@ PlatformScanOrAdd64BitE820Ram ( return EFI_SUCCESS; } -typedef VOID (*E820_SCAN_CALLBACK) ( - EFI_E820_ENTRY64 *E820Entry, - EFI_HOB_PLATFORM_INFO *PlatformInfoHob - ); - -/** - Store first address not used by e820 RAM entries in - PlatformInfoHob->FirstNonAddress -**/ -STATIC -VOID -PlatformGetFirstNonAddressCB ( - IN EFI_E820_ENTRY64 *E820Entry, - IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob - ) -{ - UINT64 Candidate; - - if (E820Entry->Type != EfiAcpiAddressRangeMemory) { - return; - } - - Candidate = E820Entry->BaseAddr + E820Entry->Length; - if (PlatformInfoHob->FirstNonAddress < Candidate) { - DEBUG ((DEBUG_INFO, "%a: FirstNonAddress=0x%Lx\n", __FUNCTION__, Candidate)); - PlatformInfoHob->FirstNonAddress = Candidate; - } -} - -/** - Iterate over the entries in QEMU's fw_cfg E820 RAM map, call the - passed callback for each entry. - - @param[in] Callback The callback function to be called. - - @param[in out] PlatformInfoHob PlatformInfo struct which is passed - through to the callback. - - @retval EFI_SUCCESS The fw_cfg E820 RAM map was found and processed. - - @retval EFI_PROTOCOL_ERROR The RAM map was found, but its size wasn't a - whole multiple of sizeof(EFI_E820_ENTRY64). No - RAM entry was processed. - - @return Error codes from QemuFwCfgFindFile(). No RAM - entry was processed. -**/ -STATIC -EFI_STATUS -PlatformScanE820 ( - IN E820_SCAN_CALLBACK Callback, - IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob - ) -{ - EFI_STATUS Status; - FIRMWARE_CONFIG_ITEM FwCfgItem; - UINTN FwCfgSize; - EFI_E820_ENTRY64 E820Entry; - UINTN Processed; - - Status = QemuFwCfgFindFile ("etc/e820", &FwCfgItem, &FwCfgSize); - if (EFI_ERROR (Status)) { - return Status; - } - - if (FwCfgSize % sizeof E820Entry != 0) { - return EFI_PROTOCOL_ERROR; - } - - QemuFwCfgSelectItem (FwCfgItem); - for (Processed = 0; Processed < FwCfgSize; Processed += sizeof E820Entry) { - QemuFwCfgReadBytes (sizeof E820Entry, &E820Entry); - Callback (&E820Entry, PlatformInfoHob); - } - - return EFI_SUCCESS; -} - /** Returns PVH memmap @@ -462,17 +384,23 @@ PlatformGetSystemMemorySizeAbove4gb ( Return the highest address that DXE could possibly use, plus one. **/ STATIC -VOID +UINT64 PlatformGetFirstNonAddress ( IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { + UINT64 FirstNonAddress; UINT32 FwCfgPciMmio64Mb; EFI_STATUS Status; FIRMWARE_CONFIG_ITEM FwCfgItem; UINTN FwCfgSize; UINT64 HotPlugMemoryEnd; + // + // set FirstNonAddress to suppress incorrect compiler/analyzer warnings + // + FirstNonAddress = 0; + // // If QEMU presents an E820 map, then get the highest exclusive >=4GB RAM // address from it. This can express an address >= 4GB+1TB. @@ -480,10 +408,9 @@ PlatformGetFirstNonAddress ( // Otherwise, get the flat size of the memory above 4GB from the CMOS (which // can only express a size smaller than 1TB), and add it to 4GB. // - PlatformInfoHob->FirstNonAddress = BASE_4GB; - Status = PlatformScanE820 (PlatformGetFirstNonAddressCB, PlatformInfoHob); + Status = PlatformScanOrAdd64BitE820Ram (FALSE, NULL, &FirstNonAddress); if (EFI_ERROR (Status)) { - PlatformInfoHob->FirstNonAddress = BASE_4GB + PlatformGetSystemMemorySizeAbove4gb (); + FirstNonAddress = BASE_4GB + PlatformGetSystemMemorySizeAbove4gb (); } // @@ -493,7 +420,7 @@ PlatformGetFirstNonAddress ( // #ifdef MDE_CPU_IA32 if (!FeaturePcdGet (PcdDxeIplSwitchToLongMode)) { - return; + return FirstNonAddress; } #endif @@ -546,7 +473,7 @@ PlatformGetFirstNonAddress ( // determines the highest address plus one. The memory hotplug area (see // below) plays no role for the firmware in this case. // - return; + return FirstNonAddress; } // @@ -570,15 +497,15 @@ PlatformGetFirstNonAddress ( HotPlugMemoryEnd )); - ASSERT (HotPlugMemoryEnd >= PlatformInfoHob->FirstNonAddress); - PlatformInfoHob->FirstNonAddress = HotPlugMemoryEnd; + ASSERT (HotPlugMemoryEnd >= FirstNonAddress); + FirstNonAddress = HotPlugMemoryEnd; } // // SeaBIOS aligns both boundaries of the 64-bit PCI host aperture to 1GB, so // that the host can map it with 1GB hugepages. Follow suit. // - PlatformInfoHob->PcdPciMmio64Base = ALIGN_VALUE (PlatformInfoHob->FirstNonAddress, (UINT64)SIZE_1GB); + PlatformInfoHob->PcdPciMmio64Base = ALIGN_VALUE (FirstNonAddress, (UINT64)SIZE_1GB); PlatformInfoHob->PcdPciMmio64Size = ALIGN_VALUE (PlatformInfoHob->PcdPciMmio64Size, (UINT64)SIZE_1GB); // @@ -592,8 +519,8 @@ PlatformGetFirstNonAddress ( // // The useful address space ends with the 64-bit PCI host aperture. // - PlatformInfoHob->FirstNonAddress = PlatformInfoHob->PcdPciMmio64Base + PlatformInfoHob->PcdPciMmio64Size; - return; + FirstNonAddress = PlatformInfoHob->PcdPciMmio64Base + PlatformInfoHob->PcdPciMmio64Size; + return FirstNonAddress; } /* @@ -854,6 +781,7 @@ PlatformAddressWidthInitialization ( IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob ) { + UINT64 FirstNonAddress; UINT8 PhysMemAddressWidth; EFI_STATUS Status; @@ -866,7 +794,7 @@ PlatformAddressWidthInitialization ( // First scan host-provided hardware information to assess if the address // space is already known. If so, guest must use those values. // - Status = PlatformScanHostProvided64BitPciMmioEnd (&PlatformInfoHob->FirstNonAddress); + Status = PlatformScanHostProvided64BitPciMmioEnd (&FirstNonAddress); if (EFI_ERROR (Status)) { // @@ -878,12 +806,13 @@ PlatformAddressWidthInitialization ( // The DXL IPL keys off of the physical address bits advertized in the CPU // HOB. To conserve memory, we calculate the minimum address width here. // - PlatformGetFirstNonAddress (PlatformInfoHob); + FirstNonAddress = PlatformGetFirstNonAddress (PlatformInfoHob); } PlatformAddressWidthFromCpuid (PlatformInfoHob, TRUE); if (PlatformInfoHob->PhysMemAddressWidth != 0) { // physical address width is known + PlatformInfoHob->FirstNonAddress = FirstNonAddress; PlatformDynamicMmioWindow (PlatformInfoHob); return; } @@ -894,13 +823,13 @@ PlatformAddressWidthInitialization ( // -> try be conservstibe to stay below the guaranteed minimum of // 36 phys bits (aka 64 GB). // - PhysMemAddressWidth = (UINT8)HighBitSet64 (PlatformInfoHob->FirstNonAddress); + PhysMemAddressWidth = (UINT8)HighBitSet64 (FirstNonAddress); // // If FirstNonAddress is not an integral power of two, then we need an // additional bit. // - if ((PlatformInfoHob->FirstNonAddress & (PlatformInfoHob->FirstNonAddress - 1)) != 0) { + if ((FirstNonAddress & (FirstNonAddress - 1)) != 0) { ++PhysMemAddressWidth; } @@ -928,6 +857,7 @@ PlatformAddressWidthInitialization ( ASSERT (PhysMemAddressWidth <= 48); #endif + PlatformInfoHob->FirstNonAddress = FirstNonAddress; PlatformInfoHob->PhysMemAddressWidth = PhysMemAddressWidth; } -- 2.35.3 ++++++ ovmf-Revert-OvmfPkg-PlatformInitLib-dynamic-mmio-window-s.patch ++++++ --- /var/tmp/diff_new_pack.fx8unH/_old 2023-03-17 17:01:11.416714629 +0100 +++ /var/tmp/diff_new_pack.fx8unH/_new 2023-03-17 17:01:11.416714629 +0100 @@ -1,20 +1,19 @@ -From 0e12a96d9f8475e164c634be9d672ca7cdb26567 Mon Sep 17 00:00:00 2001 +From 5b3a40038886774228826b42c9aa3c9645a799a9 Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" <j...@suse.com> -Date: Fri, 2 Dec 2022 20:11:45 +0800 -Subject: [PATCH] Revert "OvmfPkg/PlatformInitLib: dynamic mmio window size" +Date: Wed, 15 Mar 2023 17:21:25 +0800 +Subject: [PATCH 6/6] Revert "OvmfPkg/PlatformInitLib: dynamic mmio window + size" This reverts commit ecb778d0ac62560aa172786ba19521f27bc3f650. - -Signed-off-by: Lee, Chun-Yi <j...@suse.com> --- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 28 --------------------- 1 file changed, 28 deletions(-) diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c -index b8feae4309..822e4aefc3 100644 +index 882805269b..0ac7d5b967 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c -@@ -606,33 +606,6 @@ PlatformAddressWidthFromCpuid ( +@@ -625,33 +625,6 @@ PlatformAddressWidthFromCpuid ( } } @@ -48,7 +47,7 @@ /** Iterate over the PCI host bridges resources information optionally provided in fw-cfg and find the highest address contained in the PCI MMIO windows. If -@@ -794,7 +767,6 @@ PlatformAddressWidthInitialization ( +@@ -813,7 +786,6 @@ PlatformAddressWidthInitialization ( if (PlatformInfoHob->PhysMemAddressWidth != 0) { // physical address width is known PlatformInfoHob->FirstNonAddress = FirstNonAddress; ++++++ ovmf-Revert-OvmfPkg-PlatformInitLib-reorder-PlatformQemuU.patch ++++++ >From 2ac2dc711bd6bdbda239955f1ae810ccb87c8789 Mon Sep 17 00:00:00 2001 From: "Lee, Chun-Yi" <j...@suse.com> Date: Wed, 15 Mar 2023 17:17:10 +0800 Subject: [PATCH 1/6] Revert "OvmfPkg/PlatformInitLib: reorder PlatformQemuUc32BaseInitialization" This reverts commit 015a001b03db14f791476f817b8b125b195b6d10. --- OvmfPkg/Library/PlatformInitLib/MemDetect.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c index 38cece9173..1f0344e47f 100644 --- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c +++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c @@ -55,15 +55,8 @@ PlatformQemuUc32BaseInitialization ( return; } - if (PlatformInfoHob->HostBridgeDevId == CLOUDHV_DEVICE_ID) { - PlatformInfoHob->Uc32Size = CLOUDHV_MMIO_HOLE_SIZE; - PlatformInfoHob->Uc32Base = CLOUDHV_MMIO_HOLE_ADDRESS; - return; - } - - PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); - if (PlatformInfoHob->HostBridgeDevId == INTEL_Q35_MCH_DEVICE_ID) { + PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); ASSERT (PcdGet64 (PcdPciExpressBaseAddress) <= MAX_UINT32); ASSERT (PcdGet64 (PcdPciExpressBaseAddress) >= PlatformInfoHob->LowMemory); @@ -85,12 +78,19 @@ PlatformQemuUc32BaseInitialization ( return; } + if (PlatformInfoHob->HostBridgeDevId == CLOUDHV_DEVICE_ID) { + PlatformInfoHob->Uc32Size = CLOUDHV_MMIO_HOLE_SIZE; + PlatformInfoHob->Uc32Base = CLOUDHV_MMIO_HOLE_ADDRESS; + return; + } + ASSERT (PlatformInfoHob->HostBridgeDevId == INTEL_82441_DEVICE_ID); // // On i440fx, start with the [LowerMemorySize, 4GB) range. Make sure one // variable MTRR suffices by truncating the size to a whole power of two, // while keeping the end affixed to 4GB. This will round the base up. // + PlatformGetSystemMemorySizeBelow4gb (PlatformInfoHob); PlatformInfoHob->Uc32Size = GetPowerOfTwo32 ((UINT32)(SIZE_4GB - PlatformInfoHob->LowMemory)); PlatformInfoHob->Uc32Base = (UINT32)(SIZE_4GB - PlatformInfoHob->Uc32Size); // -- 2.35.3 ++++++ ovmf-build-funcs.sh ++++++ --- /var/tmp/diff_new_pack.fx8unH/_old 2023-03-17 17:01:11.444714776 +0100 +++ /var/tmp/diff_new_pack.fx8unH/_new 2023-03-17 17:01:11.448714797 +0100 @@ -51,6 +51,9 @@ # memory: 256MB local MEMORY="-m 256" + # kvm + local FW_CFG="-fw_cfg name=opt/org.tianocore/X-Cpuhp-Bugcheck-Override,string=yes" + # redirect display to stdio and disable network local MISC="-display none -no-user-config -nodefaults -smp 1" MISC="$MISC -serial stdio" @@ -83,6 +86,6 @@ fi # Launch the VM - $QEMU $MACHINE $MEMORY $PFLASH $SMBIOS $CDROM $MISC + $QEMU $MACHINE $MEMORY $FW_CFG $PFLASH $SMBIOS $CDROM $MISC } ++++++ ovmf-disable-ia32-firmware-piepic.patch ++++++ --- /var/tmp/diff_new_pack.fx8unH/_old 2023-03-17 17:01:11.460714860 +0100 +++ /var/tmp/diff_new_pack.fx8unH/_new 2023-03-17 17:01:11.464714881 +0100 @@ -1,14 +1,14 @@ -Index: edk2-edk2-stable202008/BaseTools/Conf/tools_def.template +Index: edk2-edk2-stable202302/BaseTools/Conf/tools_def.template =================================================================== ---- edk2-edk2-stable202008.orig/BaseTools/Conf/tools_def.template -+++ edk2-edk2-stable202008/BaseTools/Conf/tools_def.template -@@ -1954,7 +1954,7 @@ DEFINE GCC_DEPS_FLAGS = -MM +--- edk2-edk2-stable202302.orig/BaseTools/Conf/tools_def.template ++++ edk2-edk2-stable202302/BaseTools/Conf/tools_def.template +@@ -1888,7 +1888,7 @@ DEFINE GCC_DEPS_FLAGS = -MM DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20 --DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -+DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-pic -fno-pie - DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address +-DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer ++DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer -fno-pic -fno-pie + DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive ++++++ ovmf-gdb-symbols.patch ++++++ --- /var/tmp/diff_new_pack.fx8unH/_old 2023-03-17 17:01:11.472714922 +0100 +++ /var/tmp/diff_new_pack.fx8unH/_new 2023-03-17 17:01:11.476714943 +0100 @@ -14,10 +14,10 @@ create mode 100644 DebugPkg/GdbSyms/GdbSyms.inf create mode 100644 DebugPkg/Scripts/gdb_uefi.py -Index: edk2-edk2-stable202202/DebugPkg/DebugPkg.dec +Index: edk2-edk2-stable202302/DebugPkg/DebugPkg.dec =================================================================== --- /dev/null -+++ edk2-edk2-stable202202/DebugPkg/DebugPkg.dec ++++ edk2-edk2-stable202302/DebugPkg/DebugPkg.dec @@ -0,0 +1,34 @@ +## @file +# Debug package - various useful stuff for debugging. @@ -53,10 +53,10 @@ + +[LibraryClasses] + -Index: edk2-edk2-stable202202/DebugPkg/GdbSyms/GdbSyms.c +Index: edk2-edk2-stable202302/DebugPkg/GdbSyms/GdbSyms.c =================================================================== --- /dev/null -+++ edk2-edk2-stable202202/DebugPkg/GdbSyms/GdbSyms.c ++++ edk2-edk2-stable202302/DebugPkg/GdbSyms/GdbSyms.c @@ -0,0 +1,78 @@ +/** @file + @@ -136,10 +136,10 @@ +} + + -Index: edk2-edk2-stable202202/DebugPkg/GdbSyms/GdbSyms.inf +Index: edk2-edk2-stable202302/DebugPkg/GdbSyms/GdbSyms.inf =================================================================== --- /dev/null -+++ edk2-edk2-stable202202/DebugPkg/GdbSyms/GdbSyms.inf ++++ edk2-edk2-stable202302/DebugPkg/GdbSyms/GdbSyms.inf @@ -0,0 +1,57 @@ +## @file +# @@ -198,10 +198,10 @@ +[Depex] + TRUE + -Index: edk2-edk2-stable202202/DebugPkg/Scripts/gdb_uefi.py +Index: edk2-edk2-stable202302/DebugPkg/Scripts/gdb_uefi.py =================================================================== --- /dev/null -+++ edk2-edk2-stable202202/DebugPkg/Scripts/gdb_uefi.py ++++ edk2-edk2-stable202302/DebugPkg/Scripts/gdb_uefi.py @@ -0,0 +1,350 @@ +""" +Allows loading TianoCore symbols into a GDB session attached to EFI @@ -553,14 +553,14 @@ +ReloadUefi () + + -Index: edk2-edk2-stable202202/OvmfPkg/OvmfPkgX64.dsc +Index: edk2-edk2-stable202302/OvmfPkg/OvmfPkgX64.dsc =================================================================== ---- edk2-edk2-stable202202.orig/OvmfPkg/OvmfPkgX64.dsc -+++ edk2-edk2-stable202202/OvmfPkg/OvmfPkgX64.dsc -@@ -1004,3 +1004,5 @@ +--- edk2-edk2-stable202302.orig/OvmfPkg/OvmfPkgX64.dsc ++++ edk2-edk2-stable202302/OvmfPkg/OvmfPkgX64.dsc +@@ -1123,3 +1123,5 @@ # TPM support # - !include OvmfPkg/OvmfTpmComponentsDxe.dsc.inc + !include OvmfPkg/Include/Dsc/OvmfTpmComponentsDxe.dsc.inc + -+ DebugPkg/GdbSyms/GdbSyms.inf ++ DebugPkg/GdbSyms/GdbSyms.inf