Newer
Older
AMI-Aptio-BIOS-Reversed / PurleySktPkg / SouthClusterLbg / SiInit / Pei / SiInitPreMem / decompiled / ffd8155f.c
@Ajax Dong Ajax Dong 2 days ago 4 KB Restructure the repo
// 0xffd8155f
{"addr":"0xffd8155f","code":"int sub_FFD8155F()\n{\n  int v0; // eax\n  int v1; // esi\n  int v2; // eax\n  int v3; // eax\n  int v4; // esi\n  int v5; // eax\n  int *v7; // [esp+10h] [ebp-4h] BYREF\n\n  sub_FFD7F9AF(64, (int)\"PchInitPreMem() - Start\\n\"); /*0xffd8156b*/\n  if ( !(unsigned __int8)sub_FFD8BDC8() ) /*0xffd81572*/\n  {\n    sub_FFD7F9AF(0x80000000, (int)\"PCH SKU is not supported due to no proper PCH LPC found!\\n\"); /*0xffd8158b*/\n    v0 = sub_FFD7F97E(); /*0xffd81592*/\n    if ( v0 ) /*0xffd81599*/\n      (*(void (__cdecl **)(const char *, int, const char *))(v0 + 4))( /*0xffd815a6*/\n        \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n        1948,\n        \"((BOOLEAN)(0==1))\");\n  }\n  v1 = sub_FFD8CBBA(0, 31, 1); /*0xffd815b8*/\n  if ( (*(_DWORD *)(v1 + 16) & 0xFF000000) == 0 ) /*0xffd815c4*/\n  {\n    sub_FFD7F9AF(64, (int)\"SBREG should be programmed before here\\n\"); /*0xffd815cd*/\n    *(_DWORD *)(v1 + 16) = -50331648; /*0xffd815d2*/\n    *(_BYTE *)(v1 + 4) |= 2u; /*0xffd815e0*/\n  }\n  sub_FFD8C632(0x500u); /*0xffd815e8*/\n  sub_FFD8C80A(); /*0xffd815ed*/\n  sub_FFD8C99B(); /*0xffd815f2*/\n  sub_FFD8C909((unsigned int *)&v7); /*0xffd815fb*/\n  sub_FFD7F9AF(64, (int)\"PCH PWRM Base needs to be programmed before here\\n\"); /*0xffd81607*/\n  if ( !v7 ) /*0xffd81613*/\n  {\n    v2 = sub_FFD7F97E(); /*0xffd81615*/\n    if ( v2 ) /*0xffd8161c*/\n      (*(void (__cdecl **)(const char *, int, const char *))(v2 + 4))( /*0xffd81629*/\n        \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n        1993,\n        \"PchPwrmBase != 0\");\n  }\n  if ( (unsigned __int8)sub_FFD8D59A() )\n  {\n    sub_FFD7F9AF(0x80000000, (int)\"DWR: DWR detected - install PPI\\n\");\n    if ( sub_FFD7F948(&unk_FFD98084) >= 0 )\n      sub_FFD7F9AF(0x80000000, (int)\"DWR: DWR PPI has been installed\\n\");\n    else\n      sub_FFD7F9AF(0x80000000, (int)\"ERROR: Can't install DWR PPI\\n\");\n  }\n  sub_FFD80210(); /*0xffd81667*/\n  sub_FFD813D1(v7); /*0xffd81670*/\n  v3 = sub_FFD7F948(&unk_FFD980AC); /*0xffd8167a*/\n  v4 = v3; /*0xffd8167f*/\n  if ( v3 < 0 ) /*0xffd81683*/\n  {\n    sub_FFD7F9AF(0x80000000, (int)\"\\nASSERT_EFI_ERROR (Status = %r)\\n\", v3); /*0xffd8168c*/\n    v5 = sub_FFD7F97E(); /*0xffd81694*/\n    if ( v5 ) /*0xffd8169b*/\n      (*(void (__cdecl **)(const char *, int, const char *))(v5 + 4))( /*0xffd816a8*/\n        \"e:\\\\hs\\\\PurleySktPkg\\\\SouthClusterLbg\\\\LibraryPrivate\\\\PeiPchInitLib\\\\PchInitPreMem.c\",\n        2007,\n        \"!EFI_ERROR (Status)\");\n  }\n  sub_FFD7F9AF(64, (int)\"PchInitPreMem() - End\\n\"); /*0xffd816b5*/\n  return v4; /*0xffd816bc*/\n}","refs":[{"addr":"0xffd7f9af","name":"sub_FFD7F9AF"},{"addr":"0xffd92b80","name":"aPchinitprememS","string":"PchInitPreMem() - Start\n"},{"addr":"0xffd92b9c","name":"aPchSkuIsNotSup","string":"PCH SKU is not supported due to no proper PCH LPC found!\n"},{"addr":"0xffd7f97e","name":"sub_FFD7F97E"},{"addr":"0xffd91f24","name":"aEHsPurleysktpk_1","string":"e:\\hs\\PurleySktPkg\\SouthClusterLbg\\LibraryPrivate\\PeiPchInitLib\\PchInitPreMem.c"},{"addr":"0xffd91b10","name":"aBoolean01","string":"((BOOLEAN)(0==1))"},{"addr":"0xffd8bdc8","name":"sub_FFD8BDC8"},{"addr":"0xffd8cbba","name":"sub_FFD8CBBA"},{"addr":"0xffd92bd8","name":"aSbregShouldBeP","string":"SBREG should be programmed before here\n"},{"addr":"0xffd8c632","name":"sub_FFD8C632"},{"addr":"0xffd8c80a","name":"sub_FFD8C80A"},{"addr":"0xffd8c99b","name":"sub_FFD8C99B"},{"addr":"0xffd8c909","name":"sub_FFD8C909"},{"addr":"0xffd92c00","name":"aPchPwrmBaseNee","string":"PCH PWRM Base needs to be programmed before here\n"},{"addr":"0xffd92c34","name":"aPchpwrmbase0","string":"PchPwrmBase != 0"},{"addr":"0xffd91fe4","name":"aDwrDwrDetected","string":"DWR: DWR detected - install PPI\n"},{"addr":"0xffd92028","name":"aDwrDwrPpiHasBe","string":"DWR: DWR PPI has been installed\n"},{"addr":"0xffd92008","name":"aErrorCanTInsta","string":"ERROR: Can't install DWR PPI\n"},{"addr":"0xffd7f948","name":"sub_FFD7F948"},{"addr":"0xffd98084","name":"unk_FFD98084"},{"addr":"0xffd8d59a","name":"sub_FFD8D59A"},{"addr":"0xffd80210","name":"sub_FFD80210"},{"addr":"0xffd813d1","name":"sub_FFD813D1"},{"addr":"0xffd980ac","name":"unk_FFD980AC"},{"addr":"0xffd9192c","name":"aAssertEfiError","string":"\nASSERT_EFI_ERROR (Status = %r)\n"},{"addr":"0xffd91950","name":"aEfiErrorStatus","string":"!EFI_ERROR (Status)"},{"addr":"0xffd92c48","name":"aPchinitprememE","string":"PchInitPreMem() - End\n"}]}