portable keyboard for mtx kernels Reference: /n/atom/patch/applied/pckbmtx Date: Tue May 6 19:51:57 CES 2014 Signed-off-by: quanstro@quanstro.net --- /sys/src/9/mtx/dat.h Tue May 6 19:51:57 2014 +++ /sys/src/9/mtx/dat.h Tue May 6 19:51:57 2014 @@ -97,6 +97,7 @@ uint ialloc; /* bytes available for interrupt time allocation */ ulong pipeqsize; /* size in bytes of pipe queues */ int postdawn; /* multiprogramming on */ + int nokbd; /* no i8042 keyboard */ }; /* --- /sys/src/9/mtx/fns.h Tue May 6 19:51:57 2014 +++ /sys/src/9/mtx/fns.h Tue May 6 19:51:57 2014 @@ -1,6 +1,7 @@ #include "../port/portfns.h" uintptr cankaddr(uintmem); +int cas(void*, int, int); void clockinit(void); void clockintr(Ureg*); void clockintrsched(void); @@ -28,6 +29,8 @@ void gotopc(ulong); int havetimer(void); void hwintrinit(void); +void i8042init(void); +void i8042kbdenable(void); void i8250console(void); void i8259init(void); int i8259intack(void); --- /sys/src/9/mtx/i8042.c Thu Jan 1 00:00:00 1970 +++ /sys/src/9/mtx/i8042.c Tue May 6 19:51:57 2014 @@ -0,0 +1 @@ +#include "../pcpae/i8042.c" --- /sys/src/9/mtx/main.c Tue May 6 19:51:57 2014 +++ /sys/src/9/mtx/main.c Tue May 6 19:51:57 2014 @@ -31,7 +31,8 @@ mmuinit(); hwintrinit(); clockinit(); - kbdinit(); + i8042init(); + i8042kbdenable(); procinit0(); initseg(); timersinit(); --- /sys/src/9/mtx/mkfile Tue May 6 19:51:57 2014 +++ /sys/src/9/mtx/mkfile Tue May 6 19:51:57 2014 @@ -17,7 +17,6 @@ dev.$O\ edf.$O\ fault.$O\ - latin1.$O\ log.$O\ mul64fract.$O\ rebootcmd.$O\ @@ -43,7 +42,6 @@ inb.$O\ clock.$O\ i8259.$O\ - kbd.$O\ main.$O\ mmu.$O\ random.$O\ --- /sys/src/9/mtx/mtx Tue May 6 19:51:57 2014 +++ /sys/src/9/mtx/mtx Tue May 6 19:51:57 2014 @@ -13,6 +13,7 @@ cap kprof uart + pckb i8042 latin1 rtc ether netif --- /sys/src/9/mtx/mtxcpu Tue May 6 19:51:57 2014 +++ /sys/src/9/mtx/mtxcpu Tue May 6 19:51:57 2014 @@ -13,6 +13,7 @@ cap kprof uart + pckb i8042 latin1 rtc ether netif