Changeset View
Changeset View
Standalone View
Standalone View
head/sys/amd64/amd64/elf_machdep.c
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | struct sysentvec elf64_freebsd_sysvec = { | ||||
.sv_shared_page_base = SHAREDPAGE, | .sv_shared_page_base = SHAREDPAGE, | ||||
.sv_shared_page_len = PAGE_SIZE, | .sv_shared_page_len = PAGE_SIZE, | ||||
.sv_schedtail = NULL, | .sv_schedtail = NULL, | ||||
.sv_thread_detach = NULL, | .sv_thread_detach = NULL, | ||||
.sv_trap = NULL, | .sv_trap = NULL, | ||||
}; | }; | ||||
INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); | INIT_SYSENTVEC(elf64_sysvec, &elf64_freebsd_sysvec); | ||||
void | |||||
amd64_lower_shared_page(struct sysentvec *sv) | |||||
{ | |||||
if (hw_lower_amd64_sharedpage != 0) { | |||||
sv->sv_maxuser -= PAGE_SIZE; | |||||
sv->sv_shared_page_base -= PAGE_SIZE; | |||||
sv->sv_usrstack -= PAGE_SIZE; | |||||
sv->sv_psstrings -= PAGE_SIZE; | |||||
} | |||||
} | |||||
/* | |||||
* Do this fixup before INIT_SYSENTVEC (SI_ORDER_ANY) because the latter | |||||
* uses the value of sv_shared_page_base. | |||||
*/ | |||||
SYSINIT(elf64_sysvec_fixup, SI_SUB_EXEC, SI_ORDER_FIRST, | |||||
(sysinit_cfunc_t) amd64_lower_shared_page, | |||||
&elf64_freebsd_sysvec); | |||||
static Elf64_Brandinfo freebsd_brand_info = { | static Elf64_Brandinfo freebsd_brand_info = { | ||||
.brand = ELFOSABI_FREEBSD, | .brand = ELFOSABI_FREEBSD, | ||||
.machine = EM_X86_64, | .machine = EM_X86_64, | ||||
.compat_3_brand = "FreeBSD", | .compat_3_brand = "FreeBSD", | ||||
.emul_path = NULL, | .emul_path = NULL, | ||||
.interp_path = "/libexec/ld-elf.so.1", | .interp_path = "/libexec/ld-elf.so.1", | ||||
.sysvec = &elf64_freebsd_sysvec, | .sysvec = &elf64_freebsd_sysvec, | ||||
.interp_newpath = NULL, | .interp_newpath = NULL, | ||||
▲ Show 20 Lines • Show All 203 Lines • Show Last 20 Lines |