2023-03-16 07:11:21 +01:00
|
|
|
From 5b3a40038886774228826b42c9aa3c9645a799a9 Mon Sep 17 00:00:00 2001
|
2022-12-02 17:49:44 +01:00
|
|
|
From: "Lee, Chun-Yi" <jlee@suse.com>
|
2023-03-16 07:11:21 +01:00
|
|
|
Date: Wed, 15 Mar 2023 17:21:25 +0800
|
|
|
|
Subject: [PATCH 6/6] Revert "OvmfPkg/PlatformInitLib: dynamic mmio window
|
|
|
|
size"
|
2022-12-02 17:49:44 +01:00
|
|
|
|
|
|
|
This reverts commit ecb778d0ac62560aa172786ba19521f27bc3f650.
|
|
|
|
---
|
|
|
|
OvmfPkg/Library/PlatformInitLib/MemDetect.c | 28 ---------------------
|
|
|
|
1 file changed, 28 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/OvmfPkg/Library/PlatformInitLib/MemDetect.c b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
2023-03-16 07:11:21 +01:00
|
|
|
index 882805269b..0ac7d5b967 100644
|
2022-12-02 17:49:44 +01:00
|
|
|
--- a/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
|
|
|
+++ b/OvmfPkg/Library/PlatformInitLib/MemDetect.c
|
2023-03-16 07:11:21 +01:00
|
|
|
@@ -625,33 +625,6 @@ PlatformAddressWidthFromCpuid (
|
2022-12-02 17:49:44 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
-VOID
|
|
|
|
-EFIAPI
|
|
|
|
-PlatformDynamicMmioWindow (
|
|
|
|
- IN OUT EFI_HOB_PLATFORM_INFO *PlatformInfoHob
|
|
|
|
- )
|
|
|
|
-{
|
|
|
|
- UINT64 AddrSpace, MmioSpace;
|
|
|
|
-
|
|
|
|
- AddrSpace = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth);
|
|
|
|
- MmioSpace = LShiftU64 (1, PlatformInfoHob->PhysMemAddressWidth - 3);
|
|
|
|
-
|
|
|
|
- if ((PlatformInfoHob->PcdPciMmio64Size < MmioSpace) &&
|
|
|
|
- (PlatformInfoHob->PcdPciMmio64Base + MmioSpace < AddrSpace))
|
|
|
|
- {
|
|
|
|
- DEBUG ((DEBUG_INFO, "%a: using dynamic mmio window\n", __func__));
|
|
|
|
- DEBUG ((DEBUG_INFO, "%a: Addr Space 0x%Lx (%Ld GB)\n", __func__, AddrSpace, RShiftU64 (AddrSpace, 30)));
|
|
|
|
- DEBUG ((DEBUG_INFO, "%a: MMIO Space 0x%Lx (%Ld GB)\n", __func__, MmioSpace, RShiftU64 (MmioSpace, 30)));
|
|
|
|
- PlatformInfoHob->PcdPciMmio64Size = MmioSpace;
|
|
|
|
- PlatformInfoHob->PcdPciMmio64Base = AddrSpace - MmioSpace;
|
|
|
|
- } else {
|
|
|
|
- DEBUG ((DEBUG_INFO, "%a: using classic mmio window\n", __func__));
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- DEBUG ((DEBUG_INFO, "%a: Pci64 Base 0x%Lx\n", __func__, PlatformInfoHob->PcdPciMmio64Base));
|
|
|
|
- DEBUG ((DEBUG_INFO, "%a: Pci64 Size 0x%Lx\n", __func__, PlatformInfoHob->PcdPciMmio64Size));
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/**
|
|
|
|
Iterate over the PCI host bridges resources information optionally provided
|
|
|
|
in fw-cfg and find the highest address contained in the PCI MMIO windows. If
|
2023-03-16 07:11:21 +01:00
|
|
|
@@ -813,7 +786,6 @@ PlatformAddressWidthInitialization (
|
2022-12-02 17:49:44 +01:00
|
|
|
if (PlatformInfoHob->PhysMemAddressWidth != 0) {
|
|
|
|
// physical address width is known
|
|
|
|
PlatformInfoHob->FirstNonAddress = FirstNonAddress;
|
|
|
|
- PlatformDynamicMmioWindow (PlatformInfoHob);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
--
|
|
|
|
2.35.3
|
|
|
|
|