Added Boot Guard debug information.

Debug info contains enable/disable status of Intel Bootguard for
Apollo Lake platform.

Signed-off-by: Agrawal <sachin.agrawal@intel.com>
This commit is contained in:
Agrawal
2018-12-03 14:11:46 -08:00
committed by Maurice Ma
parent 864293a4aa
commit 21ddcb16e2
2 changed files with 12 additions and 1 deletions
@@ -35,6 +35,7 @@
#include <Library/IoLib.h>
#include <Library/DecompressLib.h>
#include <CpuRegs.h>
#include <PlatformData.h>
#define SRAM_SIZE 0x20000
#define SRAM_REMAPPING (0xFFFFFFFF - SRAM_SIZE + 1)
@@ -82,6 +83,7 @@ LoadStage1B (
UINT8 *Src;
UINT8 *Dst;
UINT8 *Ptr;
PLATFORM_DATA *PlatformData;
if (CSE_VIDDID == 0xFFFFFFFF) {
/* CSE does not exist */
@@ -157,7 +159,15 @@ LoadStage1B (
} while ((CseToHost & 0x00000400) == 0);
if ((CseToHost & 0x00000200) != 0) {
DEBUG ((DEBUG_INFO, "CSE verified IBBM successfully OR BtGuard is NOT enabled!\n"));
PlatformData = (PLATFORM_DATA *)GetPlatformDataPtr ();
if (PlatformData != NULL) {
if (PlatformData->BtGuardInfo.Bpm.Vb) {
DEBUG ((DEBUG_INFO, "BtGuard IBBM verification succeeded !\n"));
} else {
DEBUG ((DEBUG_INFO, "No BtGuard verification !\n"));
}
}
} else {
CpuHalt ("BtGuard verification failed !!\n");
}
@@ -101,6 +101,7 @@ FetchPreRBPData(
FitData = FindFitEntryData ( FIT_TABLE_TYPE_TXE_SECURE_BOOT, FIT_ENTRY_SUB_TYPE_BOOT_POLICY );
if (FitData != NULL) {
CopyMem ((VOID*)&(BtGuardInfo->Bpm), FitData, sizeof (BtGuardInfo->Bpm));
DEBUG ((DEBUG_INFO, "BtGuard: VB : %d, MB : %d \n", BtGuardInfo->Bpm.Vb, BtGuardInfo->Bpm.Mb));
}
if (BtGuardInfo->Bpm.Mb) {