efi/devices: Skip qemu flash device for now due to crash

* An upstream bug exists which results in the tianocore
  bios crashing when attempting to read from qemu's
  (unconfigured, but present) flash device.

Change-Id: Ie9f02a290abc29cce3a5e279382750c0b14164dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3049
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
Alexander von Gluck IV
2020-07-21 12:49:44 +00:00
committed by Alex von Gluck IV
parent 9f30e61f95
commit a704a197f5
+7
View File
@@ -155,6 +155,13 @@ platform_add_boot_device(struct stage2_args *args, NodeList *devicesList)
if (!blockIo->Media->MediaPresent || blockIo->Media->LogicalPartition)
continue;
// The qemu flash device with a 256K block sizes sometime show up
// in edk2. If flash is unconfigured, bad things happen on arm.
// edk2 bug: https://bugzilla.tianocore.org/show_bug.cgi?id=2856
// We're not ready for flash devices in efi, so skip anything odd.
if (blockIo->Media->BlockSize > 8192)
continue;
EfiDevice *device = new(std::nothrow)EfiDevice(blockIo);
if (device == NULL)
panic("Can't allocate memory for block devices!");