mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-01 04:12:51 +00:00
The FreeBSD bootloader loads the kernel at the a_entry address in the
kernel a.out file, meaning that this is where the kernel starts. (not at KERNBASE) - KERNBASE is 0xf0000000, while the kernel loads at 0xf0100000 Reviewed by:
This commit is contained in:
parent
1f80968a0b
commit
408dc3832a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1795
@ -136,7 +136,18 @@ create_knlist(name, db)
|
||||
if (strcmp((char *)key.data, VRS_SYM) == 0) {
|
||||
long cur_off, voff;
|
||||
#ifndef KERNTEXTOFF
|
||||
/*
|
||||
* XXX
|
||||
* The FreeBSD bootloader loads the kernel at the a_entry address, meaning
|
||||
* that this is where the kernel starts. (not at KERNBASE)
|
||||
*
|
||||
* This may be introducing an i386 dependency.
|
||||
*/
|
||||
#if defined(__FreeBSD__)
|
||||
#define KERNTEXTOFF ebuf.a_entry
|
||||
#else
|
||||
#define KERNTEXTOFF KERNBASE
|
||||
#endif
|
||||
#endif
|
||||
/*
|
||||
* Calculate offset relative to a normal (non-kernel)
|
||||
|
Loading…
Reference in New Issue
Block a user