Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ovmf for openSUSE:Factory checked in at 2026-03-05 17:13:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ovmf (Old) and /work/SRC/openSUSE:Factory/.ovmf.new.561 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ovmf" Thu Mar 5 17:13:39 2026 rev:129 rq:1336065 version:202602 Changes: -------- --- /work/SRC/openSUSE:Factory/ovmf/ovmf.changes 2026-02-26 18:36:53.616215452 +0100 +++ /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes 2026-03-05 17:14:53.526011105 +0100 @@ -1,0 +2,17 @@ +Tue Mar 3 08:46:00 UTC 2026 - Richard Lyu <[email protected]> + +- Add backported patch to fix the build failure on RISC-V 64 (bsc#1255113) + - ovmf-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch + a1abc3032cd2 OvmfPkg/RiscVVirt: Make SecureBootDefaultKeysInit driver configurable +- Remove ovmf-Revert-OvmfPkg-RiscVVirt-Add-SecureBootDefaultKeysIn.patch + because ovmf-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch + fixes the build failure on RISC-V 64 + +------------------------------------------------------------------- +Fri Feb 27 10:32:56 UTC 2026 - Fabian Vogt <[email protected]> + +- Add patch to fix PEI on RISCV64 (gh#tianocore/edk2#12206): + * ovmf-Revert-UefiCpuPkg-BaseRiscV64CpuTimerLib-Add-constru.patch +- Enable PEI on RISCV64 for TPM2 support + +------------------------------------------------------------------- @@ -4 +21 @@ -- Update to edk2-stable202602 +- Update to edk2-stable202602 (jsc#PED-13648, jsc#PED-14981) +++ only whitespace diff in changes, re-diffing Old: ---- ovmf-Revert-OvmfPkg-RiscVVirt-Add-SecureBootDefaultKeysIn.patch New: ---- ovmf-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch ovmf-Revert-UefiCpuPkg-BaseRiscV64CpuTimerLib-Add-constru.patch ----------(Old B)---------- Old:/work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes- a1abc3032cd2 OvmfPkg/RiscVVirt: Make SecureBootDefaultKeysInit driver configurable /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes:- Remove ovmf-Revert-OvmfPkg-RiscVVirt-Add-SecureBootDefaultKeysIn.patch /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes- because ovmf-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch ----------(Old E)---------- ----------(New B)---------- New:/work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes-- Add backported patch to fix the build failure on RISC-V 64 (bsc#1255113) /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes: - ovmf-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes- a1abc3032cd2 OvmfPkg/RiscVVirt: Make SecureBootDefaultKeysInit driver configurable New:/work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes-- Add patch to fix PEI on RISCV64 (gh#tianocore/edk2#12206): /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes: * ovmf-Revert-UefiCpuPkg-BaseRiscV64CpuTimerLib-Add-constru.patch /work/SRC/openSUSE:Factory/.ovmf.new.561/ovmf.changes-- Enable PEI on RISCV64 for TPM2 support ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ovmf.spec ++++++ --- /var/tmp/diff_new_pack.rac3X2/_old 2026-03-05 17:14:55.282084097 +0100 +++ /var/tmp/diff_new_pack.rac3X2/_new 2026-03-05 17:14:55.286084263 +0100 @@ -63,7 +63,7 @@ Patch4: %{name}-OvmfPkg-Adjust-Memory-Layout-for-2MB-OVMF.patch Patch6: %{name}-ignore-spurious-GCC-12-warning.patch # Bug 1255113 - Build Failure for RISC-V 64 When Secure Boot is Enabled Due to SecureBootDefaultKeysInit module -Patch7: %{name}-Revert-OvmfPkg-RiscVVirt-Add-SecureBootDefaultKeysIn.patch +Patch7: %{name}-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch # Bug 1207095 - ASSERT [ArmCpuDxe] /home/abuild/rpmbuild/BUILD/edk2-edk2-stable202211/ArmPkg/Library/DefaultExceptionHandlerLib/AArch64/DefaultExceptionHandler.c(333): ((BOOLEAN)(0==1)) Patch8: %{name}-Revert-ArmVirtPkg-make-EFI_LOADER_DATA-non-executabl.patch # Bug 1205613 - L3: win 2k22 UEFI xen VMs cannot boot in xen after upgrade @@ -83,6 +83,8 @@ Patch15: %{name}-Revert-ArmPkg-UefiCpuPkg-Fix-boot-failure-on-FEAT_LP.patch Patch16: %{name}-Revert-ArmPkg-UefiCpuPkg-fix-boot-failure-with-LPA2.patch Patch17: %{name}-Revert-UefiCpuPkg-ArmMmuLib-Add-support-for-LPA2.patch +# Workaround for failing PEI boot on RISCV64 (https://github.com/tianocore/edk2/issues/12206) +Patch18: ovmf-Revert-UefiCpuPkg-BaseRiscV64CpuTimerLib-Add-constru.patch BuildRequires: bc BuildRequires: cross-arm-binutils BuildRequires: cross-arm-gcc%{gcc_version} @@ -290,8 +292,10 @@ %if %{with build_riscv64} # Flavors for riscv FLAVORS_RV64=("riscv") +# RISCVVIRT_PEI_BOOTING is needed for TPM initialization BUILD_OPTIONS_RV64=" \ $OVMF_FLAGS \ + -D RISCVVIRT_PEI_BOOTING \ -D SECURE_BOOT_ENABLE \ -a RISCV64 \ -p OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc \ ++++++ ovmf-OvmfPkg-RiscVVirt-Make-SecureBootDefaultKeysInit-dri.patch ++++++ >From 3926678924d72b68637223772945e3d5213766a3 Mon Sep 17 00:00:00 2001 From: Richard Lyu <[email protected]> Date: Thu, 26 Feb 2026 15:01:54 +0800 Subject: [PATCH] OvmfPkg/RiscVVirt: Make SecureBootDefaultKeysInit driver configurable When Secure Boot is enabled, the SecureBootDefaultKeysInit driver is not always required. There are alternative methods for enrollment, such as EnrollDefaultKeys.efi or virt-firmware. Therefore, make the SecureBootDefaultKeysInit driver an optional build component. Wrap SecureBootDefaultKeysInit.inf with the SECURE_BOOT_DEFAULT_KEYS condition, allowing builds to optionally configure the driver. Signed-off-by: Richard Lyu <[email protected]> --- OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc | 13 +++++++------ OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf | 2 ++ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc index db2efccab743..d3ae3aff70a0 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.dsc @@ -35,12 +35,13 @@ # Defines for default states. These can be changed on the command line. # -D FLAG=VALUE # - DEFINE TTY_TERMINAL = FALSE - DEFINE SECURE_BOOT_ENABLE = FALSE - DEFINE QEMU_PV_VARS = FALSE - DEFINE TPM2_ENABLE = FALSE - DEFINE TPM2_CONFIG_ENABLE = FALSE - DEFINE DEBUG_ON_SERIAL_PORT = TRUE + DEFINE TTY_TERMINAL = FALSE + DEFINE SECURE_BOOT_ENABLE = FALSE + DEFINE SECURE_BOOT_DEFAULT_KEYS = FALSE + DEFINE QEMU_PV_VARS = FALSE + DEFINE TPM2_ENABLE = FALSE + DEFINE TPM2_CONFIG_ENABLE = FALSE + DEFINE DEBUG_ON_SERIAL_PORT = TRUE # # Shell can be useful for debugging but should not be enabled for production diff --git a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf index eebab647fa43..cd3f768ae946 100644 --- a/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf +++ b/OvmfPkg/RiscVVirt/RiscVVirtQemu.fdf @@ -89,6 +89,7 @@ INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf !endif !if $(SECURE_BOOT_ENABLE) == TRUE INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf + !if $(SECURE_BOOT_DEFAULT_KEYS) == TRUE INF OvmfPkg/RiscVVirt/Feature/SecureBoot/SecureBootDefaultKeysInit/SecureBootDefaultKeysInit.inf FILE FREEFORM = 85254ea7-4759-4fc4-82d4-5eed5fb0a4a0 { @@ -107,6 +108,7 @@ INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf FILE FREEFORM = 5740766a-718e-4dc0-9935-c36f7d3f884f { SECTION RAW = OvmfPkg/RiscVVirt/Feature/SecureBoot/SecureBootKeys/dbx/dbxupdate_x64.bin } + !endif !endif INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf -- 2.51.0 ++++++ ovmf-Revert-UefiCpuPkg-BaseRiscV64CpuTimerLib-Add-constru.patch ++++++ >From 756560b2ec49a63ef86808615cf1746266c1144f Mon Sep 17 00:00:00 2001 From: Fabian Vogt <[email protected]> Date: Fri, 27 Feb 2026 12:36:31 +0100 Subject: [PATCH] Revert "UefiCpuPkg/BaseRiscV64CpuTimerLib: Add constructor to initialize mTimeBase" This reverts commit f2c63dca1bc5201903b75a8551afdf2c7ab2fc4d. --- .../BaseRiscV64CpuTimerLib.inf | 1 - .../BaseRiscV64CpuTimerLib/CpuTimerLib.c | 113 ++++++++---------- 2 files changed, 50 insertions(+), 64 deletions(-) diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/BaseRiscV64CpuTimerLib.inf b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/BaseRiscV64CpuTimerLib.inf index a3d25cda41..b7ae1e86b7 100644 --- a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/BaseRiscV64CpuTimerLib.inf +++ b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/BaseRiscV64CpuTimerLib.inf @@ -16,7 +16,6 @@ VERSION_STRING = 1.0 LIBRARY_CLASS = TimerLib MODULE_UNI_FILE = BaseRisV64CpuTimerLib.uni - CONSTRUCTOR = BaseRiscV64CpuTimerLibConstructor [Sources] CpuTimerLib.c diff --git a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c index f93e841a45..bb07200754 100644 --- a/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c +++ b/UefiCpuPkg/Library/BaseRiscV64CpuTimerLib/CpuTimerLib.c @@ -21,6 +21,8 @@ STATIC UINT64 mTimeBase; +#define GET_TIME_BASE() (mTimeBase ?: GetPerformanceCounterProperties(NULL, NULL)) + /** Stalls the CPU for at least the given number of ticks. @@ -65,7 +67,7 @@ MicroSecondDelay ( DivU64x32 ( MultU64x32 ( MicroSeconds, - mTimeBase + GET_TIME_BASE () ), 1000000u ) @@ -93,7 +95,7 @@ NanoSecondDelay ( DivU64x32 ( MultU64x32 ( NanoSeconds, - mTimeBase + GET_TIME_BASE () ), 1000000000u ) @@ -152,6 +154,12 @@ GetPerformanceCounterProperties ( OUT UINT64 *EndValue OPTIONAL ) { + VOID *Hob; + RISCV_SEC_HANDOFF_DATA *SecData; + CONST EFI_GUID SecHobDataGuid = RISCV_SEC_HANDOFF_HOB_GUID; + UINT64 TimeBase; + CONST VOID *FdtBase; + if (StartValue != NULL) { *StartValue = 0; } @@ -160,66 +168,9 @@ GetPerformanceCounterProperties ( *EndValue = 32 - 1; } - return mTimeBase; -} - -/** - Converts elapsed ticks of performance counter to time in nanoseconds. - - This function converts the elapsed ticks of running performance counter to - time value in unit of nanoseconds. - - @param Ticks The number of elapsed ticks of running performance counter. - - @return The elapsed time in nanoseconds. - -**/ -UINT64 -EFIAPI -GetTimeInNanoSecond ( - IN UINT64 Ticks - ) -{ - UINT64 NanoSeconds; - UINT32 Remainder; - - // - // Ticks - // Time = --------- x 1,000,000,000 - // Frequency - // - NanoSeconds = MultU64x32 (DivU64x32Remainder (Ticks, mTimeBase, &Remainder), 1000000000u); - - // - // Frequency < 0x100000000, so Remainder < 0x100000000, then (Remainder * 1,000,000,000) - // will not overflow 64-bit. - // - NanoSeconds += DivU64x32 (MultU64x32 ((UINT64)Remainder, 1000000000u), mTimeBase); - - return NanoSeconds; -} - -/** - Constructor function for the Timer Library. - - This constructor function is called early during DXE phase to ensure that - GetPerformanceCounterProperties() is invoked and mTimeBase is initialized - before any code that depends on it. - - @retval EFI_SUCCESS The constructor always returns success. - -**/ -EFI_STATUS -EFIAPI -BaseRiscV64CpuTimerLibConstructor ( - VOID - ) -{ - VOID *Hob; - RISCV_SEC_HANDOFF_DATA *SecData; - CONST EFI_GUID SecHobDataGuid = RISCV_SEC_HANDOFF_HOB_GUID; - UINT64 TimeBase; - CONST VOID *FdtBase; + if (mTimeBase != 0) { + return mTimeBase; + } // // Locate the FDT HOB and validate header @@ -273,5 +224,41 @@ BaseRiscV64CpuTimerLibConstructor ( // mTimeBase = TimeBase; - return EFI_SUCCESS; + return TimeBase; +} + +/** + Converts elapsed ticks of performance counter to time in nanoseconds. + + This function converts the elapsed ticks of running performance counter to + time value in unit of nanoseconds. + + @param Ticks The number of elapsed ticks of running performance counter. + + @return The elapsed time in nanoseconds. + +**/ +UINT64 +EFIAPI +GetTimeInNanoSecond ( + IN UINT64 Ticks + ) +{ + UINT64 NanoSeconds; + UINT32 Remainder; + + // + // Ticks + // Time = --------- x 1,000,000,000 + // Frequency + // + NanoSeconds = MultU64x32 (DivU64x32Remainder (Ticks, GET_TIME_BASE (), &Remainder), 1000000000u); + + // + // Frequency < 0x100000000, so Remainder < 0x100000000, then (Remainder * 1,000,000,000) + // will not overflow 64-bit. + // + NanoSeconds += DivU64x32 (MultU64x32 ((UINT64)Remainder, 1000000000u), GET_TIME_BASE ()); + + return NanoSeconds; } -- 2.52.0
