]> git.proxmox.com Git - mirror_edk2.git/blobdiff - CorebootModulePkg/CbSupportPei/CbSupportPei.c
CorebootPayloadPkg DSC: Add build option to disable deprecated APIs
[mirror_edk2.git] / CorebootModulePkg / CbSupportPei / CbSupportPei.c
index e58aa2d03d9d45ea6a67f637c9fed13a96b67c81..9d5803449e2519b07f04e40e163f284d5fd15528 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
@@ -329,7 +329,8 @@ CbPeiEntryPoint (
   if ((CbParseGetCbHeader (1, &pCbHeader) == RETURN_SUCCESS)\r
     && ((UINTN)pCbHeader > BASE_4KB)) {\r
     DEBUG((EFI_D_ERROR, "Actual Coreboot header: %p.\n", pCbHeader));\r
-    PcdSet32 (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);\r
+    Status = PcdSet32S (PcdCbHeaderPointer, (UINT32)(UINTN)pCbHeader);\r
+    ASSERT_EFI_ERROR (Status);\r
   }\r
 \r
   //\r