/** @file
  SetupConfigUpdateDxeCLX64L.h -- Header for SetupConfigUpdateDxeCLX64L

Copyright (c) HR650X BIOS Decompilation Project
**/

#ifndef __SETUPCONFIGUPDATEDXECLX64L_H__
#define __SETUPCONFIGUPDATEDXECLX64L_H__

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

//
// Function Prototypes
//

EFI_STATUS
EFIAPI
ReadUnaligned64(
  VOID
);

EFI_STATUS
EFIAPI
CompareGuidPair(
  VOID
);

EFI_STATUS
EFIAPI
DebugAssert(
  VOID
);

EFI_STATUS
EFIAPI
SetupConfigUpdateEntry(
  VOID
);

EFI_STATUS
EFIAPI
// ---------------------------------------------------------------------------(
  VOID
);

EFI_STATUS
EFIAPI
/ UefiRuntimeServicesTableLib backing(
  VOID
);

EFI_STATUS
EFIAPI
gImageHandle     = NULL;(
  VOID
);

EFI_STATUS
EFIAPI
globals(
  VOID
);

EFI_STATUS
EFIAPI
mImageHandle     = NULL;  ///< Saved image handle(
  VOID
);

EFI_STATUS
EFIAPI
instances(
  VOID
);

EFI_STATUS
EFIAPI
gSetupConfigUpdateProtocolGuid  = SETUP_CONFIG_UPDATE_PROTOCOL_GUID;(
  VOID
);

EFI_STATUS
EFIAPI
HOB list GUID, split across two QWORD-aligned storage locations(
  VOID
);

EFI_STATUS
EFIAPI
efficient comparison in CompareGuidPair().(
  VOID
);

EFI_STATUS
EFIAPI
= {7739F24C-93D7-11D4-9A3A-0090273FC14D}(
  VOID
);

EFI_STATUS
EFIAPI
as two UINT64 values at gHobListGuidLo (0xB40) and(
  VOID
);

EFI_STATUS
EFIAPI
(0xB48) for the inline comparison function to access(
  VOID
);

EFI_STATUS
EFIAPI
loading the full GUID from .rdata.(
  VOID
);

EFI_STATUS
EFIAPI
CONST UINT64  gHobListGuidLo  = 0x11D493D77739F24CULL;  ///< First  8 bytes(
  VOID
);

EFI_STATUS
EFIAPI
PSET configuration data header for the CLX64L platform.(
  VOID
);

EFI_STATUS
EFIAPI
full configuration block (header + payload) occupies 0x48C bytes.(
  VOID
);

EFI_STATUS
EFIAPI
CONST SETUP_CONFIG_DATA_HEADER  mSetupConfigDataHeader = {(
  VOID
);

EFI_STATUS
EFIAPI
functions(
  VOID
);

EFI_STATUS
EFIAPI
the debug assert protocol from Boot Services.(
  VOID
);

EFI_STATUS
EFIAPI
VOID  *mAssertProtocol = NULL;(
  VOID
);

EFI_STATUS
EFIAPI
the assert function at the protocol's standard offset.(
  VOID
);

EFI_STATUS
EFIAPI
list locator(
  VOID
);

EFI_STATUS
EFIAPI
cached value if already resolved.(
  VOID
);

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

EFI_STATUS
EFIAPI
(gST->NumberOfTableEntries == 0) {(
  VOID
);

/// emit diagnostic and assert.
EFI_STATUS
EFIAPI
configuration table entries(
  VOID
);

EFI_STATUS
EFIAPI
((DEBUG_SETUP_CONFIG(
  VOID
);

EFI_STATUS
EFIAPI
through to the NULL check below.(
  VOID
);

EFI_STATUS
EFIAPI
the configuration table looking for the HOB list GUID.(
  VOID
);

EFI_STATUS
EFIAPI
entry is an EFI_CONFIGURATION_TULE (16-byte GUID + pointer).(
  VOID
);

EFI_STATUS
EFIAPI
= gST->ConfigurationTable;(
  VOID
);

EFI_STATUS
EFIAPI
as two QWORDs (first 8 bytes, then second 8 bytes).(
  VOID
);

EFI_STATUS
EFIAPI
((GuidEntry[0] == *HobGuidLo) && (GuidEntry[1] == *HobGuidHi)) {(
  VOID
);

EFI_STATUS
EFIAPI
follows the GUID in the configuration table entry.(
  VOID
);

EFI_STATUS
EFIAPI
through byte pointer arithmetic to avoid strict aliasing.(
  VOID
);

EFI_STATUS
EFIAPI
= *(VOID **)((UINT8 *)GuidEntry + 16);(
  VOID
);

EFI_STATUS
EFIAPI
the HOB list was not found, emit a diagnostic.(
  VOID
);

EFI_STATUS
EFIAPI
(mHobList == NULL) {(
  VOID
);

EFI_STATUS
EFIAPI
HOB list must be non-NULL at this point.(
  VOID
);

EFI_STATUS
EFIAPI
entry point(
  VOID
);

EFI_STATUS
EFIAPI
= ImageHandle;(
  VOID
);

EFI_STATUS
EFIAPI
= GetHobList ();(
  VOID
);

EFI_STATUS
EFIAPI
the configuration receiver protocol.(
  VOID
);

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

EFI_STATUS
EFIAPI
(optional)(
  VOID
);

/// return the error status.
EFI_STATUS
EFIAPI
not found(
  VOID
);

EFI_STATUS
EFIAPI
Status;(
  VOID
);

EFI_STATUS
EFIAPI
the setup config via the receiver protocol.(
  VOID
);

EFI_STATUS
EFIAPI
at offset 0x10 in the protocol interface.(
  VOID
);

EFI_STATUS
EFIAPI
*ConfigData, UINTN ConfigDataSize)(
  VOID
);

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

EFI_STATUS
EFIAPI
0x10 = index 2(
  VOID
);

#endif /* __SETUPCONFIGUPDATEDXECLX64L_H__ */