From owner-freebsd-stable@FreeBSD.ORG Wed Apr 4 08:45:30 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4386316A408 for ; Wed, 4 Apr 2007 08:45:30 +0000 (UTC) (envelope-from rink@thunderstone.rink.nu) Received: from mx1.rink.nu (thunderstone.rink.nu [80.112.228.34]) by mx1.freebsd.org (Postfix) with ESMTP id 04FC213C4AD for ; Wed, 4 Apr 2007 08:45:30 +0000 (UTC) (envelope-from rink@thunderstone.rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id DF0E8D4C5D; Wed, 4 Apr 2007 10:15:42 +0200 (CEST) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([127.0.0.1]) by localhost (thunderstone.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lE9IbWKYiJPz; Wed, 4 Apr 2007 10:15:34 +0200 (CEST) Received: from thunderstone.rink.nu (localhost [127.0.0.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.rink.nu (Postfix) with ESMTP id 73445D4C5C; Wed, 4 Apr 2007 10:15:34 +0200 (CEST) Received: (from rink@localhost) by thunderstone.rink.nu (8.13.8/8.13.8/Submit) id l348FYia043111; Wed, 4 Apr 2007 10:15:34 +0200 (CEST) (envelope-from rink) Date: Wed, 4 Apr 2007 10:15:34 +0200 From: Rink Springer To: Nikolas Britton Message-ID: <20070404081534.GC2546@rink.nu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Cc: FreeBSD Stable Subject: Re: Porting FreeBSD to a new Architecture? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 08:45:30 -0000 Hi Nikolas, On Wed, Apr 04, 2007 at 02:23:44AM -0500, Nikolas Britton wrote: > I'm looking for documentation that could possibly help me port FreeBSD > to a new architecture. I'm mainly interested in how you guys did the > xbox and amd64 ports. i.e. x86 instruction set. I can answer the Xbox question for you... basically, what I did was get a good understanding of how the xbox internals worked (i.e. what the exact differences are between an ordinary PC and an Xbox). Based on this understanding, I patched the Xbox boot loader (Cromwell) so it could properly load FreeBSD ELF images. Once that was done, I worked my way up from the first piece of code executed (that is in i386/i386/locore.s). I crafted some assembly code which could control the Xbox LED's, and I used this to determine where the Xbox would crash... Once I got the initial machine-dependant stuff out of the way, I created a console driver so I could see what was going on (which I later on totally rewrote); and worked my way up from here... Expect a lot of painstaking debugging in the progress... Good luck! -- Rink P.W. Springer - http://rink.nu "It is such a quiet thing, to fall. But yet a far more terrible thing, to admit it." - Darth Traya