diff options
author | Yinghai Lu <yinghailu@gmail.com> | 2004-04-28 05:37:36 +0000 |
---|---|---|
committer | Yinghai Lu <yinghailu@gmail.com> | 2004-04-28 05:37:36 +0000 |
commit | 97c4947ec9af1664e81ee797834a32d3ca2f74fe (patch) | |
tree | 33f41aaaf4c61c0b41ae4751081d2c369ee371b0 /src/console/btext_console.c | |
parent | 48d11d557f725ecf89678a1b9df440417b8da225 (diff) | |
download | coreboot-staging-97c4947ec9af1664e81ee797834a32d3ca2f74fe.zip coreboot-staging-97c4947ec9af1664e81ee797834a32d3ca2f74fe.tar.gz |
Changes for btext and etherboot and filo merge support
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1540 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/console/btext_console.c')
-rw-r--r-- | src/console/btext_console.c | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/console/btext_console.c b/src/console/btext_console.c index 5961a8a..6601b0f 100644 --- a/src/console/btext_console.c +++ b/src/console/btext_console.c @@ -48,7 +48,13 @@ static u32 g_loc_Y; static u32 g_max_loc_X; static u32 g_max_loc_Y; +#define CHAR_256 0 + +#if CHAR_256==1 #define cmapsz (16*256) +#else +#define cmapsz (16*96) +#endif static unsigned char vga_font[cmapsz]; @@ -285,7 +291,7 @@ void BTEXT btext_drawchar(char c) } #endif } - +#if 0 void BTEXT btext_drawstring(const char *c) { @@ -312,13 +318,17 @@ btext_drawhex(u32 v) btext_drawchar(hex_table[(v >> 0) & 0x0000000FUL]); btext_drawchar(' '); } - +#endif static void BTEXT draw_byte(unsigned char c, u32 locX, u32 locY) { boot_infos_t* bi = &disp_bi; unsigned char *base = calc_base(bi, locX << 3, locY << 4); - unsigned char *font = &vga_font[((u32)c) * 16]; +#if CHAR_256==1 + unsigned char *font = &vga_font[((u32)c) * 16]; +#else + unsigned char *font = &vga_font[((u32)c-0x20) * 16]; // skip the first 0x20 +#endif u32 rb = bi->dispDeviceRowBytes; switch(bi->dispDeviceDepth) { @@ -451,7 +461,7 @@ static struct console_driver btext_console __console = { static unsigned char vga_font[cmapsz] BTDATA = { - +#if CHAR_256==1 /* 0 0x00 '^@' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -1027,7 +1037,7 @@ static unsigned char vga_font[cmapsz] BTDATA = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - +#endif /* 32 0x20 ' ' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -2755,7 +2765,7 @@ static unsigned char vga_font[cmapsz] BTDATA = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - +#if CHAR_256==1 /* 128 0x80 '€' */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ @@ -5059,6 +5069,6 @@ static unsigned char vga_font[cmapsz] BTDATA = { 0x00, /* 00000000 */ 0x00, /* 00000000 */ 0x00, /* 00000000 */ - +#endif }; |