Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: e3e93cf092974c5a27ea7e2f63affc1b52db0106
https://github.com/tianocore/edk2/commit/e3e93cf092974c5a27ea7e2f63affc1b52db0106
Author: Jiaqing Zhao <[email protected]>
Date: 2026-06-29 (Mon, 29 Jun 2026)
Changed paths:
M MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c
Log Message:
-----------
MdeModulePkg/PciBusDxe: Fix Mem64 BAR handling in IsPciDeviceRejected()
IsPciDeviceRejected() masks BAR value with 0xFFFFFFF0 before testing
the type bits (2:1) that mark a 64-bit memory BAR, essentially clears
them, making the 64-bit BAR code path unreachable and treated as if
it were 32-bit.
The function rejects a device when BAR looks unprogrammed by comparing
if its size mask equals its value. When a 64-bit BAR is mistaken for a
32-bit one, only its lower part is compared, possibly leading a valid
BAR being falsely rejected. For example, a 2G BAR with size mask
0x80000000 at 0x180000000 matches and the device is dropped.
This code runs during light enumeration (PciEnumeratorLight), used when
PCI resources are already assigned by the platform (e.g. Xen HVM, where
hvmloader programs the BARs). The rejected device never receives a
PciIo handle, so no driver can bind to it. For example, a virtio-vga
with a 64-bit BAR vanishes under OVMF on Xen, leaving the guest with
no graphics output.
Fix by testing the type bits on the raw BAR value before masking.
Signed-off-by: Jiaqing Zhao <[email protected]>
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits