From owner-p4-projects Thu Feb 13 1:48: 8 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id ED0A937B405; Thu, 13 Feb 2003 01:48:03 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A02F37B401 for ; Thu, 13 Feb 2003 01:48:03 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0958543F3F for ; Thu, 13 Feb 2003 01:48:03 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h1D9m2bv043047 for ; Thu, 13 Feb 2003 01:48:02 -0800 (PST) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h1D9m2RJ043044 for perforce@freebsd.org; Thu, 13 Feb 2003 01:48:02 -0800 (PST) Date: Thu, 13 Feb 2003 01:48:02 -0800 (PST) Message-Id: <200302130948.h1D9m2RJ043044@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett Subject: PERFORCE change 25082 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 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 +#include + +#include + 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