loader.efi: Default to serial if we don't have a ConOut variable

In the EFI implementation in U-Boot no ConOut efi variable is created,
this cause loader to fallback to TERM_EMU implementation which is very
very very slow (and uses the ConOut device in the system table anyway).
The UEFI spec aren't clear as if this variable needs to exists or not.

Reviewed by:	imp, kevans
This commit is contained in:
Emmanuel Vadot 2019-11-08 20:08:44 +00:00
parent 2bd45eb23e
commit 14fb9485a4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354559

View File

@ -703,8 +703,11 @@ parse_uefi_con_out(void)
how = 0;
sz = sizeof(buf);
rv = efi_global_getenv("ConOut", buf, &sz);
if (rv != EFI_SUCCESS)
if (rv != EFI_SUCCESS) {
/* If we don't have any ConOut default to serial */
how = RB_SERIAL;
goto out;
}
ep = buf + sz;
node = (EFI_DEVICE_PATH *)buf;
while ((char *)node < ep) {