improve risc-v console
authorAndrew Waterman <waterman@eecs.berkeley.edu>
Thu, 17 May 2012 04:12:52 +0000 (21:12 -0700)
committerAndrew Waterman <waterman@eecs.berkeley.edu>
Thu, 17 May 2012 04:12:52 +0000 (21:12 -0700)
we now explicitly read the keyboard in non-canonical mode.

kern/arch/riscv/console.c
kern/arch/riscv/console.h

index 6ad117a..64d63bf 100644 (file)
@@ -73,7 +73,7 @@ static struct alarm_waiter keyboard_waiter;
 static void cons_poll(struct alarm_waiter* awaiter)
 {
        static char buf[64] __attribute__((aligned(64)));
-       fesvr_syscall(FESVR_SYS_read, 0, PADDR(buf), sizeof(buf), 0, cons_polled, 0);
+       fesvr_syscall(FESVR_SYS_read_noncanonical, 0, PADDR(buf), sizeof(buf), 0, cons_polled, 0);
 
        set_awaiter_rel(&keyboard_waiter, 100);
        set_alarm(&per_cpu_info[core_id()].tchain, &keyboard_waiter);
index a50560c..5bd8737 100644 (file)
@@ -35,6 +35,7 @@ int cons_get_any_char(void);
 #define        FESVR_SYS_pread 180
 #define        FESVR_SYS_pwrite 181
 #define FESVR_SYS_getmainvars 201
+#define FESVR_SYS_read_noncanonical 202
 
 void fesvr_die();