Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/loader/arch/amd64/elf64_freebsd.c
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | |||||
#include "actypes.h" | #include "actypes.h" | ||||
#include "actbl.h" | #include "actbl.h" | ||||
#include "loader_efi.h" | #include "loader_efi.h" | ||||
static EFI_GUID acpi_guid = ACPI_TABLE_GUID; | static EFI_GUID acpi_guid = ACPI_TABLE_GUID; | ||||
static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; | static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; | ||||
extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp); | extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, | ||||
bool exit_bs); | |||||
static int elf64_exec(struct preloaded_file *amp); | static int elf64_exec(struct preloaded_file *amp); | ||||
static int elf64_obj_exec(struct preloaded_file *amp); | static int elf64_obj_exec(struct preloaded_file *amp); | ||||
static struct file_format amd64_elf = { | static struct file_format amd64_elf = { | ||||
.l_load = elf64_loadfile, | .l_load = elf64_loadfile, | ||||
.l_exec = elf64_exec, | .l_exec = elf64_exec, | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | for (i = 0; i < 512; i++) { | ||||
/* The L2 page slots are mapped with 2MB pages for 1GB. */ | /* The L2 page slots are mapped with 2MB pages for 1GB. */ | ||||
PT2[i] = i * (2 * 1024 * 1024); | PT2[i] = i * (2 * 1024 * 1024); | ||||
PT2[i] |= PG_V | PG_RW | PG_PS; | PT2[i] |= PG_V | PG_RW | PG_PS; | ||||
} | } | ||||
printf("Start @ 0x%lx ...\n", ehdr->e_entry); | printf("Start @ 0x%lx ...\n", ehdr->e_entry); | ||||
efi_time_fini(); | efi_time_fini(); | ||||
err = bi_load(fp->f_args, &modulep, &kernend); | err = bi_load(fp->f_args, &modulep, &kernend, true); | ||||
if (err != 0) { | if (err != 0) { | ||||
efi_time_init(); | efi_time_init(); | ||||
return(err); | return(err); | ||||
} | } | ||||
dev_cleanup(); | dev_cleanup(); | ||||
trampoline(trampstack, efi_copy_finish, kernend, modulep, PT4, | trampoline(trampstack, efi_copy_finish, kernend, modulep, PT4, | ||||
Show All 11 Lines |