main.c (136891) | main.c (146011) |
---|---|
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 --- 11 unchanged lines hidden (view full) --- 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 27#include <sys/cdefs.h> | 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 --- 11 unchanged lines hidden (view full) --- 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 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/boot/pc98/loader/main.c 136891 2004-10-24 12:15:07Z nyan $"); | 28__FBSDID("$FreeBSD: head/sys/boot/pc98/loader/main.c 146011 2005-05-08 14:17:28Z nyan $"); |
29 30/* 31 * MD bootstrap main() and assorted miscellaneous 32 * commands. 33 */ 34 35#include <stand.h> 36#include <string.h> --- 95 unchanged lines hidden (view full) --- 132 if (devsw[i]->dv_init != NULL) 133 (devsw[i]->dv_init)(); 134 printf("BIOS %dkB/%dkB available memory\n", bios_basemem / 1024, bios_extmem / 1024); 135 if (initial_bootinfo != NULL) { 136 initial_bootinfo->bi_basemem = bios_basemem / 1024; 137 initial_bootinfo->bi_extmem = bios_extmem / 1024; 138 } 139 | 29 30/* 31 * MD bootstrap main() and assorted miscellaneous 32 * commands. 33 */ 34 35#include <stand.h> 36#include <string.h> --- 95 unchanged lines hidden (view full) --- 132 if (devsw[i]->dv_init != NULL) 133 (devsw[i]->dv_init)(); 134 printf("BIOS %dkB/%dkB available memory\n", bios_basemem / 1024, bios_extmem / 1024); 135 if (initial_bootinfo != NULL) { 136 initial_bootinfo->bi_basemem = bios_basemem / 1024; 137 initial_bootinfo->bi_extmem = bios_extmem / 1024; 138 } 139 |
140#ifndef PC98 141 /* detect ACPI for future reference */ 142 biosacpi_detect(); 143#endif 144 | |
145 printf("\n"); 146 printf("%s, Revision %s\n", bootprog_name, bootprog_rev); 147 printf("(%s, %s)\n", bootprog_maker, bootprog_date); 148 149 extract_currdev(); /* set $currdev and $loaddev */ 150 setenv("LINES", "24", 1); /* optional */ 151 152 archsw.arch_autoload = i386_autoload; --- 54 unchanged lines hidden (view full) --- 207 major = B_TYPE(initial_bootdev); 208 209 /* 210 * If we are booted by an old bootstrap, we have to guess at the BIOS 211 * unit number. We will loose if there is more than one disk type 212 * and we are not booting from the lowest-numbered disk type 213 * (ie. SCSI when IDE also exists). 214 */ | 140 printf("\n"); 141 printf("%s, Revision %s\n", bootprog_name, bootprog_rev); 142 printf("(%s, %s)\n", bootprog_maker, bootprog_date); 143 144 extract_currdev(); /* set $currdev and $loaddev */ 145 setenv("LINES", "24", 1); /* optional */ 146 147 archsw.arch_autoload = i386_autoload; --- 54 unchanged lines hidden (view full) --- 202 major = B_TYPE(initial_bootdev); 203 204 /* 205 * If we are booted by an old bootstrap, we have to guess at the BIOS 206 * unit number. We will loose if there is more than one disk type 207 * and we are not booting from the lowest-numbered disk type 208 * (ie. SCSI when IDE also exists). 209 */ |
215#ifdef PC98 | |
216 if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) { /* biosdev doesn't match major */ 217 if (B_TYPE(initial_bootdev) == 6) 218 biosdev = 0x30 + B_UNIT(initial_bootdev); 219 else 220 biosdev = (major << 3) + 0x80 + B_UNIT(initial_bootdev); 221 } | 210 if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) { /* biosdev doesn't match major */ 211 if (B_TYPE(initial_bootdev) == 6) 212 biosdev = 0x30 + B_UNIT(initial_bootdev); 213 else 214 biosdev = (major << 3) + 0x80 + B_UNIT(initial_bootdev); 215 } |
222#else 223 if ((biosdev == 0) && (B_TYPE(initial_bootdev) != 2)) /* biosdev doesn't match major */ 224 biosdev = 0x80 + B_UNIT(initial_bootdev); /* assume harddisk */ 225#endif | |
226 } 227 new_currdev.d_type = new_currdev.d_dev->dv_type; 228 229 /* 230 * If we are booting off of a BIOS disk and we didn't succeed in determining 231 * which one we booted off of, just use disk0: as a reasonable default. 232 */ 233 if ((new_currdev.d_type == biosdisk.dv_type) && --- 74 unchanged lines hidden --- | 216 } 217 new_currdev.d_type = new_currdev.d_dev->dv_type; 218 219 /* 220 * If we are booting off of a BIOS disk and we didn't succeed in determining 221 * which one we booted off of, just use disk0: as a reasonable default. 222 */ 223 if ((new_currdev.d_type == biosdisk.dv_type) && --- 74 unchanged lines hidden --- |