audk/ArmPlatformPkg/ArmVirtualizationPkg/Library
Laszlo Ersek a8c2de1d7d ArmVirtualizationPkg: PlatformIntelBdsLib: fix multiconsole setup
In the following call chain:

PlatformBdsPolicyBehavior()
  PlatformBdsConnectConsole()
    InitializeConsolePipe() x 3
      BdsConnectDevicePath() [ArmPkg/Library/BdsLib/BdsFilePath.c]

the three InitializeConsolePipe() function calls pass through
- (&gST->ConsoleOutHandle, &gST->ConOut),
- (&gST->ConsoleInHandle, &gST->ConIn),
- (&gST->StandardErrorHandle, &gST->StdErr)

to BdsConnectDevicePath(), in ArmPkg's BdsLib.

At least when more than one console device paths are specified in the
ConIn / ConOut / ErrOut variables, the above resuls in:
- unchanged protocol interfaces (ConOut, ConIn, StdErr) in the system
  table (because ConSplitterDxe installs its non-NULL interfaces first),
- but, changed handles in the system table.

This effectively separates the handle fields in the system table from the
protocol interfaces in the same that should always be associated with the
handles. The end result is that clients using the handles break (splitting
/ multiplexing doesn't work for them), while clients directly using the
protocol interfaces work.

Therefore, do not attempt to connect consoles separately. ConSplitterDxe
is dispatched before PlatformBdsPolicyBehavior() is called (the latter
happens in the BDS phase), and ConSplitterDxe installs virtual handles and
protocol interfaces for input / output / error.

BdsLibConnectAll() covers all devices, including consoles; as those
consoles are connected, ConPlatformDxe and ConSplitterDxe pick them up
nicely as "slaves". We just need to make sure that the variables are set
first, for the variables -> ConPlatformDxe -> ConSplitterDxe dependency
chain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Olivier Martin <Olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16912 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-23 16:04:21 +00:00
..
ArmVirtualizationDxeHobLib ArmPlatformPkg/ArmVirtualizationPkg: Add private HobLib implementation for DXE phase 2014-09-18 17:55:17 +00:00
ArmVirtualizationPlatformLib ArmPlatformPkg/ArmVirtualizationPkg: Removed compiler family to the AArch64 assembly files 2014-12-12 19:00:37 +00:00
ArmVirtualizationPsciResetSystemLib ArmPkg/ArmPsciResetSystemLib: Made the library only using SMC 2014-10-10 11:22:50 +00:00
BaseCachingPciExpressLib ArmVirtualizationPkg: clone BasePciExpressLib, cache PCIe config base 2015-02-23 16:04:07 +00:00
FdtPL011SerialPortLib ArmVirtualizationPkg: FdtPL011SerialPortLib: support UEFI_APPLICATION 2014-10-15 14:15:21 +00:00
NorFlashQemuLib ArmVirtualizationPkg: add driver for QEMU's NOR flash 2014-09-18 17:53:36 +00:00
PlatformIntelBdsLib ArmVirtualizationPkg: PlatformIntelBdsLib: fix multiconsole setup 2015-02-23 16:04:21 +00:00
PlatformPeiLib ArmPlatformPkg: Increase more ARM address Pcd entries to 64-bit. 2014-11-11 00:43:03 +00:00
QemuFwCfgLib ArmVirtualizationPkg: introduce QemuFwCfgLib instance for DXE drivers 2015-01-02 12:04:15 +00:00