Conversation
…alse What happened since commit 1549bf1 ("OvmfPkg/X86QemuLoadImageLib: make legacy loader configurable.") ? First, qemu 10.0 has been released, which brings support for the -shim command line option so direct kernel boot with secure boot works. Second, support has been added to libvirt (version v11.2.0 and newer). Third, we got a bunch of linux distro releases. Latest debian, ubuntu and fedora releases all have new enough edk2+qemu+libvirt packages to support direct kernel boot with shim.efi loading and proper secure boot verification. Lastly, the edk2 security advisory GHSA-6pp6-cm5h-86g5 and CVE-2025-2296 have been published. Time for the next step in tightening the screws: Flip the default for the EnableLegacyLoader config option from true to false. Also update the documentation accordingly. The documentation for the config option is here: https://github.com/tianocore/edk2/blob/master/OvmfPkg/RUNTIME_CONFIG.md#user-content-security-optorgtianocoreenablelegacyloader Upcoming final step, in a year or two: remove the legacy loader from the code base (drop X86QemuLoadImageLib, migrade all users to use GenericQemuLoadImageLib instead). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
The ACPI specification does not require legacy IRQs (x86) to be ActiveLow when EdgeTriggered or vice-versa. Hence the ASSERT checking for ActiveLow when EdgeTriggered is removed for IRQ macro generation non-ARM architecture. The IRQNoFlags macro defaults to EdgeTrigger and ActiveHigh configuration, demonstrating that this combination is valid. Reference: ACPI Specification 6.5 - Section 19.6.66: IRQ (Interrupt Resource Descriptor Macro) - Section 19.6.67: IRQNoFlags (Interrupt Resource Descriptor Macro) Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
Although almost all tool chain plus package combinations currently stay under the 2MB firmware size, except for NOOPT builds, ArmVirtQemu DEBUG built with CLANGDWARF now sneaks over. Noting that images will be padded to 64MB for before use anyway, we now choose 3MB as the default for all. But keep the 2MB vs. 3MB code which checks FD_SIZE_IN_MB, in this and other files, available for reference the next time a size change is needed. Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
Separate Exception Stacks has been enabled by default in commit [1], in this case, TSS will be appended to original GDT. As secondary bootloader, UniversalPayload solution has different boot flow from original EDK2. When DxeMain tries to append TSS after original GDT, the original GDT is empty. It leads to system reboot when DxeMain tries to install new GDT which is appended with TSS. To fix this issue, set up temporary GDT with 64-bit code and data descriptors. [1] tianocore@cec2c6 Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
Variable ChildBusAddress is not used in function ParsePciRootBridge, it triggers build error on GCC version gcc version 13.3.0. Remove this variable to fix build error. Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
Without this fix CLANGPDB X64 and IA32 builds of RedfishPkg fail with: lld-link: error: undefined symbol: _fltused Fixes: tianocore#11881 Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
The changes introduced by ff3c1ad which made two calls to ProcessOpRomImage() resulted a platform where single OpRom present, the same image to be loaded and started. Prevent loading and starting same image twice. Signed-off-by: Khalid Ali <khaliidcaliy@gmail.com> Suggested-by: Ard Biesheuvel <ardb@kernel.org>
11687 introduced a null check and break on the orderedlist carriage return input handler. The carriage return is a special case that should result in exiting the menu, but the null check that prevented null pointer access changed the logic to continue in the input wait loop. Removed the break while still preventing null variable access and allow function to exit. 11689 introduced checks on the call to EfiBootManagerGetLoadOptions, but this encounterd a problem with the way that a default platform recovery option was created. The default platform recovery option was attempting to go through existing recovery options to get the next available recovery option number. The introduced null check short circuited these additional calls and resulted in the platform recovery option not being created. Modified the logic to no longer attempt to access recovery options when non exist, and still create the default platform recovery option. Signed-off-by: Aaron Pop <aaronpop@microsoft.com>
Add "uintn" to extended words in ci.yaml and fix typos. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Add "usbsts" to extended words in ci.yaml file. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Fix uninitialized variable errors in unit tests discovered by CLANG by zeroing local variable structures before use in unit test cases. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Add extended words to ci.yaml file for words noted by spell check when doing stuart_ci_build NO-TARGET build against PrmPkg. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: 20000419 <lzy00419@163.com>
For clang build, enable to generate coverage file under Build folder to merge coverage files of all module. Signed-off-by: Cosmo Lai <cosmo.lai@intel.com>
If the multi-core IPI trapping into an SMP_CALL_FUNCTION interrupt is used, then the Context will be allowed to be null. Cc: Chao Li <lichao@loongson.cn> Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
Change BASE_NAME from "tftpDynamicCommand" to "TftpDynamicCommand" to follow code style for names. The use of 'T' in the directory name and INF file name and the use of 't' in BASE_NAME causes build failures on Linux platforms due to a mismatch in file/directory names in the build output directory. Following the code style resolves this issue. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Add "smcbios" to extended works in ci.yaml file and fix typos. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
For reference, this minor incorrect naming was present when file was added: tianocore@3579551 Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
For reference, this minor incorrect naming was present when the relevant line in the README was added: tianocore@a6871b5 Signed-off-by: Mike Beaton <mjsbeaton@gmail.com>
Update UnitTestLib to not pass UnitTest->Log as the format string to printf(). If UnitTest->Log contains any printf() format specifiers, then printf() will look for arguments that are not present and will read beyond the stack frame. Change use of printf() to an fwrite() to stdout followed by an fflush() to stdout. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Fix error reported by clang in UnitTestDebugAssertLibHost that the function snprintf() is undefined. Add include of <stdio.h> to resolve error. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Fix uninitialized variable error in unit tests detected by clang by zeroing local variable structure before use in unit test cases. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Correct a typographical error in the DebugServicePei module by renaming the function and entry point from DebugSerivceInitialize to DebugServiceInitialize in both the C source file and the INF configuration file. Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Use $(OS) in all GNUMakefiles to detect if the GNUMakefile is being used in a Windows OS. If a Windows OS is detected, then override SHELL to use cmd.exe. This prevents make utility from using sh.exe if sh.exe happens to be in PATH. If sh.exe is used, then backslash (\) characters in file paths are removed and builds break for files not found. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update GCC Family to undefined _MSC_VER to match settings used by other compilers. This addresses clang compatibility issues for host-based unit test builds. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update GCC Family to undefined _MSC_VER to match settings used by other compilers. This addresses clang compatibility issues for host-based unit test builds. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Update GCC Family to undefined _MSC_VER to match settings used by other compilers. This addresses clang compatibility issues for host-based unit test builds. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Remove -U _MSC_VER from CLANGPDB tool chain in tools_def.template. _MSC_VER should only be undefined in specific components that require it to be undefined. -U _MSC_VER in tools_def.txt for CLANGPDB breaks host-based unit test builds on Windows. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Remove workaround to define _MSC_VER when it is not defined when building with clang on Windows. This workaround was required when CLANGPDB undefined _MSC_VER in tools_def.txt. With -U _MSC_VER removed from tools_def.txt, this workaround for host-based unit test builds is no longer required. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
…fixed Always access PcdControlFlowEnforcementPropertyMask using FixedPcdGet() in NASM source files and update INFs to correctly declare that PcdControlFlowEnforcementPropertyMask is always accessed as a Fixed PCD. PcdControlFlowEnforcementPropertyMask is declared in MdePkg.dec in the [PcdsFixedAtBuild] section, so this PCD does not support any other PCD access types. This change resolves ld warnings from GCC and CLANGDWARF builds for relocations in read-only text sections because use of PcdGet() in NASM source files reads the value into eax from the memory location of a const global variable that requires a relocation fixup. By changing PcdGet() to FixedPcdGet(), eax is loaded with an immediate value known at build time and no relocation fixups for PcdControlFlowEnforcementPropertyMask are required. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
The Firmware Handoff specification has withdrawn the use of the “XOR” checksum and updated the checksum calculation to use “SUM” [0]. Accordingly, libtl has also been updated to reflect this change [1]. The “XOR” checksum calculation existed in version 1; however, as mentioned above, it has been withdrawn, and TF-A always provides the checksum using the “SUM” calculation. Therefore, the xferlist version is updated to version 2. Link: FirmwareHandoff/firmware_handoff#81 [0] Link: https://review.trustedfirmware.org/c/shared/transfer-list-library/+/46033 [1] Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
An exception and interrupt vector table was added to the ASM file, a fast path was created for the IPI SMP_BOOT_CPU vector, and the C version of the SMP_BOOT_CPU handler was removed. Signed-off-by: Chao Li <lichao@loongson.cn> Cc: Ray Ni <ray.ni@intel.com> Cc: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Zhiguang Liu <zhiguang.liu@intel.com> Cc: Dun Tan <dun.tan@intel.com> Cc: Arun Subramanian Baskaran <arun.subramanian.baskaran@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Star Zeng <star.zeng@intel.com> Cc: Eduardo Cuevas Farfan <eduardo.cuevas.farfan@intel.com>
REF: pftf/RPi4#87 The PL011UartLib SetControl() is failing the SCT test for SerialIoBBTestConformance (00605CBC-3965-4B61-A254-2B2B723172EA), which is trying to set bits that are not supported per UEFI spec. Add proper argument check for valid bits, and confirm that test passes. Cc: Leif Lindholm <leif.lindholm@oss.qualcomm.com> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Use $(SEP) with addprefix of $(OBJDIR) to support Windows MINGW CLANG builds that use Windows path separators with GNU makefiles. This fixes Windows MINGW CLANG builds of the PcdValueInit application that is required for structured PCDs. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This commit removes an wrong goto statement which may cause DXE_ASSERT! `ConfigRequest` example: `&NameValueVar0&NameValueVar1&NameValueVar2`. When `*Progress` is `&NameValueVar2`, code will run to `goto Done;`, then return NULL. Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
The wiki has moved and this change updates links in the edk2 repo root to the new page location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in the edk2 .github directory to the new page location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in the .pytool directory to the new page location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in ArmVirtPkg to reflect the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in BaseTools to reflect the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in OvmfPkg to refer to the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in PrmPkg to refer to the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in SignedCapsulePkg to point to the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The wiki has moved and this change updates links in UefiPayloadPkg to refer to the new location. - New location: https://github.com/tianocore/tianocore-wiki.github.io - Rendered version: https://www.tianocore.org/tianocore-wiki.github.io/ - Old location: https://github.com/tianocore/tianocore.github.io/wiki More details: tianocore#11969 Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Adds a section to Maintainers.txt to indicate packages that either need maintainers or would benefit from additional maintainers. The community is welcome to update this list over time. Ideally, as maintainers are added, the packages would be removed from this list. Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
When allocating Runtime memory the MemoryAllocation HOB's length needs to meet the alignment requirements of Runtime memory. On AARCH64 architectures this alignment is not the default of 4KB. Instead it is set by the RUNTIME_PAGE_ALLOCATION_GRANULARITY definition, which is 64KB. This change enforces the RUNTIME alignment as part of generating the MemoryAllocationHob for runtime memory types. Signed-off-by: Antaeus Kleinert-Strand <antklein@microsoft.com>
… SEP" This reverts commit f0542ae. PR tianocore#11757 introduced a "Breaking Change" feature for out of tree builds of tools. This breaking change is blocking testing of edk2-stable202602 due to side effects on building FitGen tool in edk2-platforms. Revert this feature for the edk2-stable202602 release and work on this feature after the release. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
This reverts commit 3fe1d56. PR tianocore#11757 introduced a "Breaking Change" feature for out of tree builds of tools. This breaking change is blocking testing of edk2-stable202602 due to side effects on building FitGen tool in edk2-platforms. Revert this feature for the edk2-stable202602 release and work on this feature after the release. Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
REF: [e092122] (PR tianocore#12085) The current logic in ArmPlatformPkg/PL011UartLib performs control-bit checks intended to align with the UEFI specification. However, it incorrectly validates control bits that cannot be set through SetControl(), resulting in failures in the SetControl() SCT test. According to the UEFI specification, the valid control bits that can be set are: EFI_SERIAL_REQUEST_TO_SEND EFI_SERIAL_DATA_TERMINAL_READY EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE EFI_SERIAL_HARDWARE_FLOW_CONTROL_ENABLE This patch updates mAllowedControlBits so that only these valid control bits are accepted during validation. Cc: Sachin Ganesh <sachinganesh@ami.com> Signed-off-by: Kavipriyan K P <kavipriyankp@ami.com>
Added ArmFfaLibIsFfaSupported to ArmFfaCommon to allow for queries of FF-A support outside of ArmFfaCommonInit. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Removed global variables in ArmFfaCommon. Moved the globals to locals in each phase's ArmFfaLib implementation. SEC and PEI will query when necessary to avoid setting globals when memory is unavailable. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Removed the global variables in ArmFfaSecRxTxMap. Rx/Tx buffer HOB is now created within the Map function rather than in the constructor of ArmFfaSecLib. This allows for the use of the HOB to find the Rx/Tx buffer information. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Replaced all instances of PcdGet64 (PcdFfaTxRxPageCount) * EFI_PAGE_SIZE, with EFI_PAGES_TO_SIZE macro. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Cleaned various comments and debug messages as well as headers to either fix typos or for readability. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Add Unmap callback for when PEI and SEC need to invalidate the Rx/Tx buffer HOB on a call to Unmap. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
This reverts commit efaa102.
In Order to make the `fw_cfg` device available to OVMF and make it respect the `bootorder` file, we must include the respective driver. Signed-off-by: Pascal Scholz <pascal.scholz@cyberus-technology.de> On-behalf-of: SAP pascal.scholz@sap.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
We need to enable the
fw_cfgdevice to use in Cloud Hypervisor. We are currently implementing support for thebootorderentry and plan to fully support thefw_cfgdevice soon.How This Was Tested
We have a libvirt test integration test for this. I'll soon link it here.