summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-08-31 09:30:35 +0300
committerToomas Soome <tsoome@me.com>2019-09-20 21:59:34 +0300
commitc8caaf7af609cac86df1d624c8b8fdf0edbb3c7f (patch)
tree7c738f95d80ee39a6175628663d394e9f84f6a00
parent2d37a1a3f6b9fa33de5a877c84711ec1231fa21b (diff)
downloadillumos-joyent-c8caaf7af609cac86df1d624c8b8fdf0edbb3c7f.tar.gz
11704 loader.efi: filter out very large blocksize in efipart
11703 loader.efi: add vendor devicepath nodes as disks Reviewed by: Robert Mustacchi <rm@fingolfin.org> Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r--usr/src/boot/sys/boot/efi/libefi/efipart.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/src/boot/sys/boot/efi/libefi/efipart.c b/usr/src/boot/sys/boot/efi/libefi/efipart.c
index e51f4b5d0b..9f2a431fab 100644
--- a/usr/src/boot/sys/boot/efi/libefi/efipart.c
+++ b/usr/src/boot/sys/boot/efi/libefi/efipart.c
@@ -241,10 +241,13 @@ efipart_inithandles(void)
/*
* We assume the block size 512 or greater power of 2.
+ * Also skip devices with block size > 64k (16 is max
+ * ashift supported by zfs).
* iPXE is known to insert stub BLOCK IO device with
* BlockSize 1.
*/
if (blkio->Media->BlockSize < 512 ||
+ blkio->Media->BlockSize > (1 << 16) ||
!powerof2(blkio->Media->BlockSize)) {
continue;
}
@@ -589,7 +592,8 @@ restart:
continue;
if (DevicePathType(node) == HARDWARE_DEVICE_PATH &&
- DevicePathSubType(node) == HW_PCI_DP) {
+ (DevicePathSubType(node) == HW_PCI_DP ||
+ DevicePathSubType(node) == HW_VENDOR_DP)) {
STAILQ_REMOVE(&pdinfo, hd, pdinfo, pd_link);
efipart_hdinfo_add(hd, NULL);
goto restart;