Index: /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
===================================================================
--- /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c	(revision 82508)
+++ /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c	(revision 82509)
@@ -1007,5 +1007,4 @@
   EFI_SIMPLE_FILE_SYSTEM_PROTOCOL     *pSFs  = NULL;
   EFI_FILE_PROTOCOL                   *pRoot = NULL;
-  EFI_FILE_PROTOCOL                   *pFile = NULL;
 
   *ppwszFileName = EFI_REMOVABLE_MEDIA_FILE_NAME;
@@ -1017,10 +1016,21 @@
     if (!EFI_ERROR(Status))
     {
-      Status = pRoot->Open(pRoot, &pFile, VBOX_EFI_APPLE_MEDIA_FILE_NAME, EFI_FILE_MODE_READ,
-                           EFI_FILE_READ_ONLY | EFI_FILE_HIDDEN | EFI_FILE_SYSTEM);
-      if (!EFI_ERROR(Status))
-      {
-        *ppwszFileName = VBOX_EFI_APPLE_MEDIA_FILE_NAME;
-        pFile->Close(pFile);
+      VBOX_FS_BLESSED_FILE *Buffer = NULL;
+      UINTN BufferSize = 0;
+
+      Status = pRoot->GetInfo(pRoot, &gVBoxFsBlessedFileInfoGuid, &BufferSize, Buffer);
+      if (Status == EFI_BUFFER_TOO_SMALL) {
+        Buffer = AllocatePool (BufferSize);
+        ASSERT (Buffer != NULL);
+
+        /** @todo We might leak this allocation but it doesn't really matter as it
+         * is of type BootServicesData and will be reclaimed by the OS when it boots.
+         */
+        Status = pRoot->GetInfo(pRoot, &gVBoxFsBlessedFileInfoGuid, &BufferSize, Buffer);
+        if (!EFI_ERROR(Status))
+        {
+          DEBUG ((EFI_D_INFO, "[Bds] VBoxBmQueryMediaFileNameForSFs: Got blessed file info %s\n", &Buffer->BlessedFile[0]));
+          *ppwszFileName = &Buffer->BlessedFile[0];
+        }
       }
 
Index: /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
===================================================================
--- /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h	(revision 82508)
+++ /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h	(revision 82509)
@@ -48,4 +48,7 @@
 #include <Guid/StatusCodeDataTypeId.h>
 #include <Guid/StatusCodeDataTypeVariable.h>
+#ifdef VBOX
+#include <Guid/VBoxFsBlessedFileInfo.h>
+#endif
 
 #include <Library/PrintLib.h>
@@ -82,9 +85,4 @@
 #endif
 
-#ifdef VBOX
-/* Support for booting Apple macOS. */
-# define VBOX_EFI_APPLE_MEDIA_FILE_NAME L"\\System\\Library\\CoreServices\\boot.efi"
-#endif
-
 typedef enum {
   BmAcpiFloppyBoot,
Index: /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
===================================================================
--- /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf	(revision 82508)
+++ /trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf	(revision 82509)
@@ -41,4 +41,5 @@
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
+  VBoxPkg/VBoxPkg.dec
 
 [LibraryClasses]
@@ -85,4 +86,6 @@
   gEfiDiskInfoSdMmcInterfaceGuid                ## SOMETIMES_CONSUMES ## GUID
 
+  gVBoxFsBlessedFileInfoGuid                    ## SOMETIMES_CONSUMES ## GUID
+
 [Protocols]
   gEfiPciRootBridgeIoProtocolGuid               ## CONSUMES
