Hi! I am hitting an issue in efiboot on my HP Stream 13. Patch below. Sorry if this is the wrong list.
When trying to boot current with the EFI bootloader it hangs: probing: pc0 mem[444K 88K 511M 1374M 19M] disk: hd0 hd1* hd2* hd3* hd4_ <----- hangs. Then it stops responding and I have to power off/on. After inserting printf's in the code and troubleshooting a bit, I think I have found the issue. The block count of the device (u_int blks) is reported as 0 which makes the off % blks code blow up. Patch below tested on the HP stream allows it to boot. I also tested that is doesn't break boot on my other HP Laptop (ZBook 15) BTW, when hitting the error both blks and off where always zero, diff below only checks blks not sure if this is correct. It's probably also wrong to just return here, but hopefully this will provide someone with enough clues to fix it properly. I you want more information, please let me know and I will send it. ? hp_efiboot.patch Index: efidev.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/stand/efiboot/efidev.c,v retrieving revision 1.16 diff -u -p -r1.16 efidev.c --- efidev.c 6 Jan 2016 02:10:03 -0000 1.16 +++ efidev.c 11 Apr 2016 18:34:05 -0000 @@ -91,6 +91,7 @@ efid_io(int rw, efi_diskinfo_t ed, u_int lba = off / blks; /* leading and trailing unaligned blocks in intrisic block */ + if(blks == 0) return (EFI_UNSUPPORTED); //HP stream 0 blocks workaround i_lblks = ((off % blks) == 0)? 0 : blks - (off % blks); i_tblks = (off + nsect) % blks;
