From owner-svn-src-all@freebsd.org Thu Aug 8 17:48:08 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B595AD4B8; Thu, 8 Aug 2019 17:48:08 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 464G7C710yz4cvH; Thu, 8 Aug 2019 17:48:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D2170CC0; Thu, 8 Aug 2019 17:48:07 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x78Hm7l4085761; Thu, 8 Aug 2019 17:48:07 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x78Hm79V085760; Thu, 8 Aug 2019 17:48:07 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201908081748.x78Hm79V085760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Thu, 8 Aug 2019 17:48:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r350764 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 350764 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Aug 2019 17:48:08 -0000 Author: imp Date: Thu Aug 8 17:48:07 2019 New Revision: 350764 URL: https://svnweb.freebsd.org/changeset/base/350764 Log: 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 Modified: head/sys/arm64/arm64/freebsd32_machdep.c Modified: head/sys/arm64/arm64/freebsd32_machdep.c ============================================================================== --- head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:30:51 2019 (r350763) +++ head/sys/arm64/arm64/freebsd32_machdep.c Thu Aug 8 17:48:07 2019 (r350764) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef VFP #include @@ -410,3 +411,30 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigs 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