Newer
Older
AMI-Aptio-BIOS-Reversed / PurleySktPkg / SouthClusterLbg / Smbus / Dxe / PchSmbusDxe / PchSmbusDxe.c
@Ajax Dong Ajax Dong 2 days ago 2 KB Full restructure
/** @file
  PchSmbusDxe.c - PCH SMBus DXE Driver Implementation.

  Reconstructed from the compiled binary of the Intel PCH SMBus host
  controller DXE driver for the Purley/LBG platform (HR650X server).

  Source files (from debug strings):
    PurleySktPkg/SouthClusterLbg/Smbus/Dxe/PchSmbusEntry.c
    PurleySktPkg/SouthClusterLbg/Smbus/Dxe/PchSmbusArp.c
    PurleySktPkg/SouthClusterLbg/LibraryPrivate/PeiDxeSmmPchSmbusCommonLib/PchSmbusExec.c

  Build: HR6N0XMLK, DEBUG_VS2015 X64
  Binary: 45 functions, 0x3160 bytes image

  This driver installs the EFI SMBUS HC PROTOCOL for the Intel PCH
  SMBus controller on Purley/H650X platforms.
**/

#include "PchSmbusDxe.h"

//
// Global data section (0xx2DA0-0x2E80)
//
EFI_SYSTEM_TABLE        gSystemTable      = NULL;     /* qword_2E20 */
EFI_BOOT_SERVICES       *gBootServices     = NULL;     /* qword_2E28 */
EFI_HANDLE              gImageHandle       = NULL;     /* qword_2E30 */
EFI_RUNTIME_SERVICES    *gRuntimeServices  = NULL;     /* qword_2E38 */
VOID                    *mHobList          = NULL;     /* qword_2EE48 */
UINT64                  *pPciExpressBase   = NULL;     /* qword_2EE50 */
VOID                    *gDS               = NULL;     /* qword_2EE58 */
VOID                    *mPciUsra          = NULL;     /* qword_2EE60 */
VOID                    *mPcd              = NULL;     /* qword_2EE68 */
PCH_SMBUS_CONTEXT       *mSmbusContext     = NULL;     /* qword_2E78 */

//
// GUIDs used by the driver
//
EFI_GUID gEfiDxeServicesTableGuid =
    { 0x054EB1BA, 0x0B53, 0x4A15, { 0xA8, 0x17, 0x62, 0x85, 0x6F, 0xC2, 0x8B, 0x02 } };

EFI_GUID gEfiHobListGuid =
    { 0x778C484C, 0x4FA2, 0x473A, { 0x95, 0x36, 0xF8, 0x00, 0x75, 0xBE, 0x2E } };

EFI_GUID gMmPciBaseProtocolGuid =
    { 0x70670B76, 0x2CFA, 0x4B35, { 0xA4, 0xCA, 0x9A, 0x15, 0x9A, 0x4F, 0x40, 0x1C } };

EFI_GUID gPcdProtocolGuid =
    { 0x1120836C, 0xD85B, 0x4E4E, { 0xA2, 0x90, 0xD5, 0xA5, 0x71, 0x31, 0x0E, 0xF7 } };

EFI_GUID gEfiSmbusHcProtocolGuid =
    { 0xDA53AAED, 0xC79D, 0x4A07, { 0x88, 0x8E, 0x49, 0xC2, 0x37, 0xB9, 0x04, 0x47 } };

EFI_GUID gSmbusPlatformConfigGuid =
    { 0xE05291CA, 0x9F83, 0x441C, { 0x9E, 0xC3, 0x3B, 0xF6, 0xD3, 0x56, 0x45, 0xD8 } };

EFI_GUID gSmbusDeviceDataGuid =
    { 0x7748A43E, 0x03BE, 0x4B68, { 0xAC, 0x86, 0x39, 0x60, 0x63, 0x11, 0x64, 0xEA } };

//=============================================================================
// Module Entry Point (sub_394, 0x394)
//=============================================================================

EFI_STATUS
EFIAPI
ModuleEntryPoint (
  IN EFI_HANDLE        ImageHandle,
  IN EFI_SYSTEM_TABLE  *SystemTable
  )
{
  UefiBootServicesTableLibConstructor (ImageHandle, SystemTable);
  return InitializePchSmbusEntryPoint ();
}