Changeset View
Changeset View
Standalone View
Standalone View
stable/10/sys/boot/i386/loader/main.c
Show All 37 Lines | |||||
#include <machine/bootinfo.h> | #include <machine/bootinfo.h> | ||||
#include <machine/cpufunc.h> | #include <machine/cpufunc.h> | ||||
#include <machine/psl.h> | #include <machine/psl.h> | ||||
#include <sys/reboot.h> | #include <sys/reboot.h> | ||||
#include "bootstrap.h" | #include "bootstrap.h" | ||||
#include "common/bootargs.h" | #include "common/bootargs.h" | ||||
#include "libi386/libi386.h" | #include "libi386/libi386.h" | ||||
#include "libi386/smbios.h" | |||||
#include "btxv86.h" | #include "btxv86.h" | ||||
#ifdef LOADER_ZFS_SUPPORT | #ifdef LOADER_ZFS_SUPPORT | ||||
#include "../zfs/libzfs.h" | #include "../zfs/libzfs.h" | ||||
#endif | #endif | ||||
CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE); | CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE); | ||||
CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO); | CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO); | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | if (high_heap_base < memtop_copyin) | ||||
} else | } else | ||||
#endif | #endif | ||||
{ | { | ||||
heap_top = (void *)PTOV(bios_basemem); | heap_top = (void *)PTOV(bios_basemem); | ||||
heap_bottom = (void *)end; | heap_bottom = (void *)end; | ||||
} | } | ||||
setheap(heap_bottom, heap_top); | setheap(heap_bottom, heap_top); | ||||
/* | /* | ||||
* XXX Chicken-and-egg problem; we want to have console output early, but some | * XXX Chicken-and-egg problem; we want to have console output early, but some | ||||
* console attributes may depend on reading from eg. the boot device, which we | * console attributes may depend on reading from eg. the boot device, which we | ||||
* can't do yet. | * can't do yet. | ||||
* | * | ||||
* We can use printf() etc. once this is done. | * We can use printf() etc. once this is done. | ||||
* If the previous boot stage has requested a serial console, prefer that. | * If the previous boot stage has requested a serial console, prefer that. | ||||
*/ | */ | ||||
bi_setboothowto(initial_howto); | bi_setboothowto(initial_howto); | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | #endif | ||||
initial_bootinfo->bi_basemem = bios_basemem / 1024; | initial_bootinfo->bi_basemem = bios_basemem / 1024; | ||||
initial_bootinfo->bi_extmem = bios_extmem / 1024; | initial_bootinfo->bi_extmem = bios_extmem / 1024; | ||||
} | } | ||||
/* detect ACPI for future reference */ | /* detect ACPI for future reference */ | ||||
biosacpi_detect(); | biosacpi_detect(); | ||||
/* detect SMBIOS for future reference */ | /* detect SMBIOS for future reference */ | ||||
smbios_detect(); | smbios_detect(NULL); | ||||
printf("\n"); | printf("\n"); | ||||
printf("%s, Revision %s\n", bootprog_name, bootprog_rev); | printf("%s, Revision %s\n", bootprog_name, bootprog_rev); | ||||
printf("(%s, %s)\n", bootprog_maker, bootprog_date); | printf("(%s, %s)\n", bootprog_maker, bootprog_date); | ||||
extract_currdev(); /* set $currdev and $loaddev */ | extract_currdev(); /* set $currdev and $loaddev */ | ||||
setenv("LINES", "24", 1); /* optional */ | setenv("LINES", "24", 1); /* optional */ | ||||
▲ Show 20 Lines • Show All 197 Lines • Show Last 20 Lines |