summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/src/boot/sys/boot/efi/libefi/efipart.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/src/boot/sys/boot/efi/libefi/efipart.c b/usr/src/boot/sys/boot/efi/libefi/efipart.c
index 347c14f68a..2640201698 100644
--- a/usr/src/boot/sys/boot/efi/libefi/efipart.c
+++ b/usr/src/boot/sys/boot/efi/libefi/efipart.c
@@ -239,6 +239,16 @@ efipart_hdd(EFI_DEVICE_PATH *dp)
!blkio->Media->MediaPresent) {
return (false);
}
+
+ /*
+ * We assume the block size 512 or greater power of 2.
+ * iPXE is known to insert stub BLOCK IO device with
+ * BlockSize 1.
+ */
+ if (blkio->Media->BlockSize < 512 ||
+ !powerof2(blkio->Media->BlockSize)) {
+ return (false);
+ }
}
return (true);
}