aboutsummaryrefslogtreecommitdiff
path: root/src/console
diff options
context:
space:
mode:
authorYinghai Lu <yinghailu@gmail.com>2004-04-28 05:37:36 +0000
committerYinghai Lu <yinghailu@gmail.com>2004-04-28 05:37:36 +0000
commit97c4947ec9af1664e81ee797834a32d3ca2f74fe (patch)
tree33f41aaaf4c61c0b41ae4751081d2c369ee371b0 /src/console
parent48d11d557f725ecf89678a1b9df440417b8da225 (diff)
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')
-rw-r--r--src/console/btext_console.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/console/btext_console.c b/src/console/btext_console.c
index 5961a8ab3b..6601b0f668 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
};