/** @file
UsbOcUpdateDxeLightningRidgeEXECB4.h -- Header for UsbOcUpdateDxeLightningRidgeEXECB4
Copyright (c) HR650X BIOS Decompilation Project
**/
#ifndef __USBOCUPDATEDXELIGHTNINGRIDGEEXECB4_H__
#define __USBOCUPDATEDXELIGHTNINGRIDGEEXECB4_H__
#include "../uefi_headers/Uefi.h"
//
// Function Prototypes
//
EFI_STATUS
EFIAPI
GetUsbOcConfigTables(
VOID
);
EFI_STATUS
EFIAPI
DebugPrintEx(
VOID
);
EFI_STATUS
EFIAPI
ReportAssertion(
VOID
);
EFI_STATUS
EFIAPI
ReadUnaligned64Ex(
VOID
);
EFI_STATUS
EFIAPI
CompareGuidEx(
VOID
);
EFI_STATUS
EFIAPI
_ModuleEntryPoint(
VOID
);
EFI_STATUS
EFIAPI
*gBS = NULL;(
VOID
);
EFI_STATUS
EFIAPI
tables are embedded in the .data section at the addresses(
VOID
);
EFI_STATUS
EFIAPI
by GetUsbOcConfigTables(). The values map USB physical(
VOID
);
EFI_STATUS
EFIAPI
to overcurrent sense pins.(
VOID
);
EFI_STATUS
EFIAPI
(mUsbOcTableDefault): {0,0,0,0, 1,1,1,1, 2,2,2,2}(
VOID
);
EFI_STATUS
EFIAPI
(mUsbOcTableAlt): {0,0,0,0, 0,0,1,1, 1,1,2,2}(
VOID
);
EFI_STATUS
EFIAPI
(mUsbOcTableExt): all 0x0702(
VOID
);
EFI_STATUS
EFIAPI
mUsbOcTableDefault = {(
VOID
);
EFI_STATUS
EFIAPI
{2638009e-3850-4e4b-b05d-042a32dbb9d1}(
VOID
);
EFI_STATUS
EFIAPI
CONST EFI_GUID mUbaProtocolGuid = UBA_USBOC_PROTOCOL_GUID;(
VOID
);
EFI_STATUS
EFIAPI
CONST EFI_GUID mEfiHobListGuid = EFI_HOB_LIST_GUID;(
VOID
);
EFI_STATUS
EFIAPI
CONST EFI_GUID mUsbOcHobGuid = USBOC_HOB_GUID;(
VOID
);
EFI_STATUS
EFIAPI
// ============================================================================(
VOID
);
EFI_STATUS
EFIAPI
pool for the protocol structure (minimum 16 bytes).(
VOID
);
EFI_STATUS
EFIAPI
= gBS->AllocatePool (EfiBootServicesData, 16, (VOID **)&Protocol);(
VOID
);
EFI_STATUS
EFIAPI
the UBA USB OC protocol by GUID.(
VOID
);
EFI_STATUS
EFIAPI
= gBS->LocateProtocol ((
VOID
);
EFI_STATUS
EFIAPI
the protocol pointer.(
VOID
);
EFI_STATUS
EFIAPI
= Protocol;(
VOID
);
EFI_STATUS
EFIAPI
board revision from RTC CMOS index 0x4B.(
VOID
);
EFI_STATUS
EFIAPI
NMI mask (bit 7) in the index register.(
VOID
);
EFI_STATUS
EFIAPI
(RTC_INDEX_PORT, IoRead8 (RTC_INDEX_PORT) & 0x80 | CMOS_BOARD_REV_INDEX);(
VOID
);
EFI_STATUS
EFIAPI
the raw CMOS value is out of range, try to refine it.(
VOID
);
EFI_STATUS
EFIAPI
((UINT8)BoardRev > BOARD_REV_MAX) {(
VOID
);
EFI_STATUS
EFIAPI
rev appears invalid. If the raw value is 0, check the(
VOID
);
EFI_STATUS
EFIAPI
strap at the MMIO address.(
VOID
);
EFI_STATUS
EFIAPI
(BoardRev == 0) {(
VOID
);
EFI_STATUS
EFIAPI
the filter mask.(
VOID
);
EFI_STATUS
EFIAPI
((UINT8)(BoardRev - 1) <= 0xFD) { // BoardRev >= 1(
VOID
);
EFI_STATUS
EFIAPI
if (BoardRev == 1) {(
VOID
);
EFI_STATUS
EFIAPI
}(
VOID
);
EFI_STATUS
EFIAPI
if our debug mask passes the filter.(
VOID
);
EFI_STATUS
EFIAPI
((FilterMask & DebugMask) == 0) {(
VOID
);
EFI_STATUS
EFIAPI
structure (field after RuntimeServices).(
VOID
);
EFI_STATUS
EFIAPI
= *(UINTN *)((UINT8 *)SystemTable + 104);(
VOID
);
/// log assertion.
EFI_STATUS
EFIAPI
configuration tables(
VOID
);
EFI_STATUS
EFIAPI
(DEBUG_MASK_INIT, "\nASSERT_EFI_ERROR (Status = %r)\n", 0x800000000000000ELL);(
VOID
);
EFI_STATUS
EFIAPI
entry is 24 bytes: { EFI_GUID Guid; VOID *Table; }.(
VOID
);
EFI_STATUS
EFIAPI
(Index = 0; Index < TableCount; Index++) {(
VOID
);
EFI_STATUS
EFIAPI
the table's GUID with gEfiHobListGuid.(
VOID
);
EFI_STATUS
EFIAPI
(CompareGuidEx ((
VOID
);
EFI_STATUS
EFIAPI
the HOB list entry. The table pointer is at offset 16(
VOID
);
EFI_STATUS
EFIAPI
each configuration table entry.(
VOID
);
EFI_STATUS
EFIAPI
= *(VOID **)((UINT8 *)SystemTable + 112 + Index * 24 + 16);(
VOID
);
/// this is an error condition.
EFI_STATUS
EFIAPI
list not found(
VOID
);
EFI_STATUS
EFIAPI
the HOB list was found, verify it is non-NULL.(
VOID
);
EFI_STATUS
EFIAPI
(HobList == NULL) {(
VOID
);
EFI_STATUS
EFIAPI
= ImageHandle;(
VOID
);
EFI_STATUS
EFIAPI
(SystemTable);(
VOID
);
EFI_STATUS
EFIAPI
((
VOID
);
EFI_STATUS
EFIAPI
protocol structure size(
VOID
);
EFI_STATUS
EFIAPI
protocol buffer is installed with the board-specific GUID.(
VOID
);
EFI_STATUS
EFIAPI
consumer (USB stack) will use this protocol to determine(
VOID
);
EFI_STATUS
EFIAPI
port-to-overcurrent-pin mappings.(
VOID
);
EFI_STATUS
EFIAPI
= gBS->InstallProtocolInterface ((
VOID
);
#endif /* __USBOCUPDATEDXELIGHTNINGRIDGEEXECB4_H__ */