From dc2dc894f397ce902985c1276fd5f75ea4a6f69a Mon Sep 17 00:00:00 2001 From: Dun Tan Date: Wed, 21 Aug 2024 09:50:14 +0800 Subject: [PATCH] SecurityPkg: Correct Pages for TCG2 communication buffer The value of the Pages for TCG2 communication buffer should be EFI_SIZE_TO_PAGES(sizeof(TCG_NVS)) instead of sizeof(TCG_NVS). Signed-off-by: Dun Tan --- SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c b/SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPeim.c index 73121b0a2674..0e4dd3e7fd0a 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);