main.c (58713) | main.c (59087) |
---|---|
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/i386/loader/main.c 58713 2000-03-28 01:19:53Z jhb $ | 26 * $FreeBSD: head/sys/boot/i386/loader/main.c 59087 2000-04-08 01:22:14Z ps $ |
27 */ 28 29/* 30 * MD bootstrap main() and assorted miscellaneous 31 * commands. 32 */ 33 34#include <stand.h> --- 30 unchanged lines hidden (view full) --- 65static void isa_outb(int port, int value); 66 67/* from vers.c */ 68extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; 69 70/* XXX debugging */ 71extern char end[]; 72 | 27 */ 28 29/* 30 * MD bootstrap main() and assorted miscellaneous 31 * commands. 32 */ 33 34#include <stand.h> --- 30 unchanged lines hidden (view full) --- 65static void isa_outb(int port, int value); 66 67/* from vers.c */ 68extern char bootprog_name[], bootprog_rev[], bootprog_date[], bootprog_maker[]; 69 70/* XXX debugging */ 71extern char end[]; 72 |
73/* XXX - I dont know why we have to do this, but it helps. */ 74#if defined(LOADER_NFS_SUPPORT) || defined(LOADER_TFTP_SUPPORT) 75char Heap[200*1024]; 76#endif 77 |
|
73void 74main(void) 75{ 76 int i; 77 78 /* Pick up arguments */ 79 kargs = (void *)__args; 80 initial_howto = kargs->howto; 81 initial_bootdev = kargs->bootdev; 82 initial_bootinfo = kargs->bootinfo ? (struct bootinfo *)PTOV(kargs->bootinfo) : NULL; 83 84 /* 85 * Initialise the heap as early as possible. Once this is done, malloc() is usable. 86 */ 87 bios_getmem(); | 78void 79main(void) 80{ 81 int i; 82 83 /* Pick up arguments */ 84 kargs = (void *)__args; 85 initial_howto = kargs->howto; 86 initial_bootdev = kargs->bootdev; 87 initial_bootinfo = kargs->bootinfo ? (struct bootinfo *)PTOV(kargs->bootinfo) : NULL; 88 89 /* 90 * Initialise the heap as early as possible. Once this is done, malloc() is usable. 91 */ 92 bios_getmem(); |
93 94 /* XXX - I dont know why we have to do this, but it helps PXE. */ 95#if defined(LOADER_NFS_SUPPORT) || defined(LOADER_TFTP_SUPPORT) 96 setheap(Heap, Heap+sizeof(Heap)); 97#else |
|
88 setheap((void *)end, (void *)bios_basemem); | 98 setheap((void *)end, (void *)bios_basemem); |
99#endif |
|
89 90 /* 91 * XXX Chicken-and-egg problem; we want to have console output early, but some 92 * console attributes may depend on reading from eg. the boot device, which we 93 * can't do yet. 94 * 95 * We can use printf() etc. once this is done. 96 * If the previous boot stage has requested a serial console, prefer that. --- 173 unchanged lines hidden --- | 100 101 /* 102 * XXX Chicken-and-egg problem; we want to have console output early, but some 103 * console attributes may depend on reading from eg. the boot device, which we 104 * can't do yet. 105 * 106 * We can use printf() etc. once this is done. 107 * If the previous boot stage has requested a serial console, prefer that. --- 173 unchanged lines hidden --- |