New commands cbmemc, lscoreboot, coreboot_boottime to inspect

coreboot tables content. Support for cbmemc.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-03-20 17:13:31 +01:00
parent ef8810e9f3
commit cc19857a2a
10 changed files with 446 additions and 5 deletions

View file

@ -979,20 +979,21 @@ grub_ucs4_count_lines (const grub_uint32_t * str,
}
void
grub_xputs_normal (const char *str)
grub_xnputs (const char *str, grub_size_t msg_len)
{
grub_uint32_t *unicode_str = NULL, *unicode_last_position;
int backlog = 0;
grub_term_output_t term;
grub_error_push ();
grub_utf8_to_ucs4_alloc (str, &unicode_str,
&unicode_last_position);
unicode_str = grub_malloc (msg_len * sizeof (grub_uint32_t));
grub_error_pop ();
if (!unicode_str)
{
for (; *str; str++)
for (; msg_len--; str++, msg_len++)
{
struct grub_unicode_glyph c =
{
@ -1021,6 +1022,10 @@ grub_xputs_normal (const char *str)
return;
}
msg_len = grub_utf8_to_ucs4 (unicode_str, msg_len,
(grub_uint8_t *) str, -1, 0);
unicode_last_position = unicode_str + msg_len;
FOR_ACTIVE_TERM_OUTPUTS(term)
{
int cur;
@ -1044,6 +1049,12 @@ grub_xputs_normal (const char *str)
grub_free (unicode_str);
}
void
grub_xputs_normal (const char *str)
{
grub_xnputs (str, grub_strlen (str));
}
void
grub_cls (void)
{