Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Dec 2012 14:54:50 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 219916 for review
Message-ID:  <201212301454.qBUEsocu093300@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@219916?ac=10

Change 219916 by rwatson@rwatson_zenith_cl_cam_ac_uk on 2012/12/30 14:54:37

	Add OpenFirmware/FDT initialisation code to the BERI
	machine-dependent boot path.  This may be sufficient to shoot my
	feet off with FDT; we will see.

Affected files ...

.. //depot/projects/ctsrd/beribsd/src/sys/mips/beri/beri_machdep.c#5 edit

Differences ...

==== //depot/projects/ctsrd/beribsd/src/sys/mips/beri/beri_machdep.c#5 (text+ko) ====

@@ -1,7 +1,12 @@
 /*-
  * Copyright (c) 2006 Wojciech A. Koszek <wkoszek@FreeBSD.org>
+ * 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 <sys/param.h>
 #include <sys/conf.h>
@@ -49,6 +55,9 @@
 #include <sys/sysproto.h>
 #include <sys/user.h>
 
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+
 #include <vm/vm.h>
 #include <vm/vm_object.h>
 #include <vm/vm_page.h>
@@ -76,6 +85,17 @@
 {
 	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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212301454.qBUEsocu093300>