Hi, with the diff below I get:

probing: pc0 mem[444K 88K 511M 1374M 19M]
Disk:BlockSize=256 LastBlock=16383
Hit any key to reboot

Also, I forgot to mention this in my first post, sorry, not sure if it is
relevant though:
I am testing this using a USB-stick with everything on a encrypted softraid.


- Vegar


-----Original Message-----
From: YASUOKA Masahiko [mailto:[email protected]] 
Sent: onsdag 13. april 2016 04.57
To: [email protected]
Cc: [email protected]
Subject: Re: EFIboot and HP Stream 13

Can you try the diff below?  I'd like to know what is happening.

Index: efiboot.c
===================================================================
RCS file: /cvs/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
retrieving revision 1.11
diff -u -p -r1.11 efiboot.c
--- efiboot.c   4 Feb 2016 09:19:39 -0000       1.11
+++ efiboot.c   13 Apr 2016 02:52:44 -0000
@@ -180,6 +180,11 @@ efi_diskprobe(void)
                media = blkio->Media;
                if (media->LogicalPartition || !media->MediaPresent)
                        continue;
+
+               if (media->BlockSize < 512)
+                       panic("BlockSize=%d LastBlock=%d",
+                           media->BlockSize, media->LastBlock);
+
                di = alloc(sizeof(struct diskinfo));
                efid_init(di, blkio);
 
@@ -569,10 +574,10 @@ efi_makebootargs(void)  void
 _rtt(void)
 {
-#ifdef EFI_DEBUG
+//#ifdef EFI_DEBUG
        printf("Hit any key to reboot\n");
        efi_cons_getc(0);
-#endif
+//#endif
        EFI_CALL(RS->ResetSystem, EfiResetCold, EFI_SUCCESS, 0, NULL);
        while (1) { }
 }

On Wed, 13 Apr 2016 10:49:40 +0900 (JST) YASUOKA Masahiko
<[email protected]> wrote:
> Hi,
> 
> Thank you for your report.
> 
> The diff seems to make sense for the issue.  I'll fix it on the CVS soon.
> 
> On Mon, 11 Apr 2016 21:26:37 +0200
> "Vegar Linge Haaland" <[email protected]> wrote:
>> 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;
>> 
>> 
>> 

Reply via email to