diff options
author | Warner Losh <imp@FreeBSD.org> | 2022-06-13 17:46:48 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2022-06-27 20:54:45 +0000 |
commit | d8f3ef8f544e0c22c09cfa4f7b51ccac2666b59f (patch) | |
tree | a18fda440ee3370dd87b273a7b6a3ee3bc85feba /stand/kboot | |
parent | 201c1d0d25ee5ac50092a7334b7ebfa238ce2c0f (diff) | |
download | src-d8f3ef8f544e0c22c09cfa4f7b51ccac2666b59f.tar.gz src-d8f3ef8f544e0c22c09cfa4f7b51ccac2666b59f.zip |
kboot: rename kexec_load to host_kexec_load
And make it match the system call more closely by passing in the proper
args.
Sponsored by: Netflix
Diffstat (limited to 'stand/kboot')
-rw-r--r-- | stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c | 3 | ||||
-rw-r--r-- | stand/kboot/host_syscall.h | 2 | ||||
-rw-r--r-- | stand/kboot/host_syscalls.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c b/stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c index adbdc7fca915..7de963d4e211 100644 --- a/stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c +++ b/stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include <stand.h> #include "bootstrap.h" +#include "syscall_nr.h" #include "host_syscall.h" extern char end[]; @@ -152,7 +153,7 @@ ppc64_elf_exec(struct preloaded_file *fp) panic("architecture did not provide kexec segment mapping"); archsw.arch_kexec_kseg_get(&nseg, &kseg); - error = kexec_load(trampolinebase, nseg, (uintptr_t)kseg); + error = host_kexec_load(trampolinebase, nseg, (uintptr_t)kseg, KEXEC_ARCH << 16); if (error != 0) panic("kexec_load returned error: %d", error); diff --git a/stand/kboot/host_syscall.h b/stand/kboot/host_syscall.h index b7861e1af6f1..3a640af30565 100644 --- a/stand/kboot/host_syscall.h +++ b/stand/kboot/host_syscall.h @@ -54,7 +54,7 @@ struct host_timeval { int host_close(int fd); int host_getdents(int fd, void *dirp, int count); int host_gettimeofday(struct host_timeval *a, void *b); -int kexec_load(uint32_t start, int nsegs, uint32_t segs); +int host_kexec_load(uint32_t start, int nsegs, uint32_t segs, uint32_t flags); ssize_t host_llseek(int fd, int32_t offset_high, int32_t offset_lo, uint64_t *result, int whence); void *host_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off); int host_open(const char *path, int flags, int mode); diff --git a/stand/kboot/host_syscalls.c b/stand/kboot/host_syscalls.c index 3a5cdd7d8ea4..66014462ccdd 100644 --- a/stand/kboot/host_syscalls.c +++ b/stand/kboot/host_syscalls.c @@ -26,9 +26,9 @@ host_gettimeofday(struct host_timeval *a, void *b) } int -kexec_load(uint32_t start, int nsegs, uint32_t segs) +host_kexec_load(uint32_t start, int nsegs, uint32_t segs, uint32_t flags) { - return host_syscall(SYS_kexec_load, start, nsegs, segs, KEXEC_ARCH << 16); + return host_syscall(SYS_kexec_load, start, nsegs, segs, flags); } ssize_t |