summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Grehan <grehan@FreeBSD.org>2013-01-08 03:27:37 +0000
committerPeter Grehan <grehan@FreeBSD.org>2013-01-08 03:27:37 +0000
commitfc1ae0bc4295bf19a4fe4dda24938bd3f81591a6 (patch)
treec6827721e448991218a25e56caf0637363e65860
parentfdf78e782301f86e1a7439569fe5d8c82be566c9 (diff)
Notes
-rw-r--r--sys/boot/common/interp_forth.c11
-rw-r--r--sys/boot/userboot/userboot/Makefile1
-rw-r--r--sys/boot/userboot/userboot/main.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/sys/boot/common/interp_forth.c b/sys/boot/common/interp_forth.c
index b53da434f30a..1c37e2b0bebe 100644
--- a/sys/boot/common/interp_forth.c
+++ b/sys/boot/common/interp_forth.c
@@ -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 */
diff --git a/sys/boot/userboot/userboot/Makefile b/sys/boot/userboot/userboot/Makefile
index bc0a30982737..a4bec5c22e99 100644
--- a/sys/boot/userboot/userboot/Makefile
+++ b/sys/boot/userboot/userboot/Makefile
@@ -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
diff --git a/sys/boot/userboot/userboot/main.c b/sys/boot/userboot/userboot/main.c
index b9b133720e7c..39f6012e16bc 100644
--- a/sys/boot/userboot/userboot/main.c
+++ b/sys/boot/userboot/userboot/main.c
@@ -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