Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/efi/loader/bootinfo.c
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | |||||
#include <machine/specialreg.h> | #include <machine/specialreg.h> | ||||
#include "framebuffer.h" | #include "framebuffer.h" | ||||
#endif | #endif | ||||
#if defined(LOADER_FDT_SUPPORT) | #if defined(LOADER_FDT_SUPPORT) | ||||
#include <fdt_platform.h> | #include <fdt_platform.h> | ||||
#endif | #endif | ||||
int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); | |||||
extern EFI_SYSTEM_TABLE *ST; | extern EFI_SYSTEM_TABLE *ST; | ||||
static const char howto_switches[] = "aCdrgDmphsv"; | static const char howto_switches[] = "aCdrgDmphsv"; | ||||
static int howto_masks[] = { | static int howto_masks[] = { | ||||
RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, | RB_ASKNAME, RB_CDROM, RB_KDB, RB_DFLTROOT, RB_GDB, RB_MULTIPLE, | ||||
RB_MUTE, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE | RB_MUTE, RB_PAUSE, RB_SERIAL, RB_SINGLE, RB_VERBOSE | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | bi_copyenv(vm_offset_t start) | ||||
vm_offset_t addr, last; | vm_offset_t addr, last; | ||||
size_t len; | size_t len; | ||||
addr = last = start; | addr = last = start; | ||||
/* Traverse the environment. */ | /* Traverse the environment. */ | ||||
for (ep = environ; ep != NULL; ep = ep->ev_next) { | for (ep = environ; ep != NULL; ep = ep->ev_next) { | ||||
len = strlen(ep->ev_name); | len = strlen(ep->ev_name); | ||||
if (archsw.arch_copyin(ep->ev_name, addr, len) != len) | if ((size_t)archsw.arch_copyin(ep->ev_name, addr, len) != len) | ||||
break; | break; | ||||
addr += len; | addr += len; | ||||
if (archsw.arch_copyin("=", addr, 1) != 1) | if (archsw.arch_copyin("=", addr, 1) != 1) | ||||
break; | break; | ||||
addr++; | addr++; | ||||
if (ep->ev_value != NULL) { | if (ep->ev_value != NULL) { | ||||
len = strlen(ep->ev_value); | len = strlen(ep->ev_value); | ||||
if (archsw.arch_copyin(ep->ev_value, addr, len) != len) | if ((size_t)archsw.arch_copyin(ep->ev_value, addr, len) != len) | ||||
break; | break; | ||||
addr += len; | addr += len; | ||||
} | } | ||||
if (archsw.arch_copyin("", addr, 1) != 1) | if (archsw.arch_copyin("", addr, 1) != 1) | ||||
break; | break; | ||||
last = ++addr; | last = ++addr; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 320 Lines • Show Last 20 Lines |