From owner-svn-src-all@FreeBSD.ORG Tue Jan 1 19:25:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AB879140; Tue, 1 Jan 2013 19:25:09 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from smtp-out3.electric.net (smtp-out3.electric.net [72.35.12.183]) by mx1.freebsd.org (Postfix) with ESMTP id 839628FC0C; Tue, 1 Jan 2013 19:25:08 +0000 (UTC) Received: from [204.11.168.155] (helo=securemail.onebox.com) by skoda.electric.net with esmtp (Exim 4.77) (envelope-from ) id 1Tq7Le-0004XC-T4; Tue, 01 Jan 2013 11:18:02 -0800 Received: from localhost (unverified [49.224.140.241]) by securemail.onebox.com (Rockliffe SMTPRA 9.3.1) with ESMTP id ; Tue, 1 Jan 2013 14:18:02 -0500 Date: Wed, 2 Jan 2013 08:17:46 +1300 From: Andrew Turner To: Robert Watson Subject: Re: svn commit: r244899 - head/sys/mips/beri Message-ID: <20130102081746.5435db05@fubar.geek.nz> In-Reply-To: <201212311106.qBVB6chM016661@svn.freebsd.org> References: <201212311106.qBVB6chM016661@svn.freebsd.org> Organization: SMTP: smtp.paradise.net.nz X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; i386-portbld-freebsd8.1) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/uEzSZj7HLXP7TyeAYwWWOYE" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2013 19:25:09 -0000 --MP_/uEzSZj7HLXP7TyeAYwWWOYE Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Mon, 31 Dec 2012 11:06:38 +0000 (UTC) Robert Watson wrote: > Author: rwatson > Date: Mon Dec 31 11:06:37 2012 > New Revision: 244899 > URL: http://svnweb.freebsd.org/changeset/base/244899 > > Log: > If FDT is compiled into a FreeBSD/beri kernel, initialise > OpenFirmware. > Sponsored by: DARPA, AFRL > > Modified: > head/sys/mips/beri/beri_machdep.c > > Modified: head/sys/mips/beri/beri_machdep.c > ============================================================================== > --- head/sys/mips/beri/beri_machdep.c Mon Dec 31 07:50:02 > 2012 (r244898) +++ head/sys/mips/beri/beri_machdep.c > Mon Dec 31 11:06:37 2012 (r244899) @@ -1,7 +1,12 @@ > /*- > * Copyright (c) 2006 Wojciech A. Koszek > + * Copyright (c) 2012 Robert N. M. Watson > * All rights reserved. > * > + * This software was developed by SRI International and the > University of > + * Cambridge Computer Laboratory under DARPA/AFRL contract > (FA8750-10-C-0237) > + * ("CTSRD"), as part of the DARPA CRASH research programme. > + * > * Redistribution and use in source and binary forms, with or without > * modification, are permitted provided that the following conditions > * are met: > @@ -27,6 +32,7 @@ > __FBSDID("$FreeBSD$"); > > #include "opt_ddb.h" > +#include "opt_platform.h" > > #include > #include > @@ -49,6 +55,9 @@ __FBSDID("$FreeBSD$"); > #include > #include > > +#include > +#include > + > #include > #include > #include > @@ -76,6 +85,17 @@ mips_init(void) > { > int i; > > +#ifdef FDT > +#ifndef FDT_DTB_STATIC > +#error "mips_init with FDT requires FDT_DTB_STATIC" > +#endif > + > + if (OF_install(OFW_FDT, 0) == FALSE) > + while (1); > + if (OF_init(&fdt_static_dtb) != 0) > + while (1); > +#endif > + > for (i = 0; i < 10; i++) { > phys_avail[i] = 0; > } > > This looks like it is too late in the boot process. If you are using FDT you will need to use the FDT uart which is initialised in cninit. You will also need a patch similar to the untested one attached to fix the build. Andrew --MP_/uEzSZj7HLXP7TyeAYwWWOYE Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=beri_fdt.diff Index: beri/beri_machdep.c =================================================================== --- beri/beri_machdep.c (revision 244940) +++ beri/beri_machdep.c (working copy) @@ -55,8 +55,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT #include #include +#endif #include #include --MP_/uEzSZj7HLXP7TyeAYwWWOYE--