From owner-freebsd-mips@FreeBSD.ORG Wed Oct 5 17:20:31 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00C4C1065675 for ; Wed, 5 Oct 2011 17:20:31 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 8D1998FC1B for ; Wed, 5 Oct 2011 17:20:30 +0000 (UTC) Received: by wwe3 with SMTP id 3so2753666wwe.31 for ; Wed, 05 Oct 2011 10:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=ziO2Jy8OqxdWk16nUNhIscS1L7h6krfKdonoM8vshZM=; b=MK6zGrDRe9ImzWmf3aqVnNV2Aq85L8GIxoEpfk+d3O4ERg/p2XArZ9hUm/IdPUIOh6 2z2dFNJ3n05OfmQgo+d86FCHR/CWezQb6iiNyUWinVadSl9j5w1Ze9HjgFK3KMCKmYY6 6HbkbP20pHkjHBpUuBkRRPf+l1Jbi7tSAXbQs= MIME-Version: 1.0 Received: by 10.216.138.210 with SMTP id a60mr6071554wej.41.1317835229198; Wed, 05 Oct 2011 10:20:29 -0700 (PDT) Received: by 10.216.29.78 with HTTP; Wed, 5 Oct 2011 10:20:29 -0700 (PDT) In-Reply-To: <20111005144605.GC1511@deviant.kiev.zoral.com.ua> References: <20111004211144.GW1511@deviant.kiev.zoral.com.ua> <20111004215218.GY1511@deviant.kiev.zoral.com.ua> <20111005144605.GC1511@deviant.kiev.zoral.com.ua> Date: Wed, 5 Oct 2011 22:50:29 +0530 Message-ID: From: "Jayachandran C." To: Kostik Belousov Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: mips@freebsd.org Subject: Re: Mips syscall entry point X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2011 17:20:31 -0000 2011/10/5 Kostik Belousov : > On Wed, Oct 05, 2011 at 05:56:10PM +0530, Jayachandran C. wrote: >> On Wed, Oct 5, 2011 at 5:05 PM, Jayachandran C. >> wrote: >> > On Wed, Oct 5, 2011 at 3:22 AM, Kostik Belousov = wrote: >> >> On Wed, Oct 05, 2011 at 12:11:44AM +0300, Kostik Belousov wrote: >> >>> Hi, >> >>> below is the patch, test-compiled for XLP64 only, which converts the >> >>> only remaining architecture MIPS to the new syscall entry sequence. >> >>> The advantage of the conversion is sharing most of the code with all >> >>> other architectures and avoiding duplication. Also, the implementati= on >> >>> automatically feels the missed features for the MIPS, see the BUGS >> >> s/feels/fills/, sorry >> >>> section in the ptrace(2). >> >> For the same reason, capsicum shall not work on MIPS. >> >> >> >>> >> >>> I am asking for you help to debug and test the patch. Please keep me >> >>> on Cc:, I am not on the list. >> >>> >> >>> Thank you. >> >>> >> >>> diff --git a/sys/mips/include/proc.h b/sys/mips/include/proc.h >> >>> index 11a1f8e..4c0b0b6 100644 >> [...] >> > >> > This gives me a crash when I test it on XLR (32bit compile). =A0The >> > crash does not look obvious - I am looking at it, hope to resolve this >> > soon. >> >> Actually it is fairly obvious :) =A0the elf*_machdep.c has to be updated >> for using the cpu_fetch_syscall_args. With that change it comes up on >> 32 bit - will do a few more tests on 64 bit to see how that goes. >> >> The other minor issue I saw was the locr0 usage in trap(), in call to >> trapdebug_enter, =A0it is fine now since =A0TRAP_DEBUG is not defined. > > Thank you very much. Your fix is applied, and I tried to cover both > locr0 and code usage. > > Will wait for your testing. This works for me, tried on o32/n32/n64 on XLR. Thanks for fixing this up . JC.