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

Copyright (c) HR650X BIOS Decompilation Project
**/

#ifndef __GENERICELOG_H__
#define __GENERICELOG_H__

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

//
// Function Prototypes
//

EFI_STATUS
EFIAPI
DebugLog(
  VOID
);

EFI_STATUS
EFIAPI
AssertFatal(
  VOID
);

EFI_STATUS
EFIAPI
OnExitBootServices(
  VOID
);

EFI_STATUS
EFIAPI
OnVirtualAddressChange(
  VOID
);

EFI_STATUS
EFIAPI
FreePoolOrAssert(
  VOID
);

EFI_STATUS
EFIAPI
CompareGuidPair(
  VOID
);

EFI_STATUS
EFIAPI
ReadUnaligned64(
  VOID
);

EFI_STATUS
EFIAPI
ElogVirtualAddressChangeEvent(
  VOID
);

EFI_STATUS
EFIAPI
EnumerateRedirectProtocols(
  VOID
);

EFI_STATUS
EFIAPI
GenericElogWriteEvent(
  VOID
);

EFI_STATUS
EFIAPI
GenericElogReadEvent(
  VOID
);

EFI_STATUS
EFIAPI
GenericElogGetStatus(
  VOID
);

EFI_STATUS
EFIAPI
GenericElogSetStatus(
  VOID
);

EFI_STATUS
EFIAPI
ElogDriverInit(
  VOID
);

EFI_STATUS
EFIAPI
GenericElogEntryPoint(
  VOID
);

EFI_STATUS
EFIAPI
ElogDriverMain(
  VOID
);

EFI_STATUS
EFIAPI
GUID declarations (from .rdata section)(
  VOID
);

EFI_STATUS
EFIAPI
EFI_GUID gEfiGenericElogProtocolGuid;(
  VOID
);

EFI_STATUS
EFIAPI
//(
  VOID
);

EFI_STATUS
EFIAPI
local structure that holds redirect-protocol pointers(
  VOID
);

EFI_STATUS
EFIAPI
the function dispatch table.(
  VOID
);

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

EFI_STATUS
EFIAPI
/ assertion output handle(
  VOID
);

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

EFI_STATUS
EFIAPI
list pointer (discovered during init)(
  VOID
);

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

EFI_STATUS
EFIAPI
VOID *(
  VOID
);

EFI_STATUS
EFIAPI
is a simplified memset(0) for the given buffer.(
  VOID
);

EFI_STATUS
EFIAPI
original implementation used 8-byte aligned stores(
  VOID
);

EFI_STATUS
EFIAPI
by a byte-wise tail.(
  VOID
);

EFI_STATUS
EFIAPI
(Buffer, Length);(
  VOID
);

EFI_STATUS
EFIAPI
the debug output handle (if available).(
  VOID
);

EFI_STATUS
EFIAPI
EFI_STATUS(
  VOID
);

EFI_STATUS
EFIAPI
CMOS offset 0x4B to determine the current debug level.(
  VOID
);

EFI_STATUS
EFIAPI
the debug level is <= 3, clamp it.(
  VOID
);

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

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

EFI_STATUS
EFIAPI
DebugMask = 0x80000400;    // EFI_D_ERROR (default)(
  VOID
);

EFI_STATUS
EFIAPI
}(
  VOID
);

EFI_STATUS
EFIAPI
VOID(
  VOID
);

EFI_STATUS
EFIAPI
zeroed pool (originally sub_19B0)(
  VOID
);

EFI_STATUS
EFIAPI
pool with ASSERT (originally sub_19E8)(
  VOID
);

EFI_STATUS
EFIAPI
a notification event and register for protocol callbacks(
  VOID
);

EFI_STATUS
EFIAPI
HOB list from the System Table (originally sub_1B18)(
  VOID
);

EFI_STATUS
EFIAPI
comparison helper (originally sub_1BF0)(
  VOID
);

EFI_STATUS
EFIAPI
BOOLEAN(
  VOID
);

EFI_STATUS
EFIAPI
two GUIDs by reading them as 64-bit halves.(
  VOID
);

EFI_STATUS
EFIAPI
LocalGuid1;(
  VOID
);

EFI_STATUS
EFIAPI
unaligned UINT64 (originally sub_1C60)(
  VOID
);

EFI_STATUS
EFIAPI
UINT64(
  VOID
);

EFI_STATUS
EFIAPI
pointers in the gElogLocalStructure for runtime.(
  VOID
);

EFI_STATUS
EFIAPI
each redirect handle pointer in the array(
  VOID
);

EFI_STATUS
EFIAPI
= *(UINT8 *)((UINT8 *)gElogLocalStructure + ELOG_STRUCT_REDIR_COUNT_OFFSET);(
  VOID
);

EFI_STATUS
EFIAPI
the structure's base pointers.(
  VOID
);

EFI_STATUS
EFIAPI
redirect protocols (originally sub_146C)(
  VOID
);

EFI_STATUS
EFIAPI
all handles that publish gEfiRedirElogProtocolGuid and stores(
  VOID
);

EFI_STATUS
EFIAPI
to ELOG_MAX_REDIRECTS of them in gElogLocalStructure.(
  VOID
);

EFI_STATUS
EFIAPI
the redirect count.(
  VOID
);

EFI_STATUS
EFIAPI
- dispatch to redirect handlers (originally sub_1550)(
  VOID
);

EFI_STATUS
EFIAPI
log type check.(
  VOID
);

EFI_STATUS
EFIAPI
(LogType >= ELOG_MAX_REDIRECTS) {(
  VOID
);

EFI_STATUS
EFIAPI
- dispatch to redirect handlers (originally sub_160C)(
  VOID
);

EFI_STATUS
EFIAPI
- dispatch to redirect handlers (originally sub_16B0)(
  VOID
);

EFI_STATUS
EFIAPI
- dispatch to redirect handlers (originally sub_1738)(
  VOID
);

EFI_STATUS
EFIAPI
initialization (originally sub_1108)(
  VOID
);

EFI_STATUS
EFIAPI
ImageHandle / SystemTable / BootServices / RuntimeServices(
  VOID
);

EFI_STATUS
EFIAPI
the exit-boot-services event and the virtual-address-change(
  VOID
);

EFI_STATUS
EFIAPI
globals.(
  VOID
);

EFI_STATUS
EFIAPI
= ImageHandle;(
  VOID
);

EFI_STATUS
EFIAPI
copies for runtime conversion.(
  VOID
);

EFI_STATUS
EFIAPI
= gRuntimeServices;(
  VOID
);

EFI_STATUS
EFIAPI
ExitBootServices notification that clears the BS copy.(
  VOID
);

EFI_STATUS
EFIAPI
protocol notification for the GenericElog protocol(
  VOID
);

EFI_STATUS
EFIAPI
triggers redirect-protocol enumeration.(
  VOID
);

EFI_STATUS
EFIAPI
VirtualAddressChange notification to convert pointers.(
  VOID
);

EFI_STATUS
EFIAPI
the HOB list.(
  VOID
);

EFI_STATUS
EFIAPI
(EFI_STATUS)GetHobList ();(
  VOID
);

EFI_STATUS
EFIAPI
entry point (originally ModuleEntryPoint at 0x10C4)(
  VOID
);

EFI_STATUS
EFIAPI
GenericElogEntryPoint in the header.(
  VOID
);

EFI_STATUS
EFIAPI
1: Save globals, create events, discover HOBs.(
  VOID
);

EFI_STATUS
EFIAPI
(ImageHandle, SystemTable);(
  VOID
);

EFI_STATUS
EFIAPI
2: Allocate the local structure, set up the protocol dispatch(
  VOID
);

EFI_STATUS
EFIAPI
the GenericElog protocol, enumerate redirects, and register(
  VOID
);

EFI_STATUS
EFIAPI
virtual-address-change event handler.(
  VOID
);

EFI_STATUS
EFIAPI
= (EFI_STATUS)(UINTN)ElogDriverMain ();(
  VOID
);

EFI_STATUS
EFIAPI
up resources on failure.(
  VOID
);

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

EFI_STATUS
EFIAPI
main (originally sub_1210)(
  VOID
);

EFI_STATUS
EFIAPI
the gElogLocalStructure, fills in the dispatch table(
  VOID
);

EFI_STATUS
EFIAPI
the GenericElog protocol, enumerates redirect handlers(
  VOID
);

EFI_STATUS
EFIAPI
the virtual-address-change event, and registers the(
  VOID
);

EFI_STATUS
EFIAPI
event for the RedirElog protocol.(
  VOID
);

EFI_STATUS
EFIAPI
dispatch function pointers are embedded in the local structure.(
  VOID
);

EFI_STATUS
EFIAPI
the local structure (0x49 bytes).(
  VOID
);

EFI_STATUS
EFIAPI
= AllocateZeroedPool (0x49);(
  VOID
);

EFI_STATUS
EFIAPI
in the dispatch table at the beginning of the structure.(
  VOID
);

EFI_STATUS
EFIAPI
the GenericElog protocol.(
  VOID
);

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

EFI_STATUS
EFIAPI
existing redirect protocols and register for new ones.(
  VOID
);

EFI_STATUS
EFIAPI
= CreateProtocolNotifyEvent ((
  VOID
);

EFI_STATUS
EFIAPI
the VirtualAddressChange event.(
  VOID
);

#endif /* __GENERICELOG_H__ */