TianoCore EDK2 master
Loading...
Searching...
No Matches
DxeCcProbeLib.c
Go to the documentation of this file.
1
10#include <Uefi/UefiBaseType.h>
11#include <Library/CcProbeLib.h>
12#include <WorkArea.h>
13
14STATIC UINT8 mCcProbeGuestType = 0;
15STATIC BOOLEAN mCcProbed = FALSE;
16
23UINT8
25 VOID
26 )
27{
28 OVMF_WORK_AREA *WorkArea;
29
30 if (!mCcProbed) {
31 WorkArea = (OVMF_WORK_AREA *)FixedPcdGet32 (PcdOvmfWorkAreaBase);
32 mCcProbeGuestType = WorkArea != NULL ? WorkArea->Header.GuestType : CcGuestTypeNonEncrypted;
33 mCcProbed = TRUE;
34 }
35
36 return mCcProbeGuestType;
37}
38
46UINT8
47EFIAPI
49 VOID
50 )
51{
52 return ReadCcGuestType ();
53}
54
61EFIAPI
63 VOID
64 )
65{
67 return EFI_SUCCESS;
68}
EFI_STATUS EFIAPI DxeCcProbeLibConstructor(VOID)
Definition: DxeCcProbeLib.c:62
STATIC UINT8 ReadCcGuestType(VOID)
Definition: DxeCcProbeLib.c:24
UINT8 EFIAPI CcProbe(VOID)
Definition: DxeCcProbeLib.c:48
#define NULL
Definition: Base.h:319
#define STATIC
Definition: Base.h:264
#define TRUE
Definition: Base.h:301
#define FALSE
Definition: Base.h:307
#define FixedPcdGet32(TokenName)
Definition: PcdLib.h:92
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
#define EFI_SUCCESS
Definition: UefiBaseType.h:112