Hi.

This broke loader menu display on efifb. At least on amd64.
ESC sequences without ESC character are shown.
Key input (at least 1, 2 and enter) works OK.
I suspect outputs for SIO is sent to efifb and ESC codes are ignored.

Reverting this fixes the issue.

Not tried (not enough time for now as I'm mainly using stable/12),
but possibly calling efi_cons_probe() from efi_cons_init() would be
needed, as ome codes are moved from the latter to the former.


> Author: tsoome
> Date: Sat Mar 14 06:36:03 2020
> New Revision: 358989
> URL: https://svnweb.freebsd.org/changeset/base/358989
> 
> Log:
>   loader: add comconsole implementation on top of SIO protocol
>   
>   Provide comconsole on top of SIO for arm platforms (x86 does use bios
version).
> 
> Added:
>   head/stand/efi/loader/efiserialio.c   (contents, props changed)
> Modified:
>   head/stand/efi/libefi/efi_console.c
>   head/stand/efi/loader/arch/arm/Makefile.inc
>   head/stand/efi/loader/arch/arm64/Makefile.inc
>   head/stand/efi/loader/conf.c
>   head/stand/efi/loader/main.c
> 
> Modified: head/stand/efi/libefi/efi_console.c
> ==============================================================================
> --- head/stand/efi/libefi/efi_console.c       Sat Mar 14 05:57:22
2020    (r358988)
> +++ head/stand/efi/libefi/efi_console.c
Sat Mar 14 06:36:03 2020        (r358989)
> @@ -377,9 +377,22 @@ efi_cons_respond(void *s __unused, const void *buf __u
>  {
>  }
>  
> +/*
> + * Set up conin/conout/coninex to make sure we have input ready.
> + */
>  static void
>  efi_cons_probe(struct console *cp)
>  {
> +     EFI_STATUS status;
> +
> +     conout = ST->ConOut;
> +     conin = ST->ConIn;
> +
> +     status = BS->OpenProtocol(ST->ConsoleInHandle,
&simple_input_ex_guid,
> +         (void **)&coninex, IH, NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
> +     if (status != EFI_SUCCESS)
> +             coninex = NULL;
> +
>       cp->c_flags |= C_PRESENTIN | C_PRESENTOUT;
>  }
>  
> @@ -889,15 +902,7 @@ efi_cons_init(int arg)
>       if (conin != NULL)
>               return (0);
>  
> -     conout = ST->ConOut;
> -     conin = ST->ConIn;
> -
>       conout->EnableCursor(conout, TRUE);
> -     status = BS->OpenProtocol(ST->ConsoleInHandle,
&simple_input_ex_guid,
> -         (void **)&coninex, IH, NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL);
> -     if (status != EFI_SUCCESS)
> -             coninex = NULL;
> -
>       if (efi_cons_update_mode())
>               return (0);
>  
> 
> Modified: head/stand/efi/loader/arch/arm/Makefile.inc
> ==============================================================================
> --- head/stand/efi/loader/arch/arm/Makefile.inc       Sat Mar 14
05:57:22 2020   (r358988)
> +++ head/stand/efi/loader/arch/arm/Makefile.inc       Sat Mar 14 06:36:03
2020    (r358989)
> @@ -1,6 +1,7 @@
>  # $FreeBSD$
>  
>  SRCS+=       exec.c \
> +     efiserialio.c \
>       start.S
>  
>  HAVE_FDT=yes

(Snip)

> @@ -930,7 +936,6 @@ main(int argc, CHAR16 *argv[])
>       if (!has_kbd && (howto & RB_PROBE))
>               howto |= RB_SERIAL | RB_MULTIPLE;
>       howto &= ~RB_PROBE;
> -     uhowto = parse_uefi_con_out();
>  
>       /*
>        * Read additional environment variables from the boot device's

-- 
Tomoaki AOKI    <junch...@dec.sakura.ne.jp>
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to