Skip to content

Commit

Permalink
OvmfPkg/PlatformInitLib: Disable PlatformReservationConflictCB in TDVF
Browse files Browse the repository at this point in the history
Currently, PlatformReservationConflictCB have comments
“This happens on (virtual) AMD machines with 1TB address space,
 because the AMD IOMMU uses an address window just below 1TB.”

Based on the comments, it should not be invoked in TDVF.

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>
  • Loading branch information
sunceping committed Aug 27, 2024
1 parent e10a746 commit 1a1f653
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion OvmfPkg/Library/PlatformInitLib/MemDetect.c
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,10 @@ PlatformDynamicMmioWindow (
DEBUG ((DEBUG_INFO, "%a: MMIO Space 0x%Lx (%Ld GB)\n", __func__, MmioSpace, RShiftU64 (MmioSpace, 30)));
PlatformInfoHob->PcdPciMmio64Size = MmioSpace;
PlatformInfoHob->PcdPciMmio64Base = AddrSpace - MmioSpace;
PlatformScanE820 (PlatformReservationConflictCB, PlatformInfoHob);

if (!TdIsEnabled ()) {
PlatformScanE820 (PlatformReservationConflictCB, PlatformInfoHob);
}
} else {
DEBUG ((DEBUG_INFO, "%a: using classic mmio window\n", __func__));
}
Expand Down

0 comments on commit 1a1f653

Please sign in to comment.