From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mx.groups.io with SMTP id smtpd.web12.210.1648654109763097946 for ; Wed, 30 Mar 2022 08:28:29 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@linux.microsoft.com header.s=default header.b=g9w+q8FE; spf=pass (domain: linux.microsoft.com, ip: 13.77.154.182, mailfrom: mikuback@linux.microsoft.com) Received: from localhost.localdomain (unknown [47.202.59.224]) by linux.microsoft.com (Postfix) with ESMTPSA id A267020DEE2D; Wed, 30 Mar 2022 08:28:28 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com A267020DEE2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1648654109; bh=D15z1LunbX5fzafJYVi9PUzt0kntIqWkcPjgIcnRtVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=g9w+q8FEPAJvCroLiZpcHUnLZ9vWxqi+VN1HyMaMJk1i2j6uCDPlCTX3ydCyS4mtr mgvV4Xn8eCWZgy5toxAxd58RucZSaV9QDTV52e2Uj6l5dfZLFm7/8JMg2Jrf3UyCbu 3q590OzK4y079FsBaxXxISFKwI7byztfeQXJULvo= From: "Michael Kubacki" To: devel@edk2.groups.io Cc: Chasel Chiu , Nate DeSimone , Liming Gao , Eric Dong Subject: [edk2-platforms][PATCH v1 1/2] MinPlatformPkg/TestPointCheckLib: Prevent MemTypeInfo HOB modification Date: Wed, 30 Mar 2022 11:28:02 -0400 Message-Id: <20220330152803.1919-2-mikuback@linux.microsoft.com> X-Mailer: git-send-email 2.28.0.windows.1 In-Reply-To: <20220330152803.1919-1-mikuback@linux.microsoft.com> References: <20220330152803.1919-1-mikuback@linux.microsoft.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Kubacki The function DumpMemoryTypeInfoSummary() is written to dump data from the memory type information HOB. However, it actually modifies the HOB data. This can be logic later in boot dependent on the HOB value. This change removes modification of the HOB data. Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Cc: Eric Dong Signed-off-by: Michael Kubacki --- Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMem= oryTypeInformation.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib= /DxeCheckMemoryTypeInformation.c b/Platform/Intel/MinPlatformPkg/Test/Lib= rary/TestPointCheckLib/DxeCheckMemoryTypeInformation.c index 9ee9dd252c7e..c4dd3c7c9519 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckMemoryTypeInformation.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeChe= ckMemoryTypeInformation.c @@ -22,8 +22,8 @@ ShortNameOfMemoryType( =20 VOID DumpMemoryTypeInfoSummary ( - IN EFI_MEMORY_TYPE_INFORMATION *CurrentMemoryTypeInformation, - IN EFI_MEMORY_TYPE_INFORMATION *PreviousMemoryTypeInformation + IN CONST EFI_MEMORY_TYPE_INFORMATION *CurrentMemoryTypeInformation, + IN CONST EFI_MEMORY_TYPE_INFORMATION *PreviousMemoryTypeInformation ) { UINTN Index; @@ -83,7 +83,6 @@ DumpMemoryTypeInfoSummary ( } =20 if (Next !=3D Previous) { - PreviousMemoryTypeInformation[Index].NumberOfPages =3D Next; MemoryTypeInformationModified =3D TRUE; } =20 @@ -110,7 +109,7 @@ TestPointCheckMemoryTypeInformation ( VOID *CurrentMemoryTypeInformation; VOID *PreviousMemoryTypeInformation; VOID *VariableMemoryTypeInformation; - =20 + DEBUG ((DEBUG_INFO, "=3D=3D=3D=3D TestPointCheckMemoryTypeInformation = - Enter\n")); CurrentMemoryTypeInformation =3D NULL; PreviousMemoryTypeInformation =3D NULL; --=20 2.28.0.windows.1