aboutsummaryrefslogtreecommitdiff
path: root/sys/boot/arc
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2003-05-01 03:56:30 +0000
committerPeter Wemm <peter@FreeBSD.org>2003-05-01 03:56:30 +0000
commit48a0b96a508aece7c0260b0ba4e98b47c206af44 (patch)
tree3ceb596207b6bc027473320fe17af905c4acd162 /sys/boot/arc
parentab7b0ae578c4ced40414f23fa55badeea27a350d (diff)
downloadsrc-48a0b96a508aece7c0260b0ba4e98b47c206af44.tar.gz
src-48a0b96a508aece7c0260b0ba4e98b47c206af44.zip
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.
Notes
Notes: svn path=/head/; revision=114379
Diffstat (limited to 'sys/boot/arc')
-rw-r--r--sys/boot/arc/lib/elf_freebsd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/boot/arc/lib/elf_freebsd.c b/sys/boot/arc/lib/elf_freebsd.c
index 994a78714bbf..41cdedb24811 100644
--- a/sys/boot/arc/lib/elf_freebsd.c
+++ b/sys/boot/arc/lib/elf_freebsd.c
@@ -90,16 +90,16 @@
#define _KERNEL
-static int elf_exec(struct preloaded_file *amp);
+static int elf64_exec(struct preloaded_file *amp);
int bi_load(struct bootinfo_v1 *, vm_offset_t *,
struct preloaded_file *);
-struct file_format alpha_elf = { elf_loadfile, elf_exec };
+struct file_format alpha_elf = { elf64_loadfile, elf64_exec };
vm_offset_t ffp_save, ptbr_save;
static int
-elf_exec(struct preloaded_file *fp)
+elf64_exec(struct preloaded_file *fp)
{
#if 0
static struct bootinfo_v1 bootinfo_v1;