PERFORCE change 219916 for review

Robert Watson rwatson at FreeBSD.org
Sun Dec 30 14:54:51 UTC 2012


http://p4web.freebsd.org/@@219916?ac=10

Change 219916 by rwatson at 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 at 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;
 	}


More information about the p4-projects mailing list