summaryrefslogtreecommitdiff
path: root/payloads/libpayload/drivers/video
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2008-10-21 15:08:18 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2008-10-21 15:08:18 +0000
commit657a6dc390871721711c2becc8501d05095891e5 (patch)
tree145b4de959fa8b76f5585ea85b1c5960e76d37c9 /payloads/libpayload/drivers/video
parent97f56a4b7e36a49f8d7d24dcf741df1c181f13cb (diff)
downloadcoreboot-657a6dc390871721711c2becc8501d05095891e5.tar.xz
This patch removes most of the #ifdefs in libc/console.c, and
replaces it with two queues (input, output) where drivers (serial, keyboard, video, usb) can attach. The only things left with #ifdefs are initialization (at some point the drivers must get a chance to register) Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Jordan Crouse <jordan.crouse@amd.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3679 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload/drivers/video')
-rw-r--r--payloads/libpayload/drivers/video/video.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index 6ebc0f8ab6..83c393b4db 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -111,6 +111,11 @@ void video_console_putc(u8 row, u8 col, unsigned int ch)
void video_console_putchar(unsigned int ch)
{
+ /* replace black-on-black with light-gray-on-black.
+ do it here, instead of in libc/console.c */
+ if ((ch & 0xFF00) == 0) {
+ ch |= 0x0700;
+ }
switch(ch & 0xFF) {
case '\r':
cursorx = 0;
@@ -165,6 +170,10 @@ void video_console_set_cursor(unsigned int x, unsigned int y)
video_console_fixup_cursor();
}
+static struct console_output_driver cons = {
+ .putchar = video_console_putchar
+};
+
int video_console_init(void)
{
int i;
@@ -187,6 +196,8 @@ int video_console_init(void)
return 0;
}
+ console_add_output_driver(&cons);
+
return 0;
}