diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c index 73121b0a26..0e4dd3e7fd 100644 --- a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c +++ b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c @@ -78,7 +78,7 @@ BuildTcg2AcpiCommunicateBufferHob ( VOID *Buffer; UINTN Pages; - Pages = sizeof (TCG_NVS); + Pages = EFI_SIZE_TO_PAGES (sizeof (TCG_NVS)); Buffer = AllocateRuntimePages (Pages); ASSERT (Buffer != NULL);