]> git.ipfire.org Git - people/ms/u-boot.git/commit
efi_loader: console: Correctly report modes
authorEmmanuel Vadot <manu@bidouilliste.com>
Tue, 8 Nov 2016 05:03:29 +0000 (06:03 +0100)
committerAlexander Graf <agraf@suse.de>
Mon, 14 Nov 2016 22:24:02 +0000 (23:24 +0100)
commit5be8b0a338c56c606d1e615c181b1cc0545b4747
tree00da40c73509c9f2534b2c5edf390e04a718c043
parentd7608aba38d760be4c40cb8f4591057e5e40c2d4
efi_loader: console: Correctly report modes

Add support for EFI console modes.
Mode 0 is always 80x25 and present by EFI specification.
Mode 1 is always 80x50 and not mandatory.
Mode 2 and above is freely usable.

If the terminal can handle mode 1, we mark it as supported.
If the terminal size is greater than mode 0 and different than mode 1,
we install it as mode 2.

Modes can be switch with cout_set_mode.

Changes in V5:
 Correctly detect mode before enabling mode 2.

Changes in V4:
 Reset cursor positon on mode switch
 Use local variables in console query code

Changes in V3:
 Valid mode are 0 to EFIMode-1
 Fix style

Changes in V2:
 Add mode switch
 Report only the modes that we support

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
lib/efi_loader/efi_console.c