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
14
STATIC
UINT8 mCcProbeGuestType = 0;
15
STATIC
BOOLEAN mCcProbed =
FALSE
;
16
22
STATIC
23
UINT8
24
ReadCcGuestType
(
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
46
UINT8
47
EFIAPI
48
CcProbe
(
49
VOID
50
)
51
{
52
return
ReadCcGuestType
();
53
}
54
60
EFI_STATUS
61
EFIAPI
62
DxeCcProbeLibConstructor
(
63
VOID
64
)
65
{
66
ReadCcGuestType
();
67
return
EFI_SUCCESS
;
68
}
CcProbeLib.h
DxeCcProbeLibConstructor
EFI_STATUS EFIAPI DxeCcProbeLibConstructor(VOID)
Definition:
DxeCcProbeLib.c:62
ReadCcGuestType
STATIC UINT8 ReadCcGuestType(VOID)
Definition:
DxeCcProbeLib.c:24
CcProbe
UINT8 EFIAPI CcProbe(VOID)
Definition:
DxeCcProbeLib.c:48
NULL
#define NULL
Definition:
Base.h:319
STATIC
#define STATIC
Definition:
Base.h:264
TRUE
#define TRUE
Definition:
Base.h:301
FALSE
#define FALSE
Definition:
Base.h:307
FixedPcdGet32
#define FixedPcdGet32(TokenName)
Definition:
PcdLib.h:92
UefiBaseType.h
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
WorkArea.h
OVMF_WORK_AREA
Definition:
WorkArea.h:107
OvmfPkg
Library
CcProbeLib
DxeCcProbeLib.c
Generated on Fri Nov 15 2024 18:01:21 for TianoCore EDK2 by
1.9.6