git: d1380cef38c4 - stable/13 - kboot: rename kexec_load to host_kexec_load
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:10:36 UTC
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d1380cef38c42a8a63517651df2df64633bf6dea commit d1380cef38c42a8a63517651df2df64633bf6dea Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-06-13 17:46:48 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-01-24 21:49:21 +0000 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 (cherry picked from commit d8f3ef8f544e0c22c09cfa4f7b51ccac2666b59f) --- stand/kboot/arch/powerpc64/ppc64_elf_freebsd.c | 3 ++- stand/kboot/host_syscall.h | 2 +- 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