diff options
author | peter <peter@FreeBSD.org> | 1998-10-14 09:53:25 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-10-14 09:53:25 +0000 |
commit | a6df719969080a17590736b9c2f77271ce3858af (patch) | |
tree | 1199302047db29bdcf50591f02e624914c016458 /sys/alpha | |
parent | 7bbde981a39055313c1d18fcc4318f4389f752ad (diff) | |
download | FreeBSD-src-a6df719969080a17590736b9c2f77271ce3858af.zip FreeBSD-src-a6df719969080a17590736b9c2f77271ce3858af.tar.gz |
Initial attempt to update the Alpha loader and kernel to use the machine
independent elf loader and have access to kld modules. Jordan and I were
not sure how to create boot floppies, and the things we tried just made
SRM laugh in our faces - but it was upset at boot1 which was not touched
by these changes. Essentially this has been untested. :-(
What this does is to steal the last three slots from the nine spare longs
in the bootinfo_v1 struct to pass the module base pointer through.
The startup code now to set up and fills in the module and environment
structures, hopefully close enough to the i386 layout to be able to use
the same kernel code. We now pass though the updated end of the kernel
space used, rather than _end. (like the i386).
If this does not work, it needs to be beaten into shape pronto. Otherwise
it should be backed out before 3.0.
Pre-approved in principle by: dfr
Diffstat (limited to 'sys/alpha')
-rw-r--r-- | sys/alpha/alpha/machdep.c | 10 | ||||
-rw-r--r-- | sys/alpha/include/bootinfo.h | 10 |
2 files changed, 17 insertions, 3 deletions
diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 5816af8..6b011f5 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: machdep.c,v 1.14 1998/09/17 09:35:31 dfr Exp $ + * $Id: machdep.c,v 1.15 1998/10/06 08:40:18 dfr Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -109,6 +109,7 @@ #include <sys/exec.h> #include <sys/sysctl.h> #include <sys/uio.h> +#include <sys/linker.h> #include <net/netisr.h> #include <vm/vm.h> #include <vm/vm_kern.h> @@ -542,6 +543,8 @@ alpha_init(pfn, ptb, bim, bip, biv) bootinfo.ssym = v1p->ssym; bootinfo.esym = v1p->esym; + bootinfo.kernend = v1p->kernend; + bootinfo.modptr = v1p->modptr; /* hwrpb may not be provided by boot block in v1 */ if (v1p->hwrpb != NULL) { bootinfo.hwrpb_phys = @@ -695,6 +698,11 @@ alpha_init(pfn, ptb, bim, bip, biv) #else kernend = (vm_offset_t)round_page(_end); #endif + /* But if the bootstrap tells us otherwise, believe it! */ + if (bootinfo.kernend) + kernend = (vm_offset_t)round_page(kernend); + preload_metadata = bootinfo.modptr; + kern_envp = bootinfo.envp; kernstartpfn = atop(ALPHA_K0SEG_TO_PHYS(kernstart)); kernendpfn = atop(ALPHA_K0SEG_TO_PHYS(kernend)); diff --git a/sys/alpha/include/bootinfo.h b/sys/alpha/include/bootinfo.h index 970987d..f9b2560 100644 --- a/sys/alpha/include/bootinfo.h +++ b/sys/alpha/include/bootinfo.h @@ -1,4 +1,4 @@ -/* $Id$ */ +/* $Id: bootinfo.h,v 1.2 1998/07/05 12:13:18 dfr Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. * All rights reserved. @@ -53,7 +53,10 @@ struct bootinfo_v1 { int (*cngetc) __P((void)); /* 160: console getc pointer */ void (*cnputc) __P((int)); /* 168: console putc pointer */ void (*cnpollc) __P((int)); /* 176: console pollc pointer */ - u_long pad[9]; /* 184: rsvd for future use */ + u_long pad[6]; /* 184: rsvd for future use */ + char *envp; /* 232: start of environment */ + u_long kernend; /* 240: end of kernel */ + u_long modbase; /* 248: FreeBSD module base */ /* 256: total size */ }; @@ -70,6 +73,9 @@ struct bootinfo_v1 { struct bootinfo_kernel { u_long ssym; /* start of syms */ u_long esym; /* end of syms */ + u_long modptr; /* FreeBSD module pointer */ + u_long kernend; /* "end of kernel" from boot code */ + char *envp; /* "end of kernel" from boot code */ u_long hwrpb_phys; /* hwrpb physical address */ u_long hwrpb_size; /* size of hwrpb data */ char boot_flags[64]; /* boot flags */ |