1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-06 09:17:25 +00:00

The boot manager sets the watchdog timer to 5 minutes before invoking

a boot option. When the timer expires the machine is rebooted.
Disable the watchdog timer for 2 reasons:
o  We're an interactive program. We cannot guarantee that we've
   booted the kernel in the time available to us. There have been
   situations where netbooting the right kernel took 2 tries and
   more time than given. Not to speak of the normal behaviour to
   have the loader sitting at the prompt while the user is off
   doing other things (such as figuring out what to type next ;-)
o  We may not boot a kernel at all. We may exit as the result of
   the user typing quit (assuming it took less than 5 minutes to
   type it :-). It is documented that loaders should have disabled
   the watchdog timer if they return to the boot manager. Not doing
   so would cause a reboot while in the boot manager. This appears
   to be harmless, besides of course the actual reboot.

Approved by: re (weisse karte)
This commit is contained in:
Marcel Moolenaar 2002-12-08 20:04:00 +00:00
parent 487d404b1b
commit ea16741fc0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107683
2 changed files with 20 additions and 12 deletions

View File

@ -174,12 +174,16 @@ efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
currdev.d_type = currdev.d_dev->dv_type;
#if 0
/* Create arc-specific variables */
bootfile = GetEnvironmentVariable(ARCENV_BOOTFILE);
if (bootfile)
setenv("bootfile", bootfile, 1);
#endif
/*
* Disable the watchdog timer. By default the boot manager sets
* the timer to 5 minutes before invoking a boot option. If we
* want to return to the boot manager, we have to disable the
* watchdog timer and since we're an interactive program, we don't
* want to wait until the user types "quit". The timer may have
* fired by then. We don't care if this fails. It does not prevent
* normal functioning in any way...
*/
BS->SetWatchdogTimer(0, 0, 0, NULL);
env_setenv("currdev", EV_VOLATILE, efi_fmtdev(&currdev),
efi_setcurrdev, env_nounset);

View File

@ -174,12 +174,16 @@ efi_main (EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table)
currdev.d_type = currdev.d_dev->dv_type;
#if 0
/* Create arc-specific variables */
bootfile = GetEnvironmentVariable(ARCENV_BOOTFILE);
if (bootfile)
setenv("bootfile", bootfile, 1);
#endif
/*
* Disable the watchdog timer. By default the boot manager sets
* the timer to 5 minutes before invoking a boot option. If we
* want to return to the boot manager, we have to disable the
* watchdog timer and since we're an interactive program, we don't
* want to wait until the user types "quit". The timer may have
* fired by then. We don't care if this fails. It does not prevent
* normal functioning in any way...
*/
BS->SetWatchdogTimer(0, 0, 0, NULL);
env_setenv("currdev", EV_VOLATILE, efi_fmtdev(&currdev),
efi_setcurrdev, env_nounset);