Commit Graph

33661 Commits

Author SHA1 Message Date
Michael Kubacki ff003faabe ReadMe.rst: Add minimum Python version badge
The Python version used for build and CI should always be at least
the minimum version supported by edk2-pytool-extensions. A badge
is added that keeps this information dynamically up-to-date based
on the minimum version specified in edk2-pytool-extensions
pyproject.toml file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-13 22:05:02 +00:00
Ceping Sun c1eb477e06 OvmfPkg/TdxDxe: Clear GPR Mask for RBX
Refer to intel-tdx-module-api spec section 5.5.21, GPR mask
(TDVMCALL_EXPOSE_REGS_MASK) is a bitmap that controls which
part of the guest TD GPR and XMM state is passed as-is to
the VMM and back.
- A bit value of 0 indicates that the corresponding register
   is saved by the Intel TDX module and not passed as-is to
   Host VMM.
- A bit value of 1 indicates that the corresponding register
   is passed as-is to the host VMM.

Currently, RBX is used as the mailbox address in ApRunLoop.nasm,
the corresponding bit value of RBX in MASK(Bit 3) is set as 1 which
means the value is passed to Host VMM as-is and it can be changed by
Host VMM.

So the bitmask shall be set as 0 to avoid this situation.

Reference:
[TDX-API]: intel-tdx-module-abi-spec
https://cdrdv2.intel.com/v1/dl/getContent/733579

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Hunter Adrian <adrian.hunter@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-13 13:29:27 +00:00
Chao Li 3022bab164 OvmfPkg: Remove macro MAX_LOONGARCH_EXCEPTION
Since the UEFI 2.11 has been released, the macro
MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in
LoongArchVirt/Sec/LoongArch64/Start.S

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 9537f8ce67 UefiCpuPkg: Remove macro MAX_LOONGARCH_EXCEPTION
Since the UEFI 2.11 has been released, the macro
MAX_LOONGARCH_EXCEPTION has been added in MdePkg, so it is deleted in
LoongArch folder header file.

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: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 3c8e10c8b3 MdePkg: Synchronize UEFI2.11 LoongArch64 DebugSupportLib definition
Synchronize the changes about LoongArch64 in section 18.2.5 of UEFI2.11.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
2024-12-12 04:57:03 +00:00
Chao Li 03783393e1 MdePkg: Allows loading X64 and ARM64 OPROM images on LoongArch64
Enable foreign images loading on LoongArch64 if the
EDKII_PECOFF_IMAGE_EMULATOR_PROTOCOL is present.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Signed-off-by: Chao Li <lichao@loongson.cn>
Co-Authored-by: Dongyan Qian <qiandongyan@loongson.cn>
2024-12-12 04:57:03 +00:00
Kun Qin 25ce25ecce ArmPkg: DefaultExceptionHandlerLib: Update function input bitwidth
The current DescribeExceptionSyndrome is taking ESR as 32bit value.
However, ESR should be a 64 bit value. This change updates the function
to intake a 64bit value.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin e8b7d7a238 ArmPkg: ArmExceptionLib: Fixing exception vector and type casting
The current VectorBase is taking value from a 64bit PCD into a UINTN
value, which could have truncated value for 32bit system.

In addition, the comparison between UINTN and INTN could lead to
undesired comparison outcome or compiler complaints.

This change updates all of them to be UINT64 based operation.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin b689c387e2 ArmPkg: ArmLib: Update function to match header file
Update function implementation to match interface definition. The return
should be bound to 0xffff0000, which is guaranteed to be a UINT32.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 6539b693d1 MdePkg: ArmLib: Return UINT32 for ArmCacheWritebackGranule
ArmCacheWritebackGranule should not return value higher than MAX_UINT32.

This change will allow the usage without architecture depenedent return
size.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 9d0f3dd35d ArmPkg: ArmArchTimerLib: Update operations to be 64 bit wide
The existing operation in ArmArchTimerLib is operating on UINT32 or
UINT64 based on the target system. This casting game originates from the
fact that timer frequency is UINTN type.

This change will simply promote all operations to UINT64 based, which
will remove the casting and conditional #if in the code for better
portability and readability.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 77d32b1796 ArmPkg: TimerDxe: Use 64bit operation for timer ticks
The current implementation operates on 64bit value with implicit value
truncation.

This change updates the involved frequencies to use 64 bit based
operations.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Kun Qin 957fcbe7a3 ArmPkg: ArmGic: Cast CpuTarget to UINT32 for legacy GIC
The current code path supporting `PcdArmGicV3WithV2Legacy` will read 32
bit CPU target and try to program ARM_GIC_ICDIPTR. However, all these
operations are 32bit wide.

This change casts the CpuTarget variable to be UINT32 before calling
MMIO read.

Cc: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>

Signed-off-by: Kun Qin <kun.qin@microsoft.com>
2024-12-11 18:21:29 +00:00
Abdul Lateef Attar 95972f966e DynamicTablesPkg: Correct parser for X64 architecture objects
- Add array size to CmArchCommonSpmiInterfaceInfoParser
   to correctly parse the SPMI interface object.
- Use the size of enum values instead of fixed sizes.
- Apply #pragma pack to the X64 object structure
   to ensure the total size of the structure matches
   the parser's combined individual field sizes without padding.

Cc: Sami Mujawar <Sami.Mujawar@arm.com>
Cc: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Abdul Lateef Attar <AbdulLateef.Attar@amd.com>
2024-12-11 13:17:04 +00:00
TsunFeng cf8241facc MdePkg: Add Google Mock Library for SafeIntLib
Signed-off-by: TsunFeng <v-tshuang@microsoft.com>
2024-12-11 07:30:17 +00:00
Raymond Yang 232003ce5a MdePkg: Update StatusCodeDataTypeId.h
Refine comments for EFI_STATUS_CODE_SPECIFIC_DATA_GUID .
Add the structs defined in this file for EFI_STATUS_CODE_SPECIFIC_DATA_GUID to comment.

Signed-off-by: Raymond Yang <yangrongwei@hotmail.com>
2024-12-11 09:54:54 +08:00
Yang Gang e02c7848af MdeModulePkg SmbiosMeasurementDxe: Release TableAddress after use
Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:51:45 +08:00
Yang Gang 58c7517228 MdeModulePkg DriverHealthManagerDxe: Display HealthStatus as TextTwo
When PcdBrowserGrayOutTextStatement is TRUE, TextOpCode will be GrayOut.
HealthStatus cannot be displayed in help area, use TextTwo to display it.

Signed-off-by: Yang Gang <yanggang@byosoft.com.cn>
2024-12-11 09:02:08 +08:00
William Leara f8f29a4a6a BaseTools: fix spelling error
No functional change.

Signed-off-by: William Leara <william.leara@dell.com>
2024-12-11 09:01:03 +08:00
Dionna Glaze 74ac8cc0e8 BaseTools: Typo fixes
Some in error messages, some in local variable names.

Signed-off-by: Dionna Glaze <dionnaglaze@google.com>
2024-12-11 09:00:21 +08:00
Dhaval aca75d3c08 BaseTools: Update alignment for entry seg for Clang
It does 3 things:
1. Use separate linker file for clang vs GCC for RISCV64.
2. Use common page size instead of max page to ensure -z option align values are properly applied.
3. Enforce alignment for .entry segment as per -z option.

When we want to have -z option aligned images, clang while
alignes .text and .data segments correctly, .entry segment
is by default not aligned unless explicitly specified.
This patch makes it explicit to clang that entry seg
should also be aligned to requirements. Somehow GCC does not require such explicit
entry. Hence detachiong both ld files.

Signed-off-by: Dhaval Sharma <dhaval@rivosinc.com>
2024-12-11 08:43:53 +08:00
Phil Noh 1bb10a479f MdeModulePkg/BrotliCustomDecompressLib: Make the library buildable
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4877

Brotli decompression library is supported in EDK2 core. Currently it is
not buildable when linking it to DxeIpl driver. The result is also checked
on edk2 master branch. It could be related to updating Brotli submodule
(v1.0.9) on the previous commit (1193aa2). The update makes the library
buildable. It was verified for the functional status.

Signed-off-by: Phil Noh <Phil.Noh@amd.com>
2024-12-11 08:38:27 +08:00
Oliver Smith-Denny 1c5c951ec3 Update CI to VS2022
This PR updates the CI pipelines to use VS2022 instead of VS2019
as that is the latest supported VS toolchain on edk2.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-10 23:42:09 +00:00
Oliver Smith-Denny bcbb709959 BaseTools: Add VS2022 XIPFLAGS
BaseTools has a limitation that modules in FVs that are force rebased
must have the same file and section alignment. This is intended for
XIP modules.

VS2019 and previous VS toolchains did not set 4k section alignment,
but VS2022 does, in order for memory protections to be applied to
images. This causes issues when building SEC and PEI modules on
VS2022 as the file alignment is 0x20 but the section alignment
is 0x1000, so BaseTools will fail to generate the FV. One option
is to set the file alignment to 0x1000 for all of these files, but
that is a large waste of space and is not feasible on some platforms
that have limited flash space. The other option is to selectively
set 0x20 as the section alignment for SEC and PEI modules, which is
the approach GCC ARM/AARCH64 took.

This is only an issue for building 64-bit PEI on x86 currently, as
other architectures are not supported by VS2022 in edk2 yet. For IA32,
the section alignment is set to 0x20 and so it matches the file
alignment, however x64 PEI uses the X64 DLINK flags which have 0x1000
set. For other architectures that don't have the PEI/DXE architecture
split, this is also an issue.

This commit is required to use VS2022 as the default CI in edk2, as
OvmfPkgX64.dsc will fail to build. Any platform with 64-bit PEI also
requires this.

This commit also updates CryptoPkg.dsc and SecurityPkg.dsc as they
are setting custom section alignments.

Continuous-integration-options: PatchCheck.ignore-multi-package

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-10 23:42:09 +00:00
Oliver Smith-Denny f1e014a5ca BaseTools: Add /WHOLEARCHIVE for VS2022 Builds
VS2022's DLINK2_FLAGS (containing only /WHOLEARCHIVE) was commented
out during upstreaming, due to some downstream platform issues
when /WHOLEARCHIVE was set. This does not prove an issue for edk2
and is what is used for earlier versions of VS, so is added here
for VS2022.

If platforms see issues, bugs should be filed on edk2 (or fixed in
the platform if applicable).

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
2024-12-10 23:42:09 +00:00
Michael Kubacki 4c7c90254f Maintainers.txt: Add VS Code PR Dashboard maintainer
Adds Michael Kubacki as a maintainer of this newly added file.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-10 16:01:51 +00:00
Michael Kubacki 2941f4b57f PullRequests.github-issues: Add PR notebook
Adds a VS Code GitHub issue notebook that can be used with the VS
Code GitHub Issue Notebook Extension to view PR queries on
Tianocore repositories.

VS Code extension:
https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-github-issue-notebooks

This is intended to provide a single real-time dashboard that
reflects PR status from all Tianocore repositories so users can
track their PRs and quickly find PRs that need their attention.

To use this, install the VS Code extension and open the file.
This can be done in a Web browser at vscode.dev or locally in
VS Code.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
2024-12-10 16:01:51 +00:00
Ceping Sun d55d4e22f4 OvmfPkg: Update PlatformPei.inf with TdxHelperLib
Since TdxHelperLib was defined in LibraryClasses for OvmfPkgX64.dsc,
the extra definitions is removed.

And for other dsc, add the Null-TdxHelperLib to remove the extra
definitions.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 1f55e175f4 OvmfPkg: Update OvmfPkgX64.dsc to support TdTcg2Pei
Add TdTcg2Pei in OvmfPkgX64.dsc in early PEI phase to
support CC measurement.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 9f9657e7da OvmfPkg: Update OvmfTpmLibs.dsc.inc to add PeiTpmMeasurementLib.inf
Because PeiTpmMeasurementLib supports both TCG measurement and CC
measurement, it shall be controled by TPM2_ENABLE and
CC_MEASUREMENT_EANBLE.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 7689c0d9fa OvmfPkg/TdTcg2Pei: Add TdTcg2Pei to install gEdkiiCcPpi
TdTcg2Pei is added to install the gEdkiiCcPpi for a TD-Guest.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun bdf3c917e3 OvmfPkg/TdTcg2Dxe: Update with TdxHelperLib
Since TdxHelperLib has the API(TdxHelperMapPcrToMrIndex)
to map PCR to MR index, the duplicate codes are removed.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun b6b1fdb073 OvmfPkg/TdxHelperLib: Refactor for new APIs
Add below APIs to support the implementation for CC measurement.
- TdxHelperMapPcrToMrIndex
- TdxHelperHashAndExtendToRtmr
- TdxHelperBuildTdxMeasurementGuidHob

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun cc0ec8ebae OvmfPkgX64: Add BaseCryptLib definition in PEIM
Since the TdxHelperLib is used for measurement
in PEI phase, it required TDVF to add the library.

Cc: Erdem Aktas <erdemaktas@google.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun b2df9a89ba SecurityPkg/PeiTpmMeasurementLib: Support CC Measurement
PeiTpmMeasurementLib is updated to support both TCG measurement and
CC Measurement. gEfiPeiMasterBootModePpiGuid is removed from [Depex]
because it is not needed for the library.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
Ceping Sun 3b07a2fb52 SecurityPkg/Ppi: Add gEdkiiCcPpi for CC Measurement in PEI phase
gEdkiiCcPpi is designed to support CC measurement in PEI phase.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Signed-off-by: Min Xu <min.m.xu@intel.com>
Signed-off-by: Ceping Sun <cepingx.sun@intel.com>
2024-12-10 02:09:29 +00:00
John Chung 481c43308b MdePkg: Add new PCDs for IPMI Serial
This change adds new PCDs for IPMI Serial.

Specification reference:
https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html

Signed-off-by: John Chung <john.chung@arm.com>
2024-12-09 19:57:53 +00:00
John Chung 5b760ca087 MdePkg/IndustryStandard: Add definitions for IPMI Serial
Add IPMI Serial definitions

Specification reference:
https://www.intel.com/content/www/us/en/products/docs/servers/ipmi/ipmi-second-gen-interface-spec-v2-rev1-1.html

Signed-off-by: John Chung <john.chung@arm.com>
2024-12-09 19:57:53 +00:00
Pierre Gondois e53cf2412a ShellPkg/UefiShellLevel2CommandsLib: Add helper for reset -fwui option
Following the UEFI Shell Specification revision 2.2,
add helper for the '-fwui' option of the reset command.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2024-12-09 17:16:58 +00:00
Ajan Zhong 694cc9f100 UefiPayloadPkg: Update ReadUnaligned64 in ACPI parsing
According to ACPI Specification, 64 bit physical address of the XSDT
provides indentical functionality to the RSDT but accommodates physical
address of description headers that are larger than 32 bits.

In this case physical address of XSDT table is 64 bit aligned, however
size of ACPI description tabled header is not 64 bit aligned. It leads
to the entry of other description headers are not 64 bit aligned. In
AARCH64 architecture, deference non-aligned 64 bit address to fetch
64-bit data will trigger Alignment fault. Use ReadUnaligned64 method
to fix this unaligned data access issue.

Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2024-12-09 02:23:28 +00:00
Ajan Zhong ddb4ea681b UefiPayloadPkg: Update FDT parser logic for unaligned data access
If alignment check is enabled in AARCH64 platform, FDT parser might
dereference non-aligned 64-bit address to fetch 64-bit data.
Use unaligned data read to avoid triggering unaligned data access.

Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2024-12-09 02:23:28 +00:00
Ajan Zhong 2d6d03056a UefiPayloadPkg: Add AARCH64 support on FdtParserLib
Add AARCH64 support on FdtParserLib.

Signed-off-by: Ajan Zhong <ajan.zhong@newfw.com>
2024-12-09 02:23:28 +00:00
Gerd Hoffmann f0424ec80e OvmfPkg: disable iscsi by default
While IScsiDxe certainly is a useful feature it is rarely used, and it
slows down firmware boot quite a bit.  So disable it by default and only
load it in case this is explicitly requested via fw_cfg.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Gerd Hoffmann 645988d9b3 OvmfPkg: add PcdEntryPointOverrideDefaultValue
UefiDriverEntryPointFwCfgOverrideLib will use
PcdEntryPointOverrideDefaultValue to decide what to do in case the
fw_cfg file specified via PcdEntryPointOverrideFwCfgVarName is not
present.  Default is "yes".

This allows to disable drivers by default and only enable them when
requested via fw_cfg.

Also log a message with the config option applied and whenever the
default value or a fw_cfg option was used.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Gerd Hoffmann 9ca29831f6 OvmfPkg: add fw_cfg option for usb storage
Use UefiDriverEntryPointFwCfgOverrideLib for UsbMassStorageDxe so
the driver can be enabled/disabled via fw_cfg option.

usage: qemu -fw_cfg name=opt/org.tianocore/UsbStorageSupport,string={yes,no}

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Gerd Hoffmann f9335bcb7c OvmfPkg: add fw_cfg option for iscsi support
Use UefiDriverEntryPointFwCfgOverrideLib for IScsiDxe so the driver
can be enabled/disabled via fw_cfg option.

usage: qemu -fw_cfg name=opt/org.tianocore/ISCSISupport,string={yes,no}

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Gerd Hoffmann b9cb18206a OvmfPkg: add fw_cfg option for virtio-net support
Use UefiDriverEntryPointFwCfgOverrideLib for VirtioNetDxe so the driver
can be enabled/disabled via fw_cfg option.

usage: qemu -fw_cfg name=opt/org.tianocore/VirtioNetSupport,string={yes,no}

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Gerd Hoffmann 5be587067a OvmfPkg: move USB drivers to new UsbComponents.dsc.inc
Allows to update USB driver configuration without
touching all *.dsc files.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Gerd Hoffmann b3b3cfab7e OvmfPkg: move VirtioNet to NetworkComponents.dsc.inc
Allows to update VirtioNet driver configuration without
touching all *.dsc files.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2024-12-06 20:45:29 +00:00
Alexander Gryanko 35706d43c5 NetworkPkg: PXE boot option build flag
Currently, the only way to disable PXE boot options is to change the PCD
variables PcdIPv4PXESupport and PcdIPv6PXESupport in the source code or
use the "--pcd" option in the build script. Other boot options such
as HTTP or iSCSI can be disabled using the -D<option> flag.
NETWORK_PXE_BOOT_ENABLE will add a consistent way to disable PXE booting.
This is the third and final part of a series of patches to enable the
NETWORK_PXE_BOOT_ENABLE build flag. At this point, the flag will be able
to disable PXE functionality.

Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
2024-12-06 18:26:01 +00:00