Laszlo Ersek 02f69a25f0 OvmfPkg: XenHypercallLib: introduce XenHypercallIsAvailable()
Similarly to QemuFwCfgLib, we prefer mellow library construction code and
an explicit "are you available" query function in the XenHypercallLib
class. In this step we introduce that query function, but move no client
code to it yet.

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@17000 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-03 08:13:30 +00:00

45 lines
1.1 KiB
C

/** @file
Xen Hypercall Library implementation for ARM architecture
Copyright (C) 2015, Red Hat, Inc.
Copyright (c) 2014, Linaro Ltd. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License that accompanies this
distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT
WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#include <Base.h>
/**
Check if the Xen Hypercall library is able to make calls to the Xen
hypervisor.
Client code should call further functions in this library only if, and after,
this function returns TRUE.
@retval TRUE Hypercalls are available.
@retval FALSE Hypercalls are not available.
**/
BOOLEAN
EFIAPI
XenHypercallIsAvailable (
VOID
)
{
return TRUE;
}
RETURN_STATUS
EFIAPI
XenHypercallLibInit (
VOID
)
{
return RETURN_SUCCESS;
}