From owner-p4-projects@FreeBSD.ORG Mon Jan 7 08:05:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8598F16A41A; Mon, 7 Jan 2008 08:05:15 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 161E716A418 for ; Mon, 7 Jan 2008 08:05:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 0F63B13C43E for ; Mon, 7 Jan 2008 08:05:15 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0785Ehx036508 for ; Mon, 7 Jan 2008 08:05:14 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0785ENj036505 for perforce@freebsd.org; Mon, 7 Jan 2008 08:05:14 GMT (envelope-from imp@freebsd.org) Date: Mon, 7 Jan 2008 08:05:14 GMT Message-Id: <200801070805.m0785ENj036505@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 132691 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jan 2008 08:05:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=132691 Change 132691 by imp@imp_paco-paco on 2008/01/07 08:04:55 Restore CFE and YAMON specific bits to LOCORE. Also need to sort out the mips_init vs platform_init disparity that we currently have, but that can wait a bit. Affected files ... .. //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#6 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#6 (text+ko) ==== @@ -71,6 +71,19 @@ #include "assym.s" + .data +#ifdef YAMON +GLOBAL(fenvp) + .space 4 # Assumes mips32? Is that OK? +#endif +#ifdef CFE /* Assumes MIPS32, bad? */ +GLOBAL(cfe_handle) + .space 4 +GLOBAL(cfe_vector) + .space 4 +#endif + + .text .set noreorder # Noreorder is default style! .globl _C_LABEL(_start) @@ -91,6 +104,20 @@ la gp, _C_LABEL(_gp) sw zero, START_FRAME - 4(sp) # Zero out old ra for debugger +#ifdef YAMON + /* Save YAMON boot environment pointer */ + sw a2, fenvp +#endif +#ifdef CFE + /* + * Save the CFE context passed to us by the loader. + */ + li t1, 0x43464531 + bne a3, t1, no_cfe /* Check for "CFE1" signature */ + sw a0, cfe_handle /* Firmware data segment */ + sw a2, cfe_vector /* Firmware entry vector */ +no_cfe: +#endif /* reset count register to 1 on each CPU */ li a0, 1 mtc0 a0, COP_0_COUNT