Skip to content

Commit

Permalink
loader: For EFI, if we don't have ConOut, try ConIn
Browse files Browse the repository at this point in the history
Try ConIn if we don't have a ConOut variable. ConIn will contain HID
devices and/or serial devices. We currently just search for serial
devices and will use them instead of video with the current code. While
ConIn w/o ConOut is fairly common on laptops, is kinda rare on servers.
Some refinement may be needed in the future if servers come to
light. This is also minimal to allow possible integration into 13.3
release.

MFC After:		1 week
Sponsored by:		Netflix
Reviewed by:		dab, tsoome
Differential Revision:	https://reviews.freebsd.org/D43714
  • Loading branch information
bsdimp committed Feb 4, 2024
1 parent 55b80e2 commit 064fa62
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion stand/efi/loader/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,10 @@ setenv_int(const char *key, int val)
* Parse ConOut (the list of consoles active) and see if we can find a
* serial port and/or a video port. It would be nice to also walk the
* ACPI name space to map the UID for the serial port to a port. The
* latter is especially hard.
* latter is especially hard. Also check for ConIn as well. This will
* be enough to determine if we have serial, and if we don't, we default
* to video. If there's a dual-console situation with ConIn, this will
* currently fail.
*/
int
parse_uefi_con_out(void)
Expand All @@ -741,6 +744,8 @@ parse_uefi_con_out(void)
rv = efi_global_getenv("ConOut", buf, &sz);
if (rv != EFI_SUCCESS)
rv = efi_global_getenv("ConOutDev", buf, &sz);
if (rv != EFI_SUCCESS)
rv = efi_global_getenv("ConIn", buf, &sz);
if (rv != EFI_SUCCESS) {
/*
* If we don't have any ConOut default to both. If we have GOP
Expand Down

0 comments on commit 064fa62

Please sign in to comment.