From a704a197f547ce3149b6ab5414836061e7150ff0 Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Mon, 20 Jul 2020 14:37:25 -0500 Subject: [PATCH] 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 --- src/system/boot/platform/efi/devices.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/system/boot/platform/efi/devices.cpp b/src/system/boot/platform/efi/devices.cpp index 17cd4a9c14..690a6a7858 100644 --- a/src/system/boot/platform/efi/devices.cpp +++ b/src/system/boot/platform/efi/devices.cpp @@ -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!");