Deleted Added
full compact
bootinfo.c (47727) bootinfo.c (48083)
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 * $Id: bootinfo.c,v 1.18 1999/03/18 14:36:22 dcs Exp $
26 * $Id: bootinfo.c,v 1.19 1999/06/04 03:18:28 ghelmer Exp $
27 */
28
29#include <stand.h>
30#include <sys/param.h>
31#include <sys/reboot.h>
32#include <sys/linker.h>
33#include <machine/bootinfo.h>
34#include "bootstrap.h"

--- 199 unchanged lines hidden (view full) ---

234 */
235int
236bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip)
237{
238 struct loaded_module *xp;
239 struct i386_devdesc *rootdev;
240 vm_offset_t addr, bootinfo_addr;
241 char *rootdevname;
27 */
28
29#include <stand.h>
30#include <sys/param.h>
31#include <sys/reboot.h>
32#include <sys/linker.h>
33#include <machine/bootinfo.h>
34#include "bootstrap.h"

--- 199 unchanged lines hidden (view full) ---

234 */
235int
236bi_load(char *args, int *howtop, int *bootdevp, vm_offset_t *bip)
237{
238 struct loaded_module *xp;
239 struct i386_devdesc *rootdev;
240 vm_offset_t addr, bootinfo_addr;
241 char *rootdevname;
242 int bootdevnr;
242 int bootdevnr, i;
243 u_int pad;
244 char *kernelname;
245 const char *kernelpath;
246
247 *howtop = bi_getboothowto(args);
248
249 /*
250 * Allow the environment variable 'rootdev' to override the supplied device

--- 23 unchanged lines hidden (view full) ---

274 free(rootdev);
275 *bootdevp = bootdevnr;
276
277 /* legacy bootinfo structure */
278 bi.bi_version = BOOTINFO_VERSION;
279 bi.bi_kernelname = 0; /* XXX char * -> kernel name */
280 bi.bi_nfs_diskless = 0; /* struct nfs_diskless * */
281 bi.bi_n_bios_used = 0; /* XXX would have to hook biosdisk driver for these */
243 u_int pad;
244 char *kernelname;
245 const char *kernelpath;
246
247 *howtop = bi_getboothowto(args);
248
249 /*
250 * Allow the environment variable 'rootdev' to override the supplied device

--- 23 unchanged lines hidden (view full) ---

274 free(rootdev);
275 *bootdevp = bootdevnr;
276
277 /* legacy bootinfo structure */
278 bi.bi_version = BOOTINFO_VERSION;
279 bi.bi_kernelname = 0; /* XXX char * -> kernel name */
280 bi.bi_nfs_diskless = 0; /* struct nfs_diskless * */
281 bi.bi_n_bios_used = 0; /* XXX would have to hook biosdisk driver for these */
282 /* bi.bi_bios_geom[] */
282 for (i = 0; i < N_BIOS_GEOM; i++)
283 bi.bi_bios_geom[i] = bd_getbigeom(i);
283 bi.bi_size = sizeof(bi);
284 bi.bi_memsizes_valid = 1;
285 bi.bi_basemem = getbasemem();
286 bi.bi_extmem = getextmem();
287
288 /* find the last module in the chain */
289 addr = 0;
290 for (xp = mod_findmodule(NULL, NULL); xp != NULL; xp = xp->m_next) {

--- 39 unchanged lines hidden ---
284 bi.bi_size = sizeof(bi);
285 bi.bi_memsizes_valid = 1;
286 bi.bi_basemem = getbasemem();
287 bi.bi_extmem = getextmem();
288
289 /* find the last module in the chain */
290 addr = 0;
291 for (xp = mod_findmodule(NULL, NULL); xp != NULL; xp = xp->m_next) {

--- 39 unchanged lines hidden ---