]> git.proxmox.com Git - mirror_edk2.git/blobdiff - OvmfPkg/Library/LoadLinuxLib/Linux.c
OvmfPkg: allocate the EFI memory map for Linux as Loader Data
[mirror_edk2.git] / OvmfPkg / Library / LoadLinuxLib / Linux.c
index cd673aa087c8959be12bf98a9b2325812c696d48..4a3e2c13cb349eb9ce481bf419c7a61045ab6e9b 100644 (file)
@@ -280,8 +280,12 @@ SetupLinuxMemmap (
   // Enlarge space here, because we will allocate pool now.\r
   //\r
   MemoryMapSize += EFI_PAGE_SIZE;\r
-  MemoryMap = AllocatePool (MemoryMapSize);\r
-  ASSERT (MemoryMap != NULL);\r
+  Status = gBS->AllocatePool (\r
+                  EfiLoaderData,\r
+                  MemoryMapSize,\r
+                  (VOID **) &MemoryMap\r
+                  );\r
+  ASSERT_EFI_ERROR (Status);\r
 \r
   //\r
   // Get System MemoryMap\r