> Date: Thu, 1 Mar 2018 16:38:50 +1100
> From: Jonathan Gray <j...@jsg.id.au>
> 
> On Sun, Feb 11, 2018 at 04:38:18PM +1100, Jonathan Gray wrote:
> > The UEFI specification states a watchdog should be armed for 5 minutes.
> > Stop this from resetting a system when in efiboot.
> 
> Anyone?  It is annoying to have the system reset itself when trying
> to do something in boot or purposefully leaving it at the prompt.

I've never actually run into this.  But assuming you've tested this
with both U-Boot and a real UEFI implementation, I'm ok with this.

It'd be interesting to be able to re-arm the watchdog before loading a
kernel and disable it again once the kernel has booted.  But it
doesn't look like it would be possible to do that.

> > Index: amd64/stand/efiboot/efiboot.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/amd64/stand/efiboot/efiboot.c,v
> > retrieving revision 1.28
> > diff -u -p -r1.28 efiboot.c
> > --- amd64/stand/efiboot/efiboot.c   25 Nov 2017 19:02:07 -0000      1.28
> > +++ amd64/stand/efiboot/efiboot.c   11 Feb 2018 05:25:11 -0000
> > @@ -81,6 +81,9 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TA
> >     RS = ST->RuntimeServices;
> >     IH = image;
> >  
> > +   /* disable reset by watchdog after 5 minutes */
> > +   EFI_CALL(BS->SetWatchdogTimer, 0, 0, 0, NULL);
> > +
> >     efi_video_init();
> >     efi_heap_init();
> >  
> > Index: armv7/stand/efiboot/efiboot.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/armv7/stand/efiboot/efiboot.c,v
> > retrieving revision 1.19
> > diff -u -p -r1.19 efiboot.c
> > --- armv7/stand/efiboot/efiboot.c   21 Aug 2017 20:05:32 -0000      1.19
> > +++ armv7/stand/efiboot/efiboot.c   11 Feb 2018 05:25:11 -0000
> > @@ -71,6 +71,9 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TA
> >     BS = ST->BootServices;
> >     IH = image;
> >  
> > +   /* disable reset by watchdog after 5 minutes */
> > +   EFI_CALL(BS->SetWatchdogTimer, 0, 0, 0, NULL);
> > +
> >     status = EFI_CALL(BS->HandleProtocol, image, &imgp_guid,
> >         (void **)&imgp);
> >     if (status == EFI_SUCCESS)
> > Index: arm64/stand/efiboot/efiboot.c
> > ===================================================================
> > RCS file: /cvs/src/sys/arch/arm64/stand/efiboot/efiboot.c,v
> > retrieving revision 1.15
> > diff -u -p -r1.15 efiboot.c
> > --- arm64/stand/efiboot/efiboot.c   6 Feb 2018 20:35:21 -0000       1.15
> > +++ arm64/stand/efiboot/efiboot.c   11 Feb 2018 05:25:12 -0000
> > @@ -74,6 +74,9 @@ efi_main(EFI_HANDLE image, EFI_SYSTEM_TA
> >     BS = ST->BootServices;
> >     IH = image;
> >  
> > +   /* disable reset by watchdog after 5 minutes */
> > +   EFI_CALL(BS->SetWatchdogTimer, 0, 0, 0, NULL);
> > +
> >     status = EFI_CALL(BS->HandleProtocol, image, &imgp_guid,
> >         (void **)&imgp);
> >     if (status == EFI_SUCCESS)
> > 
> 
> 

Reply via email to