This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
RedBoot - console interrupts
- From: Gary Thomas <gary at chez-thomas dot org>
- To: eCos patches <ecos-patches at sources dot redhat dot com>
- Date: 11 Jul 2002 10:40:14 -0600
- Subject: RedBoot - console interrupts
Index: redboot/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.59
diff -u -5 -p -r1.59 ChangeLog
--- redboot/current/ChangeLog 9 Jul 2002 20:23:47 -0000 1.59
+++ redboot/current/ChangeLog 11 Jul 2002 16:16:44 -0000
@@ -1,5 +1,12 @@
+2002-07-11 Gary Thomas <gary@chez-thomas.org>
+
+ * src/io.c (mon_read_char_with_timeout): Ensure interrupts are
+ disabled on all I/O channels, except for the current console.
+ This is done when selecting a console, as this process causes
+ the interrupt state to be inherited from the current console.
+
2002-07-09 Gary Thomas <gary@chez-thomas.org>
2002-07-09 Grant Edwards <grante@visi.com>
* src/net/udp.c:
* src/net/net_io.c:
Index: redboot/current/src/io.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/io.c,v
retrieving revision 1.24
diff -u -5 -p -r1.24 io.c
--- redboot/current/src/io.c 23 May 2002 23:08:31 -0000 1.24
+++ redboot/current/src/io.c 11 Jul 2002 16:12:11 -0000
@@ -170,11 +170,11 @@ mon_read_char_with_timeout(char *c)
hal_virtual_comm_table_t *__chan;
#ifdef CYGPKG_REDBOOT_ANY_CONSOLE
if (!console_selected) {
int cur = CYGACC_CALL_IF_SET_CONSOLE_COMM(CYGNUM_CALL_IF_SET_COMM_ID_QUERY_CURRENT);
- int i, tot;
+ int i, j, tot;
// Try input from all channels
tot = 0;
while (tot < _mon_timeout) {
for (i = 0; i < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; i++, tot++) {
CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
@@ -184,10 +184,19 @@ mon_read_char_with_timeout(char *c)
// Input available on this channel, make it be the console
if (*c != '\0') {
// Don't chose this unless real data have arrived
console_selected = true;
CYGACC_CALL_IF_SET_DEBUG_COMM(i);
+ // Disable interrupts on all channels but this one
+ for (j = 0; j < CYGNUM_HAL_VIRTUAL_VECTOR_COMM_CHANNELS; j++) {
+ if (i != j) {
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(j);
+ __chan = CYGACC_CALL_IF_CONSOLE_PROCS();
+ CYGACC_COMM_IF_CONTROL(*__chan, __COMMCTL_IRQ_DISABLE);
+ }
+ }
+ CYGACC_CALL_IF_SET_CONSOLE_COMM(i);
return res;
}
}
}
}