diff options
Diffstat (limited to 'OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c')
-rw-r--r-- | OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c b/OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c index 98022354c..467cb27a3 100644 --- a/OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c +++ b/OvmfPkg/Library/XenConsoleSerialPortLib/XenConsoleSerialPortLib.c @@ -40,6 +40,10 @@ SerialPortInitialize ( VOID
)
{
+ if (! XenHypercallIsAvailable ()) {
+ return RETURN_NOT_FOUND;
+ }
+
if (!mXenConsoleInterface) {
mXenConsoleEventChain.port = (UINT32)XenHypercallHvmGetParam (HVM_PARAM_CONSOLE_EVTCHN);
mXenConsoleInterface = (struct xencons_interface *)(UINTN)
|