Newer
Older
AMI-Aptio-BIOS-Reversed / AmiDeviceGuardApi / AmiDeviceGuardApi.h
@Ajax Dong Ajax Dong 2 days ago 18 KB Init
/** @file
  AmiDeviceGuardApi.h -- Header for AmiDeviceGuardApi

Copyright (c) HR650X BIOS Decompilation Project
**/

#ifndef __AMIDEVICEGUARDAPI_H__
#define __AMIDEVICEGUARDAPI_H__

#include "../uefi_headers/Uefi.h"

//
// Function Prototypes
//

EFI_STATUS
EFIAPI
GetImageSecurityDatabase(
  VOID
);

EFI_STATUS
EFIAPI
AsciiStrLen(
  VOID
);

EFI_STATUS
EFIAPI
ZeroMem(
  VOID
);

EFI_STATUS
EFIAPI
HobLibInit(
  VOID
);

EFI_STATUS
EFIAPI
CompareGuid(
  VOID
);

EFI_STATUS
EFIAPI
ReadUnaligned64(
  VOID
);

EFI_STATUS
EFIAPI
WriteUnaligned64(
  VOID
);

EFI_STATUS
EFIAPI
GetTimeStampSize(
  VOID
);

EFI_STATUS
EFIAPI
SetVariableWithTimestamp(
  VOID
);

EFI_STATUS
EFIAPI
FindCertificateInSignatureList(
  VOID
);

EFI_STATUS
EFIAPI
CpuId(
  VOID
);

EFI_STATUS
EFIAPI
GetDebugLevelFromCmos(
  VOID
);

EFI_STATUS
EFIAPI
DebugPrint(
  VOID
);

EFI_STATUS
EFIAPI
DebugAssert(
  VOID
);

EFI_STATUS
EFIAPI
FreePool(
  VOID
);

EFI_STATUS
EFIAPI
IsMatchingHobGuid(
  VOID
);

EFI_STATUS
EFIAPI
LocateHandleBufferByProtocol(
  VOID
);

EFI_STATUS
EFIAPI
GetFvbProtocol(
  VOID
);

EFI_STATUS
EFIAPI
GetFvbAndReadData(
  VOID
);

EFI_STATUS
EFIAPI
FreeFvbBuffer(
  VOID
);

EFI_STATUS
EFIAPI
FindCertificateBySubject(
  VOID
);

EFI_STATUS
EFIAPI
ParseDbSignatureData(
  VOID
);

EFI_STATUS
EFIAPI
AppendSignatureEntry(
  VOID
);

EFI_STATUS
EFIAPI
ReadSignatureDatabase(
  VOID
);

EFI_STATUS
EFIAPI
UpdateSignatureDatabase(
  VOID
);

EFI_STATUS
EFIAPI
ReadVariableFromFvb(
  VOID
);

EFI_STATUS
EFIAPI
FreeFvbReadBuffer(
  VOID
);

EFI_STATUS
EFIAPI
DeviceGuardEntryPoint(
  VOID
);

EFI_STATUS
EFIAPI
ReadSignatureDatabaseImpl(
  VOID
);

EFI_STATUS
EFIAPI
FindCertificateBySubjectImpl(
  VOID
);

EFI_STATUS
EFIAPI
AppendSignatureEntryImpl(
  VOID
);

EFI_STATUS
EFIAPI
UpdateSignatureDatabaseImpl(
  VOID
);

EFI_STATUS
EFIAPI
protocol GUID(
  VOID
);

EFI_STATUS
EFIAPI
gAmiDeviceGuardApiProtocolGuid = AMI_DEVICE_GUARD_API_PROTOCOL_GUID;(
  VOID
);

EFI_STATUS
EFIAPI
(from .data segment, addresses relative to image base)(
  VOID
);

EFI_STATUS
EFIAPI
- gEfiFirmwareVolumeBlockProtocolGuid or similar protocol GUID(
  VOID
);

EFI_STATUS
EFIAPI
to locate the debug mask protocol.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mDebugProtocolGuid;(
  VOID
);

EFI_STATUS
EFIAPI
- EFI_GLOBAL_VARIABLE GUID(
  VOID
);

EFI_STATUS
EFIAPI
for access to "db" UEFI variable.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mGlobalVariableGuid;(
  VOID
);

EFI_STATUS
EFIAPI
- First component GUID for timestamp magic(
  VOID
);

EFI_STATUS
EFIAPI
- Second component GUID for timestamp magic(
  VOID
);

EFI_STATUS
EFIAPI
by sub_14A0 when building the timestamp header.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mTimeStampGuid1;(
  VOID
);

EFI_STATUS
EFIAPI
- gEfiImageSecurityDatabaseGuid(
  VOID
);

EFI_STATUS
EFIAPI
used for certificate parsing services.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mImageSecurityDatabaseGuid;(
  VOID
);

EFI_STATUS
EFIAPI
- Protocol GUID for locating FVB (Firmware Volume Block)(
  VOID
);

EFI_STATUS
EFIAPI
via BootServices->LocateProtocol.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mFirmwareVolumeBlockProtocolGuid;(
  VOID
);

EFI_STATUS
EFIAPI
- EFI_CERT_SHA256_GUID value (16-byte buffer).(
  VOID
);

EFI_STATUS
EFIAPI
against signature list type to identify SHA-256(
  VOID
);

EFI_STATUS
EFIAPI
entries.(
  VOID
);

EFI_STATUS
EFIAPI
UINT8     mCertSha256Guid[16];(
  VOID
);

EFI_STATUS
EFIAPI
- GUID for the Variable Write service inside the(
  VOID
);

EFI_STATUS
EFIAPI
protocol.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mVariableWriteGuid;(
  VOID
);

EFI_STATUS
EFIAPI
- First GUID for HOB list owner GUID comparison(
  VOID
);

EFI_STATUS
EFIAPI
- Second GUID for HOB list owner GUID comparison(
  VOID
);

EFI_STATUS
EFIAPI
by sub_14E4 to match against HOB owner GUIDs.(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID  mHobOwnerGuid1;(
  VOID
);

EFI_STATUS
EFIAPI
- The Device Guard API Protocol GUID structure (installed).(
  VOID
);

EFI_STATUS
EFIAPI
- Pointer to "Microsoft Corporation UEFI CA 2011" string.(
  VOID
);

EFI_STATUS
EFIAPI
well-known subject name for the Microsoft UEFI CA 2011(
  VOID
);

EFI_STATUS
EFIAPI
trusted by Windows Secure Boot.(
  VOID
);

EFI_STATUS
EFIAPI
CONST CHAR8 *mMsftUefiCa2011Subject = "Microsoft Corporation UEFI CA 2011";(
  VOID
);

EFI_STATUS
EFIAPI
- Protocol instance flag (dword, initialised to 1).(
  VOID
);

EFI_STATUS
EFIAPI
that the protocol has been installed.(
  VOID
);

EFI_STATUS
EFIAPI
UINT32      mProtocolInstalled = 0;(
  VOID
);

EFI_STATUS
EFIAPI
- Debug mask protocol pointer (cached)(
  VOID
);

EFI_STATUS
EFIAPI
- HOB list pointer (cached)(
  VOID
);

EFI_STATUS
EFIAPI
VOID  *mDebugMaskProtocol;(
  VOID
);

EFI_STATUS
EFIAPI
UEFI table pointers assigned in entry point(
  VOID
);

EFI_STATUS
EFIAPI
gImageHandle   = NULL;(
  VOID
);

EFI_STATUS
EFIAPI
declarations for internal helper functions(
  VOID
);

EFI_STATUS
EFIAPI
that are library-level wrappers(
  VOID
);

EFI_STATUS
EFIAPI
Implementations(
  VOID
);

EFI_STATUS
EFIAPI
CMOS index 0x4B from bank 0x70.(
  VOID
);

EFI_STATUS
EFIAPI
the NMI disable bit (bit 7).(
  VOID
);

EFI_STATUS
EFIAPI
= IoRead8 (0x70);(
  VOID
);

EFI_STATUS
EFIAPI
DebugLevel > 3 and DebugLevel == 0, read from MEMORY[0xFDAF0490].(
  VOID
);

EFI_STATUS
EFIAPI
(DebugLevel > 3) {(
  VOID
);

EFI_STATUS
EFIAPI
debug level to EFI debug mask.(
  VOID
);

EFI_STATUS
EFIAPI
1 -> INFO (0x00000004)(
  VOID
);

EFI_STATUS
EFIAPI
2 -> WARN (0x00000008)(
  VOID
);

EFI_STATUS
EFIAPI
(DebugLevel == 1) {(
  VOID
);

EFI_STATUS
EFIAPI
0 or > 2 -> disabled.(
  VOID
);

EFI_STATUS
EFIAPI
0;(
  VOID
);

EFI_STATUS
EFIAPI
mask protocol structure(
  VOID
);

EFI_STATUS
EFIAPI
for debug print and assertion support.(
  VOID
);

EFI_STATUS
EFIAPI
struct {(
  VOID
);

EFI_STATUS
EFIAPI
the debug mask protocol. The GUID is stored at(
  VOID
);

EFI_STATUS
EFIAPI
0x1F10 in the data section.(
  VOID
);

EFI_STATUS
EFIAPI
= gBootServices->LocateProtocol ((
  VOID
);

EFI_STATUS
EFIAPI
(Length >= 8) {(
  VOID
);

EFI_STATUS
EFIAPI
misaligned head(
  VOID
);

EFI_STATUS
EFIAPI
= ((UINTN)DestBytes & 7);(
  VOID
);

EFI_STATUS
EFIAPI
aligned 8-byte chunks(
  VOID
);

EFI_STATUS
EFIAPI
((UINTN)DestBytes <= (UINTN)(Destination + Length - 8) &&(
  VOID
);

EFI_STATUS
EFIAPI
remaining bytes one at a time(
  VOID
);

EFI_STATUS
EFIAPI
((UINTN)DestBytes < (UINTN)(Destination + Length)) {(
  VOID
);

EFI_STATUS
EFIAPI
unaligned read: copy byte-by-byte from the buffer.(
  VOID
);

EFI_STATUS
EFIAPI
(Value, Buffer, sizeof (UINT64));(
  VOID
);

EFI_STATUS
EFIAPI
GUIDs as two 64-bit values for fast comparison.(
  VOID
);

EFI_STATUS
EFIAPI
Guid1Part1;(
  VOID
);

EFI_STATUS
EFIAPI
List Support(
  VOID
);

EFI_STATUS
EFIAPI
HOB list pointer is stored in SystemTable at offset +104(
  VOID
);

EFI_STATUS
EFIAPI
(gSystemTable->HobList == NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
through HOBs. Each HOB entry is 24 bytes:(
  VOID
);

EFI_STATUS
EFIAPI
0: EFI_GUID (16 bytes) - Owner GUID(
  VOID
);

EFI_STATUS
EFIAPI
16: (8 bytes) - HOB data pointer(
  VOID
);

EFI_STATUS
EFIAPI
(HobCount < (UINTN)gSystemTable->HobList) {(
  VOID
);

EFI_STATUS
EFIAPI
we reach here, no matching HOB was found.(
  VOID
);

EFI_STATUS
EFIAPI
an assertion failure.(
  VOID
);

EFI_STATUS
EFIAPI
((
  VOID
);

EFI_STATUS
EFIAPI
and Variable Support(
  VOID
);

EFI_STATUS
EFIAPI
consists of:(
  VOID
);

EFI_STATUS
EFIAPI
(16 bytes) + 0x10 pad/magic + 8 bytes GUID + 8 bytes GUID(
  VOID
);

EFI_STATUS
EFIAPI
sizeof (EFI_TIME) + 24;(
  VOID
);

EFI_STATUS
EFIAPI
values for timestamp structure initialisation(
  VOID
);

EFI_STATUS
EFIAPI
MagicValue   = 0x07060402;  // 117704678 decimal(
  VOID
);

EFI_STATUS
EFIAPI
decimal(
  VOID
);

EFI_STATUS
EFIAPI
the MagicValue trackers for debug print(
  VOID
);

EFI_STATUS
EFIAPI
(TimeStamp, sizeof (EFI_TIME) + 24);(
  VOID
);

EFI_STATUS
EFIAPI
to get the current time from the runtime services.(
  VOID
);

EFI_STATUS
EFIAPI
time services are not available, use the magic defaults above.(
  VOID
);

EFI_STATUS
EFIAPI
(gRuntimeServices != NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
print the time information(
  VOID
);

EFI_STATUS
EFIAPI
(MagicValue >> 16) & 0xFF, // Hour(
  VOID
);

EFI_STATUS
EFIAPI
MagicValue2   // Second(
  VOID
);

EFI_STATUS
EFIAPI
time data into timestamp buffer(
  VOID
);

EFI_STATUS
EFIAPI
(TimeStamp, &Now, sizeof (EFI_TIME));(
  VOID
);

EFI_STATUS
EFIAPI
in the remaining fields of the timestamp structure:(
  VOID
);

EFI_STATUS
EFIAPI
16: MonotonicCount(
  VOID
);

EFI_STATUS
EFIAPI
20: FormatMagic(
  VOID
);

EFI_STATUS
EFIAPI
(or structure version)(
  VOID
);

EFI_STATUS
EFIAPI
- format magic(
  VOID
);

EFI_STATUS
EFIAPI
the two GUID components for timestamp verification(
  VOID
);

EFI_STATUS
EFIAPI
((UINT64 *)TimeStamp + 3, *(UINT64 *)&mTimeStampGuid1);(
  VOID
);

EFI_STATUS
EFIAPI
attributes: EFI_VARIABLE_NON_VOLATILE |(
  VOID
);

EFI_STATUS
EFIAPI
|(
  VOID
);

EFI_STATUS
EFIAPI
// (0x21 = NV | BS | AT)(
  VOID
);

EFI_STATUS
EFIAPI
TimeAttributes;(
  VOID
);

EFI_STATUS
EFIAPI
to query the current variable size.(
  VOID
);

EFI_STATUS
EFIAPI
the variable does not exist, gRT->GetVariable returns(
  VOID
);

EFI_STATUS
EFIAPI
with the required size in OldDataSize.(
  VOID
);

EFI_STATUS
EFIAPI
= 0;(
  VOID
);

EFI_STATUS
EFIAPI
variable exists. Re-write with timestamp attributes.(
  VOID
);

EFI_STATUS
EFIAPI
(&TimeStamp);(
  VOID
);

EFI_STATUS
EFIAPI
= NV | BS | AT (0x21) + time-based auth.(
  VOID
);

EFI_STATUS
EFIAPI
= Attributes | EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS;(
  VOID
);

EFI_STATUS
EFIAPI
does not exist yet. Use the raw attributes.(
  VOID
);

EFI_STATUS
EFIAPI
= Attributes;(
  VOID
);

EFI_STATUS
EFIAPI
write the variable with the requested data.(
  VOID
);

EFI_STATUS
EFIAPI
= NV | BS | (AT if existing) -> 0x21 or 0x07.(
  VOID
);

EFI_STATUS
EFIAPI
= TimeAttributes | 0x21;(
  VOID
);

EFI_STATUS
EFIAPI
(0x800000000000000E) means we succeeded(
  VOID
);

EFI_STATUS
EFIAPI
(Status == EFI_UNSUPPORTED) {(
  VOID
);

EFI_STATUS
EFIAPI
the write succeeded, query the old variable size for debug(
  VOID
);

EFI_STATUS
EFIAPI
so the caller can see the size change.(
  VOID
);

EFI_STATUS
EFIAPI
(!EFI_ERROR (Status)) {(
  VOID
);

EFI_STATUS
EFIAPI
Lookup(
  VOID
);

EFI_STATUS
EFIAPI
cached, return existing pointer.(
  VOID
);

EFI_STATUS
EFIAPI
the list of all FVB protocol instances(
  VOID
);

EFI_STATUS
EFIAPI
= LocateHandleBufferByProtocol ((
  VOID
);

EFI_STATUS
EFIAPI
through handles to find one where Read can succeed(
  VOID
);

EFI_STATUS
EFIAPI
(Index = 0; Index < HandleCount; Index++) {(
  VOID
);

EFI_STATUS
EFIAPI
to read from the FVB volume(
  VOID
);

EFI_STATUS
EFIAPI
a buffer and read from FVB(
  VOID
);

EFI_STATUS
EFIAPI
= AllocatePool (BufferSize);(
  VOID
);

EFI_STATUS
EFIAPI
suitable FVB handle found(
  VOID
);

EFI_STATUS
EFIAPI
= EFI_NOT_FOUND;(
  VOID
);

EFI_STATUS
EFIAPI
the "db" variable size first(
  VOID
);

EFI_STATUS
EFIAPI
a buffer and read the variable data(
  VOID
);

EFI_STATUS
EFIAPI
= AllocatePool (DataSize);(
  VOID
);

EFI_STATUS
EFIAPI
for the certificate in the signature list(
  VOID
);

EFI_STATUS
EFIAPI
(DataSize > 0) {(
  VOID
);

EFI_STATUS
EFIAPI
"db" variable does not exist at all(
  VOID
);

EFI_STATUS
EFIAPI
EFI_NOT_FOUND;(
  VOID
);

EFI_STATUS
EFIAPI
the Image Security Database protocol for certificate parsing(
  VOID
);

EFI_STATUS
EFIAPI
= NULL;(
  VOID
);

EFI_STATUS
EFIAPI
the subject name length(
  VOID
);

EFI_STATUS
EFIAPI
= AsciiStrLen (SubjectName);(
  VOID
);

EFI_STATUS
EFIAPI
a buffer for certificate parsing(
  VOID
);

EFI_STATUS
EFIAPI
= DataSize + 1;(
  VOID
);

EFI_STATUS
EFIAPI
the number of signature lists(
  VOID
);

EFI_STATUS
EFIAPI
print the signature list info(
  VOID
);

EFI_STATUS
EFIAPI
through each signature list(
  VOID
);

EFI_STATUS
EFIAPI
= SigListCount;(
  VOID
);

EFI_STATUS
EFIAPI
the offset to the signature data within this list(
  VOID
);

EFI_STATUS
EFIAPI
SigDataOffset;(
  VOID
);

EFI_STATUS
EFIAPI
the owner GUID from the signature list(
  VOID
);

EFI_STATUS
EFIAPI
owner GUID for this list context(
  VOID
);

EFI_STATUS
EFIAPI
is simplified(
  VOID
);

EFI_STATUS
EFIAPI
if this signature type is EFI_CERT_SHA256_GUID(
  VOID
);

EFI_STATUS
EFIAPI
(CompareMem (&SigList->SignatureType, mCertSha256Guid, sizeof (EFI_GUID)) == 0) {(
  VOID
);

EFI_STATUS
EFIAPI
through each signature data entry in this list(
  VOID
);

EFI_STATUS
EFIAPI
= (EFI_SIGNATURE_DATA *)((UINT8 *)SigList + SigDataOffset);(
  VOID
);

EFI_STATUS
EFIAPI
signature data contains:(
  VOID
);

EFI_STATUS
EFIAPI
SignatureOwner (16 bytes)(
  VOID
);

EFI_STATUS
EFIAPI
SignatureData[...](
  VOID
);

EFI_STATUS
EFIAPI
X.509 certs, the SignatureData starts with the X.509 certificate.(
  VOID
);

EFI_STATUS
EFIAPI
can search for the subject name within the DER-encoded cert.(
  VOID
);

EFI_STATUS
EFIAPI
CertDataOffset;(
  VOID
);

EFI_STATUS
EFIAPI
the cert buffer and call the security database to parse(
  VOID
);

EFI_STATUS
EFIAPI
(CertBuffer, CertBufferSize);(
  VOID
);

EFI_STATUS
EFIAPI
SecurityDatabase is available, call its parse function(
  VOID
);

EFI_STATUS
EFIAPI
(SecurityDatabase != NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
security database protocol entry point for parsing(
  VOID
);

EFI_STATUS
EFIAPI
and extracting subject names.(
  VOID
);

EFI_STATUS
EFIAPI
calls into the Authenticated Variable parser.(
  VOID
);

EFI_STATUS
EFIAPI
ParsedDataSize;(
  VOID
);

EFI_STATUS
EFIAPI
the parse function. This typically invokes(
  VOID
);

EFI_STATUS
EFIAPI
internal function that extracts the subject from(
  VOID
);

EFI_STATUS
EFIAPI
X.509 certificate.(
  VOID
);

EFI_STATUS
EFIAPI
(mDebugMaskProtocol != NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
the image security database protocol's parse function(
  VOID
);

EFI_STATUS
EFIAPI
extract the subject name from the certificate.(
  VOID
);

EFI_STATUS
EFIAPI
the parsed subject name with the target(
  VOID
);

EFI_STATUS
EFIAPI
(CompareMem (CertBuffer, SubjectName, SubjectNameLen) == 0) {(
  VOID
);

EFI_STATUS
EFIAPI
to the next signature data entry(
  VOID
);

EFI_STATUS
EFIAPI
= (EFI_SIGNATURE_DATA *)((UINT8 *)SigData + SigSize);(
  VOID
);

EFI_STATUS
EFIAPI
to the next signature list(
  VOID
);

EFI_STATUS
EFIAPI
= (EFI_SIGNATURE_LIST *)((UINT8 *)SigList + SigList->SignatureListSize);(
  VOID
);

EFI_STATUS
EFIAPI
Database Update(
  VOID
);

EFI_STATUS
EFIAPI
function validates the EFI_SIGNATURE_LIST structure(s)(
  VOID
);

EFI_STATUS
EFIAPI
the buffer and returns the total size of valid entries.(
  VOID
);

EFI_STATUS
EFIAPI
a stub that returns the input size after validation.(
  VOID
);

EFI_STATUS
EFIAPI
(Data == NULL || ParsedSize == NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
1: Read the current "db" variable size(
  VOID
);

EFI_STATUS
EFIAPI
2: Allocate and read the current data(
  VOID
);

EFI_STATUS
EFIAPI
= AllocatePool (DbDataSize);(
  VOID
);

EFI_STATUS
EFIAPI
3: Parse the existing data to validate it(
  VOID
);

EFI_STATUS
EFIAPI
= ParseDbSignatureData (DbData, &ParsedSize);(
  VOID
);

EFI_STATUS
EFIAPI
4: Allocate a new buffer with room for timestamp + existing + new data(
  VOID
);

EFI_STATUS
EFIAPI
= GetTimeStampSize () + DbDataSize;(
  VOID
);

EFI_STATUS
EFIAPI
5: Build the timestamp at the start of the new buffer(
  VOID
);

EFI_STATUS
EFIAPI
((EFI_TIME *)NewData);(
  VOID
);

EFI_STATUS
EFIAPI
6: Copy existing signature data after the timestamp(
  VOID
);

EFI_STATUS
EFIAPI
7: Write the updated variable(
  VOID
);

EFI_STATUS
EFIAPI
= SetVariableWithTimestamp ((
  VOID
);

EFI_STATUS
EFIAPI
the "db" variable size(
  VOID
);

EFI_STATUS
EFIAPI
= gRuntimeServices->GetVariable ((
  VOID
);

EFI_STATUS
EFIAPI
2: Allocate and read the current variable data(
  VOID
);

EFI_STATUS
EFIAPI
3: Allocate new buffer with room for timestamp(
  VOID
);

EFI_STATUS
EFIAPI
4: Build timestamp at the start(
  VOID
);

EFI_STATUS
EFIAPI
5: Copy existing data after timestamp(
  VOID
);

EFI_STATUS
EFIAPI
6: Write the updated variable(
  VOID
);

EFI_STATUS
EFIAPI
the FVB protocol on the given handle(
  VOID
);

EFI_STATUS
EFIAPI
= gBootServices->HandleProtocol ((
  VOID
);

EFI_STATUS
EFIAPI
FVB size(
  VOID
);

EFI_STATUS
EFIAPI
buffer and read(
  VOID
);

EFI_STATUS
EFIAPI
= AllocatePool (Size);(
  VOID
);

EFI_STATUS
EFIAPI
Entry Point(
  VOID
);

EFI_STATUS
EFIAPI
global table pointers.(
  VOID
);

EFI_STATUS
EFIAPI
mirrors the standard UEFI BootServicesTableLib initialisation.(
  VOID
);

EFI_STATUS
EFIAPI
= ImageHandle;(
  VOID
);

EFI_STATUS
EFIAPI
the HOB list (required for variable services)(
  VOID
);

EFI_STATUS
EFIAPI
();(
  VOID
);

EFI_STATUS
EFIAPI
runtime/BS pointers if not already set in the global init above(
  VOID
);

EFI_STATUS
EFIAPI
(SystemTable->RuntimeServices == NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
a new handle and install the Device Guard API protocol.(
  VOID
);

EFI_STATUS
EFIAPI
protocol is a singleton interface for managing the "db" variable.(
  VOID
);

EFI_STATUS
EFIAPI
16-bit value to 32-bit pattern(
  VOID
);

EFI_STATUS
EFIAPI
= Value | ((UINT32)Value << 16);(
  VOID
);

EFI_STATUS
EFIAPI
misalignment(
  VOID
);

EFI_STATUS
EFIAPI
= (4 - ((UINTN)ByteBuffer & 3)) & 3;(
  VOID
);

EFI_STATUS
EFIAPI
4 bytes at a time(
  VOID
);

EFI_STATUS
EFIAPI
= (UINT32 *)ByteBuffer;(
  VOID
);

EFI_STATUS
EFIAPI
remaining bytes(
  VOID
);

EFI_STATUS
EFIAPI
(Index = 0; Index < Size; Index++) {(
  VOID
);

EFI_STATUS
EFIAPI
interrupt state and disable interrupts(
  VOID
);

EFI_STATUS
EFIAPI
= SaveAndDisableInterrupts ();(
  VOID
);

EFI_STATUS
EFIAPI
overlapping regions where source < dest(
  VOID
);

EFI_STATUS
EFIAPI
copying from the end.(
  VOID
);

EFI_STATUS
EFIAPI
((UINTN)Source < (UINTN)Destination &&(
  VOID
);

EFI_STATUS
EFIAPI
= (CONST UINT8 *)Source + Length;(
  VOID
);

EFI_STATUS
EFIAPI
destination(
  VOID
);

EFI_STATUS
EFIAPI
= (UINTN)DestBytes & 7;(
  VOID
);

EFI_STATUS
EFIAPI
8 bytes at a time(
  VOID
);

EFI_STATUS
EFIAPI
= Length >> 3;(
  VOID
);

EFI_STATUS
EFIAPI
remaining bytes backwards(
  VOID
);

EFI_STATUS
EFIAPI
(Length-- != 0) {(
  VOID
);

EFI_STATUS
EFIAPI
(Length >= 8 && (UINTN)((INTN)DestBytes - (INTN)SrcBytes) >= 8) {(
  VOID
);

EFI_STATUS
EFIAPI
source and destination(
  VOID
);

EFI_STATUS
EFIAPI
interrupt state(
  VOID
);

EFI_STATUS
EFIAPI
(InterruptState);(
  VOID
);

EFI_STATUS
EFIAPI
Method Implementation (for the installed protocol structure)(
  VOID
);

EFI_STATUS
EFIAPI
AMI_DEVICE_GUARD_API_PROTOCOL instance(
  VOID
);

EFI_STATUS
EFIAPI
gAmiDeviceGuardApiProtocol = {(
  VOID
);

#endif /* __AMIDEVICEGUARDAPI_H__ */