* [edk2-platforms][PATCH v1 0/2] MinPlatformPkg: Check MemoryTypeInfo Fixes
@ 2022-03-30 15:28 Michael Kubacki
2022-03-30 15:28 ` [edk2-platforms][PATCH v1 1/2] MinPlatformPkg/TestPointCheckLib: Prevent MemTypeInfo HOB modification Michael Kubacki
2022-03-30 15:28 ` [edk2-platforms][PATCH v1 2/2] MinPlatformPkg/TestPointCheckLib: Remove unused variable Michael Kubacki
0 siblings, 2 replies; 3+ messages in thread
From: Michael Kubacki @ 2022-03-30 15:28 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
This patch series addresses two issues in
TestPointCheckLib/DxeCheckMemoryTypeInformation.c:
1. The MemoryTypeInformation HOB is modified when the HOB data
is being dumped. Test point code should not modify HOB
data contents in DXE and this can impact subsequent HOB
consumers.
2. A variable is set and never used.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Michael Kubacki (2):
MinPlatformPkg/TestPointCheckLib: Prevent MemTypeInfo HOB modification
MinPlatformPkg/TestPointCheckLib: Remove unused variable
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
--
2.28.0.windows.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* [edk2-platforms][PATCH v1 1/2] MinPlatformPkg/TestPointCheckLib: Prevent MemTypeInfo HOB modification
2022-03-30 15:28 [edk2-platforms][PATCH v1 0/2] MinPlatformPkg: Check MemoryTypeInfo Fixes Michael Kubacki
@ 2022-03-30 15:28 ` Michael Kubacki
2022-03-30 15:28 ` [edk2-platforms][PATCH v1 2/2] MinPlatformPkg/TestPointCheckLib: Remove unused variable Michael Kubacki
1 sibling, 0 replies; 3+ messages in thread
From: Michael Kubacki @ 2022-03-30 15:28 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
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 <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.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/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
index 9ee9dd252c7e..c4dd3c7c9519 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
@@ -22,8 +22,8 @@ ShortNameOfMemoryType(
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 (
}
if (Next != Previous) {
- PreviousMemoryTypeInformation[Index].NumberOfPages = Next;
MemoryTypeInformationModified = TRUE;
}
@@ -110,7 +109,7 @@ TestPointCheckMemoryTypeInformation (
VOID *CurrentMemoryTypeInformation;
VOID *PreviousMemoryTypeInformation;
VOID *VariableMemoryTypeInformation;
-
+
DEBUG ((DEBUG_INFO, "==== TestPointCheckMemoryTypeInformation - Enter\n"));
CurrentMemoryTypeInformation = NULL;
PreviousMemoryTypeInformation = NULL;
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [edk2-platforms][PATCH v1 2/2] MinPlatformPkg/TestPointCheckLib: Remove unused variable
2022-03-30 15:28 [edk2-platforms][PATCH v1 0/2] MinPlatformPkg: Check MemoryTypeInfo Fixes Michael Kubacki
2022-03-30 15:28 ` [edk2-platforms][PATCH v1 1/2] MinPlatformPkg/TestPointCheckLib: Prevent MemTypeInfo HOB modification Michael Kubacki
@ 2022-03-30 15:28 ` Michael Kubacki
1 sibling, 0 replies; 3+ messages in thread
From: Michael Kubacki @ 2022-03-30 15:28 UTC (permalink / raw)
To: devel; +Cc: Chasel Chiu, Nate DeSimone, Liming Gao, Eric Dong
From: Michael Kubacki <michael.kubacki@microsoft.com>
The variable VariableMemoryTypeInformation is set but never used.
This change removes the variable.
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Eric Dong <eric.dong@intel.com>
Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
---
Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
index c4dd3c7c9519..0d3da7320fdd 100644
--- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
+++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckMemoryTypeInformation.c
@@ -108,7 +108,6 @@ TestPointCheckMemoryTypeInformation (
EFI_HOB_GUID_TYPE *GuidHob;
VOID *CurrentMemoryTypeInformation;
VOID *PreviousMemoryTypeInformation;
- VOID *VariableMemoryTypeInformation;
DEBUG ((DEBUG_INFO, "==== TestPointCheckMemoryTypeInformation - Enter\n"));
CurrentMemoryTypeInformation = NULL;
@@ -127,13 +126,6 @@ TestPointCheckMemoryTypeInformation (
goto Done;
}
- GetVariable2 (
- EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME,
- &gEfiMemoryTypeInformationGuid,
- &VariableMemoryTypeInformation,
- NULL
- );
-
if ((CurrentMemoryTypeInformation != NULL) && (PreviousMemoryTypeInformation != NULL)) {
DumpMemoryTypeInfoSummary(CurrentMemoryTypeInformation, PreviousMemoryTypeInformation);
}
--
2.28.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-30 15:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-30 15:28 [edk2-platforms][PATCH v1 0/2] MinPlatformPkg: Check MemoryTypeInfo Fixes Michael Kubacki
2022-03-30 15:28 ` [edk2-platforms][PATCH v1 1/2] MinPlatformPkg/TestPointCheckLib: Prevent MemTypeInfo HOB modification Michael Kubacki
2022-03-30 15:28 ` [edk2-platforms][PATCH v1 2/2] MinPlatformPkg/TestPointCheckLib: Remove unused variable Michael Kubacki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox