Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 2010 03:22:04 +0000 (UTC)
From:      Neel Natu <neel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r203510 - head/sys/mips/sibyte
Message-ID:  <201002050322.o153M40q013953@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: neel
Date: Fri Feb  5 03:22:04 2010
New Revision: 203510
URL: http://svn.freebsd.org/changeset/base/203510

Log:
  Initialize interrupt controller early on.

Modified:
  head/sys/mips/sibyte/sb_machdep.c

Modified: head/sys/mips/sibyte/sb_machdep.c
==============================================================================
--- head/sys/mips/sibyte/sb_machdep.c	Fri Feb  5 03:20:47 2010	(r203509)
+++ head/sys/mips/sibyte/sb_machdep.c	Fri Feb  5 03:22:04 2010	(r203510)
@@ -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, __regist
 	memset(&edata, 0, (vm_offset_t)&end - (vm_offset_t)&edata);
 	mips_postboot_fixup();
 
+	sb_intr_init(0);
+
 	/* Initialize pcpu stuff */
 	mips_pcpu0_init();
 



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