PERFORCE change 101016 for review

Wojciech A. Koszek wkoszek at FreeBSD.org
Sat Jul 8 13:58:35 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=101016

Change 101016 by wkoszek at wkoszek_laptop on 2006/07/08 13:57:39

	
	Bring intr_enable() to cpufunc.h and uncomment calling in machdep.c.
	It might be useful to make sure some portions of the code are called
	with interrupts enabled/disabled (we already have intr_destroy() and
	intr_restore() couple).
	
	XXXMIPS:
	
		For know I've been given free hand with modifications on
		this branch. Since it's P4, we accept things going wrong for
		a while. It will be basically related with directory
		structure, since we will have to spend some time on good
		planning and reviewing, if the chip versions bring big
		differences between themselves.

Affected files ...

.. //depot/projects/mips2/src/sys/mips/include/cpufunc.h#11 edit
.. //depot/projects/mips2/src/sys/mips/mips/machdep.c#8 edit

Differences ...

==== //depot/projects/mips2/src/sys/mips/include/cpufunc.h#11 (text+ko) ====

@@ -188,6 +188,17 @@
 	return (s);
 }
 
+static __inline register_t
+intr_enable(void)
+{
+	register_t s;
+
+	s = mips_rd_status();
+	mips_wr_status(s | MIPS_SR_IE);
+
+	return (s);
+}
+
 #define	intr_restore(s)	mips_wr_status((s))
 
 static __inline void

==== //depot/projects/mips2/src/sys/mips/mips/machdep.c#8 (text+ko) ====

@@ -295,6 +295,42 @@
 
 }
 
+void
+platform_start(int argc, char **argv)
+{
+	volatile uint32_t * dest_ch;
+
+#define MALTA_FPGA_BASE         0x1f000000  /* FPGA:            */
+#define MALTA_FPGA_SIZE         0x00c00000  /*    12 MByte      */
+
+#define MALTA_LEDBAR            (MALTA_FPGA_BASE + 0x408)
+#define MALTA_ASCIIWORD         (MALTA_FPGA_BASE + 0x410)
+#define MALTA_ASCII_BASE        (MALTA_FPGA_BASE + 0x418)
+#define MALTA_ASCIIPOS0         0x00
+#define MALTA_ASCIIPOS1         0x08
+#define MALTA_ASCIIPOS2         0x10
+#define MALTA_ASCIIPOS3         0x18
+#define MALTA_ASCIIPOS4         0x20
+#define MALTA_ASCIIPOS5         0x28
+#define MALTA_ASCIIPOS6         0x30
+#define MALTA_ASCIIPOS7         0x38
+
+#define MALTA_PUTCHAR(pos, ch)							\
+	dest_ch = (uint32_t *)						\
+	    MIPS_PHYS_TO_KSEG0(MALTA_ASCII_BASE + MALTA_ASCIIPOS ## pos);	\
+	*dest_ch = (uint32_t) (ch);
+
+	MALTA_PUTCHAR(0, 'F');
+	MALTA_PUTCHAR(1, 'r');
+	MALTA_PUTCHAR(2, 'e');
+	MALTA_PUTCHAR(3, 'E');
+	MALTA_PUTCHAR(4, 'B');
+	MALTA_PUTCHAR(5, 'S');
+	MALTA_PUTCHAR(6, 'D');
+
+	memset((char *)MIPS_PHYS_TO_KSEG0(0x1fc00500 + 0x04), 'x', 10);
+}
+
 void setPQL2(int *const size, int *const ways);
 
 void


More information about the p4-projects mailing list