#define NUM_DEV_TTY 3
/* PropIO as the console */
- #define BOOT_TTY (512 + 3)
+ #define TTYDEV (512+3) /* System console (used by kernel, init) */
#else
#define NUM_DEV_TTY 2
/* ASCI0 as the console */
- #define BOOT_TTY (512 + 1)
+ #define TTYDEV (512+1) /* System console (used by kernel, init) */
#endif
-
-#define TTYDEV BOOT_TTY /* Device used by kernel for messages, panics */
/* kernel writes to system console -- never sleep! */
void kputchar(char c)
{
- tty_putc(TTYDEV - 512, c);
+ tty_putc(TTYDEV & 0xFF, c);
if(c == '\n')
- tty_putc(TTYDEV - 512, '\r');
+ tty_putc(TTYDEV & 0xFF, '\r');
}
#define PROGTOP 0xF800 /* Top of program, base of U_DATA copy */
#define PROC_SIZE 64 /* Memory needed per process */
-#define BOOT_TTY (512 + 1)/* Set this to default device for stdio, stderr */
- /* In this case, the default is the first TTY device */
-
/* We need a tidier way to do this from the loader */
#define CMDLINE (0x0081) /* Location of root dev name */
#define BOOTDEVICENAMES "hd#,fd"
/* Device parameters */
#define NUM_DEV_TTY 5
-#define TTYDEV BOOT_TTY /* Device used by kernel for messages, panics */
+#define TTYDEV (512+1) /* System console (used by kernel, init) */
#define NBUFS 10 /* Number of block buffers */
#define NMOUNTS 4 /* Number of mounts at a time */
while(true){
iir = TTY_COM1_IIR;
lsr = TTY_COM1_LSR;
+
/* IIR bits
* 3 2 1 0
* -------
/* kernel writes to system console -- never sleep! */
void kputchar(char c)
{
- tty_putc(1, c);
+ tty_putc(TTYDEV & 0xFF, c);
if(c == '\n')
- tty_putc(1, '\r');
+ tty_putc(TTYDEV & 0xFF, '\r');
}