Changeset 82509 in vbox for trunk/src/VBox
- Timestamp:
- Dec 9, 2019 12:12:17 PM (5 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
r80934 r82509 1007 1007 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *pSFs = NULL; 1008 1008 EFI_FILE_PROTOCOL *pRoot = NULL; 1009 EFI_FILE_PROTOCOL *pFile = NULL;1010 1009 1011 1010 *ppwszFileName = EFI_REMOVABLE_MEDIA_FILE_NAME; … … 1017 1016 if (!EFI_ERROR(Status)) 1018 1017 { 1019 Status = pRoot->Open(pRoot, &pFile, VBOX_EFI_APPLE_MEDIA_FILE_NAME, EFI_FILE_MODE_READ, 1020 EFI_FILE_READ_ONLY | EFI_FILE_HIDDEN | EFI_FILE_SYSTEM); 1021 if (!EFI_ERROR(Status)) 1022 { 1023 *ppwszFileName = VBOX_EFI_APPLE_MEDIA_FILE_NAME; 1024 pFile->Close(pFile); 1018 VBOX_FS_BLESSED_FILE *Buffer = NULL; 1019 UINTN BufferSize = 0; 1020 1021 Status = pRoot->GetInfo(pRoot, &gVBoxFsBlessedFileInfoGuid, &BufferSize, Buffer); 1022 if (Status == EFI_BUFFER_TOO_SMALL) { 1023 Buffer = AllocatePool (BufferSize); 1024 ASSERT (Buffer != NULL); 1025 1026 /** @todo We might leak this allocation but it doesn't really matter as it 1027 * is of type BootServicesData and will be reclaimed by the OS when it boots. 1028 */ 1029 Status = pRoot->GetInfo(pRoot, &gVBoxFsBlessedFileInfoGuid, &BufferSize, Buffer); 1030 if (!EFI_ERROR(Status)) 1031 { 1032 DEBUG ((EFI_D_INFO, "[Bds] VBoxBmQueryMediaFileNameForSFs: Got blessed file info %s\n", &Buffer->BlessedFile[0])); 1033 *ppwszFileName = &Buffer->BlessedFile[0]; 1034 } 1025 1035 } 1026 1036 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h
r80901 r82509 48 48 #include <Guid/StatusCodeDataTypeId.h> 49 49 #include <Guid/StatusCodeDataTypeVariable.h> 50 #ifdef VBOX 51 #include <Guid/VBoxFsBlessedFileInfo.h> 52 #endif 50 53 51 54 #include <Library/PrintLib.h> … … 82 85 #endif 83 86 84 #ifdef VBOX85 /* Support for booting Apple macOS. */86 # define VBOX_EFI_APPLE_MEDIA_FILE_NAME L"\\System\\Library\\CoreServices\\boot.efi"87 #endif88 89 87 typedef enum { 90 88 BmAcpiFloppyBoot, -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
r80721 r82509 41 41 MdePkg/MdePkg.dec 42 42 MdeModulePkg/MdeModulePkg.dec 43 VBoxPkg/VBoxPkg.dec 43 44 44 45 [LibraryClasses] … … 85 86 gEfiDiskInfoSdMmcInterfaceGuid ## SOMETIMES_CONSUMES ## GUID 86 87 88 gVBoxFsBlessedFileInfoGuid ## SOMETIMES_CONSUMES ## GUID 89 87 90 [Protocols] 88 91 gEfiPciRootBridgeIoProtocolGuid ## CONSUMES
Note:
See TracChangeset
for help on using the changeset viewer.