From owner-p4-projects@FreeBSD.ORG Mon Feb 11 20:14:22 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A87D016A41B; Mon, 11 Feb 2008 20:14:22 +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 6C81C16A419 for ; Mon, 11 Feb 2008 20:14:22 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 623A013C45E for ; Mon, 11 Feb 2008 20:14:22 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m1BKEM5s057168 for ; Mon, 11 Feb 2008 20:14:22 GMT (envelope-from rrs@cisco.com) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m1BKEM5H057160 for perforce@freebsd.org; Mon, 11 Feb 2008 20:14:22 GMT (envelope-from rrs@cisco.com) Date: Mon, 11 Feb 2008 20:14:22 GMT Message-Id: <200802112014.m1BKEM5H057160@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rrs@cisco.com using -f From: "Randall R. Stewart" To: Perforce Change Reviews Cc: Subject: PERFORCE change 135218 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, 11 Feb 2008 20:14:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=135218 Change 135218 by rrs@rrs-mips2-jnpr-2 on 2008/02/11 20:13:45 Work around (option) for the Cavium emulator. The telnet console to the emulator runs in cooked (line input) mode, this causes ddb to get confused about its character inputs. This change flushes the input line after single-character input (the pager) and tosses '\r' input. Submitted by: bbeare Reviewed by: rrs Approved by: rrs Affected files ... .. //depot/projects/mips2-jnpr/src/sys/Makefile#2 edit .. //depot/projects/mips2-jnpr/src/sys/conf/options.mips#4 edit .. //depot/projects/mips2-jnpr/src/sys/ddb/db_output.c#2 edit .. //depot/projects/mips2-jnpr/src/sys/kern/tty_cons.c#2 edit .. //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs2#2 edit Differences ... ==== //depot/projects/mips2-jnpr/src/sys/Makefile#2 (text+ko) ==== @@ -38,4 +38,9 @@ rm -f ${.CURDIR}/TAGS cd ${.CURDIR}; xargs etags -a < ${.CURDIR}/cscopenamefile +# Tags for vi +ctags ${.CURDIR}/ctags: ${.CURDIR}/cscopenamefile + rm -f ${.CURDIR}/ctags + cd ${.CURDIR}; xargs ctags -a < ${.CURDIR}/cscopenamefile + .include ==== //depot/projects/mips2-jnpr/src/sys/conf/options.mips#4 (text+ko) ==== @@ -21,7 +21,8 @@ KERNVIRTADDR opt_global.h PHYSADDR opt_global.h -TARGET_OCTEON opt_global.h +TARGET_OCTEON opt_global.h +TARGET_EMULATOR opt_ddb.h TICK_USE_YAMON_FREQ opt_global.h TICK_USE_MALTA_RTC opt_global.h ==== //depot/projects/mips2-jnpr/src/sys/ddb/db_output.c#2 (text+ko) ==== @@ -32,6 +32,7 @@ * Printf and character output for debugger. */ +#include "opt_ddb.h" #include __FBSDID("$FreeBSD: src/sys/ddb/db_output.c,v 1.38 2007/12/25 23:06:51 rwatson Exp $"); @@ -217,6 +218,15 @@ done = 0; while (!done) { c = cngetc(); +#ifdef TARGET_EMULATOR +/* + * Work around EMULATOR problem on Cavium. + * telnet to emulator runs in cooked mode. + */ + while (cncheckc() != -1) { + /* nothing */ + } +#endif switch (c) { case 'e': case 'j': ==== //depot/projects/mips2-jnpr/src/sys/kern/tty_cons.c#2 (text+ko) ==== @@ -579,10 +579,19 @@ if (cn_mute) return (-1); +#ifdef TARGET_EMULATOR +/* + * Work around EMULATOR problem on Cavium. + * telnet to emulator runs in cooked mode. + */ + while (((c = cncheckc()) == -1) || (c == '\r')) + ; +#else while ((c = cncheckc()) == -1) ; if (c == '\r') c = '\n'; /* console input is always ICRNL */ +#endif return (c); } ==== //depot/projects/mips2-jnpr/src/sys/mips/conf/OCTEON_rrs2#2 (text+ko) ==== @@ -82,3 +82,6 @@ options MD_ROOT # options ROOTDEVNAME = \"ufs:md0\" options MD_ROOT_SIZE = 25200 + +# Work around for the OCTEON emulator +options TARGET_EMULATOR