|
Gerd Hoffmann |
b0c3af |
From c8e5617ebaaa8be91a32be48dcf3dc7157b00d2c Mon Sep 17 00:00:00 2001
|
|
Gerd Hoffmann |
b0c3af |
From: Laszlo Ersek <lersek@redhat.com>
|
|
Gerd Hoffmann |
b0c3af |
Date: Tue, 25 Feb 2014 18:40:35 +0100
|
|
Gerd Hoffmann |
b0c3af |
Subject: [PATCH] MdeModulePkg: TerminalDxe: add other text resolutions
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
When the console output is multiplexed to several devices by
|
|
Gerd Hoffmann |
b0c3af |
ConSplitterDxe, then ConSplitterDxe builds an intersection of text modes
|
|
Gerd Hoffmann |
b0c3af |
supported by all console output devices.
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
Two notable output devices are provided by:
|
|
Gerd Hoffmann |
b0c3af |
(1) MdeModulePkg/Universal/Console/GraphicsConsoleDxe,
|
|
Gerd Hoffmann |
b0c3af |
(2) MdeModulePkg/Universal/Console/TerminalDxe.
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
GraphicsConsoleDxe supports four modes at most -- see
|
|
Gerd Hoffmann |
b0c3af |
InitializeGraphicsConsoleTextMode():
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
(1a) 80x25 (required by the UEFI spec as mode 0),
|
|
Gerd Hoffmann |
b0c3af |
(1b) 80x50 (not necessarily supported, but if it is, then the UEFI spec
|
|
Gerd Hoffmann |
b0c3af |
requires the driver to provide it as mode 1),
|
|
Gerd Hoffmann |
b0c3af |
(1c) 100x31 (corresponding to graphics resolution 800x600, which the UEFI
|
|
Gerd Hoffmann |
b0c3af |
spec requires from all plug-in graphics devices),
|
|
Gerd Hoffmann |
b0c3af |
(1d) "full screen" resolution, derived form the underlying GOP's
|
|
Gerd Hoffmann |
b0c3af |
horizontal and vertical resolutions with division by EFI_GLYPH_WIDTH
|
|
Gerd Hoffmann |
b0c3af |
(8) and EFI_GLYPH_HEIGHT (19), respectively.
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
The automatic "full screen resolution" makes GraphicsConsoleDxe's
|
|
Gerd Hoffmann |
b0c3af |
character console very flexible. However, TerminalDxe (which runs on
|
|
Gerd Hoffmann |
b0c3af |
serial ports) only provides the following fixed resolutions -- see
|
|
Gerd Hoffmann |
b0c3af |
InitializeTerminalConsoleTextMode():
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
(2a) 80x25 (required by the UEFI spec as mode 0),
|
|
Gerd Hoffmann |
b0c3af |
(2b) 80x50 (since the character resolution of a serial device cannot be
|
|
Gerd Hoffmann |
b0c3af |
interrogated easily, this is added unconditionally as mode 1)
|
|
Gerd Hoffmann |
b0c3af |
(2c) modes 2 and above come from "mTerminalConsoleModeData". This table
|
|
Gerd Hoffmann |
b0c3af |
currently only contains one mode, 100x31.
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
When ConSplitterDxe combines (1) and (2), multiplexing console output to
|
|
Gerd Hoffmann |
b0c3af |
both video output and serial terminal, the list of commonly supported text
|
|
Gerd Hoffmann |
b0c3af |
modes (ie. the "intersection") comprises:
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
(3a) 80x25, unconditionally, from (1a) and (2a),
|
|
Gerd Hoffmann |
b0c3af |
(3b) 80x50, if the graphics console provides at least 640x950 pixel
|
|
Gerd Hoffmann |
b0c3af |
resolution, from (1b) and (2b)
|
|
Gerd Hoffmann |
b0c3af |
(3c) 100x31, if the graphics device is a plug-in one (because in that case
|
|
Gerd Hoffmann |
b0c3af |
800x600 is a mandated pixel resolution), from (1c) and (2c).
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
Unfortunately, the "full screen resolution" (1d) of the GOP-based text
|
|
Gerd Hoffmann |
b0c3af |
console is not available in general.
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
Mitigate this problem by extending "mTerminalConsoleModeData" with a
|
|
Gerd Hoffmann |
b0c3af |
handful of text resolutions that are derived from widespread maximal pixel
|
|
Gerd Hoffmann |
b0c3af |
resolutions. This way TerminalDxe won't cause ConSplitterDxe to filter out
|
|
Gerd Hoffmann |
b0c3af |
the most frequent (1d) values from the intersection, and eg. the MODE
|
|
Gerd Hoffmann |
b0c3af |
command in the UEFI shell will offer the "best" (ie. full screen)
|
|
Gerd Hoffmann |
b0c3af |
resolution too.
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
Contributed-under: TianoCore Contribution Agreement 1.0
|
|
Gerd Hoffmann |
b0c3af |
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
|
Gerd Hoffmann |
b0c3af |
---
|
|
Gerd Hoffmann |
b0c3af |
.../Universal/Console/TerminalDxe/Terminal.c | 37 +++++++++++++++++++++-
|
|
Gerd Hoffmann |
b0c3af |
1 file changed, 36 insertions(+), 1 deletion(-)
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
|
Gerd Hoffmann |
b0c3af |
index 6fde3b2..787bd35 100644
|
|
Gerd Hoffmann |
b0c3af |
--- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
|
Gerd Hoffmann |
b0c3af |
+++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
|
|
Gerd Hoffmann |
b0c3af |
@@ -103,7 +103,42 @@ TERMINAL_DEV mTerminalDevTemplate = {
|
|
Gerd Hoffmann |
b0c3af |
};
|
|
Gerd Hoffmann |
b0c3af |
|
|
Gerd Hoffmann |
b0c3af |
TERMINAL_CONSOLE_MODE_DATA mTerminalConsoleModeData[] = {
|
|
Gerd Hoffmann |
b0c3af |
- {100, 31},
|
|
Gerd Hoffmann |
b0c3af |
+ { 100, 25 }, // from graphics resolution 800 x 480
|
|
Gerd Hoffmann |
b0c3af |
+ { 100, 31 }, // from graphics resolution 800 x 600
|
|
Gerd Hoffmann |
b0c3af |
+ { 104, 32 }, // from graphics resolution 832 x 624
|
|
Gerd Hoffmann |
b0c3af |
+ { 120, 33 }, // from graphics resolution 960 x 640
|
|
Gerd Hoffmann |
b0c3af |
+ { 128, 31 }, // from graphics resolution 1024 x 600
|
|
Gerd Hoffmann |
b0c3af |
+ { 128, 40 }, // from graphics resolution 1024 x 768
|
|
Gerd Hoffmann |
b0c3af |
+ { 144, 45 }, // from graphics resolution 1152 x 864
|
|
Gerd Hoffmann |
b0c3af |
+ { 144, 45 }, // from graphics resolution 1152 x 870
|
|
Gerd Hoffmann |
b0c3af |
+ { 160, 37 }, // from graphics resolution 1280 x 720
|
|
Gerd Hoffmann |
b0c3af |
+ { 160, 40 }, // from graphics resolution 1280 x 760
|
|
Gerd Hoffmann |
b0c3af |
+ { 160, 40 }, // from graphics resolution 1280 x 768
|
|
Gerd Hoffmann |
b0c3af |
+ { 160, 42 }, // from graphics resolution 1280 x 800
|
|
Gerd Hoffmann |
b0c3af |
+ { 160, 50 }, // from graphics resolution 1280 x 960
|
|
Gerd Hoffmann |
b0c3af |
+ { 160, 53 }, // from graphics resolution 1280 x 1024
|
|
Gerd Hoffmann |
b0c3af |
+ { 170, 40 }, // from graphics resolution 1360 x 768
|
|
Gerd Hoffmann |
b0c3af |
+ { 170, 40 }, // from graphics resolution 1366 x 768
|
|
Gerd Hoffmann |
b0c3af |
+ { 175, 55 }, // from graphics resolution 1400 x 1050
|
|
Gerd Hoffmann |
b0c3af |
+ { 180, 47 }, // from graphics resolution 1440 x 900
|
|
Gerd Hoffmann |
b0c3af |
+ { 200, 47 }, // from graphics resolution 1600 x 900
|
|
Gerd Hoffmann |
b0c3af |
+ { 200, 63 }, // from graphics resolution 1600 x 1200
|
|
Gerd Hoffmann |
b0c3af |
+ { 210, 55 }, // from graphics resolution 1680 x 1050
|
|
Gerd Hoffmann |
b0c3af |
+ { 240, 56 }, // from graphics resolution 1920 x 1080
|
|
Gerd Hoffmann |
b0c3af |
+ { 240, 63 }, // from graphics resolution 1920 x 1200
|
|
Gerd Hoffmann |
b0c3af |
+ { 240, 75 }, // from graphics resolution 1920 x 1440
|
|
Gerd Hoffmann |
b0c3af |
+ { 250, 105 }, // from graphics resolution 2000 x 2000
|
|
Gerd Hoffmann |
b0c3af |
+ { 256, 80 }, // from graphics resolution 2048 x 1536
|
|
Gerd Hoffmann |
b0c3af |
+ { 256, 107 }, // from graphics resolution 2048 x 2048
|
|
Gerd Hoffmann |
b0c3af |
+ { 320, 75 }, // from graphics resolution 2560 x 1440
|
|
Gerd Hoffmann |
b0c3af |
+ { 320, 84 }, // from graphics resolution 2560 x 1600
|
|
Gerd Hoffmann |
b0c3af |
+ { 320, 107 }, // from graphics resolution 2560 x 2048
|
|
Gerd Hoffmann |
b0c3af |
+ { 350, 110 }, // from graphics resolution 2800 x 2100
|
|
Gerd Hoffmann |
b0c3af |
+ { 400, 126 }, // from graphics resolution 3200 x 2400
|
|
Gerd Hoffmann |
b0c3af |
+ { 480, 113 }, // from graphics resolution 3840 x 2160
|
|
Gerd Hoffmann |
b0c3af |
+ { 512, 113 }, // from graphics resolution 4096 x 2160
|
|
Gerd Hoffmann |
b0c3af |
+ { 960, 227 }, // from graphics resolution 7680 x 4320
|
|
Gerd Hoffmann |
b0c3af |
+ { 1024, 227 }, // from graphics resolution 8192 x 4320
|
|
Gerd Hoffmann |
b0c3af |
//
|
|
Gerd Hoffmann |
b0c3af |
// New modes can be added here.
|
|
Gerd Hoffmann |
b0c3af |
//
|
|
Gerd Hoffmann |
b0c3af |
--
|
|
Gerd Hoffmann |
b0c3af |
1.8.3.1
|
|
Gerd Hoffmann |
b0c3af |
|