Hi,

On Thu, 29 Dec 2016 14:53:20 -0600
Ryan <[email protected]> wrote:
> I've successfully booted the machine with the following changes:
> 
> 
> --- sys/arch/amd64/stand/efiboot/efiboot.c    2016-06-10 12:36:06.000000000
> -0600
> +++ sys/arch/amd64/stand/efiboot/efiboot.c    2016-12-28 15:57:36.728002168
> -0600
> @@ -137,12 +137,16 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TA
>  void
>  efi_cleanup(void)
>  {
> +      int         retry;
>      EFI_STATUS     status;
> 
> -    efi_memprobe_internal();    /* sync the current map */
> -    status = EFI_CALL(BS->ExitBootServices, IH, mmap_key);
> -    if (status != EFI_SUCCESS)
> -        panic("ExitBootServices");
> +    /* retry once in case of failure */
> +    for (retry = 1; retry == 0; retry--) {
> +        efi_memprobe_internal();    /* sync the current map */
> +        status = EFI_CALL(BS->ExitBootServices, IH, mmap_key);
> +        if (status != EFI_SUCCESS && retry == 0)
> +            panic("ExitBootServices failed (%d)\n", status);
> +    }
>  }

See the condition of "for" carefully.  It seems that it never become
true.  Can you check whether it will still boot successfull after this
problem is fixed?

(snip)
> Oh before I forget, while I was reading through the code I noticed what
> appears to be a typo in sys/arch/amd64/stand/efiboot/eficall.h:
> 
> #define       EFI_CALL(...)   \
>     _efi_call_fn(__VA_ARGS__, _call_9, _call_8, _call_7, _call_6, _call_5, \
>           _call_4, _call_3, _call_2, _call_1, _call_1)(__VA_ARGS__)
> #endif
> 
> It looks like the second instance of _call_1 should be _call_0 (which is
> defined earlier), unless I am totally misreading this.

I commited this already.  Thanks.

--yasuoka

Reply via email to