PERFORCE change 135218 for review
Randall R. Stewart
rrs at FreeBSD.org
Mon Feb 11 12:14:23 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=135218
Change 135218 by rrs at 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 <bsd.subdir.mk>
==== //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 <sys/cdefs.h>
__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
More information about the p4-projects
mailing list