From owner-freebsd-mips@FreeBSD.ORG Tue Feb 2 05:36:44 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32AE3106568D for ; Tue, 2 Feb 2010 05:36:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.223.174]) by mx1.freebsd.org (Postfix) with ESMTP id 010BE8FC0A for ; Tue, 2 Feb 2010 05:36:43 +0000 (UTC) Received: by iwn4 with SMTP id 4so1152889iwn.27 for ; Mon, 01 Feb 2010 21:36:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=Lr0ZQ3anOBnafUedVyrWbjUq1RiQ0NFsWJLm3dBc7+0=; b=cO5NF8ueUeNTFHrDzs+fTHKopr3NaTjH4YV1hSRAcbBExT7NMYhrg6zKzRul/GgWzC 4cP2RSovMyiSmJ4K2ONZ3unhe6HF017txx/PYqqTLrcPTvYrR94OLDic6QMXEeM30Dpq SWgo620f6mj/lqGG2hLVbilB8itmwuE088eH0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xBS0S3T+iiGSY/9qJubMXZ79rWtk5rCGrGky+5CVGSc7EqXR/BiCEfvXv8erEpSHCD 2QKVT2CdiRUG50VGjBnQ5nTKdwfXEzDiTGaruauYoApv30lRpv0xihbSKPYxF1TRoSeg mOY4jybWdsNJrzJLiEv7U8xPJOmLzlVYB7r/U= MIME-Version: 1.0 Received: by 10.231.156.205 with SMTP id y13mr4410995ibw.27.1265087436106; Mon, 01 Feb 2010 21:10:36 -0800 (PST) Date: Tue, 2 Feb 2010 13:10:36 +0800 Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Success with RouterStation Pro! 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: Tue, 02 Feb 2010 05:36:44 -0000 Howdy, I've been playing with the RouterStation Pro boards and I've managed to coax them to boot FreeBSD off of the on-board flash. I've tar'ed up my build scripts and the modified version of the Ubiquity firmware building program and placed them online for others to tinker with. You can find the tarball and a high level overview README file at http://people.freebsd.org/~adrian/rspro/ . The process was (mostly) straight forward, save for some messing about with a bug in the PCI code which gonzo has fixed in -head. He's also hacked up a quick patch to make the geom_redboot pick up the on-board flash: http://sparc64.pastebin.ca/1775142 HTH! Adrian From owner-freebsd-mips@FreeBSD.ORG Tue Feb 2 05:55:21 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 669471065672 for ; Tue, 2 Feb 2010 05:55:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 250F78FC23 for ; Tue, 2 Feb 2010 05:55:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o125m84D042858; Mon, 1 Feb 2010 22:48:10 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Mon, 01 Feb 2010 22:48:50 -0700 (MST) Message-Id: <20100201.224850.29593248078748591.imp@bsdimp.com> To: adrian.chadd@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: Success with RouterStation Pro! 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: Tue, 02 Feb 2010 05:55:21 -0000 In message: Adrian Chadd writes: : Howdy, : : I've been playing with the RouterStation Pro boards and I've managed : to coax them to boot FreeBSD off of the on-board flash. : : I've tar'ed up my build scripts and the modified version of the : Ubiquity firmware building program and placed them online for others : to tinker with. You can find the tarball and a high level overview : README file at http://people.freebsd.org/~adrian/rspro/ . : : The process was (mostly) straight forward, save for some messing about : with a bug in the PCI code which gonzo has fixed in -head. He's also : hacked up a quick patch to make the geom_redboot pick up the on-board : flash: http://sparc64.pastebin.ca/1775142 You'll need my hack to ath driver too, if you are angling towards an AP http://people.freebsd.org/~imp/ar71xx_ath_war.diff Warner From owner-freebsd-mips@FreeBSD.ORG Tue Feb 2 06:01:12 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD93D106566C for ; Tue, 2 Feb 2010 06:01:12 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.223.174]) by mx1.freebsd.org (Postfix) with ESMTP id 85A328FC1F for ; Tue, 2 Feb 2010 06:01:12 +0000 (UTC) Received: by iwn4 with SMTP id 4so1169543iwn.27 for ; Mon, 01 Feb 2010 22:01:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ucr5GWnvC2Oe9mE9FRWpiDlqcRl7eKOcvzPP/a5R5y4=; b=Eq0jeuNNQ/kI0hOmD/QK9UjmT8uVxJgz3khCKrd+7gYO0W5slWntSnIcOXPWJZvODM 7KBYrktt1BlE0uWK9Py0x6LK/fqEpzW1kJUlmnsV3CAynDPHX7GL3aFeYy1DbFHs2CU8 M6RHEnAXUR4fUdk8NlpzhBX0yFs9oc6CiSfVI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Dq5lkNvqAsvRKebfAwUlrdfcYrLyEG3tRAeim1M+D62iwSTLpAD2b1GJBNHuSS6JiP mFuW9bNS89VagCHWBUMG/5h+t89/hN6yWFqjwcI2zO3kEdR3tVqF1knrxKLI6XFyGf8X 6kTfIrTcEuHVj2ZPFyIu7/3XQ/qnySajd19/M= MIME-Version: 1.0 Received: by 10.231.146.74 with SMTP id g10mr897669ibv.98.1265090472001; Mon, 01 Feb 2010 22:01:12 -0800 (PST) In-Reply-To: <20100201.224850.29593248078748591.imp@bsdimp.com> References: <20100201.224850.29593248078748591.imp@bsdimp.com> Date: Tue, 2 Feb 2010 14:01:11 +0800 Message-ID: From: Adrian Chadd To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Success with RouterStation Pro! 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: Tue, 02 Feb 2010 06:01:12 -0000 On 2 February 2010 13:48, M. Warner Losh wrote: > You'll need my hack to ath driver too, if you are angling towards an > AP > =A0 =A0 =A0 =A0http://people.freebsd.org/~imp/ar71xx_ath_war.diff Cool. I'll add that to the local tree tomorrow and play. Thanks! Adrian From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 03:06:21 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC595106566B for ; Wed, 3 Feb 2010 03:06:20 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id B111F8FC16 for ; Wed, 3 Feb 2010 03:06:20 +0000 (UTC) Received: by pxi13 with SMTP id 13so846870pxi.3 for ; Tue, 02 Feb 2010 19:06:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=9MT1jX+davjvjNw0s8Iju1/QmDll4gyB3K9UTvDeeFc=; b=MjmhG7qfpRnj4eD89GpvNTYt1JAfNda4LwTgk5/lcGkzM/qM2sxsss2P3XR6LJRiAQ CXtBGmmXoCidEXbzAaOP/SpfnCKZXyxgLlu3G9av0MQtUJvheDqJEncSjz589turOUPw h9Y+QfyNouqnlcyZp2DXfta/WZV3KORJdJ/jg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=BGR1c9csDBt8fl1Gc1Zi7/K4F62xXWjeEq8f2DDACq+cWwLoBXWd1cDL0S/vgZ5/X8 ouj5xtMpMEIR8FRwDJRk+d0rwBzGinuIIYuvGFQ5WNsbysc/JGSokGIEzduXCc51PZnb dOtfE+a62qvhUX65TuvVFFCm3wWVNgc1q0oYA= MIME-Version: 1.0 Received: by 10.141.2.14 with SMTP id e14mr4788300rvi.56.1265166380025; Tue, 02 Feb 2010 19:06:20 -0800 (PST) Date: Wed, 3 Feb 2010 08:36:19 +0530 Message-ID: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> From: "C. Jayachandran" To: freebsd-mips@freebsd.org Content-Type: multipart/mixed; boundary=000e0cd11bb4a9c925047ea9800a X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: mips ptrace.S fix 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, 03 Feb 2010 03:06:21 -0000 --000e0cd11bb4a9c925047ea9800a Content-Type: text/plain; charset=UTF-8 The ptrace system call implementation seems to have a bug, we need to save ra and gp before calling the __error, and that will need a stack frame. I've attached a patch that should fix this for o32 ABI - but it really should be written with ABI-independent macros, any clue on how to do this which will take care of n32/64 too will be helpful. I also have some initial patches for making gdb work on MIPS. . That patch is also attached, but it is work in progress, only the static executables work now. JC. --000e0cd11bb4a9c925047ea9800a-- From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 07:21:16 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FDB11065672 for ; Wed, 3 Feb 2010 07:21:16 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2E98FC1B for ; Wed, 3 Feb 2010 07:21:15 +0000 (UTC) Received: by pzk40 with SMTP id 40so1074705pzk.7 for ; Tue, 02 Feb 2010 23:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:cc:content-type; bh=ovAw4qWJ6y2/g0mnW2dhv/4qpTghca5Gs8h12pfXTs4=; b=ZcP0gLLXAiQQ9cefwYOXy7CLCDDRBzzj5t3+5DRBM1qeZYMuypUX5pa8jbIPzpvlSU 62KK73d86FqTsmirN4T6fMsWCb23C76Z6D7J+7dr0RN+qFqHGtrR0GMR+4WxykZhVgMc CK4D0giYKnul5LS/1Sq2ryxXiksywAdM9Upww= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; b=mWg88n4kvh+OEmdznJ1vheUl44jFY+XDDOOEL4scgIUz6FWL5cQ7DIPTWb9RxYFMNR jbPIJ0rUmUYq1UzoeB02V9/N8K+oITqe08BAKQ+htvzMmnt8ULFEq0D4nD1Vt/1EmzZd 9pOfOvy9Y/fsBtWyeFp/osLjJZjmmSxLGSQck= MIME-Version: 1.0 Received: by 10.141.2.14 with SMTP id e14mr4971687rvi.56.1265181675676; Tue, 02 Feb 2010 23:21:15 -0800 (PST) Date: Wed, 3 Feb 2010 12:51:15 +0530 Message-ID: <98a59be81002022321w510e7b6eoed2f28f46bfb2740@mail.gmail.com> From: "C. Jayachandran" To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=UTF-8 Cc: Subject: truss - minor fix for mips 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, 03 Feb 2010 07:21:16 -0000 The current truss crashes even after the ptrace fix (I'd mailed earlier) is applied. The fsc.args needs to be allocated before it can be filled from the registers. The following patch will fix that. Truss output still seems to have issues (too many sigprocmask calls, no tracing shown for static executables) which I am looking at - but the change below seems to be needed. Comments welcome, JC. Index: usr.bin/truss/mips-fbsd.c =================================================================== --- usr.bin/truss/mips-fbsd.c (revision 203379) +++ usr.bin/truss/mips-fbsd.c (working copy) @@ -155,8 +155,8 @@ if (nargs == 0) return; + fsc.args = malloc((1+nargs) * sizeof(unsigned long)); #if 0 // XXX - fsc.args = malloc((1+nargs) * sizeof(unsigned long)); iorequest.piod_op = PIOD_READ_D; iorequest.piod_offs = (void *)parm_offset; iorequest.piod_addr = fsc.args; From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 10:27:03 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 444891065672 for ; Wed, 3 Feb 2010 10:27:03 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id 1B9798FC19 for ; Wed, 3 Feb 2010 10:27:02 +0000 (UTC) Received: by pzk40 with SMTP id 40so1220265pzk.7 for ; Wed, 03 Feb 2010 02:27:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=tLhsrquomyoB/u/vylGpYzsagFWTGefvazilC0iOH68=; b=j/T+GFWvVmN3R8ORrdv5OpAhi2/bEleNeATcZKDsd6EANoA3nGpmHM26VgQ35LGN2q ZO+SvtDDgn8ZrAiRaAR61mgignrwBZNo6wYZNlvZJwM5gkXc/WsvyhZApDwTfrhwYFEP /0rOaYFl1fwsoR2g8K5vpXVZjBPWEruGcdYZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=SITyc8ltc7jx850mq0dcCCmzNqh3NSFW+E3cK4Zf/ymNI1b6+ZbhaupX9yMzJBS18p DuohAcqgBbv4VRxYWuqgm1gYnp+nSqDhYFIP/0kLyh1azIzfKP9gF1Otx8cbgo0W0X7e LtBFk5PYGGoT/47rOmiHP/zhYDKlTSd/nnKOs= MIME-Version: 1.0 Received: by 10.141.105.13 with SMTP id h13mr3262211rvm.162.1265192822533; Wed, 03 Feb 2010 02:27:02 -0800 (PST) In-Reply-To: References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> Date: Wed, 3 Feb 2010 15:57:02 +0530 Message-ID: <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> From: "C. Jayachandran" To: Rui Paulo Content-Type: text/plain; charset=UTF-8 Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 10:27:03 -0000 On Wed, Feb 3, 2010 at 3:49 PM, Rui Paulo wrote: > On 3 Feb 2010, at 03:06, C. Jayachandran wrote: > >> The ptrace system call implementation seems to have a bug, we need to >> save ra and gp before calling the __error, and that will need a stack >> frame. >> >> I've attached a patch that should fix this for o32 ABI - but it really >> should be written with ABI-independent macros, any clue on how to do >> this which will take care of n32/64 too will be helpful. >> >> I also have some initial patches for making gdb work on MIPS. . That >> patch is also attached, but it is work in progress, only the static >> executables work now. > > I think you forgot the attachments or they were stripped out. I think the attachments were stripped out, may be by the mailing list itself. I had them as attachments since I was worried that gmail will damage white-space if I did it inline. Is there a standard way of submitting patches to the list? For now I have the patches at: http://sites.google.com/site/cjayachandran/files (the files are ptrace.S.patch and gdb.patch) Thanks, JC. From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 10:49:42 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18B36106566B for ; Wed, 3 Feb 2010 10:49:42 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-fx0-f226.google.com (mail-fx0-f226.google.com [209.85.220.226]) by mx1.freebsd.org (Postfix) with ESMTP id 974E98FC13 for ; Wed, 3 Feb 2010 10:49:41 +0000 (UTC) Received: by fxm26 with SMTP id 26so284926fxm.13 for ; Wed, 03 Feb 2010 02:49:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=NSCYTr8a77JPNE4kZsPDi+EMRLOkbtXfy9qkT/JZ2LM=; b=uGSEWzQpaS5hAAO6CJZkcVM5Gl/Xi9uxLuMNET3CNHCReu0KzE7v1vN7UZlB3o7EjU EHYRuenj16nundBZOdFVNpelWEkPVx7bIkS6RFgx63OLjA1iBjRUXZ6tAKg+SuUKSJl/ h3As3o5kJk16r6ozczbawQ3+mvOYoA62hTYVs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=AZkX7aDk1EkrQHaoH0NDdgsYvp/9ybFXnzWWaaLKmK6RHx8z1Z0gdSPZym60ohXu1d qsiYZRfl3PAFD0REOsVfR2BLsUxD9jE6B0tF/GBzaTh5hAPkWGN/V6RuqYWy2RqAsHDY XH+lsOCYpUMsQEY/lDop49mcn4KtGiK1vTy2w= Received: by 10.223.2.216 with SMTP id 24mr7612188fak.72.1265192383636; Wed, 03 Feb 2010 02:19:43 -0800 (PST) Received: from ?10.0.10.4? (54.81.54.77.rev.vodafone.pt [77.54.81.54]) by mx.google.com with ESMTPS id 15sm3050752fxm.10.2010.02.03.02.19.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 03 Feb 2010 02:19:42 -0800 (PST) Sender: Rui Paulo Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii From: Rui Paulo In-Reply-To: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> Date: Wed, 3 Feb 2010 10:19:41 +0000 Content-Transfer-Encoding: 7bit Message-Id: References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> To: C. Jayachandran X-Mailer: Apple Mail (2.1077) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 10:49:42 -0000 On 3 Feb 2010, at 03:06, C. Jayachandran wrote: > The ptrace system call implementation seems to have a bug, we need to > save ra and gp before calling the __error, and that will need a stack > frame. > > I've attached a patch that should fix this for o32 ABI - but it really > should be written with ABI-independent macros, any clue on how to do > this which will take care of n32/64 too will be helpful. > > I also have some initial patches for making gdb work on MIPS. . That > patch is also attached, but it is work in progress, only the static > executables work now. I think you forgot the attachments or they were stripped out. -- Rui Paulo From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 12:04:37 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88A2E1065695 for ; Wed, 3 Feb 2010 12:04:37 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 3B6758FC16 for ; Wed, 3 Feb 2010 12:04:37 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o13C4a92055224 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 07:04:36 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: <2290FD92-929C-4612-9CB8-F57097E2378E@lakerest.net> From: Randall Stewart To: "C. Jayachandran" In-Reply-To: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Feb 2010 04:04:35 -0800 References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 12:04:37 -0000 JC: I don't see the patch attached to the email. ? R On Feb 2, 2010, at 7:06 PM, C. Jayachandran wrote: > The ptrace system call implementation seems to have a bug, we need to > save ra and gp before calling the __error, and that will need a stack > frame. > > I've attached a patch that should fix this for o32 ABI - but it really > should be written with ABI-independent macros, any clue on how to do > this which will take care of n32/64 too will be helpful. > > I also have some initial patches for making gdb work on MIPS. . That > patch is also attached, but it is work in progress, only the static > executables work now. > > JC. > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 12:06:47 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC8C11065676; Wed, 3 Feb 2010 12:06:47 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2BD8FC15; Wed, 3 Feb 2010 12:06:47 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o13C6kkL055346 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 07:06:46 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: From: Randall Stewart To: "C. Jayachandran" In-Reply-To: <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Feb 2010 04:06:46 -0800 References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 12:06:47 -0000 JC: Ok now I have them.. let me look through them.. if no one screams to loud I will commit them ;-) R On Feb 3, 2010, at 2:27 AM, C. Jayachandran wrote: > On Wed, Feb 3, 2010 at 3:49 PM, Rui Paulo wrote: >> On 3 Feb 2010, at 03:06, C. Jayachandran wrote: >> >>> The ptrace system call implementation seems to have a bug, we need >>> to >>> save ra and gp before calling the __error, and that will need a >>> stack >>> frame. >>> >>> I've attached a patch that should fix this for o32 ABI - but it >>> really >>> should be written with ABI-independent macros, any clue on how to do >>> this which will take care of n32/64 too will be helpful. >>> >>> I also have some initial patches for making gdb work on MIPS. . That >>> patch is also attached, but it is work in progress, only the static >>> executables work now. >> >> I think you forgot the attachments or they were stripped out. > > I think the attachments were stripped out, may be by the mailing list > itself. I had them as attachments since I was worried that gmail will > damage white-space if I did it inline. > > Is there a standard way of submitting patches to the list? For now I > have the patches at: > http://sites.google.com/site/cjayachandran/files (the files are > ptrace.S.patch and gdb.patch) > > Thanks, > JC. > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 12:27:23 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F2101065679; Wed, 3 Feb 2010 12:27:23 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 217148FC1D; Wed, 3 Feb 2010 12:27:23 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o13CRKb7056180 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 07:27:22 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: From: Randall Stewart To: "C. Jayachandran" In-Reply-To: <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Feb 2010 04:27:20 -0800 References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 12:27:23 -0000 JC: The two small patches (truss and ptrace) look fine to me.. and definitely I can see things will not work without them.. The gdb patch will take me a while to chew on ;-) I will commit the small patches later on today... I have a problem with my svn right now.. have to sort that out first ;-) R On Feb 3, 2010, at 2:27 AM, C. Jayachandran wrote: > On Wed, Feb 3, 2010 at 3:49 PM, Rui Paulo wrote: >> On 3 Feb 2010, at 03:06, C. Jayachandran wrote: >> >>> The ptrace system call implementation seems to have a bug, we need >>> to >>> save ra and gp before calling the __error, and that will need a >>> stack >>> frame. >>> >>> I've attached a patch that should fix this for o32 ABI - but it >>> really >>> should be written with ABI-independent macros, any clue on how to do >>> this which will take care of n32/64 too will be helpful. >>> >>> I also have some initial patches for making gdb work on MIPS. . That >>> patch is also attached, but it is work in progress, only the static >>> executables work now. >> >> I think you forgot the attachments or they were stripped out. > > I think the attachments were stripped out, may be by the mailing list > itself. I had them as attachments since I was worried that gmail will > damage white-space if I did it inline. > > Is there a standard way of submitting patches to the list? For now I > have the patches at: > http://sites.google.com/site/cjayachandran/files (the files are > ptrace.S.patch and gdb.patch) > > Thanks, > JC. > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 12:27:52 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0E52106568D for ; Wed, 3 Feb 2010 12:27:52 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id A11888FC18 for ; Wed, 3 Feb 2010 12:27:52 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Ncdll-00089K-Jv for freebsd-mips@freebsd.org; Wed, 03 Feb 2010 13:51:41 +0200 Date: Wed, 3 Feb 2010 13:54:57 +0200 From: Alexandr Rybalko To: freebsd-mips@freebsd.org Message-Id: <20100203135457.be65e40e.ray@dlink.ua> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: MIPS ldscript 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, 03 Feb 2010 12:27:53 -0000 Hi, Have trouble, possible ldscript problem, all executables have .data segment started at 0x10000, so /usr/bin/true have size 70277. Help to resolve problem. -- Alexandr Rybalko From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 12:40:47 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D22C2106568B; Wed, 3 Feb 2010 12:40:47 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f202.google.com (mail-pz0-f202.google.com [209.85.222.202]) by mx1.freebsd.org (Postfix) with ESMTP id A03688FC21; Wed, 3 Feb 2010 12:40:47 +0000 (UTC) Received: by mail-pz0-f202.google.com with SMTP id 40so1327968pzk.7 for ; Wed, 03 Feb 2010 04:40:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=fQZ5Mdf+NbUdYkn6PV+mqIE6fU9NxlJz/gxD3XNZ5Tk=; b=oAjwA0Mfk578K4whmjm/FDb0/7zn9nB2iazGeJptwQcyT1nFqHAhSug6LMDWDZoB0G 4Y+EZyjdqbKnNyt0eo1SxXuxvaWWn6m778b1pRF4Wr29yHB0tQKu8KuhY4+s6sOZWGqu F623PTKulUz0I9HLBd6D021ug9vv/jM1Xpmas= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=t2v9eWm09iVIylvsA27+XvGqD/mMesJqP0zVYUBL/3A2w7jiAwosoCutINxDc0Awc2 18fmIQJ5Qo9FvpAgHjOEnB5fdKnqQ1ztxAMrOCbvnoZtbkQPGELHYVpLdF+72Bybxcpz IbdF08bcPkKqUTxLB4iZTkgxazkgbhxCHKs8s= MIME-Version: 1.0 Received: by 10.140.82.21 with SMTP id f21mr5136709rvb.265.1265200847394; Wed, 03 Feb 2010 04:40:47 -0800 (PST) In-Reply-To: References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> Date: Wed, 3 Feb 2010 18:10:47 +0530 Message-ID: <98a59be81002030440x711d1eafv7b8925ebe109146e@mail.gmail.com> From: "C. Jayachandran" To: Randall Stewart Content-Type: text/plain; charset=UTF-8 Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 12:40:47 -0000 On Wed, Feb 3, 2010 at 5:57 PM, Randall Stewart wrote: > JC: > > The two small patches (truss and ptrace) look fine to me.. and > definitely I can see things will not work without them.. > > The gdb patch will take me a while to chew on ;-) The gdb patch now is a rough merge I did with the RMI code, that gets gdb to compile and debug static binaries. Basic functionality seems to working now. I will have an update shortly with some more changes. Thanks, JC. From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 12:43:18 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4252106566C; Wed, 3 Feb 2010 12:43:18 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 540F28FC0C; Wed, 3 Feb 2010 12:43:18 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o13ChHW7056855 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 07:43:17 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: <6AC1CD6F-58A6-4082-9806-8FC166FC0039@lakerest.net> From: Randall Stewart To: "C. Jayachandran" In-Reply-To: <98a59be81002030440x711d1eafv7b8925ebe109146e@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Feb 2010 04:43:16 -0800 References: <98a59be81002021906l5a718a3p8127f2240dd538@mail.gmail.com> <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> <98a59be81002030440x711d1eafv7b8925ebe109146e@mail.gmail.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 12:43:18 -0000 Ok.. I will wait for your update before I start digging through the patch in any detail ;-) R On Feb 3, 2010, at 4:40 AM, C. Jayachandran wrote: > On Wed, Feb 3, 2010 at 5:57 PM, Randall Stewart > wrote: >> JC: >> >> The two small patches (truss and ptrace) look fine to me.. and >> definitely I can see things will not work without them.. >> >> The gdb patch will take me a while to chew on ;-) > > The gdb patch now is a rough merge I did with the RMI code, that gets > gdb to compile and debug static binaries. Basic functionality seems to > working now. I will have an update shortly with some more changes. > > Thanks, > JC. > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 14:22:39 2010 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1CE0B106568F for ; Wed, 3 Feb 2010 14:22:39 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id BE15C8FC15 for ; Wed, 3 Feb 2010 14:22:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o13E96Et070246; Wed, 3 Feb 2010 07:09:06 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 03 Feb 2010 07:10:01 -0700 (MST) Message-Id: <20100203.071001.787670930858389487.imp@bsdimp.com> To: ray@dlink.ua From: "M. Warner Losh" In-Reply-To: <20100203135457.be65e40e.ray@dlink.ua> References: <20100203135457.be65e40e.ray@dlink.ua> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@FreeBSD.org Subject: Re: MIPS ldscript 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, 03 Feb 2010 14:22:39 -0000 In message: <20100203135457.be65e40e.ray@dlink.ua> Alexandr Rybalko writes: : Have trouble, possible ldscript problem, all executables have .data : segment started at 0x10000, so /usr/bin/true have size 70277. Help : to resolve problem. How are you building? Can you send the following: ls -l /usr/bin/true size /usr/bin/true ldd /usr/bin/true objdump -h /usr/bin/true Thanks! Warner From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 15:35:29 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7375E106566C for ; Wed, 3 Feb 2010 15:35:29 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 310308FC0A for ; Wed, 3 Feb 2010 15:35:28 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1NchEB-0002me-Vt; Wed, 03 Feb 2010 17:33:16 +0200 Date: Wed, 3 Feb 2010 17:36:33 +0200 From: Alexandr Rybalko To: "M. Warner Losh" Message-Id: <20100203173633.5f5766d4.ray@dlink.ua> In-Reply-To: <20100203.071001.787670930858389487.imp@bsdimp.com> References: <20100203135457.be65e40e.ray@dlink.ua> <20100203.071001.787670930858389487.imp@bsdimp.com> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: MIPS ldscript 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, 03 Feb 2010 15:35:29 -0000 Problem not only with /usr/bin/true all binary have hole from .rodata to 64K filled with zero -- Aleksandr Rybalko From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 15:35:30 2010 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 5AA431065670 for ; Wed, 3 Feb 2010 15:35:30 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id D90038FC14 for ; Wed, 3 Feb 2010 15:35:29 +0000 (UTC) Received: from gw ([192.168.10.10] helo=terran) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Ncgxh-0001vW-PC; Wed, 03 Feb 2010 17:16:13 +0200 Date: Wed, 3 Feb 2010 17:19:30 +0200 From: Alexandr Rybalko To: "M. Warner Losh" Message-Id: <20100203171930.ed680ebe.ray@dlink.ua> In-Reply-To: <20100203.071001.787670930858389487.imp@bsdimp.com> References: <20100203135457.be65e40e.ray@dlink.ua> <20100203.071001.787670930858389487.imp@bsdimp.com> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.16.6; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: mips@freebsd.org Subject: Re: MIPS ldscript 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, 03 Feb 2010 15:35:30 -0000 On Wed, 03 Feb 2010 07:10:01 -0700 (MST) "M. Warner Losh" wrote: >> In message: <20100203135457.be65e40e.ray@dlink.ua> >> Alexandr Rybalko writes: >> : Have trouble, possible ldscript problem, all executables have .data >> : segment started at 0x10000, so /usr/bin/true have size 70277. Help >> : to resolve problem. >> >> How are you building? Can you send the following: OK No ldd in cross toolchain, so ldd I test on runing MIPS device (BCM5354 DIR-320) >> >> ls -l /usr/bin/true > ls -l true -rwxr-xr-x 1 ray wheel 70277 3 лют 14:11 true >> size /usr/bin/true > size true text data bss dec hex filename 1837 124 20 1981 7bd true >> ldd /usr/bin/true %ldd /usr/bin/true /usr/bin/true: libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x50081000) libc.so.7 => /lib/libc.so.7 (0x500d3000) >> objdump -h /usr/bin/true > objdump -h true true: file format elf32-tradlittlemips Sections: Idx Name Size VMA LMA File off Algn 0 .interp 00000015 00400114 00400114 00000114 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 1 .note.ABI-tag 00000018 0040012c 0040012c 0000012c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 2 .reginfo 00000018 00400144 00400144 00000144 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA, LINK_ONCE_SAME_SIZE 3 .dynamic 000000f8 0040015c 0040015c 0000015c 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 4 .hash 0000004c 00400254 00400254 00000254 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 5 .dynsym 000000e0 004002a0 004002a0 000002a0 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 6 .dynstr 00000093 00400380 00400380 00000380 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA 7 .gnu.version 0000001c 00400414 00400414 00000414 2**1 CONTENTS, ALLOC, LOAD, READONLY, DATA 8 .gnu.version_r 00000020 00400430 00400430 00000430 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 9 .init 0000005c 00400450 00400450 00000450 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 10 .text 00000320 004004b0 004004b0 000004b0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 11 .MIPS.stubs 00000030 004007d0 004007d0 000007d0 2**2 CONTENTS, ALLOC, LOAD, READONLY, CODE 12 .fini 00000044 00400800 00400800 00000800 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE 13 .rodata 00000001 00400844 00400844 00000844 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 14 .data 00000020 10000000 10000000 00010000 2**4 CONTENTS, ALLOC, LOAD, DATA 15 .rld_map 00000004 10000020 10000020 00010020 2**2 CONTENTS, ALLOC, LOAD, DATA 16 .eh_frame 00000004 10000024 10000024 00010024 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA 17 .ctors 00000008 10000028 10000028 00010028 2**2 CONTENTS, ALLOC, LOAD, DATA 18 .dtors 00000008 10000030 10000030 00010030 2**2 CONTENTS, ALLOC, LOAD, DATA 19 .jcr 00000004 10000038 10000038 00010038 2**2 CONTENTS, ALLOC, LOAD, DATA 20 .got 00000040 10000040 10000040 00010040 2**4 CONTENTS, ALLOC, LOAD, DATA 21 .sdata 00000004 10000080 10000080 00010080 2**2 CONTENTS, ALLOC, LOAD, DATA 22 .sbss 00000000 10000084 10000084 00010090 2**0 ALLOC 23 .bss 00000014 10000090 10000090 00010090 2**4 ALLOC 24 .comment 000000c2 00000000 00000000 00010090 2**0 CONTENTS, READONLY 25 .pdr 00000080 00000000 00000000 00010154 2**2 CONTENTS, READONLY 26 .mdebug.abi32 00000000 00000000 00000000 000101d4 2**0 CONTENTS, READONLY >> >> Thanks! >> >> Warner -- Aleksandr Rybalko From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 17:44:30 2010 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 50B271065672 for ; Wed, 3 Feb 2010 17:44:30 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-pz0-f184.google.com (mail-pz0-f184.google.com [209.85.222.184]) by mx1.freebsd.org (Postfix) with ESMTP id 25D868FC16 for ; Wed, 3 Feb 2010 17:44:30 +0000 (UTC) Received: by pzk14 with SMTP id 14so283464pzk.3 for ; Wed, 03 Feb 2010 09:44:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=X0Z2nfMeD/vZZ84l9QP6OFLD68ExJXcXqrpjhiU+t10=; b=fvYhnmN7lsTePb2Z9vdiDekt3QNJRPOraADGmP8tsFE09rNg7OYKofG5fSmR8LTK0T jHhDZtu0zxPjSz7AIbWzRSOjVh/D3eN1iFPwKJD4xGmdBMtOtlSyj9puu/3UogIWirkE rmc4hYq+PC+QLvbtoIWRN3b9qJ9XFy3JxJn7Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=iUQwjV2zYiROUhg2tJIaabbb7Vcokw+1GYxpSa3zXn37N0vCHrD7puDh+gUHaIhf9i xBIVh6HjiCMn4+/uX6lX/qOKvh0m6+BaWbY/t2l3adF0ut8fy2QjHRftfkUaOZdw/3RV cmbGOhzY3m9mw1yYzx7/zsynl7VzTolWS9408= MIME-Version: 1.0 Received: by 10.141.105.13 with SMTP id h13mr3563282rvm.162.1265217423385; Wed, 03 Feb 2010 09:17:03 -0800 (PST) In-Reply-To: <20100203171930.ed680ebe.ray@dlink.ua> References: <20100203135457.be65e40e.ray@dlink.ua> <20100203.071001.787670930858389487.imp@bsdimp.com> <20100203171930.ed680ebe.ray@dlink.ua> Date: Wed, 3 Feb 2010 22:47:03 +0530 Message-ID: <98a59be81002030917sd5d556fv67a3a76786df1817@mail.gmail.com> From: "C. Jayachandran" To: Alexandr Rybalko Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: mips@freebsd.org Subject: Re: MIPS ldscript 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, 03 Feb 2010 17:44:30 -0000 [re-send, seems to have messed up the to/cc on first try] On Wed, Feb 3, 2010 at 8:49 PM, Alexandr Rybalko wrote: > On Wed, 03 Feb 2010 07:10:01 -0700 (MST) > "M. Warner Losh" wrote: > >>> In message: <20100203135457.be65e40e.ray@dlink.ua> >>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Alexandr Rybalko writes: >>> : Have trouble, possible ldscript problem, all executables have .data >>> : segment started at 0x10000, so /usr/bin/true have size 70277. =C2=A0H= elp >>> : to resolve problem. >>> >>> How are you building? =C2=A0Can you send the following: > OK > > > No ldd in cross toolchain, so ldd I test on runing MIPS device (BCM5354 D= IR-320) > > >>> >>> =C2=A0 =C2=A0 =C2=A0ls -l /usr/bin/true >> ls -l true > -rwxr-xr-x =C2=A01 ray =C2=A0wheel =C2=A070277 =C2=A03 =D0=BB=D1=8E=D1=82= 14:11 true > >>> =C2=A0 =C2=A0 =C2=A0size /usr/bin/true >> size true > =C2=A0 text =C2=A0 =C2=A0data =C2=A0 =C2=A0 bss =C2=A0 =C2=A0 dec =C2=A0 = =C2=A0 hex filename > =C2=A0 1837 =C2=A0 =C2=A0 124 =C2=A0 =C2=A0 =C2=A020 =C2=A0 =C2=A01981 = =C2=A0 =C2=A0 7bd true I too see the same executable size. My guess was that this is caused by the toolchain setup, the pagesize setting for target seems to be 64K, unless I am reading it wrong (contrib/binutils/bfd/elf32-mips.c ELF_MAXPAGESIZE) Don't know if there are any other knobs to control this setting. JC. From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 17:54:27 2010 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 E938D106566B for ; Wed, 3 Feb 2010 17:54:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 8DD0D8FC16 for ; Wed, 3 Feb 2010 17:54:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o13Hm3JO073565; Wed, 3 Feb 2010 10:48:03 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 03 Feb 2010 10:48:58 -0700 (MST) Message-Id: <20100203.104858.812628220522969523.imp@bsdimp.com> To: c.jayachandran@gmail.com From: "M. Warner Losh" In-Reply-To: <98a59be81002030917sd5d556fv67a3a76786df1817@mail.gmail.com> References: <20100203.071001.787670930858389487.imp@bsdimp.com> <20100203171930.ed680ebe.ray@dlink.ua> <98a59be81002030917sd5d556fv67a3a76786df1817@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=utf-8 Content-Transfer-Encoding: base64 Cc: mips@freebsd.org Subject: Re: MIPS ldscript 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, 03 Feb 2010 17:54:28 -0000 SW4gbWVzc2FnZTogPDk4YTU5YmU4MTAwMjAzMDkxN3NkNWQ1NTZmdjY3YTNhNzY3ODZkZjE4MTdA bWFpbC5nbWFpbC5jb20+DQogICAgICAgICAgICAiQy4gSmF5YWNoYW5kcmFuIiA8Yy5qYXlhY2hh bmRyYW5AZ21haWwuY29tPiB3cml0ZXM6DQo6IFtyZS1zZW5kLCBzZWVtcyB0byBoYXZlIG1lc3Nl ZCB1cCB0aGUgdG8vY2Mgb24gZmlyc3QgdHJ5XQ0KOiBPbiBXZWQsIEZlYiAzLCAyMDEwIGF0IDg6 NDkgUE0sIEFsZXhhbmRyIFJ5YmFsa28gPHJheUBkbGluay51YT4gd3JvdGU6DQo6ID4gT24gV2Vk LCAwMyBGZWIgMjAxMCAwNzoxMDowMSAtMDcwMCAoTVNUKQ0KOiA+ICJNLiBXYXJuZXIgTG9zaCIg PGltcEBic2RpbXAuY29tPiB3cm90ZToNCjogPg0KOiA+Pj4gSW4gbWVzc2FnZTogPDIwMTAwMjAz MTM1NDU3LmJlNjVlNDBlLnJheUBkbGluay51YT4NCjogPj4+IMKgIMKgIMKgIMKgIMKgIMKgIEFs ZXhhbmRyIFJ5YmFsa28gPHJheUBkbGluay51YT4gd3JpdGVzOg0KOiA+Pj4gOiBIYXZlIHRyb3Vi bGUsIHBvc3NpYmxlIGxkc2NyaXB0IHByb2JsZW0sIGFsbCBleGVjdXRhYmxlcyBoYXZlIC5kYXRh DQo6ID4+PiA6IHNlZ21lbnQgc3RhcnRlZCBhdCAweDEwMDAwLCBzbyAvdXNyL2Jpbi90cnVlIGhh dmUgc2l6ZSA3MDI3Ny4gwqBIZWxwDQo6ID4+PiA6IHRvIHJlc29sdmUgcHJvYmxlbS4NCjogPj4+ DQo6ID4+PiBIb3cgYXJlIHlvdSBidWlsZGluZz8gwqBDYW4geW91IHNlbmQgdGhlIGZvbGxvd2lu ZzoNCjogPiBPSw0KOiA+DQo6ID4NCjogPiBObyBsZGQgaW4gY3Jvc3MgdG9vbGNoYWluLCBzbyBs ZGQgSSB0ZXN0IG9uIHJ1bmluZyBNSVBTIGRldmljZSAoQkNNNTM1NCBESVItMzIwKQ0KOiA+DQo6 ID4NCjogPj4+DQo6ID4+PiDCoCDCoCDCoGxzIC1sIC91c3IvYmluL3RydWUNCjogPj4gbHMgLWwg dHJ1ZQ0KOiA+IC1yd3hyLXhyLXggwqAxIHJheSDCoHdoZWVsIMKgNzAyNzcgwqAzINC70Y7RgiAx NDoxMSB0cnVlDQo6ID4NCjogPj4+IMKgIMKgIMKgc2l6ZSAvdXNyL2Jpbi90cnVlDQo6ID4+IHNp emUgdHJ1ZQ0KOiA+IMKgIHRleHQgwqAgwqBkYXRhIMKgIMKgIGJzcyDCoCDCoCBkZWMgwqAgwqAg aGV4IGZpbGVuYW1lDQo6ID4gwqAgMTgzNyDCoCDCoCAxMjQgwqAgwqAgwqAyMCDCoCDCoDE5ODEg wqAgwqAgN2JkIHRydWUNCjogDQo6IEkgdG9vIHNlZSB0aGUgc2FtZSBleGVjdXRhYmxlIHNpemUu IE15IGd1ZXNzIHdhcyB0aGF0IHRoaXMgaXMgY2F1c2VkDQo6IGJ5IHRoZSB0b29sY2hhaW4gc2V0 dXAsIHRoZSBwYWdlc2l6ZSBzZXR0aW5nIGZvciB0YXJnZXQgc2VlbXMgdG8gYmUNCjogNjRLLCB1 bmxlc3MgSSBhbSByZWFkaW5nIGl0IHdyb25nIChjb250cmliL2JpbnV0aWxzL2JmZC9lbGYzMi1t aXBzLmMNCjogRUxGX01BWFBBR0VTSVpFKQ0KOiANCjogRG9uJ3Qga25vdyBpZiB0aGVyZSBhcmUg YW55IG90aGVyIGtub2JzIHRvIGNvbnRyb2wgdGhpcyBzZXR0aW5nLg0KDQpIbW1tbSwgSSdsbCB0 YWtlIGEgbG9vayBhdCB0aGlzIGFzIG15IHRpbWUgcGVybWl0cy4uLiAgSSdtIG5vdCBzdXJlIGlm DQppdCBpcyB0aGUgcGFnZSBzaXplIG9yIHNvbWV0aGluZyBlbHNlLCBidXQgSSdsbCBsb29rIGlu dG8gaXQuLi4NCg0KSSdtIHNlZWluZyBzaW1pbGFyIHJlc3VsdHMgdG9vIG5vdyB0aGF0IEknbSBs b29raW5nIGNsb3NlbHkgYXQNCnRoaW5ncy4gIEl0IGFsc28gZXhwbGFpbnMgd2h5IG15IHJvb3Qg aXMgbGlrZSAyOTBNQiBpbnN0ZWFkIG9mIDE5Mk1CDQp0aGF0IG15IHg4NiB0cmVlcyBhcmUuLi4N Cg0KT2YgY291cnNlLCBJJ20gZ3JhdGlmaWVkIHRoYXQgcGVvcGxlIGFyZSBjb21wbGFpbmluZyBh Ym91dCBwcm9ibGVtcw0KbGlrZSB0aGlzLiAgSXQgaXNuJ3QgdGhlIHNvcnQgb2YgdGhpbmcgeW91 IGdyaXBlIGFib3V0IGlmIHlvdSBhcmUganVzdA0KY2FzdWFsbHkgZGFiYmxpbmcgd2l0aCB0aGUg cG9ydCA6KQ0KDQpXYXJuZXINCg== From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 18:55:25 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32ABB1065701 for ; Wed, 3 Feb 2010 18:55:25 +0000 (UTC) (envelope-from alancyang@gmail.com) Received: from mail-pz0-f184.google.com (mail-pz0-f184.google.com [209.85.222.184]) by mx1.freebsd.org (Postfix) with ESMTP id 087E88FC1B for ; Wed, 3 Feb 2010 18:55:24 +0000 (UTC) Received: by pzk14 with SMTP id 14so357093pzk.3 for ; Wed, 03 Feb 2010 10:55:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=SIZD5Gdtl+NU2KA/7m3ZsacIdOLmuVhuEltyVyGGk84=; b=ZCzpZcyS06KK7ltSS1IRx32O7ldNyo37mv015LjjgFpVgt0Oj7Dz9uxnVhofFfKrYL fs/YXhYfCvC+gQMOaTFd3QYOykLWRgczdgdcbru8l18VQP+J5ZqsrE/d+VisRpl6kKpu Kypa7PPgQWykqYx7Zb4kqW6LcqgMPo9SULyjo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UzfEYwWER7GOr1u/MSs7qb0fL6xhBsjbdPXBoW3b6Qjr8BTMzgt/omIJL2sCQRfj9Z VowmmBOadflBI8VNhF/HJol4UxjXs4lnIVwIL8BwoqDl8bzS5ZsFkoQVUIY5vxt4tOQQ V9aCIJZNIbsP6M0ZzraUHF42rvfkbpnZy1ZQA= MIME-Version: 1.0 Received: by 10.115.84.15 with SMTP id m15mr5261141wal.171.1265223324457; Wed, 03 Feb 2010 10:55:24 -0800 (PST) In-Reply-To: <20100128.101357.69891821659229949.imp@bsdimp.com> References: <290865fd1001262235m13ec4a2em863da596fd9a6c2@mail.gmail.com> <20100127.090718.131509470573849915.imp@bsdimp.com> <290865fd1001280620p300e318bh848cb801d681ff40@mail.gmail.com> <20100128.101357.69891821659229949.imp@bsdimp.com> Date: Wed, 3 Feb 2010 10:55:24 -0800 Message-ID: <290865fd1002031055v5cadc0c5qb02a034b5849b50@mail.gmail.com> From: alan yang To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: Cavium port 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, 03 Feb 2010 18:55:25 -0000 hi, Warner, I checkout head, cross compile with OCTEON1-32 conf file and the kernel boot on ebt5800 now. But still would like to ask couple questions: 1. option SMP support - wonder is there working in progress to get SMP to work 2. rgmx interface - seems to have problem getting interface rgmx to work (ifconfig to set static ip,...etc. but ping failed). I noticed your 1/26 blog mentioned some problem in this area that i also tried 'comment out the enableintr() call in mips_vector_init around line 365 of sys/mips/mips/machdep.c' . wonder is there solution or something that i missed. Thanks again for help. -- U-Boot 1.1.1 (U-boot build #: 176) (SDK version: 1.7.1-240) (Build time: Feb 1 2008 ) EBT5800 board revision major:2, minor:0, serial #: 2008-2.0-00251 OCTEON CN5860-NSP pass 1.1, Core clock: 600 MHz, DDR clock: 400 MHz (800 Mhz data rat) DRAM: 2048 MB Flash: 8 MB Clearing DRAM........ done BIST check passed. Net: octeth0, octeth1, octeth2, octeth3 Bus 0 (CF Card): OK ide 0: Model: 1024MB CompactFlash Card Firm: CF_A408J Ser#: A181109948O004036618 Type: Hard Disk Capacity: 977.4 MB = 0.9 GB (2001888 x 512) Octeon ebt5800# fatload ide 0 20000000 kernel reading kernel 3285400 bytes read Octeon ebt5800# bootoctlinux 20000000 numcores=1 argv[2]: numcores=1 ELF file is 32 bit Skipping non LOAD program header (type 0x6) Skipping non LOAD program header (type 0x3) Skipping non LOAD program header (type 0x70000000) Allocated memory for ELF segment: addr: 0x1000000, size 0x2967e0 Loading .text @ 0x810000d4 (2064172 bytes) Loading .MIPS.stubs @ 0x811f8000 (16 bytes) Loading .rodata @ 0x811fa000 (33248 bytes) Loading .reginfo @ 0x812021e0 (24 bytes) Loading .rodata.str1.4 @ 0x812021f8 (193028 bytes) Loading set_sysctl_set @ 0x812313fc (3500 bytes) Loading set_sysinit_set @ 0x812321a8 (1692 bytes) Loading set_sysuninit_set @ 0x81232844 (964 bytes) Loading .interp @ 0x81232c08 (13 bytes) Loading .dynsym @ 0x81232c18 (78256 bytes) Loading .dynstr @ 0x81245dc8 (72061 bytes) Loading .hash @ 0x81257748 (35968 bytes) Loading set_kdb_dbbe_set @ 0x812603c8 (8 bytes) Loading set_modmetadata_set @ 0x812603d0 (288 bytes) Loading set_cons_set @ 0x812604f0 (8 bytes) Loading .data @ 0x812604f8 (116360 bytes) Loading set_pcpu @ 0x8127cb80 (3136 bytes) Loading .got @ 0x8127d7c0 (5292 bytes) Loading .rld_map @ 0x8127ec6c (4 bytes) Loading .sdata @ 0x8127ec70 (16 bytes) Clearing .bss @ 0x8127ec80 (97120 bytes) ## Loading Linux kernel with entry point: 0x810000e0 ... Bootloader: Done loading app on coremask: 0x1 Boot Descriptor Ver: 6 -> 1/2 CPU clock: 600MHz Dram: 2048 MB Board Type: 15 Revision: 2/0 Octeon Chip: 0 Rev 0/0 Mac Address 00.0F.B7.10.49.F2 (14) octeon_dram == 80000000 reduced to ram: 2048 MBReal memory bytes is 7ffff000 phys_avail[0] = 1297000 phys_avail[1] = fffffff realmem_bytes is now at 5ffff000 Next block of memory goes from 20000000 to 7ffff000 Total DRAM Size 0x80000000 Bank 0 = 0x 1297000 -> 0x FFFFFFF Bank 1 = 0x20000000 -> 0x7FFFF000 physmem: 0x6ed68Cache info: picache_stride = 4096 picache_loopcount = 8 pdcache_stride = 128 pdcache_loopcount = 64 cpu0: Cavium processor v1.3 MMU: Standard TLB, 64 entries L1 i-cache: 4 ways of 64 sets, 128 bytes per line L1 d-cache: 64 ways of 1 sets, 128 bytes per line Config1=0xfe3303da Config3=0x1080 KDB: debugger backends: ddb KDB: current backend: ddb hz=100 cyl_per_hz:300000 cyl_per_usec:300 freq:300000000 cyl_per_hz:3000000 cyl_per_s0 Copyright (c) 1992-2010 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 9.0-CURRENT #3 r203169M: Tue Feb 2 14:19:40 PST 2010 root@Fujitsu.nt-fsrvr.o2micro.com:/usr/home/alan/genova/FreeBSD/head/obj/mips/usrs real memory = 1859551232 (1815968K bytes) avail memory = 1813176320 (1729MB) nexus0: Compact flash found in bootbus region 3 (8 bit). rgmii0: on nexus0 FPA fill: Pool 0 elem_size_words 208 Num: 2400 elem_size_bytes = words * 8 = 1664; block_size 1664 % Filling Pool 0 with 2400 blocks of 1664 bytes 208 words % Huge MemBlock 0xdece6000 Bytes 3993600 FPA fill: 0 Count: 2400 SizeBytes: 1664 SizeBytesAligned: 1664 1st: 0xdece6000 = 0 % Block 0: 0xdece6000 Phys 0x1800000 Bytes 1664 % Block 1: 0xdece6680 Phys 0x1800680 Bytes 1664 % Block 2: 0xdece6d00 Phys 0x1800D00 Bytes 1664 % Block 2396: 0xdf0b3600 Phys 0x1BCD600 Bytes 1664 % Block 2397: 0xdf0b3c80 Phys 0x1BCDC80 Bytes 1664 % Block 2398: 0xdf0b4300 Phys 0x1BCE300 Bytes 1664 % Block 2399: 0xdf0b4980 Phys 0x1BCE980 Bytes 1664 FPA fill: Pool 1 elem_size_words 16 Num: 5400 elem_size_bytes = words * 8 = 128; block_size 128 % Filling Pool 1 with 5400 blocks of 128 bytes 16 words % Huge MemBlock 0xc61eb000 Bytes 691200 FPA fill: 1 Count: 5400 SizeBytes: 128 SizeBytesAligned: 128 1st: 0xc61eb000 = 0x0 % Block 0: 0xc61eb000 Phys 0x1C00000 Bytes 128 % Block 1: 0xc61eb080 Phys 0x1C00080 Bytes 128 % Block 2: 0xc61eb100 Phys 0x1C00100 Bytes 128 % Block 5396: 0xc6293a00 Phys 0x1CA8A00 Bytes 128 % Block 5397: 0xc6293a80 Phys 0x1CA8A80 Bytes 128 % Block 5398: 0xc6293b00 Phys 0x1CA8B00 Bytes 128 % Block 5399: 0xc6293b80 Phys 0x1CA8B80 Bytes 128 FPA fill: Pool 3 elem_size_words 601 Num: 240 elem_size_bytes = words * 8 = 4808; block_size 4864 % Filling Pool 3 with 240 blocks of 4808 bytes 601 words % Huge MemBlock 0xc6294000 Bytes 1167360 FPA fill: 3 Count: 240 SizeBytes: 4808 SizeBytesAligned: 4864 1st: 0xc6294000 = 00 % Block 0: 0xc6294000 Phys 0x1D00000 Bytes 4808 % Block 1: 0xc6295300 Phys 0x1D01300 Bytes 4808 % Block 2: 0xc6296600 Phys 0x1D02600 Bytes 4808 % Block 236: 0xc63ac400 Phys 0x1E18400 Bytes 4808 % Block 237: 0xc63ad700 Phys 0x1E19700 Bytes 4808 % Block 238: 0xc63aea00 Phys 0x1E1AA00 Bytes 4808 % Block 239: 0xc63afd00 Phys 0x1E1BD00 Bytes 4808 FPA fill: Pool 2 elem_size_words 208 Num: 80 elem_size_bytes = words * 8 = 1664; block_size 1664 % Filling Pool 2 with 80 blocks of 1664 bytes 208 words % Huge MemBlock 0xc63b1000 Bytes 133120 FPA fill: 2 Count: 80 SizeBytes: 1664 SizeBytesAligned: 1664 1st: 0xc63b1000 = 0x0 % Block 0: 0xc63b1000 Phys 0x1CC0000 Bytes 1664 % Block 1: 0xc63b1680 Phys 0x1CC0680 Bytes 1664 % Block 2: 0xc63b1d00 Phys 0x1CC0D00 Bytes 1664 % Block 76: 0xc63cfe00 Phys 0x1CDEE00 Bytes 1664 % Block 77: 0xc63d0480 Phys 0x1CDF480 Bytes 1664 % Block 78: 0xc63d0b00 Phys 0x1CDFB00 Bytes 1664 % Block 79: 0xc63d1180 Phys 0x1CE0180 Bytes 1664 rgmx0: Ethernet address: 00:0f:b7:10:49:f2 rgmx0: type (null), full duplex rgmx1: Ethernet address: 00:0f:b7:10:49:f3 rgmx1: type (null), full duplex rgmx2: Ethernet address: 00:0f:b7:10:49:f4 rgmx2: type (null), full duplex rgmx3: Ethernet address: 00:0f:b7:10:49:f5 rgmx3: type (null), full duplex rgmii0: [FILTER] cf0: on nexus0 clock0: on nexus0 clock0: [FILTER] obio0 at mem 0x1 flags 0x1 on nexus0 uart1: on obio0 uart1: [FILTER] uart1: console (115200,n,8,1) uart0: on obio0 uart0: [FILTER] uart0: console (115200,n,8,1) Timecounter "MIPS32" frequency 300000000 Hz quality 800 Timecounters tick every 10.000 msec GEOM: cf0: partition 2 does not start on a track boundary. GEOM: cf0: partition 2 does not end on a track boundary. GEOM: cf0: partition 1 does not start on a track boundary. GEOM: cf0: partition 1 does not end on a track boundary. GEOM: cf0s2: geometry does not match label (64h,32s != 16h,63s). Trying to mount root from ufs:cf0s2a warning: no time-of-day clock registered, system time will not be set accurately Feb 2 23:53:12 init: NSSWITCH(_nsdispatch): nis, passwd_compat, endpwent, not found,d Enter full pathname of shell or RETURN for /bin/sh: /bin/csh % %/sbin/ifconfig rgmx0: flags=8802 metric 0 mtu 1500 options=3 ether 00:0f:b7:10:49:f2 media: Ethernet autoselect rgmx1: flags=8802 metric 0 mtu 1500 options=3 ether 00:0f:b7:10:49:f3 media: Ethernet autoselect rgmx2: flags=8802 metric 0 mtu 1500 options=3 ether 00:0f:b7:10:49:f4 media: Ethernet autoselect rgmx3: flags=8802 metric 0 mtu 1500 options=3 ether 00:0f:b7:10:49:f5 media: Ethernet autoselect lo0: flags=8008 metric 0 mtu 16384 options=3 From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 19:14:05 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71BA61065696 for ; Wed, 3 Feb 2010 19:14:05 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 0386B8FC21 for ; Wed, 3 Feb 2010 19:14:04 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o13JDs1h074209 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 14:13:55 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: <3EAF6158-E3D2-422F-8796-CE2F87C507A4@lakerest.net> From: Randall Stewart To: alan yang In-Reply-To: <290865fd1002031055v5cadc0c5qb02a034b5849b50@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Feb 2010 11:13:54 -0800 References: <290865fd1001262235m13ec4a2em863da596fd9a6c2@mail.gmail.com> <20100127.090718.131509470573849915.imp@bsdimp.com> <290865fd1001280620p300e318bh848cb801d681ff40@mail.gmail.com> <20100128.101357.69891821659229949.imp@bsdimp.com> <290865fd1002031055v5cadc0c5qb02a034b5849b50@mail.gmail.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: Cavium port 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, 03 Feb 2010 19:14:05 -0000 Alan: At least one answer ;-) On Feb 3, 2010, at 10:55 AM, alan yang wrote: > hi, Warner, > > I checkout head, cross compile with OCTEON1-32 conf file and the > kernel boot on ebt5800 now. > But still would like to ask couple questions: > 1. option SMP support > - wonder is there working in progress to get SMP to work Yes, this is on the "todo" list. I hope to be able to devote some time to it as soon as I get my RMI board completely stable where I can build world. On RMI I am close.. but I am still loosing an interrupt or something under heavy load ;-o > 2. rgmx interface > - seems to have problem getting interface rgmx to work (ifconfig > to set static ip,...etc. but ping failed). I noticed your 1/26 blog > mentioned some problem in this area that i also tried 'comment out the > enableintr() call in mips_vector_init around line 365 of > sys/mips/mips/machdep.c' . wonder is there solution or something that > i missed. > I can't speak on this 100% but last time I chatted with Warner I know this device was also why he was not booting from NFS and building world.. So I am sure its on his todo list ;-) R > Thanks again for help. > > -- > > U-Boot 1.1.1 (U-boot build #: 176) (SDK version: 1.7.1-240) (Build > time: Feb 1 2008 ) > > EBT5800 board revision major:2, minor:0, serial #: 2008-2.0-00251 > OCTEON CN5860-NSP pass 1.1, Core clock: 600 MHz, DDR clock: 400 MHz > (800 Mhz data rat) > DRAM: 2048 MB > Flash: 8 MB > Clearing DRAM........ done > BIST check passed. > Net: octeth0, octeth1, octeth2, octeth3 > Bus 0 (CF Card): OK > > ide 0: Model: 1024MB CompactFlash Card Firm: CF_A408J Ser#: > A181109948O004036618 > Type: Hard Disk > Capacity: 977.4 MB = 0.9 GB (2001888 x 512) > Octeon ebt5800# fatload ide 0 20000000 kernel > reading kernel > > 3285400 bytes read > Octeon ebt5800# bootoctlinux 20000000 numcores=1 > argv[2]: numcores=1 > ELF file is 32 bit > Skipping non LOAD program header (type 0x6) > Skipping non LOAD program header (type 0x3) > Skipping non LOAD program header (type 0x70000000) > Allocated memory for ELF segment: addr: 0x1000000, size 0x2967e0 > Loading .text @ 0x810000d4 (2064172 bytes) > Loading .MIPS.stubs @ 0x811f8000 (16 bytes) > Loading .rodata @ 0x811fa000 (33248 bytes) > Loading .reginfo @ 0x812021e0 (24 bytes) > Loading .rodata.str1.4 @ 0x812021f8 (193028 bytes) > Loading set_sysctl_set @ 0x812313fc (3500 bytes) > Loading set_sysinit_set @ 0x812321a8 (1692 bytes) > Loading set_sysuninit_set @ 0x81232844 (964 bytes) > Loading .interp @ 0x81232c08 (13 bytes) > Loading .dynsym @ 0x81232c18 (78256 bytes) > Loading .dynstr @ 0x81245dc8 (72061 bytes) > Loading .hash @ 0x81257748 (35968 bytes) > Loading set_kdb_dbbe_set @ 0x812603c8 (8 bytes) > Loading set_modmetadata_set @ 0x812603d0 (288 bytes) > Loading set_cons_set @ 0x812604f0 (8 bytes) > Loading .data @ 0x812604f8 (116360 bytes) > Loading set_pcpu @ 0x8127cb80 (3136 bytes) > Loading .got @ 0x8127d7c0 (5292 bytes) > Loading .rld_map @ 0x8127ec6c (4 bytes) > Loading .sdata @ 0x8127ec70 (16 bytes) > Clearing .bss @ 0x8127ec80 (97120 bytes) > ## Loading Linux kernel with entry point: 0x810000e0 ... > Bootloader: Done loading app on coremask: 0x1 > Boot Descriptor Ver: 6 -> 1/2 CPU clock: 600MHz > Dram: 2048 MB Board Type: 15 Revision: 2/0 > Octeon Chip: 0 Rev 0/0 Mac Address 00.0F.B7.10.49.F2 (14) > octeon_dram == 80000000 > reduced to ram: 2048 MBReal memory bytes is 7ffff000 > phys_avail[0] = 1297000 phys_avail[1] = fffffff > realmem_bytes is now at 5ffff000 > Next block of memory goes from 20000000 to 7ffff000 > > Total DRAM Size 0x80000000 > Bank 0 = 0x 1297000 -> 0x FFFFFFF > Bank 1 = 0x20000000 -> 0x7FFFF000 > > physmem: 0x6ed68Cache info: > picache_stride = 4096 > picache_loopcount = 8 > pdcache_stride = 128 > pdcache_loopcount = 64 > cpu0: Cavium processor v1.3 > MMU: Standard TLB, 64 entries > L1 i-cache: 4 ways of 64 sets, 128 bytes per line > L1 d-cache: 64 ways of 1 sets, 128 bytes per line > Config1=0xfe3303da > Config3=0x1080 > KDB: debugger backends: ddb > KDB: current backend: ddb > hz=100 cyl_per_hz:300000 cyl_per_usec:300 freq:300000000 > cyl_per_hz:3000000 cyl_per_s0 > Copyright (c) 1992-2010 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, > 1994 > The Regents of the University of California. All rights > reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 9.0-CURRENT #3 r203169M: Tue Feb 2 14:19:40 PST 2010 > root@Fujitsu.nt-fsrvr.o2micro.com:/usr/home/alan/genova/FreeBSD/ > head/obj/mips/usrs > real memory = 1859551232 (1815968K bytes) > avail memory = 1813176320 (1729MB) > nexus0: > Compact flash found in bootbus region 3 (8 bit). > rgmii0: on nexus0 > FPA fill: Pool 0 elem_size_words 208 Num: 2400 > elem_size_bytes = words * 8 = 1664; block_size 1664 > % Filling Pool 0 with 2400 blocks of 1664 bytes 208 words > % Huge MemBlock 0xdece6000 Bytes 3993600 > FPA fill: 0 Count: 2400 SizeBytes: 1664 SizeBytesAligned: 1664 > 1st: 0xdece6000 = 0 > % Block 0: 0xdece6000 Phys 0x1800000 Bytes 1664 > % Block 1: 0xdece6680 Phys 0x1800680 Bytes 1664 > % Block 2: 0xdece6d00 Phys 0x1800D00 Bytes 1664 > % Block 2396: 0xdf0b3600 Phys 0x1BCD600 Bytes 1664 > % Block 2397: 0xdf0b3c80 Phys 0x1BCDC80 Bytes 1664 > % Block 2398: 0xdf0b4300 Phys 0x1BCE300 Bytes 1664 > % Block 2399: 0xdf0b4980 Phys 0x1BCE980 Bytes 1664 > FPA fill: Pool 1 elem_size_words 16 Num: 5400 > elem_size_bytes = words * 8 = 128; block_size 128 > % Filling Pool 1 with 5400 blocks of 128 bytes 16 words > % Huge MemBlock 0xc61eb000 Bytes 691200 > FPA fill: 1 Count: 5400 SizeBytes: 128 SizeBytesAligned: 128 1st: > 0xc61eb000 = 0x0 > % Block 0: 0xc61eb000 Phys 0x1C00000 Bytes 128 > % Block 1: 0xc61eb080 Phys 0x1C00080 Bytes 128 > % Block 2: 0xc61eb100 Phys 0x1C00100 Bytes 128 > % Block 5396: 0xc6293a00 Phys 0x1CA8A00 Bytes 128 > % Block 5397: 0xc6293a80 Phys 0x1CA8A80 Bytes 128 > % Block 5398: 0xc6293b00 Phys 0x1CA8B00 Bytes 128 > % Block 5399: 0xc6293b80 Phys 0x1CA8B80 Bytes 128 > FPA fill: Pool 3 elem_size_words 601 Num: 240 > elem_size_bytes = words * 8 = 4808; block_size 4864 > % Filling Pool 3 with 240 blocks of 4808 bytes 601 words > % Huge MemBlock 0xc6294000 Bytes 1167360 > FPA fill: 3 Count: 240 SizeBytes: 4808 SizeBytesAligned: 4864 1st: > 0xc6294000 = 00 > % Block 0: 0xc6294000 Phys 0x1D00000 Bytes 4808 > % Block 1: 0xc6295300 Phys 0x1D01300 Bytes 4808 > % Block 2: 0xc6296600 Phys 0x1D02600 Bytes 4808 > % Block 236: 0xc63ac400 Phys 0x1E18400 Bytes 4808 > % Block 237: 0xc63ad700 Phys 0x1E19700 Bytes 4808 > % Block 238: 0xc63aea00 Phys 0x1E1AA00 Bytes 4808 > % Block 239: 0xc63afd00 Phys 0x1E1BD00 Bytes 4808 > FPA fill: Pool 2 elem_size_words 208 Num: 80 > elem_size_bytes = words * 8 = 1664; block_size 1664 > % Filling Pool 2 with 80 blocks of 1664 bytes 208 words > % Huge MemBlock 0xc63b1000 Bytes 133120 > FPA fill: 2 Count: 80 SizeBytes: 1664 SizeBytesAligned: 1664 1st: > 0xc63b1000 = 0x0 > % Block 0: 0xc63b1000 Phys 0x1CC0000 Bytes 1664 > % Block 1: 0xc63b1680 Phys 0x1CC0680 Bytes 1664 > % Block 2: 0xc63b1d00 Phys 0x1CC0D00 Bytes 1664 > % Block 76: 0xc63cfe00 Phys 0x1CDEE00 Bytes 1664 > % Block 77: 0xc63d0480 Phys 0x1CDF480 Bytes 1664 > % Block 78: 0xc63d0b00 Phys 0x1CDFB00 Bytes 1664 > % Block 79: 0xc63d1180 Phys 0x1CE0180 Bytes 1664 > rgmx0: Ethernet address: 00:0f:b7:10:49:f2 > rgmx0: type (null), full duplex > rgmx1: Ethernet address: 00:0f:b7:10:49:f3 > rgmx1: type (null), full duplex > rgmx2: Ethernet address: 00:0f:b7:10:49:f4 > rgmx2: type (null), full duplex > rgmx3: Ethernet address: 00:0f:b7:10:49:f5 > rgmx3: type (null), full duplex > rgmii0: [FILTER] > cf0: on nexus0 > clock0: on nexus0 > clock0: [FILTER] > obio0 at mem 0x1 flags 0x1 on nexus0 > uart1: on obio0 > uart1: [FILTER] > uart1: console (115200,n,8,1) > uart0: on obio0 > uart0: [FILTER] > uart0: console (115200,n,8,1) > Timecounter "MIPS32" frequency 300000000 Hz quality 800 > Timecounters tick every 10.000 msec > GEOM: cf0: partition 2 does not start on a track boundary. > GEOM: cf0: partition 2 does not end on a track boundary. > GEOM: cf0: partition 1 does not start on a track boundary. > GEOM: cf0: partition 1 does not end on a track boundary. > GEOM: cf0s2: geometry does not match label (64h,32s != 16h,63s). > Trying to mount root from ufs:cf0s2a > warning: no time-of-day clock registered, system time will not be > set accurately > Feb 2 23:53:12 init: NSSWITCH(_nsdispatch): nis, passwd_compat, > endpwent, not found,d > Enter full pathname of shell or RETURN for /bin/sh: /bin/csh > % > %/sbin/ifconfig > rgmx0: flags=8802 metric 0 mtu 1500 > options=3 > ether 00:0f:b7:10:49:f2 > media: Ethernet autoselect > rgmx1: flags=8802 metric 0 mtu 1500 > options=3 > ether 00:0f:b7:10:49:f3 > media: Ethernet autoselect > rgmx2: flags=8802 metric 0 mtu 1500 > options=3 > ether 00:0f:b7:10:49:f4 > media: Ethernet autoselect > rgmx3: flags=8802 metric 0 mtu 1500 > options=3 > ether 00:0f:b7:10:49:f5 > media: Ethernet autoselect > lo0: flags=8008 metric 0 mtu 16384 > options=3 > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 19:31:37 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F74D106568B for ; Wed, 3 Feb 2010 19:31:37 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34402.mail.mud.yahoo.com (web34402.mail.mud.yahoo.com [66.163.178.151]) by mx1.freebsd.org (Postfix) with SMTP id DF82E8FC0C for ; Wed, 3 Feb 2010 19:31:36 +0000 (UTC) Received: (qmail 53177 invoked by uid 60001); 3 Feb 2010 19:31:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265225496; bh=KCxOAC3VL3WoBv8XOhHX96ahfEM7/h/RlEG9mp1YLpI=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=dG9c9ORSf+wcMJZNP6IcB+V9FyZu+jotZAK8/1M8tTK9NrGWcDn8ZCBzpKaUGvM5nIKvuszQiKycscrhl/TXcXmPb64Tr69qXJkXD+K3o2xwbjUu+SzMXKgY4+J2bvIz9McFce89ivTdo3ZIgivE3an0pOQagg7DX/CRGx3bxrY= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=nCk1/zTVXk5blVlUjq7RgRTMzLXJgPHQclwhkIqkujXP3OpbZcmt+Ghp5m1U+pTQo2GkP+tItiMWq7bFR8p8omPG8Xz+xZZbpKhWtTKahx9/XoYSUp2oo6nkcX9A9Eic3NqmZehWMGBKXYe9p/8ImZV3XVpdEdS7ji3RU5JGzpw=; Message-ID: <296949.49663.qm@web34402.mail.mud.yahoo.com> X-YMail-OSG: 8LED1joVM1nyrynPG2tX3WFV4d.VbPlyQWXva3s5dkBslPVDOMeAX1h5RbntYdiBZjJYBtiSAhDHq7r6861Q9FRJswaZ_jNxz2T5CMDiSRa9UWnAYOGnaTiT7KoSp2vtisJ5nt9GIG3SzQ3AW_.rwvmFA0p1ZOmFU0PwTPIO55M2Z1njxE2yDOnoGGyHFs1uEwWfxfnzWdPvSRH.elh.rQpmyeeMRLMKMQSEyfgoLM_FXti2lyqRv3DSst6pwVSgHMqPd7_o_rD7286EvReCXr0F0HgjEaD6oY0XwA9qsWzokaXVyAMDMXeIMM2.S.FABPkTrYymnfPBA4rXLzF3laEGeXAtoEgeIkN1G8sS3xeq9E5PGsGDg_1GPDaPqY7SCKtoFciKxytk9IX314Y8s6.TBt2AEqVS6G3hgTW1cSKpAmzxsZm5aVOq.fZH0yc5Mja0pBQX Received: from [198.95.226.228] by web34402.mail.mud.yahoo.com via HTTP; Wed, 03 Feb 2010 11:31:36 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Wed, 3 Feb 2010 11:31:36 -0800 (PST) From: Neelkanth Natu To: Rui Paulo , "C. Jayachandran" In-Reply-To: <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 19:31:37 -0000 Hi JC, Your patch looks good. I have a few comments though. See inline: Index: lib/libc/mips/sys/ptrace.S =================================================================== --- lib/libc/mips/sys/ptrace.S (revision 203379) +++ lib/libc/mips/sys/ptrace.S (working copy) @@ -42,14 +42,26 @@ #endif /* LIBC_SCCS and not lint */ LEAF(ptrace) + .frame sp,40,ra >> space missing after the ',' + .mask 0x80000000, -8 #ifdef __ABICALLS__ .set noreorder .cpload t9 .set reorder #endif + subu sp, sp, 40 + sw ra, 32(sp) +#ifdef __ABICALLS__ + .cprestore 16 +#endif la t9, _C_LABEL(__error) # locate address of errno - jalr t9 + jalr t9 >> this change is not required - the newly added line has a tab at the end. +#ifdef __ABICALLS__ + lw gp, 16(sp) +#endif >> this is redundant - the assembler will generate exactly the same line of >> code due to the .cprestore directive above. sw zero, 0(v0) + lw ra, 32(sp) + addu sp, sp, 40 li v0, SYS_ptrace syscall bne a3, zero, 1f best Neel --- On Wed, 2/3/10, C. Jayachandran wrote: > From: C. Jayachandran > Subject: Re: mips ptrace.S fix > To: "Rui Paulo" > Cc: freebsd-mips@freebsd.org > Date: Wednesday, February 3, 2010, 2:27 AM > On Wed, Feb 3, 2010 at 3:49 PM, Rui > Paulo > wrote: > > On 3 Feb 2010, at 03:06, C. Jayachandran wrote: > > > >> The ptrace system call implementation seems to > have a bug, we need to > >> save ra and gp before calling the __error, and > that will need a stack > >> frame. > >> > >> I've attached a patch that should fix this for o32 > ABI - but it really > >> should be written with ABI-independent macros, any > clue on how to do > >> this which will take care of n32/64 too will be > helpful. > >> > >> I also have some initial patches for making gdb > work on MIPS. . That > >> patch is also attached, but it is work in > progress, only the static > >> executables work now. > > > > I think you forgot the attachments or they were > stripped out. > > I think the attachments were stripped out, may be by the > mailing list > itself. I had them as attachments since I was worried > that gmail will > damage white-space if I did it inline. > > Is there a standard way of submitting patches to the list? > For now I > have the patches at: > http://sites.google.com/site/cjayachandran/files (the > files are > ptrace.S.patch and gdb.patch) > > Thanks, > JC. > _______________________________________________ > freebsd-mips@freebsd.org > mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 19:53:06 2010 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76071106566C for ; Wed, 3 Feb 2010 19:53:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 0929E8FC1F for ; Wed, 3 Feb 2010 19:53:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o13JYRMg075207; Wed, 3 Feb 2010 12:34:27 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Wed, 03 Feb 2010 12:35:22 -0700 (MST) Message-Id: <20100203.123522.649807917541218528.imp@bsdimp.com> To: alancyang@gmail.com From: "M. Warner Losh" In-Reply-To: <290865fd1002031055v5cadc0c5qb02a034b5849b50@mail.gmail.com> References: <290865fd1001280620p300e318bh848cb801d681ff40@mail.gmail.com> <20100128.101357.69891821659229949.imp@bsdimp.com> <290865fd1002031055v5cadc0c5qb02a034b5849b50@mail.gmail.com> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@FreeBSD.org Subject: Re: Cavium port 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, 03 Feb 2010 19:53:06 -0000 In message: <290865fd1002031055v5cadc0c5qb02a034b5849b50@mail.gmail.com> alan yang writes: : I checkout head, cross compile with OCTEON1-32 conf file and the : kernel boot on ebt5800 now. Very cool... : But still would like to ask couple questions: : 1. option SMP support : - wonder is there working in progress to get SMP to work Yes. The Cavium port has some pieces, and there's work to get SMP working on the Sibyte SB-1 core (dual core) and RMI as well... : 2. rgmx interface : - seems to have problem getting interface rgmx to work (ifconfig : to set static ip,...etc. but ping failed). I noticed your 1/26 blog : mentioned some problem in this area that i also tried 'comment out the : enableintr() call in mips_vector_init around line 365 of : sys/mips/mips/machdep.c' . wonder is there solution or something that : i missed. I get an interrupt storm when the serial port attaches if I don't do that. I'm also having problems with the rgmx interfaces too. No status is reported, so dhcp doesn't work. I can ping, but when I telnet/ssh in to the box, the port becomes unresponsive... I'm working on these issues as I find time... Warner : Thanks again for help. : : -- : : U-Boot 1.1.1 (U-boot build #: 176) (SDK version: 1.7.1-240) (Build : time: Feb 1 2008 ) : : EBT5800 board revision major:2, minor:0, serial #: 2008-2.0-00251 : OCTEON CN5860-NSP pass 1.1, Core clock: 600 MHz, DDR clock: 400 MHz : (800 Mhz data rat) : DRAM: 2048 MB : Flash: 8 MB : Clearing DRAM........ done : BIST check passed. : Net: octeth0, octeth1, octeth2, octeth3 : Bus 0 (CF Card): OK : : ide 0: Model: 1024MB CompactFlash Card Firm: CF_A408J Ser#: : A181109948O004036618 : Type: Hard Disk : Capacity: 977.4 MB = 0.9 GB (2001888 x 512) : Octeon ebt5800# fatload ide 0 20000000 kernel : reading kernel : : 3285400 bytes read : Octeon ebt5800# bootoctlinux 20000000 numcores=1 : argv[2]: numcores=1 : ELF file is 32 bit : Skipping non LOAD program header (type 0x6) : Skipping non LOAD program header (type 0x3) : Skipping non LOAD program header (type 0x70000000) : Allocated memory for ELF segment: addr: 0x1000000, size 0x2967e0 : Loading .text @ 0x810000d4 (2064172 bytes) : Loading .MIPS.stubs @ 0x811f8000 (16 bytes) : Loading .rodata @ 0x811fa000 (33248 bytes) : Loading .reginfo @ 0x812021e0 (24 bytes) : Loading .rodata.str1.4 @ 0x812021f8 (193028 bytes) : Loading set_sysctl_set @ 0x812313fc (3500 bytes) : Loading set_sysinit_set @ 0x812321a8 (1692 bytes) : Loading set_sysuninit_set @ 0x81232844 (964 bytes) : Loading .interp @ 0x81232c08 (13 bytes) : Loading .dynsym @ 0x81232c18 (78256 bytes) : Loading .dynstr @ 0x81245dc8 (72061 bytes) : Loading .hash @ 0x81257748 (35968 bytes) : Loading set_kdb_dbbe_set @ 0x812603c8 (8 bytes) : Loading set_modmetadata_set @ 0x812603d0 (288 bytes) : Loading set_cons_set @ 0x812604f0 (8 bytes) : Loading .data @ 0x812604f8 (116360 bytes) : Loading set_pcpu @ 0x8127cb80 (3136 bytes) : Loading .got @ 0x8127d7c0 (5292 bytes) : Loading .rld_map @ 0x8127ec6c (4 bytes) : Loading .sdata @ 0x8127ec70 (16 bytes) : Clearing .bss @ 0x8127ec80 (97120 bytes) : ## Loading Linux kernel with entry point: 0x810000e0 ... : Bootloader: Done loading app on coremask: 0x1 : Boot Descriptor Ver: 6 -> 1/2 CPU clock: 600MHz : Dram: 2048 MB Board Type: 15 Revision: 2/0 : Octeon Chip: 0 Rev 0/0 Mac Address 00.0F.B7.10.49.F2 (14) : octeon_dram == 80000000 : reduced to ram: 2048 MBReal memory bytes is 7ffff000 : phys_avail[0] = 1297000 phys_avail[1] = fffffff : realmem_bytes is now at 5ffff000 : Next block of memory goes from 20000000 to 7ffff000 : : Total DRAM Size 0x80000000 : Bank 0 = 0x 1297000 -> 0x FFFFFFF : Bank 1 = 0x20000000 -> 0x7FFFF000 : : physmem: 0x6ed68Cache info: : picache_stride = 4096 : picache_loopcount = 8 : pdcache_stride = 128 : pdcache_loopcount = 64 : cpu0: Cavium processor v1.3 : MMU: Standard TLB, 64 entries : L1 i-cache: 4 ways of 64 sets, 128 bytes per line : L1 d-cache: 64 ways of 1 sets, 128 bytes per line : Config1=0xfe3303da : Config3=0x1080 : KDB: debugger backends: ddb : KDB: current backend: ddb : hz=100 cyl_per_hz:300000 cyl_per_usec:300 freq:300000000 : cyl_per_hz:3000000 cyl_per_s0 : Copyright (c) 1992-2010 The FreeBSD Project. : Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 : The Regents of the University of California. All rights reserved. : FreeBSD is a registered trademark of The FreeBSD Foundation. : FreeBSD 9.0-CURRENT #3 r203169M: Tue Feb 2 14:19:40 PST 2010 : root@Fujitsu.nt-fsrvr.o2micro.com:/usr/home/alan/genova/FreeBSD/head/obj/mips/usrs : real memory = 1859551232 (1815968K bytes) : avail memory = 1813176320 (1729MB) : nexus0: : Compact flash found in bootbus region 3 (8 bit). : rgmii0: on nexus0 : FPA fill: Pool 0 elem_size_words 208 Num: 2400 : elem_size_bytes = words * 8 = 1664; block_size 1664 : % Filling Pool 0 with 2400 blocks of 1664 bytes 208 words : % Huge MemBlock 0xdece6000 Bytes 3993600 : FPA fill: 0 Count: 2400 SizeBytes: 1664 SizeBytesAligned: 1664 : 1st: 0xdece6000 = 0 : % Block 0: 0xdece6000 Phys 0x1800000 Bytes 1664 : % Block 1: 0xdece6680 Phys 0x1800680 Bytes 1664 : % Block 2: 0xdece6d00 Phys 0x1800D00 Bytes 1664 : % Block 2396: 0xdf0b3600 Phys 0x1BCD600 Bytes 1664 : % Block 2397: 0xdf0b3c80 Phys 0x1BCDC80 Bytes 1664 : % Block 2398: 0xdf0b4300 Phys 0x1BCE300 Bytes 1664 : % Block 2399: 0xdf0b4980 Phys 0x1BCE980 Bytes 1664 : FPA fill: Pool 1 elem_size_words 16 Num: 5400 : elem_size_bytes = words * 8 = 128; block_size 128 : % Filling Pool 1 with 5400 blocks of 128 bytes 16 words : % Huge MemBlock 0xc61eb000 Bytes 691200 : FPA fill: 1 Count: 5400 SizeBytes: 128 SizeBytesAligned: 128 1st: : 0xc61eb000 = 0x0 : % Block 0: 0xc61eb000 Phys 0x1C00000 Bytes 128 : % Block 1: 0xc61eb080 Phys 0x1C00080 Bytes 128 : % Block 2: 0xc61eb100 Phys 0x1C00100 Bytes 128 : % Block 5396: 0xc6293a00 Phys 0x1CA8A00 Bytes 128 : % Block 5397: 0xc6293a80 Phys 0x1CA8A80 Bytes 128 : % Block 5398: 0xc6293b00 Phys 0x1CA8B00 Bytes 128 : % Block 5399: 0xc6293b80 Phys 0x1CA8B80 Bytes 128 : FPA fill: Pool 3 elem_size_words 601 Num: 240 : elem_size_bytes = words * 8 = 4808; block_size 4864 : % Filling Pool 3 with 240 blocks of 4808 bytes 601 words : % Huge MemBlock 0xc6294000 Bytes 1167360 : FPA fill: 3 Count: 240 SizeBytes: 4808 SizeBytesAligned: 4864 1st: : 0xc6294000 = 00 : % Block 0: 0xc6294000 Phys 0x1D00000 Bytes 4808 : % Block 1: 0xc6295300 Phys 0x1D01300 Bytes 4808 : % Block 2: 0xc6296600 Phys 0x1D02600 Bytes 4808 : % Block 236: 0xc63ac400 Phys 0x1E18400 Bytes 4808 : % Block 237: 0xc63ad700 Phys 0x1E19700 Bytes 4808 : % Block 238: 0xc63aea00 Phys 0x1E1AA00 Bytes 4808 : % Block 239: 0xc63afd00 Phys 0x1E1BD00 Bytes 4808 : FPA fill: Pool 2 elem_size_words 208 Num: 80 : elem_size_bytes = words * 8 = 1664; block_size 1664 : % Filling Pool 2 with 80 blocks of 1664 bytes 208 words : % Huge MemBlock 0xc63b1000 Bytes 133120 : FPA fill: 2 Count: 80 SizeBytes: 1664 SizeBytesAligned: 1664 1st: : 0xc63b1000 = 0x0 : % Block 0: 0xc63b1000 Phys 0x1CC0000 Bytes 1664 : % Block 1: 0xc63b1680 Phys 0x1CC0680 Bytes 1664 : % Block 2: 0xc63b1d00 Phys 0x1CC0D00 Bytes 1664 : % Block 76: 0xc63cfe00 Phys 0x1CDEE00 Bytes 1664 : % Block 77: 0xc63d0480 Phys 0x1CDF480 Bytes 1664 : % Block 78: 0xc63d0b00 Phys 0x1CDFB00 Bytes 1664 : % Block 79: 0xc63d1180 Phys 0x1CE0180 Bytes 1664 : rgmx0: Ethernet address: 00:0f:b7:10:49:f2 : rgmx0: type (null), full duplex : rgmx1: Ethernet address: 00:0f:b7:10:49:f3 : rgmx1: type (null), full duplex : rgmx2: Ethernet address: 00:0f:b7:10:49:f4 : rgmx2: type (null), full duplex : rgmx3: Ethernet address: 00:0f:b7:10:49:f5 : rgmx3: type (null), full duplex : rgmii0: [FILTER] : cf0: on nexus0 : clock0: on nexus0 : clock0: [FILTER] : obio0 at mem 0x1 flags 0x1 on nexus0 : uart1: on obio0 : uart1: [FILTER] : uart1: console (115200,n,8,1) : uart0: on obio0 : uart0: [FILTER] : uart0: console (115200,n,8,1) : Timecounter "MIPS32" frequency 300000000 Hz quality 800 : Timecounters tick every 10.000 msec : GEOM: cf0: partition 2 does not start on a track boundary. : GEOM: cf0: partition 2 does not end on a track boundary. : GEOM: cf0: partition 1 does not start on a track boundary. : GEOM: cf0: partition 1 does not end on a track boundary. : GEOM: cf0s2: geometry does not match label (64h,32s != 16h,63s). : Trying to mount root from ufs:cf0s2a : warning: no time-of-day clock registered, system time will not be set accurately : Feb 2 23:53:12 init: NSSWITCH(_nsdispatch): nis, passwd_compat, : endpwent, not found,d : Enter full pathname of shell or RETURN for /bin/sh: /bin/csh : % : %/sbin/ifconfig : rgmx0: flags=8802 metric 0 mtu 1500 : options=3 : ether 00:0f:b7:10:49:f2 : media: Ethernet autoselect : rgmx1: flags=8802 metric 0 mtu 1500 : options=3 : ether 00:0f:b7:10:49:f3 : media: Ethernet autoselect : rgmx2: flags=8802 metric 0 mtu 1500 : options=3 : ether 00:0f:b7:10:49:f4 : media: Ethernet autoselect : rgmx3: flags=8802 metric 0 mtu 1500 : options=3 : ether 00:0f:b7:10:49:f5 : media: Ethernet autoselect : lo0: flags=8008 metric 0 mtu 16384 : options=3 : : From owner-freebsd-mips@FreeBSD.ORG Wed Feb 3 20:51:45 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 485AD1065692; Wed, 3 Feb 2010 20:51:45 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id DDFF08FC23; Wed, 3 Feb 2010 20:51:44 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o13KpfMX078395 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 3 Feb 2010 15:51:42 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: From: Randall Stewart To: Neelkanth Natu In-Reply-To: <296949.49663.qm@web34402.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Wed, 3 Feb 2010 12:51:41 -0800 References: <296949.49663.qm@web34402.mail.mud.yahoo.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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, 03 Feb 2010 20:51:45 -0000 Neel: Good point.. I will fix these in head since I pushed his patch in ;-) R On Feb 3, 2010, at 11:31 AM, Neelkanth Natu wrote: > Hi JC, > > Your patch looks good. I have a few comments though. See inline: > > Index: lib/libc/mips/sys/ptrace.S > =================================================================== > --- lib/libc/mips/sys/ptrace.S (revision 203379) > +++ lib/libc/mips/sys/ptrace.S (working copy) > @@ -42,14 +42,26 @@ > #endif /* LIBC_SCCS and not lint */ > > LEAF(ptrace) > + .frame sp,40,ra > >>> space missing after the ',' > > + .mask 0x80000000, -8 > #ifdef __ABICALLS__ > .set noreorder > .cpload t9 > .set reorder > #endif > + subu sp, sp, 40 > + sw ra, 32(sp) > +#ifdef __ABICALLS__ > + .cprestore 16 > +#endif > la t9, _C_LABEL(__error) # locate address of errno > - jalr t9 > + jalr t9 > >>> this change is not required - the newly added line has a tab at >>> the end. > > +#ifdef __ABICALLS__ > + lw gp, 16(sp) > +#endif > >>> this is redundant - the assembler will generate exactly the same >>> line of >>> code due to the .cprestore directive above. > > sw zero, 0(v0) > + lw ra, 32(sp) > + addu sp, sp, 40 > li v0, SYS_ptrace > syscall > bne a3, zero, 1f > > best > Neel > > --- On Wed, 2/3/10, C. Jayachandran wrote: > >> From: C. Jayachandran >> Subject: Re: mips ptrace.S fix >> To: "Rui Paulo" >> Cc: freebsd-mips@freebsd.org >> Date: Wednesday, February 3, 2010, 2:27 AM >> On Wed, Feb 3, 2010 at 3:49 PM, Rui >> Paulo >> wrote: >>> On 3 Feb 2010, at 03:06, C. Jayachandran wrote: >>> >>>> The ptrace system call implementation seems to >> have a bug, we need to >>>> save ra and gp before calling the __error, and >> that will need a stack >>>> frame. >>>> >>>> I've attached a patch that should fix this for o32 >> ABI - but it really >>>> should be written with ABI-independent macros, any >> clue on how to do >>>> this which will take care of n32/64 too will be >> helpful. >>>> >>>> I also have some initial patches for making gdb >> work on MIPS. . That >>>> patch is also attached, but it is work in >> progress, only the static >>>> executables work now. >>> >>> I think you forgot the attachments or they were >> stripped out. >> >> I think the attachments were stripped out, may be by the >> mailing list >> itself. I had them as attachments since I was worried >> that gmail will >> damage white-space if I did it inline. >> >> Is there a standard way of submitting patches to the list? >> For now I >> have the patches at: >> http://sites.google.com/site/cjayachandran/files (the >> files are >> ptrace.S.patch and gdb.patch) >> >> Thanks, >> JC. >> _______________________________________________ >> freebsd-mips@freebsd.org >> mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-mips >> To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org >> " >> > > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 02:09:34 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D331D106568B; Thu, 4 Feb 2010 02:09:34 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id A1CFA8FC22; Thu, 4 Feb 2010 02:09:33 +0000 (UTC) Received: by pxi13 with SMTP id 13so817348pxi.3 for ; Wed, 03 Feb 2010 18:09:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=VZPVqlMANYP4lFilxI+J6IGRbyOwdmHVEiFetdL5jmU=; b=gHA3wSjmgaiPXc3FEMtU5zOyex2CqlWYvgSAULjIuNu/fQUF+3kkrBDf6bcSIdZ1Ua pP6r4+sNFgXS12IxqtwGJud7yOYvu7s9/Un8QbyuYF39FFiK5sk/SFNyldrvcqbfJaKu /95NEcRvw7vjAZnBX8NRNukIZGv6Gxe5sR11E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=YcyAcJxJ8/as7tkkDuTsxmV8x6gHukgxUHfwf5g6r50VNK4kevlTLcT29sksl9x+/4 po/GY/XzZlPiYTKUA32SdmX+3BJHUAdT+KhQbDwH03ZzmH6sYYVhcM8groLe3frQ18j0 poz2gOsZ6+XTmHoQSgZ4+QdHVzar0pLsIRByY= MIME-Version: 1.0 Received: by 10.141.23.16 with SMTP id a16mr331559rvj.95.1265249372313; Wed, 03 Feb 2010 18:09:32 -0800 (PST) In-Reply-To: <296949.49663.qm@web34402.mail.mud.yahoo.com> References: <98a59be81002030227u43b0e601q2eebb383debc230b@mail.gmail.com> <296949.49663.qm@web34402.mail.mud.yahoo.com> Date: Thu, 4 Feb 2010 07:39:32 +0530 Message-ID: <98a59be81002031809p70f0154dnd9a1744ade7aac33@mail.gmail.com> From: "C. Jayachandran" To: Neelkanth Natu Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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: Thu, 04 Feb 2010 02:09:34 -0000 On Thu, Feb 4, 2010 at 1:01 AM, Neelkanth Natu wrote: > Your patch looks good. I have a few comments though. See inline: > > Index: lib/libc/mips/sys/ptrace.S > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- lib/libc/mips/sys/ptrace.S =C2=A0(revision 203379) > +++ lib/libc/mips/sys/ptrace.S =C2=A0(working copy) > @@ -42,14 +42,26 @@ > =C2=A0#endif /* LIBC_SCCS and not lint */ > > =C2=A0LEAF(ptrace) > + =C2=A0 =C2=A0 =C2=A0 .frame =C2=A0sp,40,ra > >>> space missing after the ',' > > + =C2=A0 =C2=A0 =C2=A0 .mask =C2=A0 0x80000000, -8 > =C2=A0#ifdef __ABICALLS__ > =C2=A0 =C2=A0 =C2=A0 =C2=A0.set =C2=A0 =C2=A0noreorder > =C2=A0 =C2=A0 =C2=A0 =C2=A0.cpload t9 > =C2=A0 =C2=A0 =C2=A0 =C2=A0.set =C2=A0 =C2=A0reorder > =C2=A0#endif > + =C2=A0 =C2=A0 =C2=A0 subu =C2=A0 =C2=A0sp, sp, 40 > + =C2=A0 =C2=A0 =C2=A0 sw =C2=A0 =C2=A0 =C2=A0ra, =C2=A032(sp) > +#ifdef __ABICALLS__ > + =C2=A0 =C2=A0 =C2=A0 .cprestore 16 > +#endif > =C2=A0 =C2=A0 =C2=A0 =C2=A0la =C2=A0 =C2=A0 =C2=A0t9, _C_LABEL(__error) = =C2=A0 # locate address of errno > - =C2=A0 =C2=A0 =C2=A0 jalr =C2=A0 =C2=A0t9 > + =C2=A0 =C2=A0 =C2=A0 jalr =C2=A0 =C2=A0t9 > >>> this change is not required - the newly added line has a tab at the end= . > > +#ifdef __ABICALLS__ > + =C2=A0 =C2=A0 =C2=A0 lw =C2=A0 =C2=A0 =C2=A0gp, 16(sp) > +#endif > >>> this is redundant - the assembler will generate exactly the same line o= f >>> code due to the .cprestore directive above. Are you sure about this? I think the assembler generates the gp load only for the 'jal' and 'bal' not for 'jalr'. Probably the two lines(la and jalr) can be replaced by a jal. Regards, JC. From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 02:56:21 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E476B1065672 for ; Thu, 4 Feb 2010 02:56:21 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34402.mail.mud.yahoo.com (web34402.mail.mud.yahoo.com [66.163.178.151]) by mx1.freebsd.org (Postfix) with SMTP id A2D948FC0C for ; Thu, 4 Feb 2010 02:56:21 +0000 (UTC) Received: (qmail 7550 invoked by uid 60001); 4 Feb 2010 02:56:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265252180; bh=80ZybuTSxXH62XFI9LCSKfqVvtcwSraHcJhh0beOiHY=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=JAkBsE/2+1B0D8MHGN2xp8aFdGh+XpgLVbYdEbMsCOqX4Qce6tb+TTry9ETAHYfCFsxoZuXPHoWuGNUqQJtA9pNDtK+56X2ka0tidFN/6WRvgI7grYiX8cHhN6DO++nhEJQhw6JLwsEHBWbVBU03zCoxl00oYRQKmuCIA6ccwe8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=wC7gNFwVEcxNRYRbPB8+czOOBSkmkjwZjZg+qmaRlExm/gILua62/6N7Tap0ZrwkfaIkKEnE22GvIDcd1Wu/ciPgNt0D/zKLmf+LIZu0za1XesK4q1T9hFd6OqzURSrv4hThANgYTbtdJFAKlqofhyA/xW/STSRLaV+to4f0x0E=; Message-ID: <940379.6969.qm@web34402.mail.mud.yahoo.com> X-YMail-OSG: 8MMGFToVM1nZt9aBiyKfWzQ3ZbkPFepfvJdtWXAcW3M4L921qP26MAW74rz88TnEiDZrBEvtqSpcoKojWls4XfnxNnIDCs1Q08GWirq1FpKbG6mVvSyqw0d0XsjJMzdw408dKNuIEZ4BTp6bNyfNVpfK97349dVHzwMEGMxgH9kpIa6yku02UT55ZD45YbmYFJ8_fdGjv2eok0Q0y7pWkZd0tWi5F1DGiG6wOY8Zp5VbwcABI6YEmJggSWB6P.Mzfmqs3HqstuLTQAk7gwqSRc.UsOnx.6Ld2a26f8fPNIvxpfox5yL4RjZRvuRTAkThjWIR6icQwhmC_g-- Received: from [198.95.226.228] by web34402.mail.mud.yahoo.com via HTTP; Wed, 03 Feb 2010 18:56:20 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Wed, 3 Feb 2010 18:56:20 -0800 (PST) From: Neelkanth Natu To: "C. Jayachandran" In-Reply-To: <98a59be81002031809p70f0154dnd9a1744ade7aac33@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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: Thu, 04 Feb 2010 02:56:22 -0000 Hi JC, --- On Wed, 2/3/10, C. Jayachandran wrote: > From: C. Jayachandran > Subject: Re: mips ptrace.S fix > To: "Neelkanth Natu" > Cc: "Rui Paulo" , freebsd-mips@freebsd.org > Date: Wednesday, February 3, 2010, 6:09 PM > On Thu, Feb 4, 2010 at 1:01 AM, > Neelkanth Natu > wrote: > > Your patch looks good. I have a few comments though. > See inline: > > > > Index: lib/libc/mips/sys/ptrace.S > > > =================================================================== > > --- lib/libc/mips/sys/ptrace.S (revision 203379) > > +++ lib/libc/mips/sys/ptrace.S (working copy) > > @@ -42,14 +42,26 @@ > > #endif /* LIBC_SCCS and not lint */ > > > > LEAF(ptrace) > > + .frame sp,40,ra > > > >>> space missing after the ',' > > > > + .mask 0x80000000, -8 > > #ifdef __ABICALLS__ > > .set noreorder > > .cpload t9 > > .set reorder > > #endif > > + subu sp, sp, 40 > > + sw ra, 32(sp) > > +#ifdef __ABICALLS__ > > + .cprestore 16 > > +#endif > > la t9, _C_LABEL(__error) # > locate address of errno > > - jalr t9 > > + jalr t9 > > > >>> this change is not required - the newly added > line has a tab at the end. > > > > +#ifdef __ABICALLS__ > > + lw gp, 16(sp) > > +#endif > > > >>> this is redundant - the assembler will > generate exactly the same line of > >>> code due to the .cprestore directive above. > > Are you sure about this? I think the assembler > generates the gp load > only for the 'jal' and 'bal' not for 'jalr'. > > Probably the two lines(la and jalr) can be replaced by a > jal. > You are right. My eyes glossed over between the 'jal' and 'jalr'. I think combining the two instructions into a single 'jal' is the way to go. best Neel > Regards, > JC. > From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 05:52:23 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B900106566C for ; Thu, 4 Feb 2010 05:52:23 +0000 (UTC) (envelope-from neelnatu@yahoo.com) Received: from web34402.mail.mud.yahoo.com (web34402.mail.mud.yahoo.com [66.163.178.151]) by mx1.freebsd.org (Postfix) with SMTP id DF5618FC25 for ; Thu, 4 Feb 2010 05:52:22 +0000 (UTC) Received: (qmail 726 invoked by uid 60001); 4 Feb 2010 05:52:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1265262742; bh=WlF6+4Mhqi02LAsplwvKvxWGDbrNm/HmylQ6UaMP7hg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=G01WqhKqmnxhet/N5hv4CbC7eyenEEUUwrGeSHPZe28MgQQPsWRgmr95hGQ189neBc8l5huSer4xUVfeN/3UXCY2iO2v40Okh4by0CLoIaZx+Gmf3Ify/LI2tSZDz9y99taSHNdKrSeC6+Sa/m7ahH86bys26C4SFZmO3KukwLk= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding; b=Zl2e6yXscsZwiHmfHUCI1bJQCkuYFBu4ZkoNLlK0eOu48b4hx5gsHY8ZEMy4qM8PfKxJW5FZlxIZ7NrZiKNiNjthPj3zcThmkDbBBWdkK4pzb50ev9LrUwkrACGNUU0Sn0HRQD6wKtbS/8X3tqLLgYSMIGWhzI5i2Q3y5evQA+M=; Message-ID: <203531.99897.qm@web34402.mail.mud.yahoo.com> X-YMail-OSG: 2IZKsroVM1nM9Y3l00YXrykE6FH4ddPcUIVsG19eqQwVJo70Q_xk5fK4RyhUUayLQRFiJBSrk8bFs72Vc8b_QD5BBrsP6UCU8K5S6bCe6Qc327hyVMDzEPj78_dhjdRXnBI_b4OzF7JcYmpvi7ZNdOyOQUo2vz.5oJQkjMdouqKTOHzV5qny1OYpNInp.bd_Q.xPYgVsEMLJp0NmMdwB_nIxF329ZQEcXEeDYXTKWVlcRckwDHb.HfVc1ZQMnpjmt3imYkmAV.rByTP2R3QewcxYE.7rswQCPtn.N8nhJg.wJ7oRBKK_wuBkuegU0Duv2LvcsEHh7EXt2hA0ruPqXsvkgVd4MvzL8OQTrZXM Received: from [198.95.226.230] by web34402.mail.mud.yahoo.com via HTTP; Wed, 03 Feb 2010 21:52:21 PST X-Mailer: YahooMailClassic/9.1.10 YahooMailWebService/0.8.100.260964 Date: Wed, 3 Feb 2010 21:52:21 -0800 (PST) From: Neelkanth Natu To: "C. Jayachandran" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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: Thu, 04 Feb 2010 05:52:23 -0000 Hi,=0A=0AI have committed JC's original patch to restore the 'gp' register= =0Aafter the 'jalr'.=0A=0Ahttp://svn.freebsd.org/viewvc/base?view=3Drevisio= n&revision=3D203475=0A=0ASorry about the churn.=0A=0Abest=0ANeel=0A=0A--- O= n Wed, 2/3/10, Neelkanth Natu wrote:=0A=0A> From: Neel= kanth Natu =0A> Subject: Re: mips ptrace.S fix=0A> To: = "C. Jayachandran" =0A> Cc: "Rui Paulo" , freebsd-mips@freebsd.org=0A> Date: Wednesday, February 3, 2010,= 6:56 PM=0A> Hi JC,=0A> =0A> --- On Wed, 2/3/10, C. Jayachandran =0A> wrote:=0A> =0A> > From: C. Jayachandran =0A> > Subject: Re: mips ptrace.S fix=0A> > To: "Neelkanth Natu= " =0A> > Cc: "Rui Paulo" ,=0A> free= bsd-mips@freebsd.org=0A> > Date: Wednesday, February 3, 2010, 6:09 PM=0A> >= On Thu, Feb 4, 2010 at 1:01 AM,=0A> > Neelkanth Natu = =0A> > wrote:=0A> > > Your patch looks good. I have a few comments=0A> thou= gh.=0A> > See inline:=0A> > >=0A> > > Index: lib/libc/mips/sys/ptrace.S=0A>= > >=0A> >=0A> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A> > > = --- lib/libc/mips/sys/ptrace.S=A0 (revision=0A> 203379)=0A> > > +++ lib/lib= c/mips/sys/ptrace.S=A0 (working=0A> copy)=0A> > > @@ -42,14 +42,26 @@=0A> >= >=A0 #endif /* LIBC_SCCS and not lint */=0A> > >=0A> > >=A0 LEAF(ptrace)= =0A> > > +=A0 =A0 =A0=A0=A0.frame=A0=0A> sp,40,ra=0A> > >=0A> > >>> space m= issing after the ','=0A> > >=0A> > > +=A0 =A0=0A> =A0=A0=A0.mask=A0=A0=A00x= 80000000, -8=0A> > >=A0 #ifdef __ABICALLS__=0A> > >=A0 =A0 =A0 =A0 .set=A0 = =A0=0A> noreorder=0A> > >=A0 =A0 =A0 =A0 .cpload t9=0A> > >=A0 =A0 =A0 =A0 = .set=A0 =A0=0A> reorder=0A> > >=A0 #endif=0A> > > +=A0 =A0 =A0=A0=A0subu=A0= =0A> =A0 sp, sp, 40=0A> > > +=A0 =A0 =A0=A0=A0sw=A0 =A0=0A> =A0 ra,=A0 32(s= p)=0A> > > +#ifdef __ABICALLS__=0A> > > +=A0 =A0 =A0=A0=A0.cprestore 16=0A>= > > +#endif=0A> > >=A0 =A0 =A0 =A0 la=A0 =A0 =A0=0A> t9, _C_LABEL(__error)= =A0=A0=A0#=0A> > locate address of errno=0A> > > -=A0 =A0 =A0=A0=A0jalr=A0= =0A> =A0 t9=0A> > > +=A0 =A0 =A0=A0=A0jalr=A0=0A> =A0 t9=0A> > >=0A> > >>> = this change is not required - the newly=0A> added=0A> > line has a tab at t= he end.=0A> > >=0A> > > +#ifdef __ABICALLS__=0A> > > +=A0 =A0 =A0=A0=A0lw= =A0 =A0=0A> =A0 gp, 16(sp)=0A> > > +#endif=0A> > >=0A> > >>> this is redund= ant - the assembler will=0A> > generate exactly the same line of=0A> > >>> = code due to the .cprestore directive=0A> above.=0A> > =0A> > Are you sure a= bout this?=A0 I think the assembler=0A> > generates the gp load=0A> > only = for the 'jal' and 'bal' not for 'jalr'.=0A> > =0A> > Probably the two lines= (la and jalr) can be replaced by=0A> a=0A> > jal.=0A> > =0A> =0A> You are r= ight. My eyes glossed over between the 'jal' and=0A> 'jalr'. I think=0A> co= mbining the two instructions into a single 'jal' is the=0A> way to go.=0A> = =0A> best=0A> Neel=0A> =0A> > Regards,=0A> > JC.=0A> > =0A> =0A> =0A> =A0 = =A0 =A0 =0A> =0A=0A=0A From owner-freebsd-mips@FreeBSD.ORG Thu Feb 4 13:59:09 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C678F106566C for ; Thu, 4 Feb 2010 13:59:09 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id 688148FC19 for ; Thu, 4 Feb 2010 13:59:09 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o14Dx7uk027097 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Thu, 4 Feb 2010 08:59:08 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: From: Randall Stewart To: Neelkanth Natu In-Reply-To: <203531.99897.qm@web34402.mail.mud.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Thu, 4 Feb 2010 05:59:07 -0800 References: <203531.99897.qm@web34402.mail.mud.yahoo.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: mips ptrace.S fix 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: Thu, 04 Feb 2010 13:59:09 -0000 Thanks Neel ;-) I would imagine you did NOT put the wrong spacing back in though.. right? R On Feb 3, 2010, at 9:52 PM, Neelkanth Natu wrote: > Hi, > > I have committed JC's original patch to restore the 'gp' register > after the 'jalr'. > > http://svn.freebsd.org/viewvc/base?view=revision&revision=203475 > > Sorry about the churn. > > best > Neel > > --- On Wed, 2/3/10, Neelkanth Natu wrote: > >> From: Neelkanth Natu >> Subject: Re: mips ptrace.S fix >> To: "C. Jayachandran" >> Cc: "Rui Paulo" , freebsd-mips@freebsd.org >> Date: Wednesday, February 3, 2010, 6:56 PM >> Hi JC, >> >> --- On Wed, 2/3/10, C. Jayachandran >> wrote: >> >>> From: C. Jayachandran >>> Subject: Re: mips ptrace.S fix >>> To: "Neelkanth Natu" >>> Cc: "Rui Paulo" , >> freebsd-mips@freebsd.org >>> Date: Wednesday, February 3, 2010, 6:09 PM >>> On Thu, Feb 4, 2010 at 1:01 AM, >>> Neelkanth Natu >>> wrote: >>>> Your patch looks good. I have a few comments >> though. >>> See inline: >>>> >>>> Index: lib/libc/mips/sys/ptrace.S >>>> >>> >> =================================================================== >>>> --- lib/libc/mips/sys/ptrace.S (revision >> 203379) >>>> +++ lib/libc/mips/sys/ptrace.S (working >> copy) >>>> @@ -42,14 +42,26 @@ >>>> #endif /* LIBC_SCCS and not lint */ >>>> >>>> LEAF(ptrace) >>>> + .frame >> sp,40,ra >>>> >>>>>> space missing after the ',' >>>> >>>> + >> .mask 0x80000000, -8 >>>> #ifdef __ABICALLS__ >>>> .set >> noreorder >>>> .cpload t9 >>>> .set >> reorder >>>> #endif >>>> + subu >> sp, sp, 40 >>>> + sw >> ra, 32(sp) >>>> +#ifdef __ABICALLS__ >>>> + .cprestore 16 >>>> +#endif >>>> la >> t9, _C_LABEL(__error) # >>> locate address of errno >>>> - jalr >> t9 >>>> + jalr >> t9 >>>> >>>>>> this change is not required - the newly >> added >>> line has a tab at the end. >>>> >>>> +#ifdef __ABICALLS__ >>>> + lw >> gp, 16(sp) >>>> +#endif >>>> >>>>>> this is redundant - the assembler will >>> generate exactly the same line of >>>>>> code due to the .cprestore directive >> above. >>> >>> Are you sure about this? I think the assembler >>> generates the gp load >>> only for the 'jal' and 'bal' not for 'jalr'. >>> >>> Probably the two lines(la and jalr) can be replaced by >> a >>> jal. >>> >> >> You are right. My eyes glossed over between the 'jal' and >> 'jalr'. I think >> combining the two instructions into a single 'jal' is the >> way to go. >> >> best >> Neel >> >>> Regards, >>> JC. >>> >> >> >> >> > > > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct) From owner-freebsd-mips@FreeBSD.ORG Fri Feb 5 05:09:23 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9618C106566C for ; Fri, 5 Feb 2010 05:09:23 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-iw0-f188.google.com (mail-iw0-f188.google.com [209.85.223.188]) by mx1.freebsd.org (Postfix) with ESMTP id 65C268FC08 for ; Fri, 5 Feb 2010 05:09:23 +0000 (UTC) Received: by iwn26 with SMTP id 26so1284902iwn.14 for ; Thu, 04 Feb 2010 21:09:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=ER1JXv3cmgse44f8hGRn4wTTiOeASWw0Ll+vvc4pW54=; b=IrYp2dPckf3MuX88g8zVLK6SHTyjEl1EkoW+1aX3xlqmchJqYXf/az6FHDa/n6BbRO /i6upYmD9nBdvq+WN3d6UkBxz0M81yebHy0cdDE4MReqEc2iCe6HJRGcK0ew96UaMrXC RAI2ctcCAeJUOnGL343PVnNAuOsJlUf7MGloc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=c4OLgoug5TARhYYz4OcbFSW9UORYdOIsJTihU7WD4kA+UrZ3D0HPUdElJtCOWW7OMS 0r2SfSH0t5RlX43DjKP+RYGwsh8Ag8ngyFyCUgFDy+wISgv8Pj3F2sP5pYP2AFYUCwR7 cBhyCcn32jH7YAEJHB7y/K8oPT7PnB7Lradh4= MIME-Version: 1.0 Received: by 10.231.160.205 with SMTP id o13mr1426773ibx.13.1265346562621; Thu, 04 Feb 2010 21:09:22 -0800 (PST) Date: Fri, 5 Feb 2010 13:09:22 +0800 Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: rspro board and mounting root from SD 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: Fri, 05 Feb 2010 05:09:23 -0000 Howdy, I've been looking at using an SD card as a test root device but it unfortunately appears that device probing doesn't quite happen fast enough for the umass device to be enumerated. description: * system boots * usbus0 is created - root_mount_hold("usbus0") called * usbus0 is probed, and umass0 is found/createdcreated * umass0 probe begins * root_mount_rel() on usbus0 is called * nothing else is waiting, so VFS tries mounting the root device The SD probe/attach doesn't occur until -after- the root is mounted and the system begins. If I stick a root_mount_hold() call in umass_attach(), the umass device is given the opportunity to complete probe/attach but obviously then a lack of root_mount_rel() results in nothing completing. Any ideas? My knowledge of USB/CAM internals is currently non-existant. I couldn't find any particular function/callback which is called when the umass bus probe completes - as far as I can tell, attach kicks off some CAM messages which may eventually end up finding a device or not. I'm not sure of the "right" place to put the release; or whether I'm on the right track at all. Adrian From owner-freebsd-mips@FreeBSD.ORG Fri Feb 5 05:26:20 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE9A71065692 for ; Fri, 5 Feb 2010 05:26:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id B24718FC15 for ; Fri, 5 Feb 2010 05:26:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o155NflY000738; Thu, 4 Feb 2010 22:23:41 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Thu, 04 Feb 2010 22:24:38 -0700 (MST) Message-Id: <20100204.222438.246077296855181113.imp@bsdimp.com> To: adrian.chadd@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: rspro board and mounting root from SD 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: Fri, 05 Feb 2010 05:26:21 -0000 In message: Adrian Chadd writes: : Howdy, : : I've been looking at using an SD card as a test root device but it : unfortunately appears that device probing doesn't quite happen fast : enough for the umass device to be enumerated. : : description: : : * system boots : * usbus0 is created - root_mount_hold("usbus0") called : * usbus0 is probed, and umass0 is found/createdcreated : * umass0 probe begins : * root_mount_rel() on usbus0 is called : * nothing else is waiting, so VFS tries mounting the root device : : The SD probe/attach doesn't occur until -after- the root is mounted : and the system begins. : : If I stick a root_mount_hold() call in umass_attach(), the umass : device is given the opportunity to complete probe/attach but obviously : then a lack of root_mount_rel() results in nothing completing. Where did you put this? : Any ideas? My knowledge of USB/CAM internals is currently : non-existant. I couldn't find any particular function/callback which : is called when the umass bus probe completes - as far as I can tell, : attach kicks off some CAM messages which may eventually end up finding : a device or not. I'm not sure of the "right" place to put the release; : or whether I'm on the right track at all. Maybe CAM should have something like this, but I'm not sure. Warner From owner-freebsd-mips@FreeBSD.ORG Fri Feb 5 05:28:05 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B6421065672 for ; Fri, 5 Feb 2010 05:28:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-iw0-f174.google.com (mail-iw0-f174.google.com [209.85.223.174]) by mx1.freebsd.org (Postfix) with ESMTP id 3DD188FC2F for ; Fri, 5 Feb 2010 05:28:05 +0000 (UTC) Received: by iwn4 with SMTP id 4so3740359iwn.27 for ; Thu, 04 Feb 2010 21:28:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=4DOptUDc1S597NadQZZ4FIsELvXe8W3MRz/NQtSejeA=; b=I5prT+YD4AC0p3OqHg+K0iOBR7ubvxv1/suD/pVFJkYoPtl7YG7vzd+NbKMLhKGBh3 on/yz7nGovBCxcGo+jQ2Ay18dnj+3U3/BceLqHvfPt6hYIxcd32qSsxSKZK9FPTF7wKa X3QTiwvxCR/HkjcV/mKfLj2LUetMcyn/xA91k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=e2g0p/Y2fFvd32SZjtXqMqYUs7ycOdjgIwJJaNvH+hf/wouLHlpQPngY69JBQddDJD Dpn8WqaWP+KD9ySK4PeAiqcua7/c5wyf89R/IEVxgurEQQ0SGn2+XkxzymhVg2FuW2Z/ KDLhtbpNqnIsnVIGORFQ/h66dqF68vVQmQjbg= MIME-Version: 1.0 Received: by 10.231.147.149 with SMTP id l21mr1044180ibv.0.1265347684296; Thu, 04 Feb 2010 21:28:04 -0800 (PST) In-Reply-To: <20100204.222438.246077296855181113.imp@bsdimp.com> References: <20100204.222438.246077296855181113.imp@bsdimp.com> Date: Fri, 5 Feb 2010 13:28:04 +0800 Message-ID: From: Adrian Chadd To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-mips@freebsd.org Subject: Re: rspro board and mounting root from SD 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: Fri, 05 Feb 2010 05:28:05 -0000 On 5 February 2010 13:24, M. Warner Losh wrote: > : If I stick a root_mount_hold() call in umass_attach(), the umass > : device is given the opportunity to complete probe/attach but obviously > : then a lack of root_mount_rel() results in nothing completing. > > Where did you put this? After the call to umass_cam_attach() in umass_attach() Adrian From owner-freebsd-mips@FreeBSD.ORG Fri Feb 5 19:34:25 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 735E91065670 for ; Fri, 5 Feb 2010 19:34:25 +0000 (UTC) (envelope-from smeagle@bsdler.de) Received: from hell.bsdler.de (hell-fe0.v6.bsdler.de [IPv6:2001:780:0:19::1]) by mx1.freebsd.org (Postfix) with ESMTP id F3DF68FC1C for ; Fri, 5 Feb 2010 19:34:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hell.bsdler.de (Postfix) with ESMTP id DEC37B872; Fri, 5 Feb 2010 20:34:22 +0100 (CET) X-Virus-Scanned: amavisd-new at bsdler.de Received: from hell.bsdler.de ([127.0.0.1]) by localhost (hell.bsdler.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BmBL+kLaiwAo; Fri, 5 Feb 2010 20:34:17 +0100 (CET) Received: from kiste.lan.terror.local (p4FF0BBE8.dip.t-dialin.net [79.240.187.232]) by hell.bsdler.de (Postfix) with ESMTPSA id 0FA95B83D; Fri, 5 Feb 2010 20:34:17 +0100 (CET) Received: from [172.17.21.80] (brain.lan.terror.local [172.17.21.80]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by kiste.lan.terror.local (Postfix) with ESMTPS id 1B8BB535B7; Fri, 5 Feb 2010 20:34:16 +0100 (CET) From: Florian Kruegl To: Adrian Chadd In-Reply-To: References: <20100204.222438.246077296855181113.imp@bsdimp.com> Content-Type: text/plain; charset="us-ascii" Date: Fri, 05 Feb 2010 20:31:32 +0100 Message-ID: <1265398292.2149.3.camel@brain.lan.terror.local> Mime-Version: 1.0 X-Mailer: Evolution 2.28.2 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: rspro board and mounting root from SD X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: smeagle@bsdler.de List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Feb 2010 19:34:25 -0000 Hi Adrian, got it running from sd card for a few month now without probs. Flash seemed to small for putting freebsd on. seems to be a reace condition until usb mas registers scsi device. one second is nuff... brain:head> svn diff Index: sys/kern/vfs_mount.c =================================================================== --- sys/kern/vfs_mount.c (revision 203445) +++ sys/kern/vfs_mount.c (working copy) @@ -72,6 +72,9 @@ #define ROOTNAME "root_device" #define VFS_MOUNTARG_SIZE_MAX (1024 * 64) +static int mount_root_delay = 4; +TUNABLE_INT("mount_root_delay", &mount_root_delay); + static void set_rootvnode(void); static int vfs_domount(struct thread *td, const char *fstype, char *fspath, int fsflags, void *fsdata); @@ -1409,13 +1412,18 @@ PICKUP_GIANT(); mtx_lock(&mountlist_mtx); if (LIST_EMPTY(&root_holds)) { - mtx_unlock(&mountlist_mtx); - break; + if(0 == mount_root_delay--) { + mtx_unlock(&mountlist_mtx); + break; + } } if (ppsratecheck(&lastfail, &curfail, 1)) { printf("Root mount waiting for:"); LIST_FOREACH(h, &root_holds, list) printf(" %s", h->who); + if(LIST_EMPTY(&root_holds)) { + printf(" %d secs...", mount_root_delay); + } printf("\n"); } msleep(&root_holds, &mountlist_mtx, PZERO | PDROP, "roothold", On Fri, 2010-02-05 at 13:28 +0800, Adrian Chadd wrote: > On 5 February 2010 13:24, M. Warner Losh wrote: > > > : If I stick a root_mount_hold() call in umass_attach(), the umass > > : device is given the opportunity to complete probe/attach but obviously > > : then a lack of root_mount_rel() results in nothing completing. > > > > Where did you put this? > > After the call to umass_cam_attach() in umass_attach() > > > > > Adrian > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@FreeBSD.ORG Sat Feb 6 02:27:32 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94689106566B for ; Sat, 6 Feb 2010 02:27:32 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB2E8FC08 for ; Sat, 6 Feb 2010 02:27:32 +0000 (UTC) Received: by pxi13 with SMTP id 13so1784217pxi.3 for ; Fri, 05 Feb 2010 18:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=pInVP578Mj64WrLmKOyJHGjsGiIa2SgMdBkz6iMn2X4=; b=Ez8tIuwLCFC5bs3BcqFUNTTG40mn5W66ZYG4kRhEVc7dgOrs8axEgwQCwtlTw6YKSq dx57Vi/quxnxrjrYWarWtPIEmnEeFxYQGxPq2AVGBFTe1nyE6X9aBgLQf/xMifwQwkIh sw1ciqLUe4AXu8up/zBMj6W8t94QDYnUkBLOo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=Mmd/CKSQLJH7ptIUxGql28zgDUZa8wTZFKTy50mq9Vd6ANYLu4yqGriB2vqUCo0qOx 7hfiDkTZoZhMFp6Xx1IIxrpXfu370Mcefs6h+fuy3nRvl35xN2JtMFPTRfkN9DdGOh40 IXgi0eK1PmIE8ob5sKdNPPwZ8LBVOynKyU0vw= MIME-Version: 1.0 Received: by 10.143.21.5 with SMTP id y5mr2266841wfi.324.1265423251909; Fri, 05 Feb 2010 18:27:31 -0800 (PST) Date: Fri, 5 Feb 2010 18:27:31 -0800 Message-ID: From: Neel Natu To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Patch: SMP support for MIPS 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: Sat, 06 Feb 2010 02:27:32 -0000 Hi, I am ready to commit the changes to enable SMP support for MIPS. I have put the diff here for review: http://people.freebsd.org/~neel/mips_smp_patch/diff.txt The mp_machdep.c file has changed a lot so it makes sense to read these files separately: http://people.freebsd.org/~neel/mips_smp_patch/mp_machdep.c http://people.freebsd.org/~neel/mips_smp_patch/mpboot.S Also, developers will be interested in the hooks that will be required from the platform code. The APIs are documented here: http://people.freebsd.org/~neel/mips_smp_patch/hwfunc.h Please review. best Neel From owner-freebsd-mips@FreeBSD.ORG Sat Feb 6 03:05:17 2010 Return-Path: Delivered-To: freebsd-mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FB69106566B for ; Sat, 6 Feb 2010 03:05:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 23DAA8FC12 for ; Sat, 6 Feb 2010 03:05:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o1630aUo039098; Fri, 5 Feb 2010 20:00:36 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 05 Feb 2010 20:01:34 -0700 (MST) Message-Id: <20100205.200134.460114267490858629.imp@bsdimp.com> To: neelnatu@gmail.com From: "M. Warner Losh" In-Reply-To: References: X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-mips@FreeBSD.org Subject: Re: Patch: SMP support for MIPS 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: Sat, 06 Feb 2010 03:05:17 -0000 In message: Neel Natu writes: : I have put the diff here for review: : http://people.freebsd.org/~neel/mips_smp_patch/diff.txt + /* + * XXX + * SMP kernels must delay pcpu initialization until after + * TLB has been flushed and initialized (see mips_cpu_init()) + */ + if (pcpu_find(0) == NULL) + mips_pcpu0_init(); + The practical upshot of this change is that panic() prior to this point will fault. Is there some way to avoid this? The rest of these changes look fairly good. I'll likely comment on a few nits later that I saw once I have the time to devote to it. Warner From owner-freebsd-mips@FreeBSD.ORG Sat Feb 6 05:49:53 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E7F41065672 for ; Sat, 6 Feb 2010 05:49:53 +0000 (UTC) (envelope-from neelnatu@gmail.com) Received: from mail-px0-f183.google.com (mail-px0-f183.google.com [209.85.216.183]) by mx1.freebsd.org (Postfix) with ESMTP id 3503D8FC12 for ; Sat, 6 Feb 2010 05:49:53 +0000 (UTC) Received: by pxi13 with SMTP id 13so1905361pxi.3 for ; Fri, 05 Feb 2010 21:49:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=LXeEUP4vjn6ag6dbf2r7ozT4Qck1BAon3wRNTLxwF0g=; b=wjq1M+BujTiqWkEH6cwO67JLgqHsnPC+7xNUgdN8l91KZSo4rpXytQY4Le/kGocsj/ Ljkg6HeFLGllB+UiuikeCyv2agQK/mPhHTWrvuTreUq6qntapqxqHTF1QQHfkiBPQBjq fjjdSaTiSEtvGbnaQWu352FFoNggrSC5VTnZs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=WYwTshn5pIZagxVz91bSqKTdryn3j+uEkv68aFOlXaIsTFi+onq9Toj4Qed9VMAY/j Q1EeqlhUAPel4XeKwHPFFTP3piuJ4ba7XYReplo6EwItfISkm70RxBAj6DpxVmY7a6Vi LUkkRwAU189n9NYYrt7tR08E8CWX1lV0Mh7As= MIME-Version: 1.0 Received: by 10.142.120.7 with SMTP id s7mr2408527wfc.104.1265435392733; Fri, 05 Feb 2010 21:49:52 -0800 (PST) In-Reply-To: <20100205.200134.460114267490858629.imp@bsdimp.com> References: <20100205.200134.460114267490858629.imp@bsdimp.com> Date: Fri, 5 Feb 2010 21:49:52 -0800 Message-ID: From: Neel Natu To: "M. Warner Losh" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-mips@freebsd.org Subject: Re: Patch: SMP support for MIPS 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: Sat, 06 Feb 2010 05:49:53 -0000 Hi Warner, Thanks for looking at this. On Fri, Feb 5, 2010 at 7:01 PM, M. Warner Losh wrote: > In message: > =A0 =A0 =A0 =A0 =A0 =A0Neel Natu writes: > : I have put the diff here for review: > : http://people.freebsd.org/~neel/mips_smp_patch/diff.txt > > + /* > + =A0* XXX > + =A0 * SMP kernels must delay pcpu initialization until after > + =A0 =A0* TLB has been flushed and initialized (see mips_cpu_init()) > + =A0 =A0 */ > + =A0 =A0 if (pcpu_find(0) =3D=3D NULL) > + =A0 =A0 =A0 =A0mips_pcpu0_init(); > + > > The practical upshot of this change is that panic() prior to this > point will fault. =A0Is there some way to avoid this? > That's right. I have this fixed in the updated patch. Please review the changes to pmap.c and machdep.c. http://people.freebsd.org/~neel/mips_smp_patch/diff.txt Briefly, we use an address in KSEG0 for the 'pcpup' until we are ready to transition to a TLB-based pcpu pointer. > The rest of these changes look fairly good. =A0I'll likely comment on a > few nits later that I saw once I have the time to devote to it. > Ok. best Neel > Warner > From owner-freebsd-mips@FreeBSD.ORG Sat Feb 6 12:00:16 2010 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 26FB710657D3 for ; Sat, 6 Feb 2010 12:00:16 +0000 (UTC) (envelope-from rrs@lakerest.net) Received: from lakerest.net (unknown [IPv6:2001:240:585:2:213:d4ff:fef3:2d8d]) by mx1.freebsd.org (Postfix) with ESMTP id F35638FC17 for ; Sat, 6 Feb 2010 12:00:13 +0000 (UTC) Received: from [10.1.1.53] ([10.1.1.53]) (authenticated bits=0) by lakerest.net (8.14.3/8.14.3) with ESMTP id o16C0ANm048802 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sat, 6 Feb 2010 07:00:10 -0500 (EST) (envelope-from rrs@lakerest.net) Message-Id: <670383AE-410B-4590-B054-B56A7E5A09A4@lakerest.net> From: Randall Stewart To: Neel Natu In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sat, 6 Feb 2010 04:00:09 -0800 References: <20100205.200134.460114267490858629.imp@bsdimp.com> X-Mailer: Apple Mail (2.936) Cc: freebsd-mips@freebsd.org Subject: Re: Patch: SMP support for MIPS 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: Sat, 06 Feb 2010 12:00:16 -0000 Neel/Warner: I won't have time to look at these until I get back to California ... actually I will look at them on the plane tomorrow ;-) R On Feb 5, 2010, at 9:49 PM, Neel Natu wrote: > Hi Warner, > > Thanks for looking at this. > > On Fri, Feb 5, 2010 at 7:01 PM, M. Warner Losh wrote: >> In message: > > >> Neel Natu writes: >> : I have put the diff here for review: >> : http://people.freebsd.org/~neel/mips_smp_patch/diff.txt >> >> + /* >> + * XXX >> + * SMP kernels must delay pcpu initialization until after >> + * TLB has been flushed and initialized (see mips_cpu_init()) >> + */ >> + if (pcpu_find(0) == NULL) >> + mips_pcpu0_init(); >> + >> >> The practical upshot of this change is that panic() prior to this >> point will fault. Is there some way to avoid this? >> > > That's right. I have this fixed in the updated patch. Please review > the changes to pmap.c and machdep.c. > http://people.freebsd.org/~neel/mips_smp_patch/diff.txt > > Briefly, we use an address in KSEG0 for the 'pcpup' until we are ready > to transition to a TLB-based pcpu pointer. > >> The rest of these changes look fairly good. I'll likely comment on a >> few nits later that I saw once I have the time to devote to it. >> > > Ok. > > best > Neel > >> Warner >> > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips- > unsubscribe@freebsd.org" > ------------------------------ Randall Stewart 803-317-4952 (cell) 803-345-0391(direct)