Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Feb 2003 01:48:02 -0800 (PST)
From:      Juli Mallett <jmallett@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 25082 for review
Message-ID:  <200302130948.h1D9m2RJ043044@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=25082

Change 25082 by jmallett@jmallett_dalek on 2003/02/13 01:47:08

	Take care of some low-hanging undefined fruit...
	
		o) Do a little Debugger(), including adding a mips_break()
		   cpufunc.
		o) Add bcopy/bzero/memcpy in assembly.
		o) Define the virtual_avail, ... things.  XXX phys_avail is
		   surely sized incorrectly.  Gotta read pmap code to try to
		   make sense of this.
		o) Fix up some macros.
		o) Add SCHED_4BSD.
	
	Do things necessary to do the above...

Affected files ...

.. //depot/projects/mips/sys/conf/files.mips#6 edit
.. //depot/projects/mips/sys/mips/conf/GENERIC#8 edit
.. //depot/projects/mips/sys/mips/include/asm.h#3 edit
.. //depot/projects/mips/sys/mips/include/cpufunc.h#5 edit
.. //depot/projects/mips/sys/mips/include/param.h#6 edit
.. //depot/projects/mips/sys/mips/mips/machdep.c#2 edit
.. //depot/projects/mips/sys/mips/mips/pmap.c#1 add
.. //depot/projects/mips/sys/mips/mips/support.S#1 add

Differences ...

==== //depot/projects/mips/sys/conf/files.mips#6 (text+ko) ====

@@ -10,7 +10,10 @@
 #
 
 # This stanza is MIPS MD files.
+#mips/mips/locore.s		standard	Implicit. XXX
 mips/mips/machdep.c		standard
+mips/mips/pmap.c		standard
+mips/mips/support.S		standard
 
 # This stanza is platform files, per platform.
 geom/geom_fx.c			optional	sgimips

==== //depot/projects/mips/sys/mips/conf/GENERIC#8 (text+ko) ====

@@ -18,6 +18,7 @@
 device		arcbios			#ARCBIOS
 
 options		COMPAT_FREEBSD4		#Keep this for a while
+options 	SCHED_4BSD		#A scheduler, if you please
 
 
 # Other options

==== //depot/projects/mips/sys/mips/include/asm.h#3 (text+ko) ====

@@ -53,19 +53,27 @@
 #define PIC_GOT(x)	x
 #endif
 
+#ifdef GPROF
+#error Need to define the profile prologue.
+#else
+#define	_PROF_PROLOGUE
+#endif
+
 #define	CNAME(csym)		csym
-#define	ASMNAME(asmsym)		asmsym
 #define	HIDENAME(asmsym)	__CONCAT(.,asmsym)
 
 #define	_GLOBAL(x) \
-	.data; .align 2; .globl x; x:
+	.data; .align 2; .globl x; .ent x; x:
 
 #define	_ENTRY(x) \
-	.text; .align 2; .globl x; .type x,@function; x:
+	.text; .align 2; .globl x; .ent x; .type x,@function; x:
+
+#define	_END(x) \
+	.end x
 
 #define	ENTRY(y)	_ENTRY(CNAME(y)); _PROF_PROLOGUE
-#define	ASENTRY(y)	_ENTRY(ASMNAME(y)); _PROF_PROLOGUE
 #define	GLOBAL(y)	_GLOBAL(CNAME(y))
+#define	END(y)		_END(CNAME(y))
 
 #define	ASMSTR		.asciz
 

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

@@ -33,6 +33,12 @@
 #include <sys/types.h>
 
 static __inline void
+mips_break(void)
+{
+	__asm __volatile ("break");
+}
+
+static __inline void
 mips_read_membar(void)
 {
 	/* Nil */

==== //depot/projects/mips/sys/mips/include/param.h#6 (text+ko) ====

@@ -63,9 +63,14 @@
  * (within reasonable limits).
  *
  */
-#define	ALIGNBYTES	7
-#define	ALIGN(p)	(((u_int)(p) + ALIGNBYTES) & ~ALIGNBYTES)
-#define ALIGNED_POINTER(p,t)	((((u_long)(p)) & (sizeof(t)-1)) == 0)
+#ifndef _ALIGNBYTES
+#define	_ALIGNBYTES	7
+#endif
+#ifndef _ALIGN
+#define	_ALIGN(p)	(((u_int)(p) + _ALIGNBYTES) & ~_ALIGNBYTES)
+#endif
+#define ALIGNBYTES	_ALIGNBYTES
+#define ALIGN(p)	_ALIGN(p)
 
 #define	NBPG		4096		/* bytes/page */
 #define	PGOFSET		(NBPG-1)	/* byte offset into page */
@@ -83,6 +88,9 @@
 #define	NKMEMPAGES_MIN_DEFAULT	((8 * 1024 * 1024) >> PAGE_SHIFT)
 #define	NKMEMPAGES_MAX_DEFAULT	((128 * 1024 * 1024) >> PAGE_SHIFT)
 
+#define	atop(x)			((unsigned long)(x) >> PAGE_SHIFT)
+#define	ptoa(x)			((unsigned long)(x) << PAGE_SHIFT)
+
 /* pages ("clicks") (4096 bytes) to disk blocks */
 #define	ctod(x)		((x) << (PGSHIFT - DEV_BSHIFT))
 #define	dtoc(x)		((x) >> (PGSHIFT - DEV_BSHIFT))

==== //depot/projects/mips/sys/mips/mips/machdep.c#2 (text+ko) ====

@@ -26,4 +26,16 @@
  * $FreeBSD$
  */
 
+#include <sys/param.h>
+#include <sys/systm.h>
+
+#include <machine/cpufunc.h>
+
 int cpu_prid, fpu_id;
+
+void
+Debugger(const char *msg)
+{
+	printf("Debugger(%s)\n", msg);
+	mips_break();
+}

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




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