]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/CbSupportPei/CbSupportPei.c
MdePkg: Enable new MS VA intrinsics for GNUC x86 64bits build
[mirror_edk2.git] / CorebootModulePkg / CbSupportPei / CbSupportPei.c
index 46b08d2f084653dd64b7f96b76a04bfd53123835..366682b32d117f83e5c5f43f48ac50170a2f372b 100755 (executable)
@@ -2,7 +2,7 @@
   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
@@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #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
@@ -186,12 +186,16 @@ CbPeiEntryPoint (
 \r
   ASSERT (LowMemorySize > 0);\r
 \r
+  //\r
+  // Report lower 640KB of RAM. Attribute EFI_RESOURCE_ATTRIBUTE_TESTED  \r
+ // is intentionally omitted to prevent erasing of the coreboot header  \r
+ // record before it is processed by CbParseMemoryInfo.\r
+  //\r
   BuildResourceDescriptorHob (\r
     EFI_RESOURCE_SYSTEM_MEMORY,\r
     (\r
     EFI_RESOURCE_ATTRIBUTE_PRESENT |\r
     EFI_RESOURCE_ATTRIBUTE_INITIALIZED |\r
-    EFI_RESOURCE_ATTRIBUTE_TESTED |\r
     EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE |\r
     EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE |\r
     EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE |\r