svn commit: r316377 - head/sys/boot/uboot/common

Ian Lepore ian at FreeBSD.org
Sat Apr 1 22:03:01 UTC 2017


Author: ian
Date: Sat Apr  1 22:03:00 2017
New Revision: 316377
URL: https://svnweb.freebsd.org/changeset/base/316377

Log:
  Correct a comment... the stack used by ubldr is the same stack u-boot was
  running on when it jumped to the ubldr entry point.  None of the arches
  that use this code set up a different stack in their start.S routines.

Modified:
  head/sys/boot/uboot/common/main.c

Modified: head/sys/boot/uboot/common/main.c
==============================================================================
--- head/sys/boot/uboot/common/main.c	Sat Apr  1 21:55:09 2017	(r316376)
+++ head/sys/boot/uboot/common/main.c	Sat Apr  1 22:03:00 2017	(r316377)
@@ -416,7 +416,9 @@ main(int argc, char **argv)
 
 	/*
 	 * Initialise the heap as early as possible.  Once this is done,
-	 * alloc() is usable. The stack is buried inside us, so this is safe.
+	 * alloc() is usable.  We are using the stack u-boot set up near the top
+	 * of physical ram; hopefully there is sufficient space between the end
+	 * of our bss and the bottom of the u-boot stack to avoid overlap.
 	 */
 	uboot_heap_start = round_page((uintptr_t)end);
 	uboot_heap_end   = uboot_heap_start + 512 * 1024;


More information about the svn-src-all mailing list