From owner-freebsd-mips@FreeBSD.ORG Sun Feb 20 18:48:46 2011 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 E0DCD1065696; Sun, 20 Feb 2011 18:48:45 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og114.obsmtp.com (exprod7og114.obsmtp.com [64.18.2.215]) by mx1.freebsd.org (Postfix) with ESMTP id EB9BD8FC1A; Sun, 20 Feb 2011 18:48:42 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob114.postini.com ([64.18.6.12]) with SMTP ID DSNKTWFiCbD4mOU4xK/P+yQklwgJfHlBmmhV@postini.com; Sun, 20 Feb 2011 10:48:45 PST Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB03-HQ.jnpr.net (172.24.192.37) with Microsoft SMTP Server (TLS) id 8.2.254.0; Sun, 20 Feb 2011 10:48:10 -0800 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Sun, 20 Feb 2011 13:48:40 -0500 From: Andrew Duane To: Juli Mallett , Warner Losh Date: Sun, 20 Feb 2011 13:43:51 -0500 Thread-Topic: Bootstraps for Mips/OCTEON platforms Thread-Index: AcvPwACNR8o8VtVKSaGKc5y2yvJtYABbh3z8 Message-ID: References: <4D5EF8CA.5010008@bsdimp.com>, In-Reply-To: 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 Cc: "freebsd-mips@freebsd.org" Subject: RE: Bootstraps for Mips/OCTEON platforms 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: Sun, 20 Feb 2011 18:48:46 -0000 Oh well, looks like I have (another) complicated shim layer to write..... We use standard ELF, and have both U-Boot and a simple embedded bootstrap (= J-Boot) on different platforms. Neither one uses the Cavium HW descriptor, = as the bootstraps support other MIPS-family chips besides Cavium. Also, sad= ly, they use a different calling convention with slightly different things = in registers A0-A3. U-Boot had already gone it's own way with a separate en= try point, and once firmware is flashed into released platforms, it's effec= tively impossible to change the interface like that. I'll put on my thinking hat and try to decide what to do about this. I'm gu= essing a new shim entry point that figures out our U-Boot versus J-Boot and= tries to construct the right things for platform_start(). I'd like to say = this is something I haven't had to do before, but....... -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 ________________________________________ From: owner-freebsd-mips@freebsd.org [owner-freebsd-mips@freebsd.org] On Be= half Of Juli Mallett [jmallett@freebsd.org] Sent: Friday, February 18, 2011 6:02 PM To: Warner Losh Cc: freebsd-mips@freebsd.org Subject: Re: Bootstraps for Mips/OCTEON platforms On Fri, Feb 18, 2011 at 14:55, Warner Losh wrote: > On 02/18/2011 12:08, Andrew Duane wrote: >> >> I'm starting at ground zero (almost) with an Octeon based platform relat= ed >> to the OCTEON1 config in the -CURRENT. The board uses an existing MIPS >> bootstrap and loader, but that does not seem to be compatible with what = the >> kernel expects. What bootstrap is used normally? u-boot? > > u-boot is what we support. There's no other support in the codebase righ= t > now. uboot gives us: > > in a3 is passed in the cavium hardware descriptor. All other registers a= re > ignored on boot. We only support version 6 and newer of the boot > descriptor. You can see the details of the structure in > sys/mips/cavium/octeon_machdep.c starting with platform_start(). It's worth noting that we don't use the Simple Executive ELF Application calling convention but the Octeon Linux one, so 'bootoctlinux' should be used instead of 'bootoctelf'. Juli. _______________________________________________ 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"