Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/powerpc/elf64_machdep.c
Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
#include <sys/smp.h> | #include <sys/smp.h> | ||||
#include <sys/syscall.h> | #include <sys/syscall.h> | ||||
#include <sys/signalvar.h> | #include <sys/signalvar.h> | ||||
#include <sys/vnode.h> | #include <sys/vnode.h> | ||||
#include <sys/linker.h> | #include <sys/linker.h> | ||||
#include <vm/vm.h> | #include <vm/vm.h> | ||||
#include <vm/vm_param.h> | #include <vm/vm_param.h> | ||||
#include <vm/pmap.h> | |||||
#include <vm/vm_map.h> | |||||
#include <machine/altivec.h> | #include <machine/altivec.h> | ||||
#include <machine/cpu.h> | #include <machine/cpu.h> | ||||
#include <machine/fpu.h> | #include <machine/fpu.h> | ||||
#include <machine/elf.h> | #include <machine/elf.h> | ||||
#include <machine/md_var.h> | #include <machine/md_var.h> | ||||
#include <powerpc/powerpc/elf_common.c> | #include <powerpc/powerpc/elf_common.c> | ||||
▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | ppc64_init_sysvecs(void *arg) | ||||
exec_sysvec_init(&elf64_freebsd_sysvec_v2); | exec_sysvec_init(&elf64_freebsd_sysvec_v2); | ||||
exec_sysvec_init_secondary(&elf64_freebsd_sysvec_v2, | exec_sysvec_init_secondary(&elf64_freebsd_sysvec_v2, | ||||
&elf64_freebsd_sysvec_v1); | &elf64_freebsd_sysvec_v1); | ||||
/* | /* | ||||
* Adjust elfv2 sigcode after elfv1 sysvec is initialized. | * Adjust elfv2 sigcode after elfv1 sysvec is initialized. | ||||
* exec_sysvec_init_secondary() assumes secondary sysvecs use | * exec_sysvec_init_secondary() assumes secondary sysvecs use | ||||
* identical signal code, and skips allocating a second copy. | * identical signal code, and skips allocating a second copy. | ||||
* Since the ELFv2 trampoline is a strict subset of the ELFv1 code, | * Since the ELFv2 trampoline is a strict subset of the ELFv1 code, | ||||
* we can work around this by adjusting the base address. This also | * we can work around this by adjusting the offset. This also | ||||
* avoids two copies of the trampoline code being allocated! | * avoids two copies of the trampoline code being allocated! | ||||
*/ | */ | ||||
elf64_freebsd_sysvec_v2.sv_sigcode_base += | elf64_freebsd_sysvec_v2.sv_sigcode_offset += | ||||
(uintptr_t)sigcode64_elfv2 - (uintptr_t)&sigcode64; | (uintptr_t)sigcode64_elfv2 - (uintptr_t)&sigcode64; | ||||
elf64_freebsd_sysvec_v2.sv_szsigcode = &szsigcode64_elfv2; | elf64_freebsd_sysvec_v2.sv_szsigcode = &szsigcode64_elfv2; | ||||
} | } | ||||
SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); | SYSINIT(elf64_sysvec, SI_SUB_EXEC, SI_ORDER_ANY, ppc64_init_sysvecs, NULL); | ||||
static boolean_t | static boolean_t | ||||
ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, | ppc64_elfv1_header_match(struct image_params *params, int32_t *osrel __unused, | ||||
uint32_t *fctl0 __unused) | uint32_t *fctl0 __unused) | ||||
▲ Show 20 Lines • Show All 235 Lines • Show Last 20 Lines |