<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Bus/Pci, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-09-29T01:36:19+00:00</updated>
<entry>
<title>MdeModulePkg/SdMmcPciHcDxe: Use UINTN for ADMA descriptor table indexing</title>
<updated>2026-09-29T01:36:19+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-09-13T02:39:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d9934e9178e71779e27c2e62e1c63dc3747ca8c9'/>
<id>urn:sha1:d9934e9178e71779e27c2e62e1c63dc3747ca8c9</id>
<content type='text'>
In BuildAdmaDescTable(), Index and Entries were UINT64. Using a 64-bit
Index for array subscripting `Trb-&gt;Adma32Desc[Index]`,
`Trb-&gt;Adma64V3Desc[Index]`, and `Trb-&gt;Adma64V4Desc[Index]` generates
64-bit multiplication on 32-bit architectures (IA32).

Change Index and Entries to UINTN so array indexing and table size
calculations use native integer math.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix unchecked return status</title>
<updated>2026-08-05T02:13:24+00:00</updated>
<author>
<name>Aaron Pop</name>
<email>aaronpop@microsoft.com</email>
</author>
<published>2025-10-22T18:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0f0515f71ba3645823ae17638532099d1e5d5144'/>
<id>urn:sha1:0f0515f71ba3645823ae17638532099d1e5d5144</id>
<content type='text'>
https://github.com/github/codeql/blob/codeql-cli-2.7.3/csharp/ql/src/API%20Abuse/UncheckedReturnValue.qhelp

When a function has a return status, it should
be checked to verify the function completed successfully.

Failing to check the return status can result in null pointer
dereferences or use of uninitialized variables.

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix missing NULL tests</title>
<updated>2026-08-05T02:13:24+00:00</updated>
<author>
<name>Aaron Pop</name>
<email>aaronpop@microsoft.com</email>
</author>
<published>2025-10-22T18:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=0bc1db4adfbdf0160a9c60eec18a23f3e282f4ab'/>
<id>urn:sha1:0bc1db4adfbdf0160a9c60eec18a23f3e282f4ab</id>
<content type='text'>
https://github.com/github/codeql/blob/codeql-cli-2.7.3/cpp/ql/src/Critical/MissingNullTest.qhelp

For items which allocate memory, or get a pointer from another
structure, it is important to validate that the pointers
are not null before they are dereferenced.

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix comparison with wider widths</title>
<updated>2026-08-05T02:13:24+00:00</updated>
<author>
<name>Aaron Pop</name>
<email>aaronpop@microsoft.com</email>
</author>
<published>2025-10-22T18:33:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=bf0dc7d78701c93a2edeeadcb0daca58f4af91a6'/>
<id>urn:sha1:bf0dc7d78701c93a2edeeadcb0daca58f4af91a6</id>
<content type='text'>
https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type

If the narrow type (smaller range) is compared against a wide type
(larger range), the narrow value may overflow before reaching the wide
value. This can cause unexpected behavior, such as:

Infinite loops (loop condition never becomes false).
Incorrect logic (comparison results are misleading).

Signed-off-by: Aaron Pop &lt;aaronpop@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/NvmExpressHci.c: Save time when BIOS reset with NVMes</title>
<updated>2026-08-01T03:58:29+00:00</updated>
<author>
<name>Theo</name>
<email>theo.tao@foxmail.com</email>
</author>
<published>2026-01-08T12:26:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=bc71cc972d5ea3cb38d4c454a68b02138b23c774'/>
<id>urn:sha1:bc71cc972d5ea3cb38d4c454a68b02138b23c774</id>
<content type='text'>
Dispatch Shutdown Notification to every NVMe first, then polling
every NVMe t omaake sure all NVMe's shutdown processing is
completed.This will help to save a lot time when BIOS trigger
reset for Servers whose have many NVMes. Tested on a platform
with AMD EPYC cpu with 26 NVMes, this method reduce reset time
from 3 minutes to 10 seconds.

Signed-off-by: Theo &lt;theo.tao@foxmail.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/PciBusDxe: Honor SpecificFlag for PMem64 in UpdatePciInfo</title>
<updated>2026-07-17T09:03:00+00:00</updated>
<author>
<name>Phil Noh</name>
<email>Phil.Noh@amd.com</email>
</author>
<published>2026-06-25T20:41:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c70637de12e0d5cee78ebf5a0b5d09cdb1db53c9'/>
<id>urn:sha1:c70637de12e0d5cee78ebf5a0b5d09cdb1db53c9</id>
<content type='text'>
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 &lt;Phil.Noh@amd.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Fix incorrect EfiPciWidth* enum literals</title>
<updated>2026-07-14T00:06:22+00:00</updated>
<author>
<name>Mingjie Shen</name>
<email>shen497@purdue.edu</email>
</author>
<published>2026-07-08T01:01:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=049dc848c4b94b9eb003eb744ccfd519104bbefb'/>
<id>urn:sha1:049dc848c4b94b9eb003eb744ccfd519104bbefb</id>
<content type='text'>
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 8ba64a9a9417 ("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-&gt;top_op
|
  y-&gt;PciIo.top_op
|
  x-&gt;space.rw
|
  y-&gt;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 &lt;shen497@purdue.edu&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/PciBusDxe: Fix Mem64 BAR handling in IsPciDeviceRejected()</title>
<updated>2026-06-29T02:25:40+00:00</updated>
<author>
<name>Jiaqing Zhao</name>
<email>Zhao.Jiaqing@amd.com</email>
</author>
<published>2026-06-18T08:27:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e3e93cf092974c5a27ea7e2f63affc1b52db0106'/>
<id>urn:sha1:e3e93cf092974c5a27ea7e2f63affc1b52db0106</id>
<content type='text'>
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 &lt;Zhao.Jiaqing@amd.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Follow pragma once coding convention</title>
<updated>2026-06-25T19:40:31+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-06-18T15:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=16b41f7d023d4977b8ae828da814fe3d6a125200'/>
<id>urn:sha1:16b41f7d023d4977b8ae828da814fe3d6a125200</id>
<content type='text'>
Update recent changes in MdeModulePkg to follow the latest EDK II
C Coding Standards Specification (5.3) to use '#pragma once' instead
of traditional macro-based include guards in header files.

https://tianocore-docs.github.io/edk2-CCodingStandardsSpecification/draft/5_source_files/53_include_files.html#53-include-files

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: CxlDxe: Fix IA32 Build Break</title>
<updated>2026-06-25T15:15:38+00:00</updated>
<author>
<name>Oliver Smith-Denny</name>
<email>osde@microsoft.com</email>
</author>
<published>2026-06-18T17:46:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=a5fcc0a6ac0acd67c65a5fb2c3b91806251791a5'/>
<id>urn:sha1:a5fcc0a6ac0acd67c65a5fb2c3b91806251791a5</id>
<content type='text'>
CxlDxe is currently compiled as part of the MdeModulePkg
IA32 CI. When running CI with VS2022 version 14.44.35228.0,
the CI build fails with:

CxlDxe.lib(CxlDxe.obj) : unresolved external symbol __allmul
CxlDxe(CxlDxe.obj) : unresolved external symbol __allshl

CxlDxe is not intended to run on IA32 DXE systems, as such
systems are legacy, but until edk2 drops build support for
IA32 DXE (or at least CI for it), the build needs to work.

This fixes the 64 bit multiplication/shifting that occurs
in CxlDxe to use the BaseLib functions that avoid the
compiler intrinsics.

Signed-off-by: Oliver Smith-Denny &lt;osde@microsoft.com&gt;
</content>
</entry>
</feed>
