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
This commit is contained in:
Warner Losh 2022-06-13 11:46:48 -06:00
parent 201c1d0d25
commit d8f3ef8f54
3 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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