Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/loader/main.c
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | out: | ||||
free(hin); | free(hin); | ||||
return retval; | return retval; | ||||
} | } | ||||
static void | static void | ||||
set_currdev(const char *devname) | set_currdev(const char *devname) | ||||
{ | { | ||||
env_setenv("currdev", EV_VOLATILE, devname, efi_setcurrdev, | |||||
env_nounset); | |||||
/* | /* | ||||
* Don't execute hooks here; we may need to try setting these more than | * Don't execute hook here;the loaddev hook makes it immutable | ||||
* once here if we're probing for the ZFS pool we're supposed to boot. | * once we've determined what the proper currdev is. | ||||
* The currdev hook is intended to just validate user input anyways, | |||||
* while the loaddev hook makes it immutable once we've determined what | |||||
* the proper currdev is. | |||||
*/ | */ | ||||
env_setenv("currdev", EV_VOLATILE | EV_NOHOOK, devname, efi_setcurrdev, | |||||
env_nounset); | |||||
env_setenv("loaddev", EV_VOLATILE | EV_NOHOOK, devname, env_noset, | env_setenv("loaddev", EV_VOLATILE | EV_NOHOOK, devname, env_noset, | ||||
env_nounset); | env_nounset); | ||||
} | } | ||||
static void | static void | ||||
set_currdev_devdesc(struct devdesc *currdev) | set_currdev_devdesc(struct devdesc *currdev) | ||||
{ | { | ||||
const char *devname; | const char *devname; | ||||
▲ Show 20 Lines • Show All 745 Lines • ▼ Show 20 Lines | #endif | ||||
*/ | */ | ||||
setenv("console", "efi", 1); | setenv("console", "efi", 1); | ||||
uhowto = parse_uefi_con_out(); | uhowto = parse_uefi_con_out(); | ||||
#if defined(__aarch64__) || defined(__arm__) || defined(__riscv) | #if defined(__aarch64__) || defined(__arm__) || defined(__riscv) | ||||
if ((uhowto & RB_SERIAL) != 0) | if ((uhowto & RB_SERIAL) != 0) | ||||
setenv("console", "comconsole", 1); | setenv("console", "comconsole", 1); | ||||
#endif | #endif | ||||
cons_probe(); | cons_probe(); | ||||
/* Set up currdev variable to have hooks in place. */ | |||||
env_setenv("currdev", EV_VOLATILE, "", efi_setcurrdev, env_nounset); | |||||
/* Init the time source */ | /* Init the time source */ | ||||
efi_time_init(); | efi_time_init(); | ||||
/* | /* | ||||
* Initialise the block cache. Set the upper limit. | * Initialise the block cache. Set the upper limit. | ||||
*/ | */ | ||||
bcache_init(32768, 512); | bcache_init(32768, 512); | ||||
▲ Show 20 Lines • Show All 693 Lines • Show Last 20 Lines |