Make arm64 32-bit mode compile with COMPAT_43
The COMPAT_43 option isn't quite like the other compat options, and arm64 makes attempts to support it in 64-bit mode. In 32-bit compat mode, however, two syscall implementations that COMPAT_FREEBSD32 assumes will be there are missing. Provide implementations for these: ofreebsd32_sigreturn (which we'll never encounter, so implement it as nosys as is done in kern_sig.c) and ofreebsd32_getpagesize, where we'll always return 4096 since that's the only PAGE_SIZE we support, similar to how the ia32 implementation does things. Reviewed by: manu@ Differential Revision: https://reviews.freebsd.org/D21192
This commit is contained in:
parent
435672e322
commit
83959d613a
@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/syscallsubr.h>
|
||||
#include <sys/ktr.h>
|
||||
#include <sys/sysent.h>
|
||||
#include <sys/sysproto.h>
|
||||
#include <machine/armreg.h>
|
||||
#ifdef VFP
|
||||
#include <machine/vfp.h>
|
||||
@ -410,3 +411,30 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
|
||||
mtx_lock(&psp->ps_mtx);
|
||||
|
||||
}
|
||||
|
||||
#ifdef COMPAT_43
|
||||
/*
|
||||
* COMPAT_FREEBSD32 assumes we have this system call when COMPAT_43 is defined.
|
||||
* FreeBSD/arm provies a similar getpagesize() syscall.
|
||||
*/
|
||||
#define ARM32_PAGE_SIZE 4096
|
||||
int
|
||||
ofreebsd32_getpagesize(struct thread *td,
|
||||
struct ofreebsd32_getpagesize_args *uap)
|
||||
{
|
||||
|
||||
td->td_retval[0] = ARM32_PAGE_SIZE;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* Mirror the osigreturn definition in kern_sig.c for !i386 platforms. This
|
||||
* mirrors what's connected to the FreeBSD/arm syscall.
|
||||
*/
|
||||
int
|
||||
ofreebsd32_sigreturn(struct thread *td, struct ofreebsd32_sigreturn_args *uap)
|
||||
{
|
||||
|
||||
return (nosys(td, (struct nosys_args *)uap));
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user