]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/Image/Image.c
Enhance PeiCore and DxeCore check whether the image machine type is supported when...
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / Image / Image.c
index 8ec6793966c8d3338cf471a0ee0c66003d78516f..8033b449d92f0eac5ac18a963d63171706367cc0 100644 (file)
@@ -1120,6 +1120,14 @@ CoreStartImage (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  if (!EFI_IMAGE_MACHINE_TYPE_SUPPORTED (Image->Machine)) {\r
+    //\r
+    // The image to be started must have the machine type supported by DxeCore.\r
+    //\r
+    ASSERT (FALSE);\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   //\r
   // Don't profile Objects or invalid start requests\r
   //\r