From owner-svn-src-head@FreeBSD.ORG Mon Dec 31 11:06:38 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8AA4BB1C; Mon, 31 Dec 2012 11:06:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 55B048FC1F; Mon, 31 Dec 2012 11:06:38 +0000 (UTC) Received: from svn.freebsd.org (svn.FreeBSD.org [8.8.178.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBVB6c86016662; Mon, 31 Dec 2012 11:06:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBVB6chM016661; Mon, 31 Dec 2012 11:06:38 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <201212311106.qBVB6chM016661@svn.freebsd.org> From: Robert Watson Date: Mon, 31 Dec 2012 11:06:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r244899 - head/sys/mips/beri X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Dec 2012 11:06:38 -0000 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; }