bootstrap.h (78195) | bootstrap.h (83321) |
---|---|
1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1998 Michael Smith <msmith@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/boot/common/bootstrap.h 78195 2001-06-14 01:23:57Z peter $ | 26 * $FreeBSD: head/sys/boot/common/bootstrap.h 83321 2001-09-11 01:09:24Z peter $ |
27 */ 28 29#include <sys/types.h> 30#include <sys/queue.h> 31#include <sys/linker_set.h> 32 33/* 34 * Generic device specifier; architecture-dependant --- 133 unchanged lines hidden (view full) --- 168{ 169 size_t md_size; 170 u_int16_t md_type; 171 struct file_metadata *md_next; 172 char md_data[1]; /* data are immediately appended */ 173}; 174 175struct preloaded_file; | 27 */ 28 29#include <sys/types.h> 30#include <sys/queue.h> 31#include <sys/linker_set.h> 32 33/* 34 * Generic device specifier; architecture-dependant --- 133 unchanged lines hidden (view full) --- 168{ 169 size_t md_size; 170 u_int16_t md_type; 171 struct file_metadata *md_next; 172 char md_data[1]; /* data are immediately appended */ 173}; 174 175struct preloaded_file; |
176struct mod_depend; |
|
176 177struct kernel_module 178{ 179 char *m_name; /* module name */ | 177 178struct kernel_module 179{ 180 char *m_name; /* module name */ |
181 int m_version; /* module version */ |
|
180/* char *m_args;*/ /* arguments for the module */ 181 struct preloaded_file *m_fp; 182 struct kernel_module *m_next; 183}; 184 185/* 186 * Preloaded file information. Depending on type, file can contain 187 * additional units called 'modules'. --- 22 unchanged lines hidden (view full) --- 210 int (* l_load)(char *filename, vm_offset_t dest, struct preloaded_file **result); 211 /* Only a loader that will load a kernel (first module) should have an exec handler */ 212 int (* l_exec)(struct preloaded_file *mp); 213}; 214 215extern struct file_format *file_formats[]; /* supplied by consumer */ 216extern struct preloaded_file *preloaded_files; 217 | 182/* char *m_args;*/ /* arguments for the module */ 183 struct preloaded_file *m_fp; 184 struct kernel_module *m_next; 185}; 186 187/* 188 * Preloaded file information. Depending on type, file can contain 189 * additional units called 'modules'. --- 22 unchanged lines hidden (view full) --- 212 int (* l_load)(char *filename, vm_offset_t dest, struct preloaded_file **result); 213 /* Only a loader that will load a kernel (first module) should have an exec handler */ 214 int (* l_exec)(struct preloaded_file *mp); 215}; 216 217extern struct file_format *file_formats[]; /* supplied by consumer */ 218extern struct preloaded_file *preloaded_files; 219 |
218int mod_load(char *name, int argc, char *argv[]); | 220int mod_load(char *name, struct mod_depend *verinfo, int argc, char *argv[]); |
219int mod_loadobj(char *type, char *name); | 221int mod_loadobj(char *type, char *name); |
222int mod_loadkld(const char *name, int argc, char *argv[]); |
|
220 221struct preloaded_file *file_alloc(void); 222struct preloaded_file *file_findfile(char *name, char *type); 223struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); 224void file_discard(struct preloaded_file *fp); 225void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); | 223 224struct preloaded_file *file_alloc(void); 225struct preloaded_file *file_findfile(char *name, char *type); 226struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); 227void file_discard(struct preloaded_file *fp); 228void file_addmetadata(struct preloaded_file *fp, int type, size_t size, void *p); |
226int file_addmodule(struct preloaded_file *fp, char *modname, | 229int file_addmodule(struct preloaded_file *fp, char *modname, int version, |
227 struct kernel_module **newmp); 228 229 230/* MI module loaders */ 231int aout_loadfile(char *filename, vm_offset_t dest, struct preloaded_file **result); 232vm_offset_t aout_findsym(char *name, struct preloaded_file *fp); 233 234int elf_loadfile(char *filename, vm_offset_t dest, struct preloaded_file **result); --- 49 unchanged lines hidden --- | 230 struct kernel_module **newmp); 231 232 233/* MI module loaders */ 234int aout_loadfile(char *filename, vm_offset_t dest, struct preloaded_file **result); 235vm_offset_t aout_findsym(char *name, struct preloaded_file *fp); 236 237int elf_loadfile(char *filename, vm_offset_t dest, struct preloaded_file **result); --- 49 unchanged lines hidden --- |