IOPL, VM, and serial debug output (disabled).
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
|
||||
#define END_OF_KMESS -1
|
||||
FORWARD _PROTOTYPE(void kputc, (int c));
|
||||
FORWARD _PROTOTYPE( void ser_putc, (char c));
|
||||
|
||||
/*===========================================================================*
|
||||
* panic *
|
||||
@@ -130,6 +131,8 @@ int c; /* character to append */
|
||||
* the to output driver if an END_OF_KMESS is encountered.
|
||||
*/
|
||||
if (c != END_OF_KMESS) {
|
||||
if (do_serial_debug)
|
||||
ser_putc(c);
|
||||
kmess.km_buf[kmess.km_next] = c; /* put normal char in buffer */
|
||||
if (kmess.km_size < KMESS_BUF_SIZE)
|
||||
kmess.km_size += 1;
|
||||
@@ -139,3 +142,24 @@ int c; /* character to append */
|
||||
}
|
||||
}
|
||||
|
||||
#define COM1_BASE 0x3F8
|
||||
#define COM1_THR (COM1_BASE + 0)
|
||||
#define LSR_THRE 0x20
|
||||
#define COM1_LSR (COM1_BASE + 5)
|
||||
|
||||
PRIVATE void ser_putc(char c)
|
||||
{
|
||||
int i;
|
||||
int lsr, thr;
|
||||
|
||||
return;
|
||||
|
||||
lsr= COM1_LSR;
|
||||
thr= COM1_THR;
|
||||
for (i= 0; i<100000; i++)
|
||||
{
|
||||
if (inb(lsr) & LSR_THRE)
|
||||
break;
|
||||
}
|
||||
outb(thr, c);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user