PERFORCE change 219957 for review
Brooks Davis
brooks at FreeBSD.org
Mon Jan 7 20:17:56 UTC 2013
http://p4web.freebsd.org/@@219957?ac=10
Change 219957 by brooks at brooks_zenith on 2013/01/07 20:17:35
Integrate rwatson's work on FDT support.
Affected files ...
.. //depot/projects/ctsrd/cheribsd/src/sys/boot/fdt/dts/beri-sim.dts#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/boot/fdt/dts/beripad-de4.dts#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/boot/fdt/dts/beripad-tpad.dts#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/conf/files#5 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/conf/files.mips#5 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/avgen/altera_avgen.c#5 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/avgen/altera_avgen.h#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/avgen/altera_avgen_fdt.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/avgen/altera_avgen_nexus.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart.h#4 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c#5 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart_fdt.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard.h#4 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard_fdt.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard_nexus.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/fdt/fdt_mips.c#2 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/fdt/fdtbus.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf.h#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf_fdt.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf_nexus.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led.c#5 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led.h#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led_fdt.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led_nexus.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl.h#4 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl_fdt.c#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl_nexus.c#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/beri/beri_machdep.c#4 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/beri/files.beri#9 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4.hints#6 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4_MDROOT#5 edit
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_FDT_DE4.hints#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_FDT_DE4_MDROOT#1 branch
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_SIM.hints#3 delete
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_SIM_MDROOT#5 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/CHERI_DE4_MDROOT#2 edit
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/bus.h#3 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/fdt.h#2 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/include/metadata.h#2 integrate
.. //depot/projects/ctsrd/cheribsd/src/sys/mips/mips/bus_space_fdt.c#1 branch
Differences ...
==== //depot/projects/ctsrd/cheribsd/src/sys/conf/files#5 (text+ko) ====
@@ -638,9 +638,12 @@
dev/alc/if_alc.c optional alc pci
dev/ale/if_ale.c optional ale pci
dev/altera/avgen/altera_avgen.c optional altera_avgen
+dev/altera/avgen/altera_avgen_fdt.c optional altera_avgen fdt
+dev/altera/avgen/altera_avgen_nexus.c optional altera_avgen
dev/altera/sdcard/altera_sdcard.c optional altera_sdcard
dev/altera/sdcard/altera_sdcard_disk.c optional altera_sdcard
dev/altera/sdcard/altera_sdcard_io.c optional altera_sdcard
+dev/altera/sdcard/altera_sdcard_fdt.c optional altera_sdcard fdt
dev/altera/sdcard/altera_sdcard_nexus.c optional altera_sdcard
dev/amr/amr.c optional amr
dev/amr/amr_cam.c optional amrp amr
@@ -1392,6 +1395,7 @@
dev/iscsi/initiator/isc_sm.c optional iscsi_initiator scbus
dev/iscsi/initiator/isc_subr.c optional iscsi_initiator scbus
dev/isf/isf.c optional isf
+dev/isf/isf_fdt.c optional isf fdt
dev/isf/isf_nexus.c optional isf
dev/isp/isp.c optional isp
dev/isp/isp_freebsd.c optional isp
==== //depot/projects/ctsrd/cheribsd/src/sys/conf/files.mips#5 (text+ko) ====
@@ -45,6 +45,7 @@
mips/mips/tlb.c standard
mips/mips/bus_space_generic.c standard
+mips/mips/bus_space_fdt.c optional fdt
mips/mips/busdma_machdep.c standard
mips/mips/cache.c standard
mips/mips/cache_mipsNN.c standard
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/avgen/altera_avgen.c#5 (text+ko) ====
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012 Robert N. M. Watson
+ * Copyright (c) 2012-2013 Robert N. M. Watson
* All rights reserved.
*
* This software was developed by SRI International and the University of
@@ -60,6 +60,8 @@
* system-on-chip bus environments would work fine with the same code.
*/
+devclass_t altera_avgen_devclass;
+
static d_mmap_t altera_avgen_mmap;
static d_read_t altera_avgen_read;
static d_write_t altera_avgen_write;
@@ -226,13 +228,6 @@
return (0);
}
-static int
-altera_avgen_nexus_probe(device_t dev)
-{
-
- device_set_desc(dev, "Generic Altera Avalon device attachment");
- return (BUS_PROBE_DEFAULT);
-}
static int
altera_avgen_process_options(struct altera_avgen_softc *sc,
@@ -321,42 +316,14 @@
return (0);
}
-static int
-altera_avgen_nexus_attach(device_t dev)
+int
+altera_avgen_attach(struct altera_avgen_softc *sc, const char *str_fileio,
+ const char *str_mmapio, const char *str_devname, int devunit)
{
- struct altera_avgen_softc *sc;
- const char *str_fileio, *str_mmapio;
- const char *str_devname;
+ device_t dev = sc->avg_dev;
char devname[SPECNAMELEN + 1];
- int devunit, error;
-
- sc = device_get_softc(dev);
- sc->avg_dev = dev;
- sc->avg_unit = device_get_unit(dev);
+ int error;
- /*
- * Query non-standard hints to find out what operations are permitted
- * on the device, and whether it is cached.
- */
- str_fileio = NULL;
- str_mmapio = NULL;
- str_devname = NULL;
- devunit = -1;
- sc->avg_width = 1;
- error = resource_int_value(device_get_name(dev), device_get_unit(dev),
- ALTERA_AVALON_STR_WIDTH, &sc->avg_width);
- if (error != 0 && error != ENOENT) {
- device_printf(dev, "invalid %s\n", ALTERA_AVALON_STR_WIDTH);
- return (error);
- }
- (void)resource_string_value(device_get_name(dev),
- device_get_unit(dev), ALTERA_AVALON_STR_FILEIO, &str_fileio);
- (void)resource_string_value(device_get_name(dev),
- device_get_unit(dev), ALTERA_AVALON_STR_MMAPIO, &str_mmapio);
- (void)resource_string_value(device_get_name(dev),
- device_get_unit(dev), ALTERA_AVALON_STR_DEVNAME, &str_devname);
- (void)resource_int_value(device_get_name(dev), device_get_unit(dev),
- ALTERA_AVALON_STR_DEVUNIT, &devunit);
error = altera_avgen_process_options(sc, str_fileio, str_mmapio,
str_devname, devunit);
if (error)
@@ -374,25 +341,15 @@
snprintf(devname, sizeof(devname), "%s%d", "avgen",
sc->avg_unit);
- /* Memory allocation and checking. */
- sc->avg_rid = 0;
- sc->avg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
- &sc->avg_rid, RF_ACTIVE);
- if (sc->avg_res == NULL) {
- device_printf(dev, "couldn't map memory\n");
- return (ENXIO);
- }
if (rman_get_size(sc->avg_res) >= PAGE_SIZE || str_mmapio != NULL) {
if (rman_get_size(sc->avg_res) % PAGE_SIZE != 0) {
device_printf(dev,
"memory region not even multiple of page size\n");
- error = ENXIO;
- goto error;
+ return (ENXIO);
}
if (rman_get_start(sc->avg_res) % PAGE_SIZE != 0) {
device_printf(dev, "memory region not page-aligned\n");
- error = ENXIO;
- goto error;
+ return (ENXIO);
}
}
@@ -409,43 +366,16 @@
GID_WHEEL, S_IRUSR | S_IWUSR, str_devname);
if (sc->avg_cdev == NULL) {
device_printf(sc->avg_dev, "%s: make_dev failed\n", __func__);
- error = ENXIO;
- goto error;
+ return (ENXIO);
}
/* XXXRW: Slight race between make_dev(9) and here. */
sc->avg_cdev->si_drv1 = sc;
return (0);
-
-error:
- bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res);
- return (error);
}
-static int
-altera_avgen_nexus_detach(device_t dev)
+void
+altera_avgen_detach(struct altera_avgen_softc *sc)
{
- struct altera_avgen_softc *sc;
- sc = device_get_softc(dev);
destroy_dev(sc->avg_cdev);
- bus_release_resource(dev, SYS_RES_MEMORY, sc->avg_rid, sc->avg_res);
- return (0);
}
-
-static device_method_t altera_avgen_nexus_methods[] = {
- DEVMETHOD(device_probe, altera_avgen_nexus_probe),
- DEVMETHOD(device_attach, altera_avgen_nexus_attach),
- DEVMETHOD(device_detach, altera_avgen_nexus_detach),
- { 0, 0 }
-};
-
-static driver_t altera_avgen_nexus_driver = {
- "altera_avgen",
- altera_avgen_nexus_methods,
- sizeof(struct altera_avgen_softc),
-};
-
-static devclass_t altera_avgen_devclass;
-
-DRIVER_MODULE(avgen, nexus, altera_avgen_nexus_driver, altera_avgen_devclass,
- 0, 0);
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/avgen/altera_avgen.h#3 (text+ko) ====
@@ -77,7 +77,11 @@
/*
* Driver setup routines from the bus attachment/teardown.
*/
-int altera_avgen_attach(struct altera_avgen_softc *sc);
+int altera_avgen_attach(struct altera_avgen_softc *sc,
+ const char *str_fileio, const char *str_mmapio,
+ const char *str_devname, int devunit);
void altera_avgen_detach(struct altera_avgen_softc *sc);
+extern devclass_t altera_avgen_devclass;
+
#endif /* _DEV_ALTERA_AVALON_H_ */
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart.h#4 (text+ko) ====
@@ -194,4 +194,6 @@
int altera_jtag_uart_attach(struct altera_jtag_uart_softc *sc);
void altera_jtag_uart_detach(struct altera_jtag_uart_softc *sc);
+extern devclass_t altera_jtag_uart_devclass;
+
#endif /* _DEV_ALTERA_JTAG_UART_H_ */
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c#5 (text+ko) ====
@@ -32,6 +32,7 @@
__FBSDID("$FreeBSD: src/sys/dev/altera/jtag_uart/altera_jtag_uart_cons.c,v 1.2 2012/09/14 21:28:56 eadler Exp $");
#include <sys/param.h>
+#include <sys/bus.h>
#include <sys/cons.h>
#include <sys/endian.h>
#include <sys/kdb.h>
@@ -46,6 +47,8 @@
#include <dev/altera/jtag_uart/altera_jtag_uart.h>
+devclass_t altera_jtag_uart_devclass;
+
/*
* One-byte buffer as we can't check whether the UART is readable without
* actually reading from it, synchronised by a spinlock; this lock also
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/jtag_uart/altera_jtag_uart_nexus.c#3 (text+ko) ====
@@ -137,7 +137,5 @@
sizeof(struct altera_jtag_uart_softc),
};
-static devclass_t altera_jtag_uart_devclass;
-
DRIVER_MODULE(altera_jtag_uart, nexus, altera_jtag_uart_nexus_driver,
altera_jtag_uart_devclass, 0, 0);
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard.c#3 (text+ko) ====
@@ -70,6 +70,7 @@
* 3. Handle read-only SD Cards.
* 4. Tune timeouts based on real-world SD Card speeds.
*/
+devclass_t altera_sdcard_devclass;
void
altera_sdcard_attach(struct altera_sdcard_softc *sc)
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard.h#4 (text+ko) ====
@@ -244,4 +244,6 @@
void altera_sdcard_disk_insert(struct altera_sdcard_softc *sc);
void altera_sdcard_disk_remove(struct altera_sdcard_softc *sc);
+extern devclass_t altera_sdcard_devclass;
+
#endif /* _DEV_ALTERA_SDCARD_H_ */
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/altera/sdcard/altera_sdcard_nexus.c#3 (text+ko) ====
@@ -110,7 +110,5 @@
sizeof(struct altera_sdcard_softc),
};
-static devclass_t altera_sdcard_devclass;
-
DRIVER_MODULE(altera_sdcard, nexus, altera_sdcard_nexus_driver,
altera_sdcard_devclass, 0, 0);
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/fdt/fdt_mips.c#2 (text+ko) ====
@@ -49,8 +49,26 @@
{ NULL, NULL }
};
+/*
+ * For PIC-free boards, provide a PIC decoder to be used with mips4k CP0
+ * interrupt control directly.
+ */
+static int
+fdt_pic_decode_mips4k_cp0(phandle_t node, pcell_t *intr, int *interrupt,
+ int *trig, int *pol)
+{
+
+ if (!fdt_is_compatible(node, "mips4k,cp0"))
+ return (ENXIO);
+
+ *interrupt = fdt32_to_cpu(intr[0]);
+ *trig = INTR_TRIGGER_CONFORM;
+ *pol = INTR_POLARITY_CONFORM;
+
+ return (0);
+}
+
fdt_pic_decode_t fdt_pic_table[] = {
- NULL,
- NULL,
+ &fdt_pic_decode_mips4k_cp0,
NULL
};
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/fdt/fdtbus.c#3 (text+ko) ====
@@ -257,6 +257,8 @@
struct fdtbus_devinfo *di;
di = device_get_ivars(dev);
+ if (di == NULL)
+ return;
free(di->di_name, M_OFWPROP);
free(di->di_type, M_OFWPROP);
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf.c#3 (text+ko) ====
@@ -150,6 +150,7 @@
* physical package, due to variable block size support in the StrataFlash
* part.
*/
+devclass_t isf_devclass;
static uint16_t
isf_read_reg(struct isf_softc *sc, uint16_t reg)
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf.h#3 (text+ko) ====
@@ -87,6 +87,8 @@
int isf_attach(struct isf_softc *sc);
void isf_detach(struct isf_softc *sc);
+
+extern devclass_t isf_devclass;
#endif /* _KERNEL */
#endif /* _DEV_ISF_H_ */
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/isf/isf_nexus.c#3 (text+ko) ====
@@ -115,6 +115,4 @@
sizeof(struct isf_softc),
};
-static devclass_t isf_devclass;
-
DRIVER_MODULE(isf, nexus, isf_nexus_driver, isf_devclass, 0, 0);
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led.c#5 (text+ko) ====
@@ -43,6 +43,8 @@
#include <dev/led/led.h>
#include <dev/terasic/de4led/terasic_de4led.h>
+devclass_t terasic_de4led_devclass;
+
static void
terasic_de4led_update(struct terasic_de4led_softc *sc)
{
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led.h#3 (text+ko) ====
@@ -70,4 +70,6 @@
void terasic_de4led_attach(struct terasic_de4led_softc *sc);
void terasic_de4led_detach(struct terasic_de4led_softc *sc);
+extern devclass_t terasic_de4led_devclass;
+
#endif /* _DEV_TERASIC_DE4LED_H_ */
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/de4led/terasic_de4led_nexus.c#3 (text+ko) ====
@@ -106,7 +106,5 @@
sizeof(struct terasic_de4led_softc),
};
-static devclass_t terasic_de4led_devclass;
-
DRIVER_MODULE(terasic_de4led, nexus, terasic_de4led_nexus_driver,
terasic_de4led_devclass, 0, 0);
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl.c#3 (text+ko) ====
@@ -63,6 +63,9 @@
* attached as they may be called even if the attach routine hasn't been, on
* an error.
*/
+
+devclass_t terasic_mtl_devclass;
+
int
terasic_mtl_attach(struct terasic_mtl_softc *sc)
{
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl.h#4 (text+ko) ====
@@ -159,6 +159,8 @@
int terasic_mtl_attach(struct terasic_mtl_softc *sc);
void terasic_mtl_detach(struct terasic_mtl_softc *sc);
+extern devclass_t terasic_mtl_devclass;
+
/*
* Sub-driver setup routines.
*/
==== //depot/projects/ctsrd/cheribsd/src/sys/dev/terasic/mtl/terasic_mtl_nexus.c#3 (text+ko) ====
@@ -190,7 +190,5 @@
sizeof(struct terasic_mtl_softc),
};
-static devclass_t terasic_mtl_devclass;
-
DRIVER_MODULE(mtl, nexus, terasic_mtl_nexus_driver, terasic_mtl_devclass, 0,
0);
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/beri/beri_machdep.c#4 (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>
@@ -39,6 +45,7 @@
#include <sys/cpu.h>
#include <sys/cons.h>
#include <sys/exec.h>
+#include <sys/linker.h>
#include <sys/ucontext.h>
#include <sys/proc.h>
#include <sys/kdb.h>
@@ -49,6 +56,11 @@
#include <sys/sysproto.h>
#include <sys/user.h>
+#ifdef FDT
+#include <dev/fdt/fdt_common.h>
+#include <dev/ofw/openfirm.h>
+#endif
+
#include <vm/vm.h>
#include <vm/vm_object.h>
#include <vm/vm_page.h>
@@ -59,6 +71,7 @@
#include <machine/cpuregs.h>
#include <machine/hwfunc.h>
#include <machine/md_var.h>
+#include <machine/metadata.h>
#include <machine/pmap.h>
#include <machine/trap.h>
@@ -124,6 +137,10 @@
char **argv = (char **)a1;
char **envp = (char **)a2;
unsigned int memsize = a3;
+#ifdef FDT
+ vm_offset_t dtbp;
+ void *kmdp;
+#endif
int i;
/* clear the BSS and SBSS segments */
@@ -134,6 +151,33 @@
mips_pcpu0_init();
+#ifdef FDT
+ /*
+ * Find the dtb passed in by the boot loader (currently fictional).
+ */
+ kmdp = preload_search_by_type("elf kernel");
+ if (kmdp != NULL)
+ dtbp = MD_FETCH(kmdp, MODINFOMD_DTBP, vm_offset_t);
+ else
+ dtbp = (vm_offset_t)NULL;
+
+#if defined(FDT_DTB_STATIC)
+ /*
+ * In case the device tree blob was not retrieved (from metadata) try
+ * to use the statically embedded one.
+ */
+ if (dtbp == (vm_offset_t)NULL)
+ dtbp = (vm_offset_t)&fdt_static_dtb;
+#else
+#error "Non-static FDT not yet supported on BERI"
+#endif
+
+ if (OF_install(OFW_FDT, 0) == FALSE)
+ while (1);
+ if (OF_init(&fdt_static_dtb) != 0)
+ while (1);
+#endif
+
/*
* XXXRW: We have no way to compare wallclock time to cycle rate on
* BERI, so for now assume we run at the MALTA default (100MHz).
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/beri/files.beri#9 (text+ko) ====
@@ -1,11 +1,14 @@
# $FreeBSD: src/sys/mips/beri/files.beri,v 1.4 2012/08/26 09:21:59 rwatson Exp $
dev/altera/jtag_uart/altera_jtag_uart_cons.c optional altera_jtag_uart
dev/altera/jtag_uart/altera_jtag_uart_tty.c optional altera_jtag_uart
+dev/altera/jtag_uart/altera_jtag_uart_fdt.c optional altera_jtag_uart fdt
dev/altera/jtag_uart/altera_jtag_uart_nexus.c optional altera_jtag_uart
dev/cfi/cfi_bus_nexus.c optional cfi
dev/terasic/de4led/terasic_de4led.c optional terasic_de4led
+dev/terasic/de4led/terasic_de4led_fdt.c optional terasic_de4led fdt
dev/terasic/de4led/terasic_de4led_nexus.c optional terasic_de4led
dev/terasic/mtl/terasic_mtl.c optional terasic_mtl
+dev/terasic/mtl/terasic_mtl_fdt.c optional terasic_mtl fdt
dev/terasic/mtl/terasic_mtl_nexus.c optional terasic_mtl
dev/terasic/mtl/terasic_mtl_pixel.c optional terasic_mtl
dev/terasic/mtl/terasic_mtl_reg.c optional terasic_mtl
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4.hints#6 (text+ko) ====
@@ -61,26 +61,26 @@
hint.altera_avgen.0.devname="berirom"
#
+# Expose the DE4 buttons and switches via an Avalon "generic" device.
+#
+hint.altera_avgen.1.at="nexus0"
+hint.altera_avgen.1.maddr=0x7f009000
+hint.altera_avgen.1.msize=2
+hint.altera_avgen.1.width=1
+hint.altera_avgen.1.fileio="r"
+hint.altera_avgen.1.devname="de4bsw"
+
+#
# Expose the DE4 flash via an Avalon "generic" device.
# This is incompatible with the isf(4) driver.
#
-#hint.altera_avgen.0.at="nexus0"
-#hint.altera_avgen.0.maddr=0x74000000
-#hint.altera_avgen.0.msize=0x4000000
-#hint.altera_avgen.0.width=2
-#hint.altera_avgen.0.fileio="rw"
-#hint.altera_avgen.0.mmapio="rwx"
-#hint.altera_avgen.0.devname="de4flash"
-
-#
-# Expose the DE4 buttons and switches via an Avalon "generic" device.
-#
-hint.altera_avgen.0.at="nexus0"
-hint.altera_avgen.0.maddr=0x7f009000
-hint.altera_avgen.0.msize=2
-hint.altera_avgen.0.width=1
-hint.altera_avgen.0.fileio="r"
-hint.altera_avgen.0.devname="de4bsw"
+#hint.altera_avgen.2.at="nexus0"
+#hint.altera_avgen.2.maddr=0x74000000
+#hint.altera_avgen.2.msize=0x4000000
+#hint.altera_avgen.2.width=2
+#hint.altera_avgen.2.fileio="rw"
+#hint.altera_avgen.2.mmapio="rwx"
+#hint.altera_avgen.2.devname="de4flash"
#
# General Intel StrataFlash driver
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_DE4_MDROOT#5 (text+ko) ====
@@ -10,7 +10,12 @@
ident BERI_DE4_MDROOT
-hints "BERI_DE4.hints" #Default places to look for devices.
+#hints "BERI_DE4.hints" #Default places to look for devices.
+hints "BERI_FDT_DE4.hints" #Default places to look for devices.
+
+options FDT
+options FDT_DTB_STATIC
+makeoptions FDT_DTS_FILE=beripad-de4.dts
#
# This kernel configuration uses an embedded 8MB memory root file system.
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/BERI_SIM_MDROOT#5 (text+ko) ====
@@ -9,7 +9,9 @@
ident BERI_SIM_MDROOT
-hints "BERI_SIM.hints" #Default places to look for devices.
+options FDT
+options FDT_DTB_STATIC
+makeoptions FDT_DTS_FILE=beri-sim.dts
#
# This kernel configuration uses an embedded 8MB memory root file system.
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/conf/CHERI_DE4_MDROOT#2 (text+ko) ====
@@ -9,5 +9,9 @@
include BERI_DE4_MDROOT
ident CHERI_DE4_MDROOT
+nooptions MD_ROOT_SIZE
+options MD_ROOT_SIZE=25600
+makeoptions MFS_IMAGE=/home/bed22/demoroot.img
+
nocpu CPU_BERI
cpu CPU_CHERI
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/bus.h#3 (text+ko) ====
@@ -728,6 +728,8 @@
*/
DECLARE_BUS_SPACE_PROTOTYPES(generic);
extern bus_space_tag_t mips_bus_space_generic;
+extern bus_space_tag_t mips_bus_space_fdt;
+
/* Special bus space for RMI processors */
#if defined(CPU_RMI) || defined (CPU_NLM)
extern bus_space_tag_t rmi_bus_space;
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/fdt.h#2 (text+ko) ====
@@ -51,7 +51,7 @@
#if defined(CPU_RMI) || defined(CPU_NLM)
#define fdtbus_bs_tag rmi_uart_bus_space
#else
-#define fdtbus_bs_tag NULL
+#define fdtbus_bs_tag mips_bus_space_fdt
#endif
#endif /* _MACHINE_FDT_H_ */
==== //depot/projects/ctsrd/cheribsd/src/sys/mips/include/metadata.h#2 (text+ko) ====
@@ -30,5 +30,6 @@
#define _MACHINE_METADATA_H_
#define MODINFOMD_SMAP 0x1001
+#define MODINFOMD_DTBP 0x1002
#endif /* !_MACHINE_METADATA_H_ */
More information about the p4-projects
mailing list