diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-08 20:36:00 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-08 20:36:00 +0200 |
commit | 42dd2d07fe194454dbc4027f3c02164f03be9eb4 (patch) | |
tree | a85286b0d5859d116e38737679e4bf7e1ee0196b /console-client/vga-dynafont.c | |
parent | bf946c17ca7cb2014aad604c253f4fa4660684da (diff) | |
download | hurd-42dd2d07fe194454dbc4027f3c02164f03be9eb4.tar.gz hurd-42dd2d07fe194454dbc4027f3c02164f03be9eb4.tar.bz2 hurd-42dd2d07fe194454dbc4027f3c02164f03be9eb4.zip |
Let GNU Mach messages appear under Hurd console
* console-client/vga-dynafont.c (dynafont_new): Force ASCII glyphs as being
always trivially mapped.
* console-client/vga-hw.h (VGA_VIDEO_MEM_BASE_ADDR): Set macro to 0x0b8000.
* console-client/vga-support.c [!OSKIT_MACH]: Do not include
<device/device.h> and <hurd.h>, remove VIDMMAP_BEGIN, VIDMMAP_SIZE and
VIDMMAP_KDOFS macros.
(vga_init): Remove code which maps video memory from the kd device. Use
VGA_GFX_MISC_B8TOBF instead of VGA_GFX_MISC_A0TOAF or VGA_GFX_MISC_A0TOBF.
Diffstat (limited to 'console-client/vga-dynafont.c')
-rw-r--r-- | console-client/vga-dynafont.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/console-client/vga-dynafont.c b/console-client/vga-dynafont.c index f72e45de..834d0aca 100644 --- a/console-client/vga-dynafont.c +++ b/console-client/vga-dynafont.c @@ -529,6 +529,31 @@ dynafont_new (bdf_font_t font, bdf_font_t font_italic, bdf_font_t font_bold, df->vga_font_last_free_index_lgc = 0; } + /* Ensure that ASCII is always available 1-to-1, for kernel messages. */ + for (int c = ' '; c <= '~'; c++) + { + glyph = bdf_find_glyph (df->font, c, 0); + if (!glyph) + glyph = bdf_find_glyph (df->font, -1, c); + if (glyph) + { + struct mapped_character *chr = &df->charmap_data[c]; + df->vga_font_free_indices--; + chr->refs = 1; + + for (int i = 0; i < ((glyph->bbox.height > 32) + ? 32 : glyph->bbox.height); i++) + df->vga_font[c][i] + = glyph->bitmap[i * ((glyph->bbox.width + 7) / 8)]; + if (glyph->bbox.height < 32) + memset (((char *) df->vga_font[c]) + + glyph->bbox.height, 0, 32 - glyph->bbox.height); + + /* Update the hash table. */ + hurd_ihash_add (&df->charmap, c, chr); + } + } + /* Ensure that we always have the replacement character available. */ { |