diff options
author | Maurice Ma <maurice.ma@intel.com> | 2016-05-18 16:27:07 -0700 |
---|---|---|
committer | Maurice Ma <maurice.ma@intel.com> | 2016-05-18 16:30:18 -0700 |
commit | 298454472bf4cf088a694bafa3b66503b4f8a39d (patch) | |
tree | 735be89727adbf71f53a3a93857285e63f4a0075 /CorebootModulePkg/CbSupportPei | |
parent | 81c1460695f783a3f91431b2babea623556a7f5d (diff) | |
download | edk2-platforms-298454472bf4cf088a694bafa3b66503b4f8a39d.tar.xz |
CorebootModulePkg: Use PCD for memory type information initialization
CorebootModulePkg currently uses a hardcoded table for memory type
initialization. It might need to be adjusted by platform to reduce
the memory fragmentation. So changing to use PCDs rather than
constant values to facilitate the customization.
Cc: Prince Agyeman <prince.agyeman@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
Diffstat (limited to 'CorebootModulePkg/CbSupportPei')
-rwxr-xr-x | CorebootModulePkg/CbSupportPei/CbSupportPei.c | 12 | ||||
-rw-r--r-- | CorebootModulePkg/CbSupportPei/CbSupportPei.inf | 13 |
2 files changed, 15 insertions, 10 deletions
diff --git a/CorebootModulePkg/CbSupportPei/CbSupportPei.c b/CorebootModulePkg/CbSupportPei/CbSupportPei.c index e58aa2d03d..366682b32d 100755 --- a/CorebootModulePkg/CbSupportPei/CbSupportPei.c +++ b/CorebootModulePkg/CbSupportPei/CbSupportPei.c @@ -2,7 +2,7 @@ This PEIM will parse coreboot table in memory and report resource information into pei core.
This file contains the main entrypoint of the PEIM.
-Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1
EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {
- { EfiACPIReclaimMemory, 0x008 },
- { EfiACPIMemoryNVS, 0x004 },
- { EfiReservedMemoryType, 0x004 },
- { EfiRuntimeServicesData, 0x080 },
- { EfiRuntimeServicesCode, 0x080 },
+ { EfiACPIReclaimMemory, FixedPcdGet32 (PcdMemoryTypeEfiACPIReclaimMemory) },
+ { EfiACPIMemoryNVS, FixedPcdGet32 (PcdMemoryTypeEfiACPIMemoryNVS) },
+ { EfiReservedMemoryType, FixedPcdGet32 (PcdMemoryTypeEfiReservedMemoryType) },
+ { EfiRuntimeServicesData, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesData) },
+ { EfiRuntimeServicesCode, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesCode) },
{ EfiMaxMemoryType, 0 }
};
diff --git a/CorebootModulePkg/CbSupportPei/CbSupportPei.inf b/CorebootModulePkg/CbSupportPei/CbSupportPei.inf index b88b6f07ff..4905bdbd8e 100644 --- a/CorebootModulePkg/CbSupportPei/CbSupportPei.inf +++ b/CorebootModulePkg/CbSupportPei/CbSupportPei.inf @@ -4,7 +4,7 @@ # Parses coreboot table in memory and report resource information into pei core. It will install
# the memory as required.
#
-# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -62,12 +62,17 @@ gUefiAcpiBoardInfoGuid
[Ppis]
- gEfiPeiMasterBootModePpiGuid
+ gEfiPeiMasterBootModePpiGuid
[Pcd]
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemBase
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemSize
- gUefiCorebootModulePkgTokenSpaceGuid.PcdCbHeaderPointer
-
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdCbHeaderPointer
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode
+
[Depex]
TRUE
\ No newline at end of file |