]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/MemDetect.c
OvmfPkg/PlatformPei: Initialise RCBA (B0:D31:F0 0xf0) register
[mirror_edk2.git] / OvmfPkg / PlatformPei / MemDetect.c
index 15b279e4456c525ab18912bb4aafa096ad0204a3..bd7bb0227d8c338173780a41bc8ce3db163cfa1d 100644 (file)
@@ -56,7 +56,7 @@ GetSystemMemorySizeBelow4gb (
   Cmos0x34 = (UINT8) CmosRead8 (0x34);\r
   Cmos0x35 = (UINT8) CmosRead8 (0x35);\r
 \r
-  return (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);\r
+  return (UINT32) (((UINTN)((Cmos0x35 << 8) + Cmos0x34) << 16) + SIZE_16MB);\r
 }\r
 \r
 \r
@@ -205,6 +205,15 @@ InitializeRamRegions (
       EfiACPIMemoryNVS\r
       );\r
 \r
+    //\r
+    // SEC stores its table of GUIDed section handlers here.\r
+    //\r
+    BuildMemoryAllocationHob (\r
+      PcdGet64 (PcdGuidedExtractHandlerTableAddress),\r
+      PcdGet32 (PcdGuidedExtractHandlerTableSize),\r
+      EfiACPIMemoryNVS\r
+      );\r
+\r
 #ifdef MDE_CPU_X64\r
     //\r
     // Reserve the initial page tables built by the reset vector code.\r