* [edk2-devel] [PATCH 0/1] UefiCpuPkg: Correct the count of different type of Cache.
@ 2024-06-18 13:34 Yuanhao Xie
2024-06-18 13:34 ` [edk2-devel] [PATCH 1/1] " Yuanhao Xie
0 siblings, 1 reply; 3+ messages in thread
From: Yuanhao Xie @ 2024-06-18 13:34 UTC (permalink / raw)
To: devel
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distinguish between different cache types.
xieyuanh (1):
UefiCpuPkg: Correct the count of different type of Cache.
UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.39.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119608): https://edk2.groups.io/g/devel/message/119608
Mute This Topic: https://groups.io/mt/106740627/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply [flat|nested] 3+ messages in thread
* [edk2-devel] [PATCH 1/1] UefiCpuPkg: Correct the count of different type of Cache.
2024-06-18 13:34 [edk2-devel] [PATCH 0/1] UefiCpuPkg: Correct the count of different type of Cache Yuanhao Xie
@ 2024-06-18 13:34 ` Yuanhao Xie
0 siblings, 0 replies; 3+ messages in thread
From: Yuanhao Xie @ 2024-06-18 13:34 UTC (permalink / raw)
To: devel
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distinguish between different cache types.
Cc: Gerd Hoffmann kraxel@redhat.com
Cc: Eric Dong eric.dong@intel.com
Cc: Ray Ni ray.ni@intel.com
Cc: Rahul Kumar rahul1.kumar@intel.com
Cc: Tom Lendacky thomas.lendacky@amd.com
Signed-off-by: xieyuanh <yuanhao.xie@intel.com>
---
UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
index c7973735e1..df07a10a2a 100644
--- a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
+++ b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
@@ -348,7 +348,8 @@ CpuCacheInfoCollectCpuCacheInfoData (
if ((LocalCacheInfo[CacheInfoIndex].Package == ProcessorInfo[Index / MAX_NUM_OF_CACHE_PARAMS_LEAF].Package) &&
(LocalCacheInfo[CacheInfoIndex].CoreType == ProcessorInfo[Index / MAX_NUM_OF_CACHE_PARAMS_LEAF].CoreType) &&
(LocalCacheInfo[CacheInfoIndex].CacheLevel == CacheData[Index].CacheLevel) &&
- (LocalCacheInfo[CacheInfoIndex].CacheType == CacheData[Index].CacheType))
+ (LocalCacheInfo[CacheInfoIndex].CacheType == CacheData[Index].CacheType) &&
+ (LocalCacheInfo[CacheInfoIndex].CacheSizeinKB == CacheData[Index].CacheSizeinKB))
{
LocalCacheInfo[CacheInfoIndex].CacheCount++;
break;
--
2.39.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119609): https://edk2.groups.io/g/devel/message/119609
Mute This Topic: https://groups.io/mt/106740629/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [edk2-devel] [PATCH 1/1] UefiCpuPkg: Correct the count of different type of Cache.
2024-06-19 3:44 [edk2-devel] [PATCH 0/1] " Yuanhao Xie
@ 2024-06-19 3:44 ` Yuanhao Xie
0 siblings, 0 replies; 3+ messages in thread
From: Yuanhao Xie @ 2024-06-19 3:44 UTC (permalink / raw)
To: devel; +Cc: Gerd Hoffmann, Eric Dong, Ray Ni, Rahul Kumar, Tom Lendacky
This patch fixes an error in calculating cache sizes for cores from
different Dies. The original code incorrectly cleared cache sizes for
different core types during intermediate calculation steps, leading to
mistakes in counting duplicate entries. This patch adds a check for
cache size to distinguish between different cache types.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: xieyuanh <yuanhao.xie@intel.com>
---
UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
index c7973735e1..df07a10a2a 100644
--- a/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
+++ b/UefiCpuPkg/Library/CpuCacheInfoLib/CpuCacheInfoLib.c
@@ -348,7 +348,8 @@ CpuCacheInfoCollectCpuCacheInfoData (
if ((LocalCacheInfo[CacheInfoIndex].Package == ProcessorInfo[Index / MAX_NUM_OF_CACHE_PARAMS_LEAF].Package) &&
(LocalCacheInfo[CacheInfoIndex].CoreType == ProcessorInfo[Index / MAX_NUM_OF_CACHE_PARAMS_LEAF].CoreType) &&
(LocalCacheInfo[CacheInfoIndex].CacheLevel == CacheData[Index].CacheLevel) &&
- (LocalCacheInfo[CacheInfoIndex].CacheType == CacheData[Index].CacheType))
+ (LocalCacheInfo[CacheInfoIndex].CacheType == CacheData[Index].CacheType) &&
+ (LocalCacheInfo[CacheInfoIndex].CacheSizeinKB == CacheData[Index].CacheSizeinKB))
{
LocalCacheInfo[CacheInfoIndex].CacheCount++;
break;
--
2.39.1.windows.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119624): https://edk2.groups.io/g/devel/message/119624
Mute This Topic: https://groups.io/mt/106754527/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 3:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-18 13:34 [edk2-devel] [PATCH 0/1] UefiCpuPkg: Correct the count of different type of Cache Yuanhao Xie
2024-06-18 13:34 ` [edk2-devel] [PATCH 1/1] " Yuanhao Xie
-- strict thread matches above, loose matches on Subject: below --
2024-06-19 3:44 [edk2-devel] [PATCH 0/1] " Yuanhao Xie
2024-06-19 3:44 ` [edk2-devel] [PATCH 1/1] " Yuanhao Xie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox