diff options
author | msmith <msmith@FreeBSD.org> | 1998-09-14 18:27:06 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 1998-09-14 18:27:06 +0000 |
commit | 97d5b830761c0a62490a16c2f4942930afcbba94 (patch) | |
tree | 9b227328959ed217910f704d659822fa67002976 /sys/boot/i386/libi386/bootinfo.c | |
parent | 34e8f6424cbf5128e7dc3149486965dd4e17c6fe (diff) | |
download | FreeBSD-src-97d5b830761c0a62490a16c2f4942930afcbba94.zip FreeBSD-src-97d5b830761c0a62490a16c2f4942930afcbba94.tar.gz |
Resynch with working sources before BTX integration.
- Use format-independant module allocator.
- Conditionalise ISA PnP support.
- Simplify PnP enumerator interface.
- Improve module/object searching.
- Add missing depend/install targets in BTX makefiles.
- Pass the kernel environment and module data in extended bootinfo fields.
- Add a pointer to the end of the kernel + modules in bootinfo.
- Fix parsing of old-style kernel arguments.
Diffstat (limited to 'sys/boot/i386/libi386/bootinfo.c')
-rw-r--r-- | sys/boot/i386/libi386/bootinfo.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/boot/i386/libi386/bootinfo.c b/sys/boot/i386/libi386/bootinfo.c index 041ccb8..02d217b 100644 --- a/sys/boot/i386/libi386/bootinfo.c +++ b/sys/boot/i386/libi386/bootinfo.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bootinfo.c,v 1.1.1.1 1998/08/21 03:17:41 msmith Exp $ + * $Id: bootinfo.c,v 1.2 1998/09/03 02:10:09 msmith Exp $ */ #include <sys/reboot.h> @@ -57,6 +57,7 @@ bi_getboothowto(char *kargs) int active; int i; + /* Parse kargs */ howto = 0; if (kargs != NULL) { cp = kargs; @@ -94,9 +95,11 @@ bi_getboothowto(char *kargs) active = 0; break; } + active = 0; + cp++; } - cp++; } + /* get equivalents from the environment */ for (i = 0; howto_names[i].ev != NULL; i++) if (getenv(howto_names[i].ev) != NULL) howto |= howto_names[i].mask; @@ -137,7 +140,7 @@ bi_copyenv(vm_offset_t addr) * used as a directory for loaded modules. * * Module data is presented in a self-describing format. Each datum - * is preceeded by a 16-bit identifier and a 16-bit size field. + * is preceeded by a 32-bit identifier and a 32-bit size field. * * Currently, the following data are saved: * @@ -177,6 +180,14 @@ bi_copyenv(vm_offset_t addr) a += mm->md_size; \ } +#define MOD_END(a) { \ + u_int32_t ident = 0; \ + vpbcopy(&ident, a, sizeof(ident)); \ + a += sizeof(ident); \ + vpbcopy(&ident, a, sizeof(ident)); \ + a += sizeof(ident); \ +} + vm_offset_t bi_copymodules(vm_offset_t addr) { @@ -186,7 +197,7 @@ bi_copymodules(vm_offset_t addr) /* start with the first module on the list, should be the kernel */ for (mp = mod_findmodule(NULL, NULL); mp != NULL; mp = mp->m_next) { - MOD_NAME(addr, mp->m_name); + MOD_NAME(addr, mp->m_name); /* this field must come first */ MOD_TYPE(addr, mp->m_type); MOD_ADDR(addr, mp->m_addr); MOD_SIZE(addr, mp->m_size); @@ -194,5 +205,6 @@ bi_copymodules(vm_offset_t addr) if (!(md->md_type & MODINFOMD_NOCOPY)) MOD_METADATA(addr, md); } + MOD_END(addr); return(addr); } |