Changeset View
Changeset View
Standalone View
Standalone View
head/sys/boot/userboot/userboot/main.c
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | |||||
/* Minimum version required */ | /* Minimum version required */ | ||||
#define USERBOOT_VERSION USERBOOT_VERSION_3 | #define USERBOOT_VERSION USERBOOT_VERSION_3 | ||||
#define MALLOCSZ (64*1024*1024) | #define MALLOCSZ (64*1024*1024) | ||||
struct loader_callbacks *callbacks; | struct loader_callbacks *callbacks; | ||||
void *callbacks_arg; | void *callbacks_arg; | ||||
extern char bootprog_name[]; | extern char bootprog_info[]; | ||||
extern char bootprog_rev[]; | |||||
extern char bootprog_date[]; | |||||
extern char bootprog_maker[]; | |||||
static jmp_buf jb; | static jmp_buf jb; | ||||
struct arch_switch archsw; /* MI/MD interface boundary */ | struct arch_switch archsw; /* MI/MD interface boundary */ | ||||
static void extract_currdev(void); | static void extract_currdev(void); | ||||
void | void | ||||
delay(int usec) | delay(int usec) | ||||
Show All 30 Lines | loader_main(struct loader_callbacks *cb, void *arg, int version, int ndisks) | ||||
*/ | */ | ||||
setheap((void *)mallocbuf, (void *)(mallocbuf + sizeof(mallocbuf))); | setheap((void *)mallocbuf, (void *)(mallocbuf + sizeof(mallocbuf))); | ||||
/* | /* | ||||
* Hook up the console | * Hook up the console | ||||
*/ | */ | ||||
cons_probe(); | cons_probe(); | ||||
printf("\n"); | printf("\n%s", bootprog_info); | ||||
printf("%s, Revision %s\n", bootprog_name, bootprog_rev); | |||||
printf("(%s, %s)\n", bootprog_maker, bootprog_date); | |||||
#if 0 | #if 0 | ||||
printf("Memory: %ld k\n", memsize() / 1024); | printf("Memory: %ld k\n", memsize() / 1024); | ||||
#endif | #endif | ||||
setenv("LINES", "24", 1); /* optional */ | setenv("LINES", "24", 1); /* optional */ | ||||
/* | /* | ||||
* Set custom environment variables | * Set custom environment variables | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |