/** @file
SetupConfigUpdateDxeNeonCityEPECB.h -- Header for SetupConfigUpdateDxeNeonCityEPECB
Copyright (c) HR650X BIOS Decompilation Project
**/
#ifndef __SETUPCONFIGUPDATEDXENEONCITYEPECB_H__
#define __SETUPCONFIGUPDATEDXENEONCITYEPECB_H__
#include "../uefi_headers/Uefi.h"
//
// Function Prototypes
//
EFI_STATUS
EFIAPI
ReturnNotFound(
VOID
);
EFI_STATUS
EFIAPI
DebugAssert(
VOID
);
EFI_STATUS
EFIAPI
DebugPrint(
VOID
);
EFI_STATUS
EFIAPI
IsHobListGuid(
VOID
);
EFI_STATUS
EFIAPI
ReadUnaligned64(
VOID
);
EFI_STATUS
EFIAPI
SetupConfigUpdateDxeNeonCityEPECBEntryPoint(
VOID
);
EFI_STATUS
EFIAPI
global variables occupy memory in the .data section at fixed offsets.(
VOID
);
EFI_STATUS
EFIAPI
are accessed directly by the compiled code via RIP-relative addressing.(
VOID
);
EFI_STATUS
EFIAPI
Name Description(
VOID
);
EFI_STATUS
EFIAPI
mDebugProtocolGuid UBA Debug Protocol GUID(
VOID
);
EFI_STATUS
EFIAPI
mUbaBoardTypeProtocolGuid UBA Board-Type Protocol GUID(
VOID
);
EFI_STATUS
EFIAPI
mEfiHobListGuid EFI HOB List GUID(
VOID
);
EFI_STATUS
EFIAPI
mEfiHobListGuidSecondHalf Second 8 bytes of HOB List GUID(
VOID
);
EFI_STATUS
EFIAPI
mUbaSetupConfigGuid UBA Setup Config Protocol GUID(
VOID
);
EFI_STATUS
EFIAPI
mSetupConfigData UBA_SETUP_CONFIG_DATA structure(
VOID
);
EFI_STATUS
EFIAPI
gBS_global Cached BootServices pointer(
VOID
);
EFI_STATUS
EFIAPI
gImageHandle_global Cached ImageHandle(
VOID
);
EFI_STATUS
EFIAPI
gRT_global Cached RuntimeServices pointer(
VOID
);
EFI_STATUS
EFIAPI
mDebugProtocol Cached Debug Protocol interface(
VOID
);
EFI_STATUS
EFIAPI
mHobList Cached HOB List pointer(
VOID
);
EFI_STATUS
EFIAPI
mCmosDebugLevel Cached CMOS debug level(
VOID
);
EFI_STATUS
EFIAPI
gST_global Cached SystemTable pointer(
VOID
);
EFI_STATUS
EFIAPI
Debug Protocol GUID(
VOID
);
EFI_STATUS
EFIAPI
mDebugProtocolGuid = UBA_DEBUG_PROTOCOL_GUID;(
VOID
);
EFI_STATUS
EFIAPI
Board-Type Protocol GUID for NeonCity EP EC B(
VOID
);
EFI_STATUS
EFIAPI
mUbaBoardTypeProtocolGuid = UBA_BOARD_TYPE_PROTOCOL_GUID;(
VOID
);
EFI_STATUS
EFIAPI
HOB List GUID - used to locate the HOB list from the system(
VOID
);
EFI_STATUS
EFIAPI
table. The GUID is split into two 64-bit halves for(
VOID
);
EFI_STATUS
EFIAPI
optimized comparison in IsHobListGuid().(
VOID
);
EFI_STATUS
EFIAPI
8 bytes: 0x11D493D77739F24C (GUID.Data1 + Data2 + Data3 high)(
VOID
);
EFI_STATUS
EFIAPI
8 bytes: 0x4DC13F2700903A9A (GUID.Data3 low + Data4)(
VOID
);
EFI_STATUS
EFIAPI
mEfiHobListGuid = EFI_HOB_LIST_GUID;(
VOID
);
EFI_STATUS
EFIAPI
Setup Config Protocol GUID for NeonCity EP EC B(
VOID
);
EFI_STATUS
EFIAPI
mUbaSetupConfigGuid = UBA_SETUP_CONFIG_PROTOCOL_GUID;(
VOID
);
EFI_STATUS
EFIAPI
Configuration Data block.(
VOID
);
EFI_STATUS
EFIAPI
"PSET" (Platform SETup), Version 1, DataSize 0x48C (1164 bytes).(
VOID
);
EFI_STATUS
EFIAPI
data is provided to the setup engine via the board-type protocol.(
VOID
);
EFI_STATUS
EFIAPI
mSetupConfigData = {(
VOID
);
EFI_STATUS
EFIAPI
1, // Version(
VOID
);
EFI_STATUS
EFIAPI
0x48C // DataSize2 (duplicate)(
VOID
);
EFI_STATUS
EFIAPI
UEFI global pointers.(
VOID
);
EFI_STATUS
EFIAPI
*gImageHandle_global = NULL; // 0xBA8(
VOID
);
EFI_STATUS
EFIAPI
EFI_BOOT_SERVICES *gBS_global = NULL; // 0xBA0(
VOID
);
EFI_STATUS
EFIAPI
//(
VOID
);
EFI_STATUS
EFIAPI
protocol and data pointers.(
VOID
);
EFI_STATUS
EFIAPI
*mDebugProtocol = NULL; // 0xBB8 - Cached Debug Protocol(
VOID
);
EFI_STATUS
EFIAPI
- Cached HOB List(
VOID
);
EFI_STATUS
EFIAPI
- Cached CMOS Debug Level(
VOID
);
EFI_STATUS
EFIAPI
Implementations(
VOID
);
EFI_STATUS
EFIAPI
cached value if already resolved.(
VOID
);
EFI_STATUS
EFIAPI
= mDebugProtocol;(
VOID
);
EFI_STATUS
EFIAPI
a small buffer (31 bytes = EfiBootServicesData pool type index)(
VOID
);
EFI_STATUS
EFIAPI
immediately free it. This validates that boot services are operational.(
VOID
);
EFI_STATUS
EFIAPI
the returned pointer value is > 0x10, the environment may not support(
VOID
);
EFI_STATUS
EFIAPI
lookup.(
VOID
);
EFI_STATUS
EFIAPI
= (UINTN)gBS_global->AllocatePool (EfiBootServicesData, 31);(
VOID
);
EFI_STATUS
EFIAPI
UEFI environment. Locate the UBA Debug Protocol.(
VOID
);
EFI_STATUS
EFIAPI
the result (or NULL if not found).(
VOID
);
EFI_STATUS
EFIAPI
the assertion handler at protocol offset 0x08.(
VOID
);
EFI_STATUS
EFIAPI
((UBA_DEBUG_PROTOCOL *)Protocol)->DebugAssert ((
VOID
);
EFI_STATUS
EFIAPI
the UBA Debug Protocol interface.(
VOID
);
EFI_STATUS
EFIAPI
= GetDebugProtocol ();(
VOID
);
EFI_STATUS
EFIAPI
the current CMOS index register, preserving bit 7 (NMI enable).(
VOID
);
EFI_STATUS
EFIAPI
CMOS register index 0x4B for the debug level.(
VOID
);
EFI_STATUS
EFIAPI
= IoRead8 (RTC_INDEX_PORT);(
VOID
);
EFI_STATUS
EFIAPI
the debug level from CMOS data port 0x71.(
VOID
);
EFI_STATUS
EFIAPI
= IoRead8 (RTC_DATA_PORT);(
VOID
);
EFI_STATUS
EFIAPI
the effective debug level.(
VOID
);
EFI_STATUS
EFIAPI
(DebugLevel > 3) {(
VOID
);
EFI_STATUS
EFIAPI
> 3 means the raw value is not a simple level encoding.(
VOID
);
EFI_STATUS
EFIAPI
the cached value.(
VOID
);
EFI_STATUS
EFIAPI
= mCmosDebugLevel;(
VOID
);
EFI_STATUS
EFIAPI
1 indicates the board type, and bit 0 is always set.(
VOID
);
EFI_STATUS
EFIAPI
= (MmioRead32 (BOARD_CONFIG_MMIO_ADDR) & 2) | 1;(
VOID
);
EFI_STATUS
EFIAPI
the debug mask from the level.(
VOID
);
EFI_STATUS
EFIAPI
must be >= 1 and level - 1 <= 0xFD.(
VOID
);
EFI_STATUS
EFIAPI
((DebugLevel > 0) && ((DebugLevel - 1) <= 0xFD)) {(
VOID
);
EFI_STATUS
EFIAPI
platform ID to debug filter mask.(
VOID
);
EFI_STATUS
EFIAPI
1: mask = 0x80000004 (DEBUG_INIT | DEBUG_INFO)(
VOID
);
EFI_STATUS
EFIAPI
>1: mask = 0x80000046 (multiple debug flags)(
VOID
);
EFI_STATUS
EFIAPI
(DebugLevel == 1) {(
VOID
);
EFI_STATUS
EFIAPI
the requested ErrorLevel is enabled by the mask, call the(
VOID
);
EFI_STATUS
EFIAPI
((DebugMask & ErrorLevel) != 0) {(
VOID
);
EFI_STATUS
EFIAPI
(mHobList != NULL) {(
VOID
);
EFI_STATUS
EFIAPI
to NULL.(
VOID
);
EFI_STATUS
EFIAPI
= NULL;(
VOID
);
EFI_STATUS
EFIAPI
if there are configuration table entries.(
VOID
);
EFI_STATUS
EFIAPI
= gST_global->NumberOfTableEntries;(
VOID
);
EFI_STATUS
EFIAPI
pointer to the configuration table array.(
VOID
);
EFI_STATUS
EFIAPI
= gST_global->ConfigurationTable;(
VOID
);
EFI_STATUS
EFIAPI
the current entry's VendorGuid against EFI_HOB_LIST_GUID.(
VOID
);
EFI_STATUS
EFIAPI
(IsHobListGuid (&ConfigTable[Index].VendorGuid)) {(
VOID
);
EFI_STATUS
EFIAPI
the HOB list. Extract the VendorTable pointer.(
VOID
);
EFI_STATUS
EFIAPI
= ConfigTable[Index].VendorTable;(
VOID
);
EFI_STATUS
EFIAPI
list not found. Raise ASSERT_EFI_ERROR.(
VOID
);
EFI_STATUS
EFIAPI
(0x80000000, L"\nASSERT_EFI_ERROR (Status = %r)\n", EFI_NOT_FOUND);(
VOID
);
EFI_STATUS
EFIAPI
mHobList is still NULL, raise another assertion.(
VOID
);
EFI_STATUS
EFIAPI
(mHobList == NULL) {(
VOID
);
EFI_STATUS
EFIAPI
first 8 bytes of the GUID against the first half of the(
VOID
);
EFI_STATUS
EFIAPI
EFI_HOB_LIST_GUID.(
VOID
);
EFI_STATUS
EFIAPI
(ReadUnaligned64 (&mEfiHobListGuid) != ReadUnaligned64 (GuidPtr)) {(
VOID
);
EFI_STATUS
EFIAPI
second 8 bytes of the GUID (at offset 8).(
VOID
);
EFI_STATUS
EFIAPI
ReadUnaligned64 ((UINT8 *)&mEfiHobListGuid + 8) ==(
VOID
);
EFI_STATUS
EFIAPI
ImageHandle with assertion check.(
VOID
);
EFI_STATUS
EFIAPI
= (EFI_HANDLE *)ImageHandle;(
VOID
);
EFI_STATUS
EFIAPI
SystemTable with assertion check.(
VOID
);
EFI_STATUS
EFIAPI
= SystemTable;(
VOID
);
EFI_STATUS
EFIAPI
BootServices from SystemTable with assertion check.(
VOID
);
EFI_STATUS
EFIAPI
= SystemTable->BootServices;(
VOID
);
EFI_STATUS
EFIAPI
RuntimeServices from SystemTable with assertion check.(
VOID
);
EFI_STATUS
EFIAPI
= SystemTable->RuntimeServices;(
VOID
);
EFI_STATUS
EFIAPI
the HOB list from the system configuration table.(
VOID
);
EFI_STATUS
EFIAPI
();(
VOID
);
EFI_STATUS
EFIAPI
debug banner.(
VOID
);
EFI_STATUS
EFIAPI
(0x80000000, L"UBA:SETUPConfigUpdate-TypeNeonCityEPECB\n");(
VOID
);
EFI_STATUS
EFIAPI
the UBA board-type protocol.(
VOID
);
EFI_STATUS
EFIAPI
the board-type protocol's RegisterSetupConfig function.(
VOID
);
EFI_STATUS
EFIAPI
registers the setup configuration GUID and data block for(
VOID
);
EFI_STATUS
EFIAPI
NeonCity EP EC B platform.(
VOID
);
EFI_STATUS
EFIAPI
BoardProtocol->RegisterSetupConfig ((
VOID
);
#endif /* __SETUPCONFIGUPDATEDXENEONCITYEPECB_H__ */