/* * EFI earlycon needs to use early_memremap() to map the framebuffer. * But early_memremap() is not usable for 'earlycon=efifb keep_bootcon', * memremap() should be used instead. memremap() will be available after * paging_init() which is earlier than initcall callbacks. Thus adding this * early initcall function early_efi_map_fb() to map the whole EFI framebuffer.
*/ staticint __init efi_earlycon_remap_fb(void)
{ /* bail if there is no bootconsole or it was unregistered already */ if (!earlycon_console || !console_is_registered(earlycon_console)) return 0;
si = &screen_info;
xres = si->lfb_width;
yres = si->lfb_height;
/* * efi_earlycon_write_char() implicitly assumes a framebuffer with * 32 bits per pixel.
*/ if (si->lfb_depth != 32) return -ENODEV;
font = get_default_font(xres, yres, NULL, NULL); if (!font) return -ENODEV;
/* Fill the cache with maximum possible value of x coordinate */
memset32(efi_x_array, rounddown(xres, font->width), ARRAY_SIZE(efi_x_array));
efi_y = rounddown(yres, font->height);
/* Make sure we have cache for the x coordinate for the full screen */
max_line_y = efi_y / font->height + 1;
cur_line_y = 0;
efi_y -= font->height; for (i = 0; i < (yres - efi_y) / font->height; i++)
efi_earlycon_scroll_up();
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.