Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Dec 2002 19:03:38 -0800 (PST)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 21949 for review
Message-ID:  <200212050303.gB533c1T025571@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212050303.gB533c1T025571>