Newer
Older
AMI-Aptio-BIOS-Reversed / TxtPei / PsfGrantCountConfig.c
@Ajax Dong Ajax Dong 2 days ago 1 KB Init
// Decompiled: 0xffe078d7
// Function: PsfGrantCountConfig
// Module: TxtPei.efi (TXTPEI)

int __thiscall PsfGrantCountConfig(unsigned int *this)
{
  int v2; // eax
  int v4; // edi
  int v5; // eax

  if ( this ) /*0xffe078de*/
  {
    v4 = PciCfgRead(this); /*0xffe0791d*/
    if ( (unsigned __int16)PsfTgtConfig(v4) == 0xFFFF ) /*0xffe0792e*/
    {
      v5 = DebugPrintProtocol(); /*0xffe07930*/
      if ( v5 ) /*0xffe07937*/
        (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffe07948*/
          "e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchCycleDecodingLib\\PchCycleDecodingLib.c",
          303,
          "((BOOLEAN)(0==1))");
      return -2147483645; /*0xffe0794e*/
    }
    else
    {
      *this = *(_DWORD *)(v4 + 72) & 0xFFFF0000; /*0xffe0795d*/
      return 0; /*0xffe0795f*/
    }
  }
  else
  {
    DebugPrint(0x80000000, (int)"PchPwrmBaseGet Error. Invalid pointer.\n"); /*0xffe078ea*/
    v2 = DebugPrintProtocol(); /*0xffe078f1*/
    if ( v2 ) /*0xffe078f8*/
      (*(void (__cdecl **)(const char *, int, const char *))(v2 + 4))( /*0xffe07909*/
        "e:\\hs\\PurleySktPkg\\SouthClusterLbg\\Library\\PeiDxeSmmPchCycleDecodingLib\\PchCycleDecodingLib.c",
        293,
        "((BOOLEAN)(0==1))");
    return -2147483646; /*0xffe0790f*/
  }
}