]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/PlatformPei/Platform.c
MdeModulePkg:Use safe string functions
[mirror_edk2.git] / OvmfPkg / PlatformPei / Platform.c
index 210578796129925f54a8dccd27dafd56ebdbef1a..fc98fc35e0781a88385ad015b7fcf3cd9f539319 100644 (file)
@@ -249,9 +249,11 @@ MiscInitialization (
   IoOr8 (0x92, BIT1);\r
 \r
   //\r
-  // Build the CPU hob with 36-bit addressing and 16-bits of IO space.\r
+  // Build the CPU HOB with guest RAM size dependent address width and 16-bits\r
+  // of IO space. (Side note: unlike other HOBs, the CPU HOB is needed during\r
+  // S3 resume as well, so we build it unconditionally.)\r
   //\r
-  BuildCpuHob (36, 16);\r
+  BuildCpuHob (mPhysMemAddressWidth, 16);\r
 \r
   //\r
   // Determine platform type and save Host Bridge DID to PCD\r
@@ -442,6 +444,7 @@ InitializePlatform (
   }\r
 \r
   BootModeInitialization ();\r
+  AddressWidthInitialization ();\r
 \r
   PublishPeiMemory ();\r
 \r