On 02/26/14 02:53, Tim Lewis wrote:
> It could be a PCD. I would recommend against using EFI_GLYPH_HEIGHT and
> EFI_GLYPH_WIDTH, since that is not necessarily the height of the system
> font.
>
>
>
> The correct way is to call the GetFontInfo() function of the HII Font
> protocol, with a NULL input for StringFontIn set to NULL. This will
> return the width and height of the character cell.
(First -- I studied the HII posts on your blog, and they are great, thanks.)
I agree that HII could be appropriate for GraphicsConsoleDxe (which
currently divides with EFI_GLYPH_* to derive the console resolution from
the graphics resolution). However relying on HII in TerminalDxe would be
a bit "divergent" in my opinion.
My motivation for this patch is that ConSplitterDxe only exposes text
modes that are supported by all of the outputs. I want to bump the
highest text resolution in the intersection of the mode lists. Of course
I can't know about all possible console outputs that might end up
underneath ConSplitterDxe, but I do know of the two (presumably) common
one that we use in OVMF. That's why I'm touching TerminalDxe.
But, TerminalDxe in isolation is independent of HII. It only needs a
serial port, and it doesn't know about fonts at all.
In fact I can disconnect the QemuVideoDxe driver in OVMF, using the UEFI
shell, and then only TerminalDxe remains. At that point I can choose any
resolution that I like, from the list hard-coded inside TerminalDxe. At
this point, HII fonts have no significance at all I think (not even
indirectly, through ConSplitterDxe), and the detailed hard-coded list in
TerminalDxe would be *really* useful.
Example session, executed on the serial console:
(1) Check currently available text modes:
Shell> mode
Available modes for console output device.
Col 80 Row 25 *
Col 100 Row 31
(2) Find out about the GOP that's limiting the console splitter:
Shell> dh -p GraphicsOutput
89: StdErr ConsoleOut SimpleTextOut GraphicsOutput
DevicePath(i(0x2,0x0)/AcpiAdr(0x80010100))
53: GraphicsOutput SimpleTextOut
(3) It's the one with the PCI parent, handle 89. Look up the handle of
the parent:
Shell> dh -d 89
89: 3EE45C18
StdErr
ConsoleOut
SimpleTextOut
GraphicsOutput
DevicePath(i(0x2,0x0)/AcpiAdr(0x80010100))
Controller Name : PciRoot(0x0)/Pci(0x2,0x0)/AcpiAdr(0x80010100)
Device Path : PciRoot(0x0)/Pci(0x2,0x0)/AcpiAdr(0x80010100)
Controller Type : BUS
Configuration : NO
Diagnostics : NO
Managed by :
Drv[4C] : Platform Console Management Driver
Drv[50] : Console Splitter Driver
Drv[51] : Console Splitter Driver
Drv[55] : Graphics Console Driver
Parent Controllers :
Parent[82] : QEMU Video PCI Adapter
Child Controllers :
Child[53] : Primary Console Output Device
Child[54] : Primary Standard Error Device
(4) Disconnect it (ie. the "QEMU Video PCI Adapter" controller):
Shell> disconnect 82
Disconnect - (82,3FF74640,3D45F298) Result Success.
At this point the graphics console freezes, but the serial port
continues working.
(5) Let's find the serial port:
Shell> dh -p SimpleTextOut
53: SimpleTextOut
54: SimpleTextOut
91: StdErr ConsoleOut ConsoleIn SimpleTextOut SimpleTextInEx
SimpleTextIn DevicePath(Uart(115200,8,N,1)/VenPcAnsi())
B5: Shell ShellParameters SimpleTextOut ImageDevicePath LoadedImage
(6) It's handle 91. Disconnect that device and reconnect all drivers to
it recursively:
Shell> reconnect 91
Connect - Handle [91] Result Success.
(7) Now that consplitter has been restarted on top of the serial console
and nothing else, let's re-check the resolution list:
Shell> mode
Available modes for console output device.
Col 80 Row 25 *
Col 80 Row 50
Col 100 Row 25
Col 100 Row 31
Col 104 Row 32
Col 120 Row 33
Col 128 Row 31
Col 128 Row 40
Col 144 Row 45
Col 160 Row 37
Col 160 Row 40
Col 160 Row 42
Col 160 Row 50
Col 160 Row 53
Col 170 Row 40
Col 175 Row 55
Col 180 Row 47
Col 200 Row 47
Col 200 Row 63
Col 210 Row 55
Col 240 Row 56
Col 240 Row 63
Col 240 Row 75
Col 250 Row 105
Col 256 Row 80
Col 256 Row 107
Col 320 Row 75
Col 320 Row 84
Col 320 Row 107
Col 350 Row 110
Col 400 Row 126
Col 480 Row 113
Col 512 Row 113
Col 960 Row 227
Col 1024 Row 227
(8) Select the largest that fits my physical screen:
Shell> mode 210 55
My xterm window is resized, and the output of the "drivers" command, for
example, is not wrapped any longer.
Thanks
Laszlo
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel