void con_init(void)
{
if(!(devfile = dev_open(CONDEV, 0, O_RDWR))) {
- panic("can't open console device %d,%d\n", CONDEV, 0);
+ //panic("can't open console device %d,%d\n", CONDEV, 0);
}
}
#ifndef DBG_H_
#define DBG_H_
-void panic(const char *fmt, ...) __attribute__((noreturn));
+__attribute__((noreturn))
+void panic(const char *fmt, ...);
#endif /* DBG_H_ */
con_init();
printf("eightysix kernel %s\n", VERSTR);
- printf("foo: %04x\n", 0xabc);
init_intr();
}
#include "ser.h"
+#define UART1_BASE 0x3f8
+#define UART2_BASE 0x2f8
+
+#define UART_DATA 0
+#define UART_DIVLO 0
+#define UART_DIVHI 1
+#define UART_FIFO 2
+#define UART_LCTL 3
+#define UART_MCTL 4
+#define UART_LSTAT 5
+
+#define DIV_9600 (115200 / 9600)
+#define DIV_38400 (115200 / 38400)
+#define LCTL_8N1 0x03
+#define LCTL_DLAB 0x80
+#define FIFO_ENABLE_CLEAR 0x07
+#define MCTL_DTR_RTS_OUT2 0x0b
+#define LST_TRIG_EMPTY 0x20
+
+
int ser_init(void)
{
return -1; /* TODO */