From owner-freebsd-mips@FreeBSD.ORG Thu Aug 26 15:27:55 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 DC2CB1065697 for ; Thu, 26 Aug 2010 15:27:54 +0000 (UTC) (envelope-from PMahan@adaranet.com) Received: from barracuda.adaranet.com (smtp.adaranet.com [72.5.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id BA0C88FC08 for ; Thu, 26 Aug 2010 15:27:54 +0000 (UTC) X-ASG-Debug-ID: 1282836473-5061551a0001-TrbQWW Received: from SJ-EXCH-1.adaranet.com ([10.10.1.29]) by barracuda.adaranet.com with ESMTP id HUBuPE2BsR3AJCtp; Thu, 26 Aug 2010 08:27:53 -0700 (PDT) X-Barracuda-Envelope-From: PMahan@adaranet.com Received: from SJ-EXCH-1.adaranet.com ([fe80::7042:d8c2:5973:c523]) by SJ-EXCH-1.adaranet.com ([fe80::7042:d8c2:5973:c523%14]) with mapi; Thu, 26 Aug 2010 08:27:54 -0700 From: Patrick Mahan X-Barracuda-BBL-IP: fe80::7042:d8c2:5973:c523 X-Barracuda-RBL-IP: fe80::7042:d8c2:5973:c523 To: "M. Warner Losh" , "c.jayachandran@gmail.com" Date: Thu, 26 Aug 2010 08:27:51 -0700 X-ASG-Orig-Subj: RE: Is the MIPS kernel buildable from HEAD? Thread-Topic: Is the MIPS kernel buildable from HEAD? Thread-Index: ActE4G68x2PUblwPQkiQ3WzhV4lrywASg7cQ Message-ID: <32AB5C9615CC494997D9ABB1DB12783C024C875653@SJ-EXCH-1.adaranet.com> References: <32AB5C9615CC494997D9ABB1DB12783C024C875590@SJ-EXCH-1.adaranet.com> <20100825.151325.645538350615354761.imp@bsdimp.com> <20100825.232923.287595822763821210.imp@bsdimp.com> In-Reply-To: <20100825.232923.287595822763821210.imp@bsdimp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.10.1.29] X-Barracuda-Start-Time: 1282836473 X-Barracuda-URL: http://172.16.10.203:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at adaranet.com Cc: "freebsd-mips@FreeBSD.org" Subject: RE: Is the MIPS kernel buildable from HEAD? 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, 26 Aug 2010 15:27:55 -0000 > -----Original Message----- > From: M. Warner Losh [mailto:imp@bsdimp.com] > Sent: Wednesday, August 25, 2010 10:29 PM > To: c.jayachandran@gmail.com > Cc: Patrick Mahan; freebsd-mips@FreeBSD.org > Subject: Re: Is the MIPS kernel buildable from HEAD? > > In message: > "Jayachandran C." writes: > : On Thu, Aug 26, 2010 at 2:43 AM, M. Warner Losh wrote: > : > In message: <32AB5C9615CC494997D9ABB1DB12783C024C875590@SJ-EXCH- > 1.adaranet.com> > : > Patrick Mahan writes: > : > : Is it possible to build the MIPS kernel from HEAD? Or is the > : > : current development still external to the HEAD branch? > : > > : > Yes. The tip of head is where the mips action is these days. There > : > is no external development branch. > : > > : > There is one issue, however. If you are building for one of the > : > 64-bit processors a 64-bit kernel, then the required userland won't > : > build. There's still issues that need to be sorted out... > : > : The 64-bit userland builds for me with -DWITHOUT_CDDL -DWITHOUT_USB > : -DWITHOUT_BLUETOOTH -DWITHOUT_RESCUE - are you referring to these, or > : are there other issues? > > I can do a buildworld now without any of these flags. I don't know > what the bluetooth issue is/was, but it doesn't kill the build. I > fixed the CDDL issue, and papered over the uath and rescue issues in > the build system. > > I can now build a n64 world in -current. I haven't had a chance to > run it yet, but hope to soon. My CN38xx board doesn't like the 32-bit > kernel anymore... It also doesn't like the 64-bit kernel, but I think > that's a uboot issue. It seems older ldscripts didn't tickle the bugs > the current one does (on the other hand, the old ldscripts only worked > on the CN38xx board). On the other hand, SDK 1.9.0's uboot on another > board works fine with the 64-bit kernel. > Warner, We build o32 with our modified FreeBSD 8.0 that boots under the SDK 1.8.1 on a CN58XX. However, I was looking at the ldscript that we use versus the one in use for you. We are using what is basically sys/conf/ldscript.m= ips. Also, I think our problem is with the a3 register passed in as part of platform_start() in cavium/octeon_machdep.c. We have the following in mips/lowcore.S - #if defined(TARGET_OCTEON) la a0, app_descriptor_addr sw a3, 0(a0) /* Store app descriptor ptr */ #endif So we are storing the value of a3 into a global that we later use in octeon32/Octeon_machdep.c - static void mips_boot_params_init(void) { int descriptor_not_parsed =3D 1; if ((app_descriptor_addr =3D=3D 0) || (app_descriptor_addr >=3D 0xA= fffffff)) { printf("address of app_descriptor is %x\n", app_descriptor_addr); } else { app_desc_ptr =3D (octeon_boot_descriptor_t *) app_descripto= r_addr; octeon_bd_ver =3D app_desc_ptr->desc_version; ... I am need to investigate, but I think we found that a3 was getting clobbere= d on the inbound call to platform_start(). Patrick