loader: autoload_font will hung loader when there is no local console
If we start with console set to comconsole, the local console (vidconsole, efi) is never initialized and attempt to use the data can render the loader hung. Reported by: Kamigishi Rei MFC after: 3 days
This commit is contained in:
parent
f11e9f325a
commit
61c50cbc09
@ -886,6 +886,9 @@ cons_update_mode(bool use_gfx_mode)
|
|||||||
EFI_STATUS status;
|
EFI_STATUS status;
|
||||||
char env[10], *ptr;
|
char env[10], *ptr;
|
||||||
|
|
||||||
|
if (!efi_started)
|
||||||
|
return (false);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Despite the use_gfx_mode, we want to make sure we call
|
* Despite the use_gfx_mode, we want to make sure we call
|
||||||
* efi_find_framebuffer(). This will populate the fb data,
|
* efi_find_framebuffer(). This will populate the fb data,
|
||||||
|
@ -53,7 +53,7 @@ static int vidc_getchar(void);
|
|||||||
static int vidc_ischar(void);
|
static int vidc_ischar(void);
|
||||||
static void cons_draw_frame(teken_attr_t *);
|
static void cons_draw_frame(teken_attr_t *);
|
||||||
|
|
||||||
static int vidc_started;
|
static bool vidc_started;
|
||||||
static uint16_t *vgatext;
|
static uint16_t *vgatext;
|
||||||
|
|
||||||
static tf_bell_t vidc_cons_bell;
|
static tf_bell_t vidc_cons_bell;
|
||||||
@ -877,6 +877,10 @@ cons_update_mode(bool use_gfx_mode)
|
|||||||
char env[10], *ptr;
|
char env[10], *ptr;
|
||||||
int format, roff, goff, boff;
|
int format, roff, goff, boff;
|
||||||
|
|
||||||
|
/* vidc_init() is not called yet. */
|
||||||
|
if (!vidc_started)
|
||||||
|
return (false);
|
||||||
|
|
||||||
gfx_state.tg_tp.tp_row = TEXT_ROWS;
|
gfx_state.tg_tp.tp_row = TEXT_ROWS;
|
||||||
gfx_state.tg_tp.tp_col = TEXT_COLS;
|
gfx_state.tg_tp.tp_col = TEXT_COLS;
|
||||||
|
|
||||||
@ -996,7 +1000,7 @@ vidc_init(int arg)
|
|||||||
if (vidc_started && arg == 0)
|
if (vidc_started && arg == 0)
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
vidc_started = 1;
|
vidc_started = true;
|
||||||
vbe_init();
|
vbe_init();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user