Newer
Older
AMI-Aptio-BIOS-Reversed / ServerCommonPkg / Universal / GetSec / Pei / TxtPei / ApicGetBase.c
@Ajax Dong Ajax Dong 2 days ago 721 bytes Restructure the repo
// Decompiled: 0xffe07759
// Function: ApicGetBase
// Module: TxtPei.efi (TXTPEI)

int __thiscall ApicGetBase(void *this)
{
  unsigned __int64 v2; // rax
  __int16 v3; // si
  int v4; // eax

  if ( !IoWrite32(this) ) /*0xffe0775b*/
    return 1; /*0xffe07766*/
  v2 = __readmsr(0x1Bu); /*0xffe0776f*/
  v3 = v2; /*0xffe07771*/
  if ( (v2 & 0x800) == 0 ) /*0xffe07779*/
  {
    v4 = DebugPrintProtocol(); /*0xffe0777b*/
    if ( v4 ) /*0xffe07782*/
      (*(void (__cdecl **)(const char *, int, const char *))(v4 + 4))( /*0xffe07793*/
        "e:\\hs\\UefiCpuPkg\\Library\\BaseXApicX2ApicLib\\BaseXApicX2ApicLib.c",
        343,
        "ApicBaseMsr.Bits.EN != 0");
  }
  return ((v3 & 0x400) != 0) + 1; /*0xffe077a9*/
}