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>
This PEIM will parse coreboot table in memory and report resource information into pei core.\r
This file contains the main entrypoint of the PEIM.\r
\r
This PEIM will parse coreboot table in memory and report resource information into pei core.\r
This file contains the main entrypoint of the PEIM.\r
\r
-Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1\r
\r
EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {\r
#define LEGACY_8259_MASK_REGISTER_SLAVE 0xA1\r
\r
EFI_MEMORY_TYPE_INFORMATION mDefaultMemoryTypeInformation[] = {\r
- { EfiACPIReclaimMemory, 0x008 },\r
- { EfiACPIMemoryNVS, 0x004 },\r
- { EfiReservedMemoryType, 0x004 },\r
- { EfiRuntimeServicesData, 0x080 },\r
- { EfiRuntimeServicesCode, 0x080 },\r
+ { EfiACPIReclaimMemory, FixedPcdGet32 (PcdMemoryTypeEfiACPIReclaimMemory) },\r
+ { EfiACPIMemoryNVS, FixedPcdGet32 (PcdMemoryTypeEfiACPIMemoryNVS) },\r
+ { EfiReservedMemoryType, FixedPcdGet32 (PcdMemoryTypeEfiReservedMemoryType) },\r
+ { EfiRuntimeServicesData, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesData) },\r
+ { EfiRuntimeServicesCode, FixedPcdGet32 (PcdMemoryTypeEfiRuntimeServicesCode) },\r
{ EfiMaxMemoryType, 0 }\r
};\r
\r
{ EfiMaxMemoryType, 0 }\r
};\r
\r
# Parses coreboot table in memory and report resource information into pei core. It will install\r
# the memory as required.\r
#\r
# Parses coreboot table in memory and report resource information into pei core. It will install\r
# the memory as required.\r
#\r
-# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
#\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
gUefiAcpiBoardInfoGuid\r
\r
[Ppis]\r
gUefiAcpiBoardInfoGuid\r
\r
[Ppis]\r
- gEfiPeiMasterBootModePpiGuid \r
+ gEfiPeiMasterBootModePpiGuid\r
\r
[Pcd]\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemBase\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemSize\r
\r
[Pcd]\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemBase\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemSize\r
- gUefiCorebootModulePkgTokenSpaceGuid.PcdCbHeaderPointer \r
- \r
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdCbHeaderPointer\r
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory\r
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS\r
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType\r
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData\r
+ gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode\r
+\r
[Depex]\r
TRUE
\ No newline at end of file
[Depex]\r
TRUE
\ No newline at end of file
## @file\r
# Coreboot Support Package\r
#\r
## @file\r
# Coreboot Support Package\r
#\r
-# Provides drivers and definitions to support coreboot in EDKII bios. \r
+# Provides drivers and definitions to support coreboot in EDKII bios.\r
-# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
-# This program and the accompanying materials are licensed and made available under \r
-# the terms and conditions of the BSD License that accompanies this distribution. \r
+# Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials are licensed and made available under\r
+# the terms and conditions of the BSD License that accompanies this distribution.\r
# The full text of the license may be found at\r
# The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php. \r
-# \r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+# http://opensource.org/licenses/bsd-license.php.\r
+#\r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
PACKAGE_NAME = CorebootModulePkg\r
PACKAGE_GUID = DE1750CE-FEE7-4dd1-8E9C-B7B8BAEBCF4F\r
PACKAGE_VERSION = 0.1\r
PACKAGE_NAME = CorebootModulePkg\r
PACKAGE_GUID = DE1750CE-FEE7-4dd1-8E9C-B7B8BAEBCF4F\r
PACKAGE_VERSION = 0.1\r
[LibraryClasses]\r
CbParseLib|Include/Library/CbParseLib.h\r
[LibraryClasses]\r
CbParseLib|Include/Library/CbParseLib.h\r
[Guids]\r
#\r
## Defines the token space for the Coreboot Module Package PCDs.\r
[Guids]\r
#\r
## Defines the token space for the Coreboot Module Package PCDs.\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemBase|0|UINT32|0x10000001\r
## Provides the size of the payload binary in memory\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemSize|0|UINT32|0x10000002\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemBase|0|UINT32|0x10000001\r
## Provides the size of the payload binary in memory\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdPayloadFdMemSize|0|UINT32|0x10000002\r
+## Used to help reduce fragmentation in the EFI memory map\r
+gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory|0x08|UINT32|0x10000012\r
+gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS|0x04|UINT32|0x10000013\r
+gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType|0x04|UINT32|0x00000014\r
+gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData|0xC0|UINT32|0x00000015\r
+gUefiCorebootModulePkgTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode|0x80|UINT32|0x00000016\r
\r
[PcdsDynamicEx]\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdCbHeaderPointer|0|UINT32|0x10000003\r
\r
[PcdsDynamicEx]\r
gUefiCorebootModulePkgTokenSpaceGuid.PcdCbHeaderPointer|0|UINT32|0x10000003\r