Tested and boots as expected. However, I was not able to run `make check` 
on the project. It was complaining about missing `ttt.h` header and I'm not 
that familiar with `ttt` project to fix it in reasonable time, so I omitted 
this step.

Regards,
-Dmitri

On Thursday, February 1, 2018 at 1:15:29 AM UTC-5, [email protected] 
wrote:
>
> From: Dmitri Toubelis <[email protected] <javascript:>> 
>
> This patch allows booting an image without arming watchdog timer 
> whwn "watchdog=0" parameter is passed to the to the module. 
>
> This covers the use case when availability of a hardware driver is 
> unknown ahead of time and can only be established upon first boot. 
> The code that runs on the first boot can then identify if supported 
> hardware watchdog is available and the required driver is present 
> in the kernel and either update boot configuration re-arming the 
> timer or issuing a warning unsupported hardware. This also allows 
> for booting images in virtual environments. 
>
> Signed-off-by: Dmitri Toubelis <[email protected] 
> <javascript:>> 
> --- 
>  main.c | 5 +++++ 
>  1 file changed, 5 insertions(+) 
>
> diff --git a/main.c b/main.c 
> index b71f811..a527e84 100644 
> --- a/main.c 
> +++ b/main.c 
> @@ -50,6 +50,11 @@ static EFI_STATUS scan_devices(EFI_LOADED_IMAGE 
> *loaded_image, UINTN timeout) 
>          EFI_STATUS status; 
>          UINT32 value; 
>   
> +    if (timeout == 0) { 
> +        Print(L"Watchdog is disabled.\n"); 
> +        return EFI_SUCCESS; 
> +    } 
> + 
>          status = uefi_call_wrapper(BS->LocateHandle, 5, ByProtocol, 
>                                     &PciIoProtocol, NULL, &size, devices); 
>          if (EFI_ERROR(status)) { 
> -- 
> 2.7.4 
>
>
> From 9f355887dd370b3682f41bc8474955823f09e38b Mon Sep 17 00:00:00 2001 
> From: Dmitri Toubelis <[email protected] <javascript:>> 
> Date: Thu, 1 Feb 2018 00:40:56 -0500 
> Subject: [efibootguard][PATCH 2/2] Allow "watchdog" be equal "0" 
>
> Signed-off-by: Dmitri Toubelis <[email protected] 
> <javascript:>> 
> --- 
>  tools/bg_setenv.c | 2 +- 
>  1 file changed, 1 insertion(+), 1 deletion(-) 
>
> diff --git a/tools/bg_setenv.c b/tools/bg_setenv.c 
> index b397aca..37f50ce 100644 
> --- a/tools/bg_setenv.c 
> +++ b/tools/bg_setenv.c 
> @@ -338,7 +338,7 @@ static error_t parse_opt(int key, char *arg, struct 
> argp_state *state) 
>                  break; 
>          case 'w': 
>                  i = parse_int(arg); 
> -                if (errno || i == 0) { 
> +                if (errno || i < 0) { 
>                          fprintf(stderr, 
>                                  "Invalid watchdog timeout specified.\n"); 
>                          return 1; 
> -- 
> 2.7.4 
>
>

-- 
You received this message because you are subscribed to the Google Groups "EFI 
Boot Guard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/efibootguard-dev/5ba89995-1bde-4dbc-9e3f-e99cb5e87ab3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to