Three tiny squirmy subtle bugs combined themselves with the bug that was just fixed to make bootmgfw believe it was being booted from a raw removable disk (floppy). Because bootmgfw now correctly enumerates boot devices and detects the DVD/CDROM media, it could no longer 'find itself', believing it was on a floppy.

[BOOTLIB]: When failing to find a block device, keep going searching for more, instead of giving up (critical, because the CDROM FAT12 image is now device path #1, not #0).
[BOOTMGR]: Correctly use the right logical operator in EfiInitpGetDeviceNode to get the deepest-level media device node. We now get the CDROM node, not the raw node.
[CDMAKE]: Don't actually create an EFI/BOOT directory on the CDROM itself, but rather in the FAT12 image. Otherwise, this can confuse UEFI implementations to boot the boot manager off the raw CDROM, instead of the FAT12 image on the CDROM.

svn path=/trunk/; revision=70542
This commit is contained in:
Alex Ionescu 2016-01-08 01:18:08 +00:00
parent 79e72915d9
commit 3bfe54c38c
4 changed files with 3 additions and 5 deletions

View file

@ -105,5 +105,3 @@ endif()
add_dependencies(bootmgfw asm bugcodes)
add_cd_file(TARGET bootmgfw FILE ${_bootmgfw_output_file} DESTINATION efi/boot NO_CAB FOR bootcd regtest NAME_ON_CD boot${EFI_PLATFORM_ID}.efi)

View file

@ -1263,7 +1263,7 @@ BmMain (
if (!NT_SUCCESS(Status))
{
/* Signature invalid, fail boot */
// goto Failure;
goto Failure;
}
}

View file

@ -319,7 +319,7 @@ EfiInitpGetDeviceNode (
/* Loop each device path, until we get to the end or to a file path device node */
for ((NextPath = NextDevicePathNode(DevicePath));
!(IsDevicePathEndType(NextPath)) && ((NextPath->Type != MEDIA_DEVICE_PATH) &&
!(IsDevicePathEndType(NextPath)) && ((NextPath->Type != MEDIA_DEVICE_PATH) ||
(NextPath->SubType != MEDIA_FILEPATH_DP));
(NextPath = NextDevicePathNode(NextPath)))
{

View file

@ -1276,7 +1276,7 @@ BlockIoFirmwareOpen (
if (!NT_SUCCESS(Status))
{
EfiPrintf(L"EFI create failed: %lx\n", Status);
break;
continue;
}
/* Add the device entry to the device table */