From owner-p4-projects Wed Dec 4 19: 7:59 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4103737B404; Wed, 4 Dec 2002 19:07:57 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE37337B401 for ; Wed, 4 Dec 2002 19:07:56 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C4E243EB2 for ; Wed, 4 Dec 2002 19:07:56 -0800 (PST) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gB533cmV025574 for ; Wed, 4 Dec 2002 19:03:38 -0800 (PST) (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB533c1T025571 for perforce@freebsd.org; Wed, 4 Dec 2002 19:03:38 -0800 (PST) Date: Wed, 4 Dec 2002 19:03:38 -0800 (PST) Message-Id: <200212050303.gB533c1T025571@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar Subject: PERFORCE change 21949 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=21949 Change 21949 by marcel@marcel_nfs on 2002/12/04 19:02:50 When the boot manager invokes us, it sets the watchdog timer. The machine resets when the timer expires and the timer is disabled when we exit boot services (ie jump to the kernel). Since we're an interactive loader, we cannot assume that the kernel gets started before the timer fires. Also, when we return to the boot manager, we're required to have disabled the timer anyway. So, to avoid surprises and to adhere to the EFI spec, we'd better disable it. Now we do :-) Slight cleaning while here. Affected files ... .. //depot/projects/ia64/sys/boot/efi/loader/main.c#8 edit Differences ... ==== //depot/projects/ia64/sys/boot/efi/loader/main.c#8 (text+ko) ==== @@ -142,7 +142,7 @@ (devsw[i]->dv_init)(); efinet_init_driver(); - + printf("\n"); printf("%s, Revision %s\n", bootprog_name, bootprog_rev); printf("(%s, %s)\n", bootprog_maker, bootprog_date); @@ -150,7 +150,6 @@ printf("Memory: %ld k\n", memsize() / 1024); #endif - /* * XXX quick and dirty check to see if we're loaded from the * network. If so, we set the default device to 'net'. In all @@ -171,15 +170,18 @@ /* default to 'a' */ currdev.d_kind.efidisk.partition = 0; } - 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); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message