audk/OvmfPkg/XenBusDxe
Laszlo Ersek 48b3ff0479 OvmfPkg: replace strict XenHypercallLib construction with explicit query
XenHypercallLib has two clients at the moment: XenBusDxe and
XenConsoleSerialPortLib. Currently, when XenBusDxe starts on a non-Xen X86
platform (ie. as part of OVMF not running on Xen), the X86XenHypercallLib
instance built into it fails to initialize, which triggers an ASSERT() in
auto-generated code.

Instead, let's call XenHypercallIsAvailable() in the driver's entry point,
and exit cleanly when the driver is started on a non-Xen platform.

Modify the constructor of XenConsoleSerialPortLib similarly; we shouldn't
proceed if Xen is not available. In practice this check should never fail,
because XenConsoleSerialPortLib is only used on ARM, and
ArmXenHypercallLib is always available; but nonetheless we should be
pedantic.

Reported-by: Gabriel L. Somlo <gsomlo@gmail.com>
Suggested-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17001 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-03 08:13:40 +00:00
..
ComponentName.c Ovmf/Xen: move XenBusDxe to abstract XENIO_PROTOCOL 2015-02-28 20:33:11 +00:00
ComponentName.h OvmfPkg: Add basic skeleton for the XenBus bus driver. 2014-10-29 06:48:50 +00:00
DriverBinding.h OvmfPkg: Add basic skeleton for the XenBus bus driver. 2014-10-29 06:48:50 +00:00
EventChannel.c Ovmf/Xen: move XenBusDxe hypercall code to separate library 2015-02-28 20:32:39 +00:00
EventChannel.h OvmfPkg/XenBusDxe: Add Event Channel into XenBus protocol. 2014-10-29 06:51:26 +00:00
GrantTable.c Ovmf/Xen: port XenBusDxe to other architectures 2015-02-28 20:33:34 +00:00
GrantTable.h Ovmf/Xen: move XenBusDxe to abstract XENIO_PROTOCOL 2015-02-28 20:33:11 +00:00
Helpers.c OvmfPkg/XenBusDxe: Add an helper AsciiStrDup. 2014-10-29 06:50:57 +00:00
TestAndClearBit.c Ovmf/Xen: port XenBusDxe to other architectures 2015-02-28 20:33:34 +00:00
XenBus.c Ovmf/Xen: move XenBusDxe to abstract XENIO_PROTOCOL 2015-02-28 20:33:11 +00:00
XenBus.h OvmfPkg/XenBusDxe: Introduce XenBus support itself. 2014-10-29 06:51:18 +00:00
XenBusDxe.c OvmfPkg: replace strict XenHypercallLib construction with explicit query 2015-03-03 08:13:40 +00:00
XenBusDxe.h Ovmf/Xen: port XenBusDxe to other architectures 2015-02-28 20:33:34 +00:00
XenBusDxe.inf Ovmf/Xen: port XenBusDxe to other architectures 2015-02-28 20:33:34 +00:00
XenStore.c Ovmf/Xen: move XenBusDxe hypercall code to separate library 2015-02-28 20:32:39 +00:00
XenStore.h OvmfPkg/Xen*: Pass struct XENSTORE_TRANSACTION argument as a pointer 2014-10-31 21:25:23 +00:00