/* If no initialization is required, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. */
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
/* If no initialization is required, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. */
RETURN_STATUS EFIAPI SerialPortInitialize(VOID)
{
  if (!XenHypercallIsAvailable ()) {
    return RETURN_DEVICE_ERROR;
  }
  if (!mXenConsoleInterface) {
    mXenConsoleEventChain.port = (UINT32)XenHypercallHvmGetParam (HVM_PARAM_CONSOLE_EVTCHN);
    mXenConsoleInterface       = (struct xencons_interface *)(UINTN)
                                 (XenHypercallHvmGetParam (HVM_PARAM_CONSOLE_PFN) << EFI_PAGE_SHIFT);
  }
  return RETURN_SUCCESS;
}