summaryrefslogtreecommitdiffstats
path: root/sys/mips/sibyte
diff options
context:
space:
mode:
authorneel <neel@FreeBSD.org>2010-02-05 03:22:04 +0000
committerneel <neel@FreeBSD.org>2010-02-05 03:22:04 +0000
commit017831802664497b541a6c978286becda1315230 (patch)
tree42a4679468d9d301ff7b68901c2798ea596e0daf /sys/mips/sibyte
parent5b7a1d2513215266bae13233b65c25a0c0c4e41e (diff)
downloadFreeBSD-src-017831802664497b541a6c978286becda1315230.zip
FreeBSD-src-017831802664497b541a6c978286becda1315230.tar.gz
Initialize interrupt controller early on.
Diffstat (limited to 'sys/mips/sibyte')
-rw-r--r--sys/mips/sibyte/sb_machdep.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/mips/sibyte/sb_machdep.c b/sys/mips/sibyte/sb_machdep.c
index 7f42f4f..c544b18 100644
--- a/sys/mips/sibyte/sb_machdep.c
+++ b/sys/mips/sibyte/sb_machdep.c
@@ -102,6 +102,22 @@ platform_cpu_init()
}
static void
+sb_intr_init(int cpuid)
+{
+ int intrnum, intsrc;
+
+ /*
+ * Disable all sources to the interrupt mapper and setup the mapping
+ * between an interrupt source and the mips hard interrupt number.
+ */
+ for (intsrc = 0; intsrc < NUM_INTSRC; ++intsrc) {
+ intrnum = sb_route_intsrc(intsrc);
+ sb_disable_intsrc(cpuid, intsrc);
+ sb_write_intmap(cpuid, intsrc, intrnum);
+ }
+}
+
+static void
mips_init(void)
{
int i, cfe_mem_idx, tmp;
@@ -279,6 +295,8 @@ platform_start(__register_t a0, __register_t a1, __register_t a2,
memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata);
mips_postboot_fixup();
+ sb_intr_init(0);
+
/* Initialize pcpu stuff */
mips_pcpu0_init();
OpenPOWER on IntegriCloud