Virtio mouse devices report relative movements (EV_REL) and button
inputs. Add VirtioMouse.c implementing mouse capability probing,
EFI_SIMPLE_POINTER_PROTOCOL implementation and event handler that
converts VIRTIO_INPUT_EVENT into EFI_SIMPLE_POINTER_STATE.
The shared event dispatcher in VirtioInput.c now routes EV_REL events
and EV_KEY codes above MAX_KEYBOARD_CODE to the mouse handler, while
keycodes in [0, MAX_KEYBOARD_CODE] still go to the keyboard. A device
is now accepted when it provides a keyboard or a mouse, and the
EFI_SIMPLE_POINTER_PROTOCOL is installed on mouse-capable devices.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
Move all keyboard-specific code including probing, initialization,
keycode translation and Simple Text Input (Ex) protocol implementation
into new VirtioKeyboard.c. VirtioInput.c retains only the shared virtio
transport, the input poll timer and the event dispatcher.
This is also the groundwork for the mouse and tablet support added in
later commits.
No functional change.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
Current driver produces the EFI_SIMPLE_TEXT_INPUT[_EX]_PROTOCOL
interfaces on every virtio-input device it binds. A virtio-input
device may however be a pointer device (mouse or tablet) that reports
no keyboard keys, in which case the keyboard protocols should not be
installed.
Add VirtioInputHasKeyboard() to check whether the virtio-input device
implements a keyboard by scanning the EV_KEY capability bitmap to see
if any keycodes between [0, MAX_KEYBOARD_CODE] is supported. A helper
function VirtioInputConfigQuerySize() is also added for fetching the
size of a virtio-input configuration sub-selection.
VirtioInputInit() now stores the result in Dev->HasKeyboard and fails
with EFI_UNSUPPORTED when no keyboard is present.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
According to UEFI specification, "the implementation of Reset is
required to clear the contents of any input queues resident in memory
used for buffering keystroke data and put the input stream in a known
empty state". So it should only reset the internal status of keyboard
driver, not the driver itself.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
The virtio input device can be used to create virtual human interface
devices such as mice and tablets, not just keyboards. Rename
VirtioKeyboardDxe to VirtioInputDxe for adding virtio-mouse and
virtio-tablet support in following commits.
No functional change.
Continuous-integration-options: PatchCheck.ignore-multi-package
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
The SimpleTextIn(Ex) protocol callbacks and IsKeyRegistered() are only
used within VirtioKeyboard.c. Declare them STATIC and remove the
declarations in VirtioKeyboard.h.
No functional change.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
Both WaitForKey and WaitForKeyEx event handler runs the same logic in
VirtioKeyboardWaitForKey(). Pass the VIRTIO_KBD_DEV pointer directly
as the event notify context so one function serves both events.
Also drop the erroneous assignment of VirtioKeyboardWaitForKey() to
Dev->Txt.WaitForKey, which stored a function pointer into the event
handle field and was immediately overwritten by CreateEvent().
No functional change.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
VirtioKeyboardRingHasBuffer() and VIRTIO_KBD_DEV.KeyNotifyTimer are
defined but never called, drop them.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
VirtioKeyboardInit() creates Txt.WaitForKey, TxtEx.WaitForKeyEx and
KeyReadTimer events, but VirtioKeyboardUninit() currently only closes
KeyReadTimer. Close the other two events to fix the leak.
Signed-off-by: Jiaqing Zhao <Zhao.Jiaqing@amd.com>
The BaseAcpiTimerLib instance contains a static global variable,
'mAcpiTimerIoAddr', that caches the ACPI timer IO base address. As this
library executes during PEI phase prior to the PEIFV measurement into
PCR0, the value of the variable is included into the measurement. This
causes the PEIFV binary footprint to change, preventing a precomputation
of the expected value needed for remote attestation.
Fix this by using the BaseRomAcpiTimerLib in the PEI phase instead of
the BaseAcpiTimerLib. This library dynamically computes the required
address and does not introduce global variables, keeping the PEIFV
binary unchanged.
Co-authored-by: Simon Ott <simon.ott@aisec.fraunhofer.de>
Signed-off-by: Jakov Zauzolkov <jakov.zauzolkov@aisec.fraunhofer.de>
VirtMmCommunication2Communicate() dereferences *CommSize in a DEBUG
statement before checking whether CommSize is NULL. CommSize is an
optional parameter, so callers may legitimately pass NULL, causing a
NULL pointer dereference in debug builds.
Guard the dereference with a ternary so the DEBUG prints 0 when
CommSize is NULL.
Fixes: 9dd47eeea1 ("OvmfPkg: add new VirtMmCommunicationDxe driver")
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
VirtMmHwFind() calls VirtMmGetProp() twice but does not assign the
return value to Status. The subsequent EFI_ERROR(Status) checks test
the stale Status from LocateProtocol(), which always succeeds at that
point, so FDT lookup failures are silently ignored and the function
proceeds with uninitialised Ranges/Reg pointers.
Assign both VirtMmGetProp() return values to Status so the error
checks work as intended.
Fixes: 9dd47eeea1 ("OvmfPkg: add new VirtMmCommunicationDxe driver")
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
QemuX64.c implemented PIO-based MM communication for the uefi-vars-isa
device. It was already commented out in VirtMmCommunication.inf and is
not referenced by any build file. Remove the dead code.
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Include validation check for Context and ContextSize in signature
function.
Updated ReadMe to show ML-DSA support
Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
In PopulateDescriptor(), each FMP device previously called
GetFmpControllerState() multiple times through individual getter
functions (GetVersionFromVariable, GetLowestSupportedVersionFromVariable,
etc.), each performing a separate GetVariable() call to read the same
FmpControllerState NV variable.
Rename the getter functions to *FromFmpControllerState and simplify
them to pure field extractors that take a required FMP_CONTROLLER_STATE
pointer. Each getter extracts the field value if the state is non-NULL
and the field is valid, returning a default otherwise. No getter calls
GetFmpControllerState() internally.
PopulateDescriptor() now calls GetFmpControllerState() once and passes
the result to all getters, then frees it after the last use. This
eliminates redundant NV reads when the variable exists and avoids
repeated failed reads and error messages when the variable does not
exist.
Signed-off-by: Shubham Kumar <kumarshubha@microsoft.com>
Include validation checks for Context and ContextSize in
sign and verify functions.
Returned FALSE for EdDsaGeneratePubKey.
Updated ReadMe to show EdDsa support
Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
The implementation adds a toolchain-specific compiler barriers to
discourage reordering under aggressive optimization around memory
setting operations.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
When Trim processes an ASL file (`--asl-file`), it textually inlines
the body of every `Include()`'d file directly into the constructed
preprocessor input, once per include site.
Its has duplicate protection in the form of a circular-include stack
(`gIncludedAslFile`), that prevents A->B->A cycles. But, as far as
the script is concerned, each `Include()` is a unique include site.
Various combinations of includes and file types are possible and
handled slightly differently.
Starting with file types as defined in
BaseTools\Conf\build_rule.template:
- `.aslc`, `.act` files fall under `Acpi-Table-Code-File` and are
compiled, linked, and processed by genfw.
- `.asl`, `.Asl`, and `.ASL` files fall in `Acpi-Source-Language-File`
and are processed by Trim:
1. `Trim --asl-file` to produce a single combined .i file with
includes inlined.
2. `ASLPP` (ASL preprocessor, a C preprocessor) on the output of
Trim to produce a .iii file with all macros expanded and
conditional branches resolved. AutoGen.h is also included and
processed here to resolve fixed PCD values if needed.
3. `Trim --source-code` which takes the pre-processed .iii file and
produces a .iiii file with content like linemarkers cleaned up.
4. The ACPI compiler compiles the .iiii file to produce AML bytecode
in a .aml file.
Because the `.aslc`/`.act` files are directly passed to normal C
processing tools, they are not part of the Trim change made in this
commit and the remainder of this message focuses on the ACPI Source
Language File case.
ASL files can use either an ASL `Include()` directive or a C-style
`#include` directive. In addition, different file types may be
included such as a `.asl` file or a `.h` file.
`Trim` handles these cases differently:
- For ASL `Include()` directives, `Trim` inlines the content of the
included file directly into the output at the include site. This is
done for all included ASL files regardless of their extension. The
inlining is purely textual and does not attempt to resolve or
preserve any preprocessor directives such as `#pragma once` or
include guards.
- For C-style `#include` directives, `Trim` checks the file extension
of the included file. If the file is an ASL file (`.asl` or `.asi`),
`Trim` treats the file the same as the `Include()` case. Otherwise,
`Trim` passes the directive through verbatim to the output, allowing
the downstream C preprocessor (`ASLPP`) to handle it according to
normal C preprocessor rules.
This creates a situtation in which the resulting `.i` might include:
- Inlined file content (from a `.asl` or `.h` file) depending on the
include type and file extension.
- Verbatim `#include` directives for non-ASL files which will be
processed by the C preprocessor.
Focusing on the "inlined" case, historically `.h` files would have
traditional C include guards (`#ifndef`/`#define`, `#endif`). However,
files might also include `#pragma once` as a guard.
In that case, the inlined content of the `.i` file could contain
multiple `#pragma once` directives, one per include site. When the
C preprocessor (`ASLPP`) processes the `.i` file, it sees multiple
`#pragma once` directives in what it considers the main file, and
could emit a warning like the following from gcc:
warning: '#pragma once' in main file [-Wpragma-once-outside-header]
The remainder of this commit message describes the change made to
address this warning.
This change strips "#pragma once" lines on the ASL content path in
`DoInclude()` in `Trim.py` so the directive is removed before it
reaches the C preprocessor.
- "#include" directives for non-ASL files are still passed through
verbatim for the C preprocessor to resolve where the contents of
those .h files might contain "#pragma once" or traditional guards.
- Traditional include guards are untouched and continue to behave as
before where multiple include sites might inline the same content
in the .i file before reaching the C preprocessor.
The change:
In the case that a file is inlined with a `#pragma once` directive,
the directive is stripped from the inlined content which prevents the
warning.
This is considered acceptable because it only removes the
`#pragma once` directive from the inlined content for these specific
cases. So, the `.i` file might contain multiple inlined copies of the
same header content (like always in this inline case) but without the
`#pragma once` directives. Because actual C content was already not
processed or trimmed out (e.g. `typedef struct`) duplicate content is
not considered to be a problem (`#define` multiple times is not a
problem for the C preprocessor).
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Generator for Smbios System Information table (Type 1).
Co-authored-by: Dat Mach <dmach@nvidia.com>
Signed-off-by: Girish Mahadevan <gmahadevan@nvidia.com>
Add EArchCommonObjSystemInfo to ArchCommonNameSpaceObjects.h and a
corresponding parser entry in ConfigurationManagerObjectParser.c.
Signed-off-by: Girish Mahadevan <gmahadevan@nvidia.com>
During Silent build,NMAKE suppresses the command echo entirely.
As a result, the only output in ProcOut is the
MSVC compiler’s output lines.
Without the command echo, there is no full path in the output to
identify which source file is currently being compiled.
For unique basenames this is not an issue, but for namesake files
(for example, AmdSev.c located in different directories),
it is impossible to determine which file’s includes are being listed.
This change improves dependency generation for MSVC builds by introducing
explicit handling for source files with duplicate basenames
(namesake sources). A new variable current_source_abs is added to
consistently track the resolved absolute path of the active source file
instead of repeatedly recomputing it from SourceFileAbsPathMap.
To correctly resolve namesake files in silent builds
(where compiler commands are not echoed), a namesake_queue is introduced,
which preserves source ordering and sequentially maps basename occurrences
to their corresponding full paths.
Additionally, a cc_cmd_in_output flag is implemented to detect the presence
of compiler command lines in the output stream; when present,
source paths are derived directly from command-line arguments, otherwise
the queue-based resolution is used. This ensures correct mapping of
basenames to absolute paths across the silent builds, fixing incorrect
dependency generation when multiple source files share the same name.
Signed-off-by: Kowsik S <kowsiks@ami.com>
The function DevPathToTextUsbWWID() allocates NewStr when the input
SerialNumber lacks a null terminator. However, this allocated memory
is never freed after use, resulting in a memory leak.
This patch adds the missing FreePool() for NewStr before the function
returns, ensuring that the allocated buffer is properly freed and
eliminating the potential leak.
Signed-off-by: Qihang Gao <gaoqihang@loongson.cn>
When UpdatePciInfo() downgrades a PciBarTypePMem64 BAR to a 32-bit type
via EFI_INCOMPATIBLE_PCI_DEVICE_SUPPORT_PROTOCOL, it unconditionally
assigns PciBarTypePMem32 regardless of SpecificFlag, placing the BAR in
the prefetchable bridge window even when the platform intended the
non-prefetchable window.
The ACPI resource descriptor's SpecificFlag field encodes the intended
prefetchability of the constrained resource, using the bit:
EFI_ACPI_MEMORY_RESOURCE_SPECIFIC_FLAG_CACHEABLE_PREFETCHABLE.
Fix this by checking the bit in SpecificFlag to select PciBarTypePMem32 or
PciBarTypeMem32, consistent with DumpPpbPaddingResource() in
PciEnumeratorSupport.c that uses the bit as the sole discriminator
between the two 32-bit BAR types.
Signed-off-by: Phil Noh <Phil.Noh@amd.com>
The RngDxe driver and its non-AArch64 support files still contained
comments and descriptions referring to Intel Secure Key technology,
RDRAND/RDSEED instructions, and the Intel DRNG implementation guide.
These references are no longer accurate because the driver obtains
random data through the platform-provided RngLib abstraction rather
than relying on Intel-specific CPU features. Update the comments and
descriptions to use architecture-neutral language that better reflects
the current implementation.
Signed-off-by: Tuan Phan <tuan.phan@oss.qualcomm.com>
Add Google Test Mock library header and implementation for
SecureBootVariableLib to allow simple mocking for host based unit tests
that utilize the Google Test framework.
Signed-off-by: Joey Vagedes <joey.vagedes@gmail.com>
Add LOONGARCH64 support to DynamicTablesPkg by adding it to the existing
common component build list, adding the LoongArch64 DynamicTableManagerDxe
source, and enabling the SMBIOS generators used by current LoongArch
platforms.
Keep DynamicTableFactoryDxe generator registration architecture-specific.
The LoongArch64 factory instance links selected NULL generator libraries so
their constructors register the generators at runtime.
LoongArch64-specific tables can use AcpiRawLib initially and move to
dedicated LoongArch64 generators in follow-up patches.
Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
The SMBIOS generators are architecture-neutral standalone components. They
are currently listed only for AARCH64. Move them to the existing common
component section so every supported architecture receives the same package
build coverage.
Keep the DynamicTableFactoryDxe registration architecture-specific.
Its NULL library list determines the generators registered at runtime.
Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
Moving the standalone SMBIOS generators to the common component section
adds them to the X64 build. VS2022 reports narrowing warnings for native-
width, wide, or enum values converted to fixed-width SMBIOS fields. These
warnings are treated as errors under /WX.
Use UINTN for the Type 7 table-list count and index. Add bounds checks for
the Type 4 processor counts and Type 7 cache level where CM-derived values
could exceed the corresponding SMBIOS fields, and make the remaining
intended conversions explicit in the Type 4, Type 7, Type 16, Type 17,
Type 19, and Type 44 generators.
This rejects out-of-range processor counts and cache levels instead of
silently truncating them, while preserving the existing behavior for valid
configuration data.
Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
The SMBIOS_TABLE_GENERATOR_BUILD_TABLEEX and
SMBIOS_TABLE_GENERATOR_FREE_TABLEEX callback types do not specify EFIAPI.
The Type 37 implementations specify it, while the other extended callback
implementations follow the omission in the shared types.
For X64 GCC builds, BaseTools/Conf/tools_def.template adds
-DEFIAPI=__attribute__((ms_abi)). Therefore, callbacks marked with EFIAPI
use the Microsoft x64 ABI, while unannotated callback types use the
compiler default ABI. If the two sides differ, the caller and callee use
different argument registers, and GCC rejects the function pointer
assignment.
This mismatch remained hidden while the standalone Type 37 generator was
built only for AARCH64. Moving the SMBIOS generators to the common
component section adds X64 build coverage and exposes it.
Add EFIAPI to the extended callback types and all matching implementations.
This follows the ACPI generator callback convention and provides the ABI
prerequisite for expanding the SMBIOS standalone build coverage.
Signed-off-by: Dongyan Qian <qiandongyan@loongson.cn>
Previous changes introduced tests for unsigned
images verified by hash entries in DB/DBX. This commit adds
tests covering verification of signed images, including
certificate chain validation as well as cases where image
hashes are checked against entries in DB/DBX.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
The part of DxeImageVerificationHandler responsible for
verifying the image location source has already been
implemented. This commit implements tests for verifying
images in cases where the image has no signature, but
there is a hash record for this file in DB/DBX.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
InstallConfigurationTable is used in the AddImageExeInfo
call and is necessary for outputting information about
the binary file in case of an error. Mock has been added
for the DxeImageVerificationHandler subroutine.
Signed-off-by: Alexander Gryanko <xpahos@gmail.com>
Update the test decision matrix and TC6 expected result to reflect
the backward-compatible ForceRebase logic: when ForceRebase=TRUE and
no files have the ,XIP suffix (XipFileCount==0), all files are
rebased using the legacy behavior rather than skipping all files.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Add XipFileCount to FV_INFO to track how many files have the ,XIP
suffix. Update FfsRebase() to only apply selective XIP rebase when
XipFileCount > 0. When no files have the ,XIP suffix (XipFileCount
== 0), preserve the legacy ForceRebase=TRUE behavior of rebasing all
files. This maintains backward compatibility for existing platforms
that use FvForceRebase=TRUE without any Xip rules.
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Because there was no negotiation, the SMM controller from QEMU will not
broadcast the SMI to all cores, causing only the BSP getting interrupted
into MMI.
This change fixed the issue by invoking the negotiation routine and
program the register to enable broadcasting.
Signed-off-by: Kun Qin <kun.qin@microsoft.com>
When caching the DHCPv6 discover packet to Mode->DhcpDiscover in
PxeBcDhcp6CallBack, the destination was incorrectly specified as
Mode->DhcpDiscover.Dhcpv4 (the DHCPv4 union member). Change it to
Mode->DhcpDiscover to correctly reference the union and avoid
type confusion when copying a DHCPv6 packet.
Signed-off-by: Abuthahir M <abuthahirm@ami.com>
In Ip6ProcessRouterAdvertise, IpSb->InterfaceId is dereferenced in
CopyMem to form a stateless address. Add a guard to ensure
IpSb->InterfaceId is not NULL before entering the block, preventing
a potential NULL pointer dereference.
Signed-off-by: Abuthahir M <abuthahirm@ami.com>
In Ip6CleanService, Ip6FreeNeighborEntry may attempt to send packets via
MNP. Defensively move the neighbor table cleanup to occur before MNP
teardown so that the MNP child handle and its resources remain valid
during neighbor entry cleanup.
Signed-off-by: Abuthahir M <abuthahirm@ami.com>
Replace the ASSERT (Instance->Config != NULL) in Dhcp6UpdateIaInfo with
an explicit NULL check that returns EFI_DEVICE_ERROR. Also add a
complementary guard in Dhcp6GenerateIaCb alongside the existing check
for Instance->IaCb.Ia. These are defensive changes to prevent potential
NULL pointer dereferences.
Signed-off-by: Abuthahir M <abuthahirm@ami.com>
Created ML-DSA API functions to configure public and private keys for
ML-DSA algorithm. This will allow users to sign and verify with ML-DSA.
Unit tests were add to confirm operation of the API.
Signed-off-by: Michael G.A. Holland <michael.holland@intel.com>
In arguments of EFI_PCI_IO_PROTOCOL member functions, replace the
EfiPciWidth* enum literals from
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH with the matching
EfiPciIoWidth* values from EFI_PCI_IO_PROTOCOL_WIDTH.
This keeps the call sites aligned with the protocol they actually use.
The old values were copied from EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL code,
so they obscured the intent of the calls and relied on an explicit
cast.
This mimics commit 8ba64a9a94 ("UefiPayloadPkg: Fix build failure with
CLANGPDB").
Generated by coccinelle script.
``` smpl
@initialize:python@
@@
def to_pci_io_width(name):
return name.replace("EfiPciWidth", "EfiPciIoWidth", 1)
@normalize@
typedef EFI_PCI_IO_PROTOCOL;
typedef EDKII_PCI_DEVICE_PPI;
type T =~ "^EFI_PCI_IO_PROTOCOL_WIDTH$";
EFI_PCI_IO_PROTOCOL *x;
EDKII_PCI_DEVICE_PPI *y;
identifier bad =~ "EfiPciWidth(Uint|FifoUint|FillUint)(8|16|32|64)";
identifier top_op =~ "^(PollMem|PollIo|CopyMem)$";
identifier space =~ "^(Mem|Io|Pci)$";
identifier rw =~ "^(Read|Write)$";
fresh identifier good = script:python(bad) { to_pci_io_width(bad) };
expression first;
expression list rest;
@@
(
x->top_op
|
y->PciIo.top_op
|
x->space.rw
|
y->PciIo.space.rw
) (
first,
- (T)bad
+ good
,
rest
)
```
Verified with:
- `build -p UefiPayloadPkg/UefiPayloadPkg.dsc -a IA32 -a X64 -b DEBUG -t GCC -D BOOTLOADER=SBL`
- temporary IA32 PEIM harness that compiled X86_BuildFdtLib.c
Signed-off-by: Mingjie Shen <shen497@purdue.edu>
In arguments of EFI_PCI_IO_PROTOCOL member functions, replace the
EfiPciWidth* enum literals from
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH with the matching
EfiPciIoWidth* values from EFI_PCI_IO_PROTOCOL_WIDTH.
This keeps the call sites aligned with the protocol they actually use.
The old values were copied from EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL code,
so they obscured the intent of the calls and relied on an explicit
cast.
This mimics commit 8ba64a9a94 ("UefiPayloadPkg: Fix build failure with
CLANGPDB").
Generated by coccinelle script.
``` smpl
@initialize:python@
@@
def to_pci_io_width(name):
return name.replace("EfiPciWidth", "EfiPciIoWidth", 1)
@normalize@
typedef EFI_PCI_IO_PROTOCOL;
typedef EDKII_PCI_DEVICE_PPI;
type T =~ "^EFI_PCI_IO_PROTOCOL_WIDTH$";
EFI_PCI_IO_PROTOCOL *x;
EDKII_PCI_DEVICE_PPI *y;
identifier bad =~ "EfiPciWidth(Uint|FifoUint|FillUint)(8|16|32|64)";
identifier top_op =~ "^(PollMem|PollIo|CopyMem)$";
identifier space =~ "^(Mem|Io|Pci)$";
identifier rw =~ "^(Read|Write)$";
fresh identifier good = script:python(bad) { to_pci_io_width(bad) };
expression first;
expression list rest;
@@
(
x->top_op
|
y->PciIo.top_op
|
x->space.rw
|
y->PciIo.space.rw
) (
first,
- (T)bad
+ good
,
rest
)
```
Verified with:
- `build -p MdeModulePkg/MdeModulePkg.dsc -m MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf -a IA32 -b DEBUG -t GCC`
- `build -p MdeModulePkg/MdeModulePkg.dsc -m MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf -a X64 -b DEBUG -t GCC`
Signed-off-by: Mingjie Shen <shen497@purdue.edu>