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
This commit is contained in:
parent
fdf78e7823
commit
fc1ae0bc42
@ -50,6 +50,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 */
|
||||
|
@ -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
|
||||
|
@ -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, void *arg, int version, int ndisks)
|
||||
* 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user