mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
kboot: Implement munmap(2)
Define host_munmap so we can use it in the x86 code to find things for the BIOS/CMS boot path and unmap after we find it. Sponsored by: Netflix
This commit is contained in:
parent
a647d4a4d1
commit
76949f503f
|
@ -4,6 +4,7 @@
|
|||
#define SYS_kexec_load 246
|
||||
#define SYS_lseek 8
|
||||
#define SYS_mmap 9
|
||||
#define SYS_munmap 11
|
||||
#define SYS_newfstat 5
|
||||
#define SYS_newfstatat 262
|
||||
#define SYS_openat 257
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#define SYS_kexec_load 268
|
||||
#define SYS_llseek 140
|
||||
#define SYS_mmap 90
|
||||
#define SYS_munmap 91
|
||||
#define SYS_newfstat SYS_fstat
|
||||
#define SYS_newfstatat 291
|
||||
#define SYS_openat 286
|
||||
|
|
|
@ -96,6 +96,7 @@ int host_gettimeofday(struct host_timeval *a, void *b);
|
|||
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_munmap(void *addr, size_t len);
|
||||
int host_open(const char *path, int flags, int mode);
|
||||
ssize_t host_read(int fd, void *buf, size_t nbyte);
|
||||
int host_reboot(int, int, int, uintptr_t);
|
||||
|
|
|
@ -57,6 +57,12 @@ host_mmap(void *addr, size_t len, int prot, int flags, int fd, off_t off)
|
|||
return (void *)host_syscall(SYS_mmap, (uintptr_t)addr, len, prot, flags, fd, off);
|
||||
}
|
||||
|
||||
int
|
||||
host_munmap(void *addr, size_t len)
|
||||
{
|
||||
return host_syscall(SYS_munmap, (uintptr_t)addr, len);
|
||||
}
|
||||
|
||||
int
|
||||
host_open(const char *path, int flags, int mode)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue