diff options
author | peter <peter@FreeBSD.org> | 2003-05-01 03:56:30 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-05-01 03:56:30 +0000 |
commit | fb5fbfc7506d016ab99e200d10dfe2a433e782be (patch) | |
tree | 3ceb596207b6bc027473320fe17af905c4acd162 /sys/boot/common/load_elf32.c | |
parent | 2eb952c37f826dcc965eb9a74d63cb4374a92f96 (diff) | |
download | FreeBSD-src-fb5fbfc7506d016ab99e200d10dfe2a433e782be.zip FreeBSD-src-fb5fbfc7506d016ab99e200d10dfe2a433e782be.tar.gz |
Enable the i386 loader to load and run an amd64 kernel. If this puts
things over floppy size limits, I can exclude it for release builds or
something like that. Most of the changes are to get the load_elf.c file
into a seperate elf32_ or elf64_ namespace so that you can have two
ELF loaders present at once. Note that for 64 bit kernels, it actually
starts up the kernel already in 64 bit mode with paging enabled. This
is really easy because we have a known minimum feature set.
Of note is that for amd64, we have to pass in the bios int 15 0xe821
memory map because once in long mode, you absolutely cannot make VM86
calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader
metadata startup, just like sparc64 and powerpc. Much of the
infrastructure to support this was adapted from sparc64.
Diffstat (limited to 'sys/boot/common/load_elf32.c')
-rw-r--r-- | sys/boot/common/load_elf32.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/boot/common/load_elf32.c b/sys/boot/common/load_elf32.c new file mode 100644 index 0000000..59b6496 --- /dev/null +++ b/sys/boot/common/load_elf32.c @@ -0,0 +1,3 @@ +/* $FreeBSD$ */ +#define __ELF_WORD_SIZE 32 +#include "load_elf.c" |