From owner-p4-projects@FreeBSD.ORG Fri Mar 18 08:34:45 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 13A8916A4D0; Fri, 18 Mar 2005 08:34:45 +0000 (GMT) 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 C899C16A4CE for ; Fri, 18 Mar 2005 08:34:44 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A33743D2D for ; Fri, 18 Mar 2005 08:34:44 +0000 (GMT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j2I8Yij5074334 for ; Fri, 18 Mar 2005 08:34:44 GMT (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j2I8YivD074331 for perforce@freebsd.org; Fri, 18 Mar 2005 08:34:44 GMT (envelope-from jmallett@freebsd.org) Date: Fri, 18 Mar 2005 08:34:44 GMT Message-Id: <200503180834.j2I8YivD074331@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 73448 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2005 08:34:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=73448 Change 73448 by jmallett@jmallett_windward on 2005/03/18 08:34:43 Compile. Affected files ... .. //depot/projects/mips/sys/alpha/include/cpu.h#9 edit .. //depot/projects/mips/sys/geom/geom_fx.c#14 edit .. //depot/projects/mips/sys/mips/include/cpu.h#18 edit .. //depot/projects/mips/sys/mips/include/cpufunc.h#18 edit .. //depot/projects/mips/sys/mips/include/critical.h#5 edit .. //depot/projects/mips/sys/mips/include/db_machdep.h#9 edit .. //depot/projects/mips/sys/mips/include/kdb.h#1 add .. //depot/projects/mips/sys/mips/include/pcb.h#8 edit .. //depot/projects/mips/sys/mips/mips/cache_r5k_subr.S#4 edit .. //depot/projects/mips/sys/mips/mips/clock_r4k.c#5 edit .. //depot/projects/mips/sys/mips/mips/cpu.c#6 edit .. //depot/projects/mips/sys/mips/mips/locore.S#16 edit .. //depot/projects/mips/sys/mips/mips/machdep.c#49 edit .. //depot/projects/mips/sys/mips/mips/pmap.c#40 edit Differences ... ==== //depot/projects/mips/sys/alpha/include/cpu.h#9 (text+ko) ==== ==== //depot/projects/mips/sys/geom/geom_fx.c#14 (text+ko) ==== @@ -182,7 +182,7 @@ } break; } - g_access_rel(cp, -1, 0, 0); + g_access(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { g_slice_spoiled(cp); return (NULL); ==== //depot/projects/mips/sys/mips/include/cpu.h#18 (text+ko) ==== @@ -79,6 +79,8 @@ { "wall_cmos_clock", CTLTYPE_INT }, \ } +#define cpu_spinwait() /* nothing */ + static __inline u_int64_t get_cyclecount(void) { ==== //depot/projects/mips/sys/mips/include/cpufunc.h#18 (text+ko) ==== @@ -160,7 +160,7 @@ #define intr_restore(s) mips_wr_status((s)) static __inline void -mips_break(void) +breakpoint(void) { __asm __volatile ("break"); } ==== //depot/projects/mips/sys/mips/include/critical.h#5 (text+ko) ==== @@ -33,7 +33,7 @@ * related support functions residing * in //critical.c - prototyped * - * $P4: //depot/projects/mips/sys/mips/include/critical.h#4 $ + * $P4: //depot/projects/mips/sys/mips/include/critical.h#5 $ */ #ifndef _MACHINE_CRITICAL_H_ @@ -57,11 +57,8 @@ * of td_critnest, prior to it being incremented to 1. */ static __inline void -cpu_critical_enter(void) +cpu_critical_enter(struct thread *td) { - struct thread *td; - - td = curthread; td->td_md.md_savecrit = intr_disable(); } @@ -73,11 +70,8 @@ * exiting the last critical section. */ static __inline void -cpu_critical_exit(void) +cpu_critical_exit(struct thread *td) { - struct thread *td; - - td = curthread; intr_restore(td->td_md.md_savecrit); } ==== //depot/projects/mips/sys/mips/include/db_machdep.h#9 (text+ko) ==== @@ -82,7 +82,6 @@ */ void kdb_kbd_trap(db_regs_t *); void db_set_ddb_regs(int type, struct trapframe *); -int kdb_trap(int type, struct trapframe *); int kdbpeek(db_addr_t); #define DB_SMALL_VALUE_MAX (0x7fffffff) ==== //depot/projects/mips/sys/mips/include/pcb.h#8 (text+ko) ==== @@ -42,6 +42,7 @@ #ifdef _KERNEL #define PCB_FSR(pcb) (0) +void makectx(struct trapframe *, struct pcb *); int savectx(struct pcb *pcb); #endif ==== //depot/projects/mips/sys/mips/mips/cache_r5k_subr.S#4 (text+ko) ==== @@ -41,14 +41,14 @@ */ LEAF(r5k_enable_sdcache) lw t2, mips_sdcache_size - la t1, MIPS_KSEG0_START + dla t1, MIPS_KSEG0_START beq t2, zero, 3f # if no sdcache, we can bail now nop add t2, t1, t2 - la v0, 1f + dla v0, 1f or v0, MIPS_KSEG1_START j v0 # run the rest from uncached space ==== //depot/projects/mips/sys/mips/mips/clock_r4k.c#5 (text+ko) ==== @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include ==== //depot/projects/mips/sys/mips/mips/cpu.c#6 (text+ko) ==== @@ -25,8 +25,10 @@ * $FreeBSD$ */ +#define __RMAN_RESOURCE_VISIBLE #include #include +#include #include #include #include ==== //depot/projects/mips/sys/mips/mips/locore.S#16 (text+ko) ==== @@ -89,10 +89,10 @@ sw t1, fpu_id /* Set up the GP. */ - la gp, _gp + dla gp, _gp /* Set up our temporary stack. */ - la sp, topstack + dla sp, topstack /* Call the platform-specific startup code. */ jal platform_start ==== //depot/projects/mips/sys/mips/mips/machdep.c#49 (text+ko) ==== @@ -135,17 +135,26 @@ } void -Debugger(const char *msg) +dumpsys(struct dumperinfo *dip) { - printf("Debugger(%s)\n", msg); - mips_break(); } +/* + * Construct a PCB from a trapframe. This is called from kdb_trap() where + * we want to start a backtrace from the function that caused us to enter + * the debugger. We have the context in the trapframe, but base the trace + * on the PCB. The PCB doesn't have to be perfect, as long as it contains + * enough for a backtrace. + */ void -dumpsys(struct dumperinfo *dip) +makectx(struct trapframe *tf, struct pcb *pcb) { + pcb->pcb_regs[11] = tf->tf_regs[TF_SR]; + pcb->pcb_regs[10] = tf->tf_regs[TF_RA]; + pcb->pcb_regs[8] = tf->tf_regs[TF_SP]; } + int get_mcontext(struct thread *td, mcontext_t *mcp, int clear_ret) { ==== //depot/projects/mips/sys/mips/mips/pmap.c#40 (text+ko) ==== @@ -101,6 +101,7 @@ #include +#include #include #include #include