1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
/** @file
Null stub of TdxLib
Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <Library/BaseLib.h>
#include <Uefi/UefiBaseType.h>
/**
The TDCALL instruction causes a VM exit to the Intel TDX module. It is
used to call guest-side Intel TDX functions, either local or a TD exit
to the host VMM, as selected by Leaf.
Leaf functions are described at <https://software.intel.com/content/
www/us/en/develop/articles/intel-trust-domain-extensions.html>
@param[in] Leaf Leaf number of TDCALL instruction
@param[in] Arg1 Arg1
@param[in] Arg2 Arg2
@param[in] Arg3 Arg3
@param[in,out] Results Returned result of the Leaf function
@return EFI_SUCCESS
@return Other See individual leaf functions
**/
UINTN
EFIAPI
TdCall (
IN UINT64 Leaf,
IN UINT64 Arg1,
IN UINT64 Arg2,
IN UINT64 Arg3,
IN OUT VOID *Results
)
{
return EFI_UNSUPPORTED;
}
/**
TDVMALL is a leaf function 0 for TDCALL. It helps invoke services from the
host VMM to pass/receive information.
@param[in] Leaf Number of sub-functions
@param[in] Arg1 Arg1
@param[in] Arg2 Arg2
@param[in] Arg3 Arg3
@param[in] Arg4 Arg4
@param[in,out] Results Returned result of the sub-function
@return EFI_SUCCESS
@return Other See individual sub-functions
**/
UINTN
EFIAPI
TdVmCall (
IN UINT64 Leaf,
IN UINT64 Arg1,
IN UINT64 Arg2,
IN UINT64 Arg3,
IN UINT64 Arg4,
IN OUT VOID *Results
)
{
return EFI_UNSUPPORTED;
}
/**
Probe if TD is enabled.
@return TRUE TD is enabled.
@return FALSE TD is not enabled.
**/
BOOLEAN
EFIAPI
TdIsEnabled (
)
{
return FALSE;
}
|