diff options
Diffstat (limited to 'OvmfPkg/PlatformPei')
-rw-r--r-- | OvmfPkg/PlatformPei/Platform.c | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c index 86084e466a..d35a1fbb5c 100644 --- a/OvmfPkg/PlatformPei/Platform.c +++ b/OvmfPkg/PlatformPei/Platform.c @@ -34,11 +34,12 @@ EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
{ EfiACPIMemoryNVS, 0x004 },
- { EfiACPIReclaimMemory, 0x01C },
- { EfiRuntimeServicesData, 0x050 },
- { EfiRuntimeServicesCode, 0x020 },
- { EfiBootServicesCode, 0x0F0 },
- { EfiBootServicesData, 0xA00 },
+ { EfiACPIReclaimMemory, 0x008 },
+ { EfiReservedMemoryType, 0x004 },
+ { EfiRuntimeServicesData, 0x024 },
+ { EfiRuntimeServicesCode, 0x030 },
+ { EfiBootServicesCode, 0x180 },
+ { EfiBootServicesData, 0xF00 },
{ EfiMaxMemoryType, 0x000 }
};
@@ -49,17 +50,12 @@ AddIoMemoryBaseSizeHob ( UINT64 MemorySize
)
{
- STATIC EFI_RESOURCE_ATTRIBUTE_TYPE Attributes =
- (
+ BuildResourceDescriptorHob (
+ EFI_RESOURCE_MEMORY_MAPPED_IO,
EFI_RESOURCE_ATTRIBUTE_PRESENT |
EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_TESTED
- );
-
- BuildResourceDescriptorHob (
- EFI_RESOURCE_MEMORY_MAPPED_IO,
- Attributes,
+ EFI_RESOURCE_ATTRIBUTE_TESTED,
MemoryBase,
MemorySize
);
@@ -82,20 +78,15 @@ AddMemoryBaseSizeHob ( UINT64 MemorySize
)
{
- STATIC EFI_RESOURCE_ATTRIBUTE_TYPE Attributes =
- (
+ BuildResourceDescriptorHob (
+ EFI_RESOURCE_SYSTEM_MEMORY,
EFI_RESOURCE_ATTRIBUTE_PRESENT |
EFI_RESOURCE_ATTRIBUTE_INITIALIZED |
EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |
EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |
EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |
EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE |
- EFI_RESOURCE_ATTRIBUTE_TESTED
- );
-
- BuildResourceDescriptorHob (
- EFI_RESOURCE_SYSTEM_MEMORY,
- Attributes,
+ EFI_RESOURCE_ATTRIBUTE_TESTED,
MemoryBase,
MemorySize
);
@@ -111,7 +102,6 @@ AddMemoryRangeHob ( AddMemoryBaseSizeHob (MemoryBase, (UINT64)(MemoryLimit - MemoryBase));
}
-
VOID
MemMapInitialization (
)
@@ -126,6 +116,22 @@ MemMapInitialization ( );
//
+ // Add PCI IO Port space available for PCI resource allocations.
+ //
+ BuildResourceDescriptorHob (
+ EFI_RESOURCE_IO,
+ EFI_RESOURCE_ATTRIBUTE_PRESENT |
+ EFI_RESOURCE_ATTRIBUTE_INITIALIZED,
+ 0x1000,
+ 0xF000
+ );
+
+ //
+ // Add PCI MMIO space available to PCI resource allocations
+ //
+ AddIoMemoryBaseSizeHob (0x80000000, 0xFEC00000 - 0x80000000);
+
+ //
// Local APIC range
//
AddIoMemoryBaseSizeHob (0xFEC80000, 0x80000);
@@ -214,4 +220,3 @@ InitializePlatform ( return EFI_SUCCESS;
}
-
|