Import libtsm to implement terminal emulation on VGA console

Import Terminal emulation library called libtsm:
http://www.freedesktop.org/wiki/Software/kmscon/libtsm/

This will used by terminal emulation on VGA console.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add libtsm license file

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add libtsm on build.mk

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
add Keyboard driver

Add PS/2 Keyboard driver.

This will use inside of VGA console driver, provides console input
functionality.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add kbd on build.mk

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Handle all VGA console input/output by libtsm

Pass all received str to libtsm, emulate VT on it.
Use kbd.cc to handle console input.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Wait next character if readch() returns 0

kbd.cc and vga.cc may returns 0 on readch(), if no readable character available.
We need to ignore it here, and wait next character.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Ignore len=0 write call

Upper layer functions may call console::write(NULL, 0).
Don't pass it to console drivers.

Signed-off-by: Takuya ASADA <syuu@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>