svn commit: r350764 - head/sys/arm64/arm64
Gleb Smirnoff
glebius at freebsd.org
Thu Aug 8 22:59:56 UTC 2019
Hi,
why do we need COMPAT_43 for arm64 at all? I can't imagine an
application that would require this compatibility.
A more general question is how far in the future are we going
to carry COMPAT_43 for i386/amd64?
On Thu, Aug 08, 2019 at 05:48:07PM +0000, Warner Losh wrote:
W> Author: imp
W> Date: Thu Aug 8 17:48:07 2019
W> New Revision: 350764
W> URL: https://svnweb.freebsd.org/changeset/base/350764
W>
W> Log:
W> Make arm64 32-bit mode compile with COMPAT_43
W>
W> The COMPAT_43 option isn't quite like the other compat options, and arm64 makes
W> attempts to support it in 64-bit mode. In 32-bit compat mode, however, two
W> syscall implementations that COMPAT_FREEBSD32 assumes will be there are
W> missing. Provide implementations for these: ofreebsd32_sigreturn (which we'll
W> never encounter, so implement it as nosys as is done in kern_sig.c) and
W> ofreebsd32_getpagesize, where we'll always return 4096 since that's the only
W> PAGE_SIZE we support, similar to how the ia32 implementation does things.
W>
W> Reviewed by: manu@
W> Differential Revision: https://reviews.freebsd.org/D21192
W>
W> Modified:
W> head/sys/arm64/arm64/freebsd32_machdep.c
W>
W> Modified: head/sys/arm64/arm64/freebsd32_machdep.c
W> ==============================================================================
W> --- head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:30:51 2019 (r350763)
W> +++ head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:48:07 2019 (r350764)
W> @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
W> #include <sys/syscallsubr.h>
W> #include <sys/ktr.h>
W> #include <sys/sysent.h>
W> +#include <sys/sysproto.h>
W> #include <machine/armreg.h>
W> #ifdef VFP
W> #include <machine/vfp.h>
W> @@ -410,3 +411,30 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigs
W> mtx_lock(&psp->ps_mtx);
W>
W> }
W> +
W> +#ifdef COMPAT_43
W> +/*
W> + * COMPAT_FREEBSD32 assumes we have this system call when COMPAT_43 is defined.
W> + * FreeBSD/arm provies a similar getpagesize() syscall.
W> + */
W> +#define ARM32_PAGE_SIZE 4096
W> +int
W> +ofreebsd32_getpagesize(struct thread *td,
W> + struct ofreebsd32_getpagesize_args *uap)
W> +{
W> +
W> + td->td_retval[0] = ARM32_PAGE_SIZE;
W> + return (0);
W> +}
W> +
W> +/*
W> + * Mirror the osigreturn definition in kern_sig.c for !i386 platforms. This
W> + * mirrors what's connected to the FreeBSD/arm syscall.
W> + */
W> +int
W> +ofreebsd32_sigreturn(struct thread *td, struct ofreebsd32_sigreturn_args *uap)
W> +{
W> +
W> + return (nosys(td, (struct nosys_args *)uap));
W> +}
W> +#endif
W> _______________________________________________
W> svn-src-all at freebsd.org mailing list
W> https://lists.freebsd.org/mailman/listinfo/svn-src-all
W> To unsubscribe, send any mail to "svn-src-all-unsubscribe at freebsd.org"
--
Gleb Smirnoff
More information about the svn-src-head
mailing list