From owner-svn-src-head@FreeBSD.ORG Tue Jan 8 03:27:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 22470508; Tue, 8 Jan 2013 03:27:38 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 04379837; Tue, 8 Jan 2013 03:27:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r083RbP9095054; Tue, 8 Jan 2013 03:27:37 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r083Rb3N095050; Tue, 8 Jan 2013 03:27:37 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201301080327.r083Rb3N095050@svn.freebsd.org> From: Peter Grehan Date: Tue, 8 Jan 2013 03:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245148 - in head/sys/boot: common userboot/userboot X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2013 03:27:38 -0000 Author: grehan Date: Tue Jan 8 03:27:37 2013 New Revision: 245148 URL: http://svnweb.freebsd.org/changeset/base/245148 Log: Bring in some userboot changes from the bhyve branch to reduce diffs. r238966 Bump up the heap size to 1MB. With a few kernel modules, libstand zalloc and userboot seem to want to use ~600KB of heap space, which results in a segfault when malloc fails in bhyveload. r241180 Clarify comment about default number of FICL dictionary cells. r241153 Allow the number of FICL dictionary cells to be overridden. Loading a 7.3 ISO with userboot/amd64 takes up 10035 cells, overflowing the long-standing default of 10000. Bump userboot's value up to 15000 cells. Reviewed by: dteske (r238966,241180) Obtained from: NetApp Modified: head/sys/boot/common/interp_forth.c head/sys/boot/userboot/userboot/Makefile head/sys/boot/userboot/userboot/main.c Modified: head/sys/boot/common/interp_forth.c ============================================================================== --- head/sys/boot/common/interp_forth.c Tue Jan 8 02:40:20 2013 (r245147) +++ head/sys/boot/common/interp_forth.c Tue Jan 8 03:27:37 2013 (r245148) @@ -51,6 +51,13 @@ extern char bootprog_rev[]; #define BF_PARSE 100 /* + * FreeBSD loader default dictionary cells + */ +#ifndef BF_DICTSIZE +#define BF_DICTSIZE 10000 +#endif + +/* * BootForth Interface to Ficl Forth interpreter. */ @@ -239,8 +246,8 @@ bf_init(void) struct bootblk_command **cmdp; char create_buf[41]; /* 31 characters-long builtins */ int fd; - - bf_sys = ficlInitSystem(10000); /* Default dictionary ~4000 cells */ + + bf_sys = ficlInitSystem(BF_DICTSIZE); bf_vm = ficlNewVM(bf_sys); /* Put all private definitions in a "builtins" vocabulary */ Modified: head/sys/boot/userboot/userboot/Makefile ============================================================================== --- head/sys/boot/userboot/userboot/Makefile Tue Jan 8 02:40:20 2013 (r245147) +++ head/sys/boot/userboot/userboot/Makefile Tue Jan 8 03:27:37 2013 (r245148) @@ -45,6 +45,7 @@ CLEANFILES= vers.c .if ${MK_FORTH} != "no" BOOT_FORTH= yes CFLAGS+= -DBOOT_FORTH -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/i386 +CFLAGS+= -DBF_DICTSIZE=15000 LIBFICL= ${.OBJDIR}/../ficl/libficl.a LIBSTAND= ${.OBJDIR}/../libstand/libstand.a .endif Modified: head/sys/boot/userboot/userboot/main.c ============================================================================== --- head/sys/boot/userboot/userboot/main.c Tue Jan 8 02:40:20 2013 (r245147) +++ head/sys/boot/userboot/userboot/main.c Tue Jan 8 03:27:37 2013 (r245148) @@ -69,7 +69,7 @@ exit(int v) void loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) { - static char malloc[512*1024]; + static char malloc[1024*1024]; const char *var; int i; @@ -85,7 +85,7 @@ loader_main(struct loader_callbacks *cb, * alloc() is usable. The stack is buried inside us, so this is * safe. */ - setheap((void *)malloc, (void *)(malloc + 512*1024)); + setheap((void *)malloc, (void *)(malloc + 1024*1024)); /* * Hook up the console