Project

General

Profile

Bug #9970

loader: fix EFI getchar() for multiple consoles

Added by John Levon 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2018-11-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

Currently, efi_cons_getchar() will wait for a key. While this seems to make sense, the implementation of getchar()
in common/console.c will loop across getchar() for all consoles without doing ischar() first.

This means that if we've configured multiple consoles such as "ttyb,text", we can't input into
the serial, as getchar() will be sat waiting for input only from efi_console.c

One version of the fix would fix the common routine so it calls into ->c_ready() first for each
console. However, as this is used on legacy BIOS, it seems better to get efi_console.c in line
with the other implementations instead, so any risk of odd behaviour is reduced.

We will also fix the ischar() implementation in efi_console.c so it's properly idempotent.

History

#1

Updated by Electric Monk 8 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit ffedf5deeba4b9adf8fdf31a53c23946700d648f

commit  ffedf5deeba4b9adf8fdf31a53c23946700d648f
Author: Toomas Soome <tsoome@me.com>
Date:   2018-11-13T01:54:19.000Z

    9970 loader: fix EFI getchar() for multiple consoles
    Reviewed by: Jason King <jason.king@joyent.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF