From 21b5b8b38b1c606fb8f6b1b0e3549072b3c1d44d Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Thu, 20 Feb 2025 21:50:20 +0200 Subject: loader.efi: add "gop blt " command Some systems have very slow console output and it may be about either wrong memory attributes are set or gop->Blt() implementation is bad. We do not have good way to set memory attributes, but we can choose which Blt() to use (or we can set "gop off" to fall back on use of SimpleTextOutput protocol). This update adds argument for "gop" command to switch gop->Blt() use. Note, this update does not fix the problem, but allows us to try to understand the possible cause. PR: 254381 Reported by: Michael Galassi Reviewed by: manu, imp Differential Revision: https://reviews.freebsd.org/D49073 --- stand/common/gfx_fb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'stand/common') diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c index 63036f3c07f6..395332af9990 100644 --- a/stand/common/gfx_fb.c +++ b/stand/common/gfx_fb.c @@ -161,6 +161,14 @@ static const int vga_to_cons_colors[NCOLORS] = { 8, 9, 10, 11, 12, 13, 14, 15 }; +/* + * It is reported very slow console draw in some systems. + * in order to exclude buggy gop->Blt(), we want option + * to use direct draw to framebuffer and avoid gop->Blt. + * Can be toggled with "gop" command. + */ +bool ignore_gop_blt = false; + struct text_pixel *screen_buffer; #if defined(EFI) static EFI_GRAPHICS_OUTPUT_BLT_PIXEL *GlyphBuffer; @@ -795,7 +803,7 @@ gfxfb_blt(void *BltBuffer, GFXFB_BLT_OPERATION BltOperation, * done as they are provided by protocols that disappear when exit * boot services. */ - if (gop != NULL && boot_services_active) { + if (!ignore_gop_blt && gop != NULL && boot_services_active) { tpl = BS->RaiseTPL(TPL_NOTIFY); switch (BltOperation) { case GfxFbBltVideoFill: -- cgit v1.2.3