summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-16 19:04:41 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-07-16 19:04:41 +0000
commit991d956362649b3076fb9664c6a5eb4e842e4314 (patch)
treead2dbe63415f94fd303f18636a0341f609e53ce4 /OvmfPkg
parent1beb1af9380ec2fce859fd8fae98a992de471f7d (diff)
downloadedk2-platforms-991d956362649b3076fb9664c6a5eb4e842e4314.tar.xz
Update OVMF Platform PEI to declare IO and MMIO resources.
Update default memory type information to reduce EFI Memory Map fragmentation. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10657 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c51
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;
}
-