/** @file
  PlatformErrorHandler.c -- PlatformErrorHandler

  Auto-converted from IDA decompiler output.
  Recovered function names are aligned to local module documentation.

Copyright (c) HR650X BIOS Decompilation Project
**/

#include "PlatformErrorHandler.h"


// Function: ModuleEntryPoint -- DXE/SMM entry point (_ModuleEntryPoint)
EFI_STATUS
ModuleEntryPoint(
  EFI_HANDLE        ImageHandle,
  EFI_SYSTEM_TABLE  *SystemTable
  )
{
  EFI_STATUS  Status;

  // Recovered constructor + init flow: sub_30D8 -> sub_3550 -> sub_34E0(on error)
  PlatformErrorHandlerConstructors();
  Status = RegisterPlatformErrorHandler(ImageHandle, SystemTable);
  if ( EFI_ERROR (Status) )
    PlatformErrorHandlerFallbackInit(ImageHandle, SystemTable);
  return Status;
}
