summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/bootstrap.h
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-05-01 03:56:30 +0000
committerpeter <peter@FreeBSD.org>2003-05-01 03:56:30 +0000
commitfb5fbfc7506d016ab99e200d10dfe2a433e782be (patch)
tree3ceb596207b6bc027473320fe17af905c4acd162 /sys/boot/common/bootstrap.h
parent2eb952c37f826dcc965eb9a74d63cb4374a92f96 (diff)
downloadFreeBSD-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/bootstrap.h')
-rw-r--r--sys/boot/common/bootstrap.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/boot/common/bootstrap.h b/sys/boot/common/bootstrap.h
index d7a95a7..6e17be7 100644
--- a/sys/boot/common/bootstrap.h
+++ b/sys/boot/common/bootstrap.h
@@ -210,7 +210,7 @@ struct preloaded_file
struct file_format
{
/* Load function must return EFTYPE if it can't handle the module supplied */
- int (* l_load)(char *filename, vm_offset_t dest, struct preloaded_file **result);
+ int (* l_load)(char *filename, u_int64_t dest, struct preloaded_file **result);
/* Only a loader that will load a kernel (first module) should have an exec handler */
int (* l_exec)(struct preloaded_file *mp);
};
@@ -231,7 +231,9 @@ int file_addmodule(struct preloaded_file *fp, char *modname, int version,
/* MI module loaders */
-int elf_loadfile(char *filename, vm_offset_t dest, struct preloaded_file **result);
+#ifdef __elfN
+int __elfN(loadfile)(char *filename, u_int64_t dest, struct preloaded_file **result);
+#endif
/*
* Support for commands
OpenPOWER on IntegriCloud