[edk2-devel] [PATCH edk2-platforms 1/1] QemuSbsa: enable WriteCombine for the FrameBuffer

2024-06-18 Thread Marcin Juszkiewicz
QEMU no longer permits misaligned access to device memory, which breaks
QemuVideoDxe on SbsaQemu.

c1d1910be6e04a8b1a73090cf2881fb698947a6e commit in EDK2 fixed it by
enabling WriteCombine for Framebuffer memory. This change enables that
fix.

Signed-off-by: Marcin Juszkiewicz 
---
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index b012eaa34147..11126bcaa1fe 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -311,6 +311,9 @@ [PcdsFeatureFlag.common]
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE
   gEfiMdeModulePkgTokenSpaceGuid.PcdConOutUgaSupport|FALSE
 
+  # Enable WriteCombine for FrameBuffer
+  gUefiOvmfPkgTokenSpaceGuid.PcdRemapFrameBufferWriteCombine|TRUE
+
 [PcdsFixedAtBuild.common]
   gEfiMdePkgTokenSpaceGuid.PcdMaximumUnicodeStringLength|100
   gEfiMdePkgTokenSpaceGuid.PcdMaximumAsciiStringLength|100
-- 
2.45.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119626): https://edk2.groups.io/g/devel/message/119626
Mute This Topic: https://groups.io/mt/106755714/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Cancelled Event: TianoCore Bug Triage - APAC / NAMO - Wednesday, June 19, 2024 #cal-cancelled

2024-06-18 Thread Group Notification
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Groups.io Inc//Groups.io Calendar//EN
METHOD:CANCEL
REFRESH-INTERVAL;VALUE=DURATION:PT1H
X-PUBLISHED-TTL:PT1H
CALSCALE:GREGORIAN
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
LAST-MODIFIED:20240422T053451Z
TZURL:https://www.tzurl.org/zoneinfo-outlook/America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZNAME:PDT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
DTSTART:19700308T02
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:PST
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
DTSTART:19701101T02
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
X-GIOIDS:Event:2345313 
UID:mlda.1580078539586725120.r...@groups.io
DTSTAMP:20240619T052045Z
ORGANIZER;CN=Liming Gao;SENT-BY="mailto:gaolim...@byosoft.com.cn":mailto:
 gaolim...@byosoft.com.cn
DTSTART:20240620T003000Z
DTEND:20240620T013000Z
SUMMARY:TianoCore Bug Triage - APAC / NAMO
DESCRIPTION:TianoCore Bug Triage - APAC / NAMO\n\nHosted by Liming Gao\n\
 n
 \n\nMicrosoft Teams meeting\n\n*Join on your computer or mobile a
 pp*\n\nClick here to join the meeting ( https://teams.microsoft.com/l/mee
 tup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40
 thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255
 d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d )\n\n*Jo
 in with a video conferencing device*\n\nte...@conf.intel.com\n\nVideo Con
 ference ID: 116 062 094 0\n\nAlternate VTC dialing instructions ( https:/
 /conf.intel.com/teams/?conf=1160620940&ivr=teams&d=conf.intel.com&test=te
 st_call )\n\n*Or call in (audio only)*\n\n+1 916-245-6934\,\,77463821# ( 
 tel:+19162456934\,\,77463821# ) United States\, Sacramento\n\nPhone Confe
 rence ID: 774 638 21#\n\nFind a local number ( https://dialin.teams.micro
 soft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821 ) | Reset PIN (
  https://mysettings.lync.com/pstnconferencing )\n\nLearn More ( https://a
 ka.ms/JoinTeamsMeeting ) | Meeting options ( https://teams.microsoft.com/
 meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e&tenantId
 =46c98d88-e344-4ed4-8496-4ed7712e255d&threadId=19_meeting_OTUyZTg2NjgtNDh
 lNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2&messageId=0&language=en-US )
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN
 2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-
 1242-431b-9a51-92cd01a5df3c%22%7d
SEQUENCE:2
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


[edk2-devel] [PATCH 1/1] UefiCpuPkg: Correct the count of different type of Cache.

2024-06-18 Thread Yuanhao Xie
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 
Cc: Eric Dong 
Cc: Ray Ni 
Cc: Rahul Kumar 
Cc: Tom Lendacky 
Signed-off-by: xieyuanh 
---
 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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 0/1] UefiCpuPkg: Correct the count of different type of Cache.

2024-06-18 Thread Yuanhao Xie
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 (#119623): https://edk2.groups.io/g/devel/message/119623
Mute This Topic: https://groups.io/mt/106740627/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: UsbBusDxe: Rebuild Descriptor Table

2024-06-18 Thread Chang, Abner via groups.io
[AMD Official Use Only - AMD Internal Distribution Only]

Hi Liming,
I created PR here: https://github.com/tianocore/edk2/pull/5794

Thanks
Abner

From: gaoliming 
Sent: Tuesday, June 18, 2024 1:37 PM
To: devel@edk2.groups.io; Chang, Abner ; Chesley, Brit 

Subject: 回复: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: UsbBusDxe: Rebuild 
Descriptor Table

Caution: This message originated from an External Source. Use proper caution 
when opening attachments, clicking links, or responding.

Abner:
  Is PR for this change?

Thanks
Liming
发件人: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>> 代表 Chang, Abner via 
groups.io
发送时间: 2024年6月18日 10:50
收件人: Chesley, Brit mailto:brit.ches...@amd.com>>; 
devel@edk2.groups.io
主题: Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg: UsbBusDxe: Rebuild Descriptor 
Table

Hi Hao,
What is your comment on the response from Brit? Hoping that I didn't miss the 
latest conversation of this thread.

Thanks
Abner



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119622): https://edk2.groups.io/g/devel/message/119622
Mute This Topic: https://groups.io/mt/106752962/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Wednesday, June 19, 2024 #cal-reminder

2024-06-18 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Wednesday, June 19, 2024
5:30pm to 6:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d

*Organizer:*
Liming Gao
gaolim...@byosoft.com.cn ( 
gaolim...@byosoft.com.cn?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO
 )

View Event ( https://edk2.groups.io/g/devel/viewevent?eventid=2345313 )

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao



Microsoft Teams meeting

*Join on your computer or mobile app*

Click here to join the meeting ( 
https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTk1YzJhN2UtOGQwNi00NjY4LWEwMTktY2JiODRlYTY1NmY0%40thread.v2/0?context=%7b%22Tid%22%3a%2246c98d88-e344-4ed4-8496-4ed7712e255d%22%2c%22Oid%22%3a%226e4ce4c4-1242-431b-9a51-92cd01a5df3c%22%7d
 )

*Join with a video conferencing device*

te...@conf.intel.com

Video Conference ID: 116 062 094 0

Alternate VTC dialing instructions ( 
https://conf.intel.com/teams/?conf=1160620940&ivr=teams&d=conf.intel.com&test=test_call
 )

*Or call in (audio only)*

+1 916-245-6934,,77463821# ( tel:+19162456934,,77463821# ) United States, 
Sacramento

Phone Conference ID: 774 638 21#

Find a local number ( 
https://dialin.teams.microsoft.com/d195d438-2daa-420e-b9ea-da26f9d1d6d5?id=77463821
 ) | Reset PIN ( https://mysettings.lync.com/pstnconferencing )

Learn More ( https://aka.ms/JoinTeamsMeeting ) | Meeting options ( 
https://teams.microsoft.com/meetingOptions/?organizerId=b286b53a-1218-4db3-bfc9-3d4c5aa7669e&tenantId=46c98d88-e344-4ed4-8496-4ed7712e255d&threadId=19_meeting_OTUyZTg2NjgtNDhlNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2&messageId=0&language=en-US
 )


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119621): https://edk2.groups.io/g/devel/message/119621
Mute This Topic: https://groups.io/mt/106752477/21656
Mute #cal-reminder:https://edk2.groups.io/g/devel/mutehashtag/cal-reminder
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [edk2-platforms][PATCH 1/2] IpmiFeaturePkg/GenericIpmi: add IpmiFeaturePkg.dec to packages list

2024-06-18 Thread Mike Maslenkin
GCC is unable to find a header file located into IpmiFeaturePkg:
  fatal error: Library/ServerMgmtRtLib.h: No such file or directory
 11 | #include 
|  ^~~

Signed-off-by: Mike Maslenkin 
Cc: Nate DeSimone 
Cc: Liming Gao 
---
 .../Library/ServerManagementLibNull/ServerManagementLibNull.inf  | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/ServerManagementLibNull/ServerManagementLibNull.inf
 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/ServerManagementLibNull/ServerManagementLibNull.inf
index 6b66b44857f3..8bde6fbaa7be 100644
--- 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/ServerManagementLibNull/ServerManagementLibNull.inf
+++ 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/Library/ServerManagementLibNull/ServerManagementLibNull.inf
@@ -27,6 +27,7 @@
 
 
 [Packages]
+  IpmiFeaturePkg/IpmiFeaturePkg.dec
   MdePkg/MdePkg.dec
   ServerPlatformPkg/PlatformPkg.dec
 
-- 
2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119619): https://edk2.groups.io/g/devel/message/119619
Mute This Topic: https://groups.io/mt/106750821/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [edk2-platforms][PATCH 2/2] IpmiFeaturePkg/GenericIpmi: add EFIAPI for driver entrypoints

2024-06-18 Thread Mike Maslenkin
Fix gcc build failure:
IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c:414:1:
  error: conflicting types for 'InitializeSmmGenericIpmi'
  414 | InitializeSmmGenericIpmi (
  | ^~~~
In file included from :
IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi/DEBUG/AutoGen.h:138:1:
  note: previous declaration of 'InitializeSmmGenericIpmi' was here
  138 | InitializeSmmGenericIpmi (
  | ^~~~

Signed-off-by: Mike Maslenkin 
Cc: Nate DeSimone 
Cc: Liming Gao 
---
 .../OutOfBandManagement/IpmiFeaturePkg/BmcElog/Dxe/BmcElog.c | 1 +
 .../IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c  | 1 +
 .../GenericIpmi/StandaloneMm/StandaloneMmGenericIpmi.c   | 1 +
 3 files changed, 3 insertions(+)

diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/Dxe/BmcElog.c 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/Dxe/BmcElog.c
index 0b1e2f5b1355..cd627ea799a2 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/Dxe/BmcElog.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcElog/Dxe/BmcElog.c
@@ -258,6 +258,7 @@ SetElogRedirInstall (
 
 **/
 EFI_STATUS
+EFIAPI
 InitializeBmcElogLayer (
   IN EFI_HANDLEImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c
 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c
index 23493733178a..976bb69c956b 100644
--- 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c
+++ 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/Smm/SmmGenericIpmi.c
@@ -410,6 +410,7 @@ Returns:
 }
 
 EFI_STATUS
+EFIAPI
 InitializeSmmGenericIpmi (
   IN EFI_HANDLEImageHandle,
   IN EFI_SYSTEM_TABLE  *SystemTable
diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/StandaloneMm/StandaloneMmGenericIpmi.c
 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/StandaloneMm/StandaloneMmGenericIpmi.c
index edc9eec9395a..a7faa0e1f37f 100644
--- 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/StandaloneMm/StandaloneMmGenericIpmi.c
+++ 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/GenericIpmi/StandaloneMm/StandaloneMmGenericIpmi.c
@@ -330,6 +330,7 @@ Returns:
 
 **/
 EFI_STATUS
+EFIAPI
 InitializeGenericIpmiStandaloneMm (
   IN EFI_HANDLE   ImageHandle,
   IN EFI_MM_SYSTEM_TABLE  *SystemTable
-- 
2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119620): https://edk2.groups.io/g/devel/message/119620
Mute This Topic: https://groups.io/mt/106750822/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [edk2-platforms][PATCH 0/2] IpmiFeaturePkg: compilation fix

2024-06-18 Thread Mike Maslenkin
Signed-off-by: Mike Maslenkin 
Cc: Nate DeSimone 
Cc: Liming Gao 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119618): https://edk2.groups.io/g/devel/message/119618
Mute This Topic: https://groups.io/mt/106750820/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] GitHub PR review process for edk2-test

2024-06-18 Thread G Edhaya Chandran
Hi Mike,

Further to the new GitHub PR review process for EDKII,
can we adapt this process for edk2-test repository contributions too?

Can we start by piloting on the upcoming edk2-test code contributions?

With Warm Regards,
Edhay (on behalf of edk2-test maintainers)

Reference: 
https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Development-Process

IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119617): https://edk2.groups.io/g/devel/message/119617
Mute This Topic: https://groups.io/mt/106750281/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH v8 2/5] ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.c

2024-06-18 Thread Sam Kaynor
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352

Implemented dumping of the Image Execution Table using Dmem.c

Cc: Ray Ni 
Cc: Zhichao Gao 
Signed-off-by: Sam Kaynor 
Tested-by: Stuart Yoder 
Reviewed-by: Stuart Yoder 
Reviewed-by: Zhichao Gao 
---

Notes:
v8:
- corrected CI failure on bad type cast
- various CI changes
v5:
- corrected comment for GetBaseName
- corrected style error (spaces before '(')
v4:
- changed Image Execution output to match spec
v3:
- fixed build erros
- added setwidth formatting to output
- properly using Address variable

 ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 
136 
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni |   
3 +
 2 files changed, 139 insertions(+)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
index d4030798f3cb..80c779a0b369 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
@@ -139,6 +139,138 @@ DisplayRtProperties (
   return (ShellStatus);
 }
 
+/**
+  Retrieve the ImageExecutionTable Entry ImageName from ImagePath
+
+  @param[in]  FileNameThe full path of the image.
+  @param[out] BaseNameThe name of the image.
+**/
+EFI_STATUS
+GetBaseName (
+  IN  CHAR16  *FileName,
+  OUT CHAR16  **BaseName
+  )
+{
+  UINTN   StrLen;
+  CHAR16  *StrTail;
+
+  StrLen = StrSize (FileName);
+
+  for (StrTail = FileName + StrLen - 1; StrTail != FileName && *StrTail != 
L'\\'; StrTail--) {
+  }
+
+  if (StrTail == FileName) {
+return EFI_NOT_FOUND;
+  }
+
+  *BaseName = StrTail+1;
+
+  return EFI_SUCCESS;
+}
+
+/**
+  Retrieve the ImageExecutionTable entries.
+**/
+EFI_STATUS
+GetImageExecutionInfo (
+  )
+{
+  EFI_STATUS  Status;
+  EFI_IMAGE_EXECUTION_INFO_TABLE  *ExecInfoTablePtr;
+  EFI_IMAGE_EXECUTION_INFO*InfoPtr;
+  CHAR8   *ptr;
+  CHAR16  *ImagePath;
+  CHAR16  *ImageName;
+  UINTN   Image;
+  UINTN   *NumberOfImages;
+  CHAR16  *ActionType;
+
+  EfiGetSystemConfigurationTable (&gEfiImageSecurityDatabaseGuid, (VOID 
**)&ExecInfoTablePtr);
+
+  NumberOfImages = &ExecInfoTablePtr->NumberOfImages;
+
+  ptr = (CHAR8 *)ExecInfoTablePtr + 1;
+
+  for (Image = 0; Image < *NumberOfImages; Image++, ptr += InfoPtr->InfoSize) {
+InfoPtr   = (EFI_IMAGE_EXECUTION_INFO *)ptr;
+ImagePath = (CHAR16 *)(InfoPtr + 1);
+
+GetBaseName (ImagePath, &ImageName);
+
+switch (InfoPtr->Action) {
+  case EFI_IMAGE_EXECUTION_AUTHENTICATION:
+ActionType = L"AUTHENTICATION";
+break;
+  case EFI_IMAGE_EXECUTION_AUTH_UNTESTED:
+ActionType = L"AUTH_UNTESTED";
+break;
+  case EFI_IMAGE_EXECUTION_AUTH_SIG_FAILED:
+ActionType = L"AUTH_SIG_FAILED";
+break;
+  case EFI_IMAGE_EXECUTION_AUTH_SIG_PASSED:
+ActionType = L"AUTH_SIG_PASSED";
+break;
+  case EFI_IMAGE_EXECUTION_AUTH_SIG_NOT_FOUND:
+ActionType = L"AUTH_SIG_NOT_FOUND";
+break;
+  case EFI_IMAGE_EXECUTION_AUTH_SIG_FOUND:
+ActionType = L"AUTH_SIG_FOUND";
+break;
+  case EFI_IMAGE_EXECUTION_POLICY_FAILED:
+ActionType = L"POLICY_FAILED";
+break;
+  case EFI_IMAGE_EXECUTION_INITIALIZED:
+ActionType = L"INITIALIZED";
+break;
+  default:
+ActionType = L"invalid action";
+}
+
+Status = ShellPrintHiiEx (
+   -1,
+   -1,
+   NULL,
+   STRING_TOKEN (STR_DMEM_IMG_EXE_ENTRY),
+   gShellDebug1HiiHandle,
+   ImageName,
+   ActionType
+   );
+  }
+
+  return Status;
+}
+
+/**
+  Display the ImageExecutionTable entries
+
+  @param[in] AddressThe pointer to the ImageExecutionTable.
+**/
+SHELL_STATUS
+DisplayImageExecutionEntries (
+  IN UINT64  Address
+  )
+{
+  SHELL_STATUS  ShellStatus;
+  EFI_STATUSStatus;
+
+  ShellStatus = SHELL_SUCCESS;
+
+  if (Address != 0) {
+ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_IMG_EXE_TABLE), 
gShellDebug1HiiHandle);
+Status = GetImageExecutionInfo ();
+if (EFI_ERROR (Status)) {
+  ShellStatus = SHELL_ABORTED;
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_GET_FAIL), 
gShellDebug1HiiHandle, L"ImageExecutionTable");
+}
+  } else {
+ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_NOT_FOUND), 
gShellDebug1HiiHandle, L"ImageExecutionTable");
+  }
+
+  return (ShellStatus);
+}
+
+
+
 STATIC CONST SHELL_PARAM_ITEM  ParamList[] = {
   { L"-mmio",TypeFlag },
   { L"-verbose", TypeFlag },
@@ -369,6 +501,10 @@ ShellCommandRunDmem (
   if (ShellStatus == SHELL_SUCCESS) {
 ShellStatus = DisplayRtProperties (RtP

[edk2-devel] [PATCH v8 3/5] MdePkg: Adding support for EFI_CONFORMANCE_PROFILE_TABLE

2024-06-18 Thread Sam Kaynor
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352

Adding support for EFI_CONFORMANCE_PROFILE_TABLE by adding an
associated header file and relevant GUIDs to MdePkg.dec as defined
in the UEFI 2.10 spec.
This table is needed to address changes being made within ShellPkg.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Signed-off-by: Sam Kaynor 
---

Notes:
v8:
- Added copyright information
- Fixed CI formatting
v7:
- Separated out Guids from UEFI and EBBR
v6:
- Added patch to address MdePkg changes separately

 MdePkg/MdePkg.dec |  4 ++
 MdePkg/Include/Guid/ConformanceProfiles.h | 57 
 2 files changed, 61 insertions(+)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 94170ff9a4a1..3a9a0fec241e 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -751,6 +751,10 @@ [Guids]
   ## Include/Guid/DeviceAuthentication.h
   gEfiDeviceSignatureDatabaseGuid  = { 0xb9c2b4f4, 0xbf5f, 0x462d, {0x8a, 
0xdf, 0xc5, 0xc7, 0xa, 0xc3, 0x5d, 0xad }}
 
+  ## Include/Guid/ConformanceProfiles.h
+  gEfiConfProfilesTableGuid= { 0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 
0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}
+  gEfiConfProfilesUefiSpecGuid = { 0x523c91af, 0xa195, 0x4382, { 0x81, 
0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
+
   #
   # GUID defined in PI1.0
   #
diff --git a/MdePkg/Include/Guid/ConformanceProfiles.h 
b/MdePkg/Include/Guid/ConformanceProfiles.h
new file mode 100644
index ..550501123151
--- /dev/null
+++ b/MdePkg/Include/Guid/ConformanceProfiles.h
@@ -0,0 +1,57 @@
+/** @file
+  GUIDs used for UEFI Conformance Profiles Table in the UEFI 2.10 
specification.
+
+  Copyright (c) 2024, Arm Limited. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef CONFORMANCE_PROFILES_TABLE_GUID_H_
+#define CONFORMANCE_PROFILES_TABLE_GUID_H_
+
+//
+// This table allows the platform to advertise its UEFI specification 
conformance
+// in the form of pre-defined profiles. Each profile is identified by a GUID, 
with
+// known profiles listed in the section below.
+// The absence of this table shall indicate that the platform implementation is
+// conformant with the UEFI specification requirements, as defined in Section 
2.6.
+// This is equivalent to publishing this configuration table with the
+// EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID conformance profile.
+//
+#define EFI_CONFORMANCE_PROFILES_TABLE_GUID \
+  { \
+0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 
0x0b } \
+  }
+
+#pragma pack(1)
+
+typedef struct {
+  ///
+  /// Version of the table must be 0x1
+  ///
+  UINT16Version;
+  ///
+  /// The number of profiles GUIDs present in ConformanceProfiles
+  ///
+  UINT16NumberOfProfiles;
+  ///
+  /// An array of conformance profile GUIDs that are supported by this system.
+  /// EFI_GUIDConformanceProfiles[];
+  ///
+} EFI_CONFORMANCE_PROFILES_TABLE;
+
+#pragma pack()
+
+#define EFI_CONFORMANCE_PROFILES_TABLE_VERSION  0x1
+
+//
+// GUID defined in spec.
+//
+#define EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID \
+{ 0x523c91af, 0xa195, 0x4382, \
+{ 0x81, 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
+
+extern EFI_GUID  gEfiConfProfilesTableGuid;
+extern EFI_GUID  gEfiConfProfilesUefiSpecGuid;
+
+#endif
-- 
2.34.1



[edk2-devel] [PATCH v8 4/5] MdePkg: Adding EBBR EFI_CONFORMANCE_PROFILE_TABLE GUIDs

2024-06-18 Thread Sam Kaynor
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352

Adding additional GUIDs for the EFI_CONFORMANCE_PROFILE_TABLE
that are defined in the Embedded Base Boot Requirments (EBBR)
Specification.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Signed-off-by: Sam Kaynor 
---

Notes:
v7:
- Added patch to spearate EBBR from UEFI Guids

 MdePkg/MdePkg.dec |  6 ++
 MdePkg/Include/Guid/ConformanceProfiles.h | 12 +++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 3a9a0fec241e..5dbe5a9f729a 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -755,6 +755,12 @@ [Guids]
   gEfiConfProfilesTableGuid= { 0x36122546, 0xf7e7, 0x4c8f, { 0xbd, 
0x9b, 0xeb, 0x85, 0x25, 0xb5, 0x0c, 0x0b }}
   gEfiConfProfilesUefiSpecGuid = { 0x523c91af, 0xa195, 0x4382, { 0x81, 
0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
 
+  # GUIDs defined in EBBR
+  #
+  ## Include/Guid/ConformanceProfiles.h
+  gEfiConfProfilesEbbrSpec21Guid = { 0xcce33c35, 0x74ac, 0x4087, { 0xbc, 
0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
+  gEfiConfProfilesEbbrSpec22Guid = { 0x9073eed4, 0xe50d, 0x11ee, { 0xb8, 
0xb0, 0x8b, 0x68, 0xda, 0x62, 0xfc, 0x80 }}
+
   #
   # GUID defined in PI1.0
   #
diff --git a/MdePkg/Include/Guid/ConformanceProfiles.h 
b/MdePkg/Include/Guid/ConformanceProfiles.h
index 550501123151..bf89ab61dd44 100644
--- a/MdePkg/Include/Guid/ConformanceProfiles.h
+++ b/MdePkg/Include/Guid/ConformanceProfiles.h
@@ -45,12 +45,22 @@ typedef struct {
 #define EFI_CONFORMANCE_PROFILES_TABLE_VERSION  0x1
 
 //
-// GUID defined in spec.
+// GUID defined in UEFI 2.10
 //
 #define EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID \
 { 0x523c91af, 0xa195, 0x4382, \
 { 0x81, 0x8d, 0x29, 0x5f, 0xe4, 0x00, 0x64, 0x65 }}
 
+//
+// GUID defined in EBBR
+//
+#define EFI_CONFORMANCE_PROFILE_EBBR_2_1_GUID \
+{ 0xcce33c35, 0x74ac, 0x4087, \
+{ 0xbc, 0xe7, 0x8b, 0x29, 0xb0, 0x2e, 0xeb, 0x27 }}
+#define EFI_CONFORMANCE_PROFILE_EBBR_2_2_GUID \
+{ 0x9073eed4, 0xe50d, 0x11ee, \
+{ 0xb8, 0xb0, 0x8b, 0x68, 0xda, 0x62, 0xfc, 0x80 }}
+
 extern EFI_GUID  gEfiConfProfilesTableGuid;
 extern EFI_GUID  gEfiConfProfilesUefiSpecGuid;
 
-- 
2.34.1



[edk2-devel] [PATCH v8 5/5] ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c

2024-06-18 Thread Sam Kaynor
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352

Implemented dumping of the UEFI Conformance Profiles Table using Dmem.c
Uses header file for GUIDs added in previous patches

Cc: Ray Ni 
Cc: Zhichao Gao 
Signed-off-by: Sam Kaynor 
Tested-by: Stuart Yoder 
Reviewed-by: Stuart Yoder 
---

Notes:
v8:
- various CI fixes
- removed bad type cast
v7:
- Added output for EBBR 2.2 Guid
v6:
- Moved MdePkg changes to separate patch
v5:
- corrected style error (spaces before '(')
v3:
- fixed build errors
- properly using Address variable
- removed unecessary comment in header file

 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf |  
4 +
 ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 
80 
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni |  
5 ++
 3 files changed, 89 insertions(+)

diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
index 3741dac5d94c..140e9dc64418 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf
@@ -139,3 +139,7 @@ [Guids]
   gEfiJsonConfigDataTableGuid ## SOMETIMES_CONSUMES ## SystemTable
   gEfiJsonCapsuleDataTableGuid## SOMETIMES_CONSUMES ## SystemTable
   gEfiJsonCapsuleResultTableGuid  ## SOMETIMES_CONSUMES ## SystemTable
+  gEfiConfProfilesTableGuid   ## SOMETIMES_CONSUMES ## SystemTable
+  gEfiConfProfilesUefiSpecGuid## SOMETIMES_CONSUMES ## GUID
+  gEfiConfProfilesEbbrSpec21Guid  ## SOMETIMES_CONSUMES ## GUID
+  gEfiConfProfilesEbbrSpec22Guid  ## SOMETIMES_CONSUMES ## GUID
diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
index 80c779a0b369..046cfd527025 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 /**
   Make a printable character.
@@ -269,7 +270,77 @@ DisplayImageExecutionEntries (
   return (ShellStatus);
 }
 
+/**
+  Display the ConformanceProfileTable entries
 
+  @param[in] AddressThe pointer to the ConformanceProfileTable.
+**/
+SHELL_STATUS
+DisplayConformanceProfiles (
+  IN UINT64  Address
+  )
+{
+  SHELL_STATUSShellStatus;
+  EFI_STATUS  Status;
+  EFI_GUID*EntryGuid;
+  CHAR16  *GuidName;
+  UINTN   Profile;
+  EFI_CONFORMANCE_PROFILES_TABLE  *ConfProfTable;
+
+  ShellStatus = SHELL_SUCCESS;
+
+  if (Address != 0) {
+EfiGetSystemConfigurationTable (&gEfiConfProfilesTableGuid, (VOID 
**)&ConfProfTable);
+
+ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_CONF_PRO_TABLE), 
gShellDebug1HiiHandle);
+
+EntryGuid = (EFI_GUID *)(ConfProfTable + 1);
+
+for (Profile = 0; Profile < ConfProfTable->NumberOfProfiles; Profile++, 
EntryGuid++) {
+  GuidName = L"Unknown_Profile";
+
+  if (CompareGuid (EntryGuid, &gEfiConfProfilesUefiSpecGuid)) {
+GuidName = L"EFI_CONFORMANCE_PROFILE_UEFI_SPEC_GUID";
+  }
+
+  if (CompareGuid (EntryGuid, &gEfiConfProfilesEbbrSpec21Guid)) {
+GuidName = L"EBBR_2.1";
+  }
+
+  if (CompareGuid (EntryGuid, &gEfiConfProfilesEbbrSpec22Guid)) {
+GuidName = L"EBBR_2.2";
+  }
+
+  Status = ShellPrintHiiEx (
+ -1,
+ -1,
+ NULL,
+ STRING_TOKEN (STR_DMEM_CONF_PRO_ROW),
+ gShellDebug1HiiHandle,
+ GuidName,
+ EntryGuid
+ );
+}
+
+if (EFI_ERROR (Status)) {
+  ShellStatus = SHELL_ABORTED;
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_GET_FAIL), 
gShellDebug1HiiHandle, L"ComformanceProfilesTable");
+}
+  } else {
+ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_CONF_PRO_TABLE), 
gShellDebug1HiiHandle);
+ShellPrintHiiEx (
+  -1,
+  -1,
+  NULL,
+  STRING_TOKEN (STR_DMEM_CONF_PRO_ROW),
+  gShellDebug1HiiHandle,
+  L"EFI_CONFORMANCE_PROFILES_UEFI_SPEC_GUID",
+  &gEfiConfProfilesUefiSpecGuid
+  );
+  }
+
+  return (ShellStatus);
+}
 
 STATIC CONST SHELL_PARAM_ITEM  ParamList[] = {
   { L"-mmio",TypeFlag },
@@ -461,6 +532,11 @@ ShellCommandRunDmem (
   HiiDatabaseExportBufferAddress = 
(UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
   continue;
 }
+
+if (CompareGuid (&gST->ConfigurationTable[TableWalker].VendorGuid, 
&gEfiConfProfilesTableGuid)) {
+  ConformanceProfileTableAddress = 
(UINT64)(UINTN)gST->ConfigurationTable[TableWalker].VendorTable;
+  continue;
+}
   }

[edk2-devel] [PATCH v8 0/5] Adding support for verbose UEFI Table dumping to Dmem.c

2024-06-18 Thread Sam Kaynor
This adds an additional option to the dmem UEFI shell command for verbose 
dumping of a couple of UEFI tables.

The tables specified are the RT Properties Table, Image Execution Table, and 
Conformance Profiles Table.

Supporting objects are odded in the .inf and .uni files relating to Dmem.c and 
an additional header file for the Conformance Profiles Table was added.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352

PR: https://github.com/tianocore/edk2/pull/5679

v7->v8:
- All CI errors were corrected

Cc: Ray Ni 
Cc: Zhichao Gao 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Stuart Yoder 
Signed-off-by: Sam Kaynor 

Sam Kaynor (5):
  ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c
  ShellPkg: UefiShellDebug1CommandsLib: Image Execution Table in Dmem.c
  MdePkg: Adding support for EFI_CONFORMANCE_PROFILE_TABLE
  MdePkg: Adding EBBR EFI_CONFORMANCE_PROFILE_TABLE GUIDs
  ShellPkg: UefiShellDebug1CommandsLib: Conformance Profiles in Dmem.c

 MdePkg/MdePkg.dec  |  
10 +
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.inf |   
4 +
 MdePkg/Include/Guid/ConformanceProfiles.h  |  
67 +
 ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 
282 +++-
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni |  
31 ++-
 5 files changed, 390 insertions(+), 4 deletions(-)
 create mode 100644 MdePkg/Include/Guid/ConformanceProfiles.h

-- 
2.34.1



[edk2-devel] [PATCH v8 1/5] ShellPkg: UefiShellDebug1CommandsLib: Dumping RT Properties in Dmem.c

2024-06-18 Thread Sam Kaynor
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4352

Implemented the dumping of the UEFI RT Properties Table using Dmem.c

Added new entry to the help command for the -verbose option

Cc: Ray Ni 
Cc: Zhichao Gao 
Signed-off-by: Sam Kaynor 
Tested-by: Stuart Yoder 
Reviewed-by: Stuart Yoder 
Reviewed-by: Zhichao Gao 
---

Notes:
v8:
- Fixed style errors
v5:
- corrected style error (spaces before '(')
v4:
- fixed crash when RTProperties table not present
- expanded help output to include -verbose option
v3:
- fixed build errors
- properly using Address variable

 ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c | 
66 +++-
 ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni | 
23 ++-
 2 files changed, 85 insertions(+), 4 deletions(-)

diff --git a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
index a609971f345e..d4030798f3cb 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/Dmem.c
@@ -84,9 +84,65 @@ DisplayMmioMemory (
   return (ShellStatus);
 }
 
+/**
+  Display the RtPropertiesTable entries
+
+  @param[in] AddressThe pointer to the RtPropertiesTable.
+**/
+SHELL_STATUS
+DisplayRtProperties (
+  IN UINT64  Address
+  )
+{
+  EFI_RT_PROPERTIES_TABLE  *RtPropertiesTable;
+  UINT32   RtServices;
+  SHELL_STATUS ShellStatus;
+  EFI_STATUS   Status;
+
+  ShellStatus = SHELL_SUCCESS;
+
+  if (Address != 0) {
+EfiGetSystemConfigurationTable (&gEfiRtPropertiesTableGuid, (VOID 
**)&RtPropertiesTable);
+
+RtServices = (UINT32)RtPropertiesTable->RuntimeServicesSupported;
+Status = ShellPrintHiiEx (
+   -1,
+   -1,
+   NULL,
+   STRING_TOKEN (STR_DMEM_RT_PROPERTIES),
+   gShellDebug1HiiHandle,
+   EFI_RT_PROPERTIES_TABLE_VERSION,
+   (RtServices & EFI_RT_SUPPORTED_GET_TIME) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_SET_TIME) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_GET_WAKEUP_TIME) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_SET_WAKEUP_TIME) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_GET_VARIABLE) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_GET_NEXT_VARIABLE_NAME) ? 1 
: 0,
+   (RtServices & EFI_RT_SUPPORTED_SET_VARIABLE) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_SET_VIRTUAL_ADDRESS_MAP) ? 1 
: 0,
+   (RtServices & EFI_RT_SUPPORTED_CONVERT_POINTER) ? 1 : 0,
+   (RtServices & 
EFI_RT_SUPPORTED_GET_NEXT_HIGH_MONOTONIC_COUNT) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_RESET_SYSTEM) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_UPDATE_CAPSULE) ? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_QUERY_CAPSULE_CAPABILITIES) 
? 1 : 0,
+   (RtServices & EFI_RT_SUPPORTED_QUERY_VARIABLE_INFO) ? 1 : 0
+   );
+
+if (EFI_ERROR (Status)) {
+  ShellStatus = SHELL_ABORTED;
+  ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_GET_FAIL), 
gShellDebug1HiiHandle, L"RtPropertiesTable");
+}
+  } else {
+ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMEM_ERR_NOT_FOUND), 
gShellDebug1HiiHandle, L"RtPropertiesTable");
+  }
+
+  return (ShellStatus);
+}
+
 STATIC CONST SHELL_PARAM_ITEM  ParamList[] = {
-  { L"-mmio", TypeFlag },
-  { NULL, TypeMax  }
+  { L"-mmio",TypeFlag },
+  { L"-verbose", TypeFlag },
+  { NULL,TypeMax  }
 };
 
 /**
@@ -308,6 +364,12 @@ ShellCommandRunDmem (
 ConformanceProfileTableAddress
 );
 }
+
+if (ShellCommandLineGetFlag (Package, L"-verbose")) {
+  if (ShellStatus == SHELL_SUCCESS) {
+ShellStatus = DisplayRtProperties (RtPropertiesTableAddress);
+  }
+}
   } else {
 ShellStatus = DisplayMmioMemory (Address, (UINTN)Size);
   }
diff --git 
a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni 
b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
index 4041f0cd483e..a2241614f109 100644
--- a/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
+++ b/ShellPkg/Library/UefiShellDebug1CommandsLib/UefiShellDebug1CommandsLib.uni
@@ -126,8 +126,26 @@
   "Memory Range Capsule
  %016LX\r\n"
   "Hii Database Export Buffer  
  %016LX\r\n"
   "Conformance Profile Table   
  %016LX\r\n"
-
-
+#string STR_DMEM_RT_PROPERTIES#language en-US "\r\nRT Properties Table\r\n"
+  
"-

Re: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : make python368.inf compile conditionally in AppPkg.dsc

2024-06-18 Thread Michael D Kinney
Reviewed-by: Michael D Kinney 


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Jayaprakash, N
> Sent: Monday, June 17, 2024 11:46 PM
> To: devel@edk2.groups.io
> Cc: Jayaprakash, N ; Rebecca Cran
> ; Kinney, Michael D 
> Subject: [edk2-devel] [edk2-libc Patch 1/1] edk2-libc : make python368.inf
> compile conditionally in AppPkg.dsc
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4789
> 
> This commit adds necessary changes to AppPkg.dsc file for
> conditional compilation of python368.inf. To enable compilation
> of python368.inf users need to pass an additional parameter
> to the build command as -D BUILD_PYTHON368.
> Also updated the Py368ReadMe.txt and the GCCCompilationBKMs.rst
> to include this additional information for building python368.inf.
> 
> Cc: Rebecca Cran 
> Cc: Michael D Kinney 
> Cc: Jayaprakash N 
> Signed-off-by: Jayaprakash N 
> ---
>  AppPkg/AppPkg.dsc| 9 ++---
>  .../Python/Python-3.6.8/GCCCompilationBKMs.rst   | 6 ++
>  AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt  | 9 +++--
>  3 files changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/AppPkg/AppPkg.dsc b/AppPkg/AppPkg.dsc
> index e5a6c5e..89f9f1d 100644
> --- a/AppPkg/AppPkg.dsc
> +++ b/AppPkg/AppPkg.dsc
> @@ -7,7 +7,7 @@
>  #   for important information about configuring this package for your
>  #   environment.
>  #
> -#   Copyright (c) 2010 - 2021, Intel Corporation. All rights reserved.
> +#   Copyright (c) 2010 - 2024, Intel Corporation. All rights reserved.
>  #   SPDX-License-Identifier: BSD-2-Clause-Patent
>  ##
> 
> @@ -120,8 +120,11 @@
>gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x80400040
>}
> 
> - Un-comment the following line to build Python 3.6.8.
> -# AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> + Conditional compilation of python368.inf by passing -D BUILD_PYTHON368
> + through build command
> +  !if $(BUILD_PYTHON368)
> +AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> +  !endif
> 
>   Un-comment the following line to build Lua.
>  #  AppPkg/Applications/Lua/Lua.inf
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> index 525bef8..0574977 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> +++ b/AppPkg/Applications/Python/Python-3.6.8/GCCCompilationBKMs.rst
> @@ -150,17 +150,15 @@ Copy the contents of edk2-libc to edk2 folder::
> 
>  2.5.  Build Python Interpreter using GCC
>  
> -Uncomment the line containing following inf file name in AppPkg/AppPkg.dsc
> file
> -AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> 
>  Execute the below command to build the X64 version of the Python 3.6.8
> interpreter using GCC tool chain::
> 
>  bash$ cd AppPkg/Applications/Python/Python-3.6.8/
>  bash$ python srcprep.py
>  bash$ cd ~/src/edk2
> -bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -m
> AppPkg/Applications/Python/Python-3.6.8/Python368.inf
> +bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -m
> AppPkg/Applications/Python/Python-3.6.8/Python368.inf -D BUILD_PYTHON368
>   or
> -bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc
> +bash$ build -a X64 -b RELEASE -p AppPkg/AppPkg.dsc -D
> BUILD_PYTHON368
> 
> 
>  2.5  Create Python UEFI package with all dependencies
> diff --git a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> index a6e65fe..5753443 100644
> --- a/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> +++ b/AppPkg/Applications/Python/Python-3.6.8/Py368ReadMe.txt
> @@ -68,12 +68,9 @@ and that you can successfully build packages within that
> distribution.
>  gc  itertools   math  _operator
>  time
> 
> -  C.  Edit AppPkg/AppPkg.dsc to enable (uncomment) the Python368.inf line
> -within the [Components] section.
> -
> -  D.  Build AppPkg using the standard "build" command:
> +  C.  Build AppPkg using the standard "build" command:
>  For example, to build Python for an X64 CPU architecture:
> -build -a X64 -p AppPkg\AppPkg.dsc
> +build -a X64 -p AppPkg\AppPkg.dsc -D BUILD_PYTHON368
> 
>  4. Python-related paths and files
>  =
> @@ -133,7 +130,7 @@ system as follows:
>2. Uncomment BsdSocketLib and EfiSocketLib LibraryClasses in Python368.inf
>3. Uncomment the statement #Modules/socketmodule.c in Python368.inf
>4. Build Python interpreter application using below command
> -  build -a X64 -p AppPkg\AppPkg.dsc
> +  build -a X64 -p AppPkg\AppPkg.dsc -D BUILD_PYTHON368
>5. Copy Build\AppPkg\RELEASE_VS2017\X64\Python.efi to \Efi\Tools on your
>   target system. Replace "RELEASE_VS2017", in

[edk2-devel] [PATCH 1/1] UefiCpuPkg: Correct the count of different type of Cache.

2024-06-18 Thread Yuanhao Xie
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 kra...@redhat.com
Cc: Eric Dong eric.d...@intel.com
Cc: Ray Ni ray...@intel.com
Cc: Rahul Kumar rahul1.ku...@intel.com
Cc: Tom Lendacky thomas.lenda...@amd.com
Signed-off-by: xieyuanh 
---
 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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




[edk2-devel] [PATCH 0/1] UefiCpuPkg: Correct the count of different type of Cache.

2024-06-18 Thread Yuanhao Xie
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/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory allocation for SP type

2024-06-18 Thread Dhaval Sharma
I already sent out an update yesterday. PTAL when you get a chance. Thanks!

On Sat, Jun 15, 2024 at 10:24 AM Kinney, Michael D <
michael.d.kin...@intel.com> wrote:

> Liming,
>
> It is here, but needs some commit message updates
>
> https://github.com/tianocore/edk2/pull/5760
>
> Mike
>
> > -Original Message-
> > From: devel@edk2.groups.io  On Behalf Of
> gaoliming via
> > groups.io
> > Sent: Friday, June 14, 2024 8:05 PM
> > To: devel@edk2.groups.io; dha...@rivosinc.com
> > Subject: 回复: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory
> > allocation for SP type
> >
> > Can you create pull request for this change? I will add my review for it.
> >
> > > -邮件原件-
> > > 发件人: devel@edk2.groups.io  代表 Dhaval Sharma
> > > 发送时间: 2024年6月11日 12:09
> > > 收件人: devel@edk2.groups.io
> > > 抄送: Liming Gao 
> > > 主题: [edk2-devel] [PATCH v1 1/1] MdeModulePkg: Avoid efi memory
> > allocation
> > > for SP type
> > >
> > > Most of the times it is desirable not to use special purpose
> > > memory for regular edk2 usages. That memory (HBm/CXL) are
> > > either meant for special purposes or are less reliable to
> > > be used. So avoid using them as long as possible. We could
> > > also introduce PCD for this control.
> > >
> > > Cc: Liming Gao 
> > > Signed-off-by: Dhaval Sharma 
> > > ---
> > >  MdeModulePkg/Core/Dxe/Mem/Page.c | 7 +++
> > >  1 file changed, 7 insertions(+)
> > >
> > > diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c
> > > b/MdeModulePkg/Core/Dxe/Mem/Page.c
> > > index 5a51d9df1a29..e4daa741b971 100644
> > > --- a/MdeModulePkg/Core/Dxe/Mem/Page.c
> > > +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c
> > > @@ -1183,6 +1183,13 @@ CoreFindFreePagesI (
> > >continue;
> > >
> > >  }
> > >
> > >
> > >
> > > +//
> > >
> > > +// Don't allocate out of Special-Purpose memory.
> > >
> > > +//
> > >
> > > +if ((Entry->Attribute & EFI_MEMORY_SP) != 0) {
> > >
> > > +  continue;
> > >
> > > +}
> > >
> > > +
> > >
> > >  DescStart = Entry->Start;
> > >
> > >  DescEnd   = Entry->End;
> > >
> > >
> > >
> > > --
> > > 2.40.1
> > >
> > >
> > >
> > > -=-=-=-=-=-=
> > > Groups.io Links: You receive all messages sent to this group.
> > > View/Reply Online (#119545):
> https://edk2.groups.io/g/devel/message/119545
> > > Mute This Topic: https://groups.io/mt/106607739/4905953
> > > Group Owner: devel+ow...@edk2.groups.io
> > > Unsubscribe: https://edk2.groups.io/g/devel/unsub
> > > [gaolim...@byosoft.com.cn]
> > > -=-=-=-=-=-=
> > >
> >
> >
> >
> >
> >
> > 
> >
>
>

-- 
Thanks!
=D


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#119607): https://edk2.groups.io/g/devel/message/119607
Mute This Topic: https://groups.io/mt/106683481/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: Install MigrateTempRamPpi

2024-06-18 Thread Li, Zhihao
Hi

The change in MdeModulePkg have been merged now. Could you please help to 
review the patch in IntelFsp2WrapperPkg.
I had sent the patch on Apr 30. I can send it again if you need.
This is the PR link for IntelFsp2WrapperPkg: 
https://github.com/tianocore/edk2/pull/5601/commits/290d3347c45d359da3ff1ccd50f290a45767d43a

Thanks a lot.

BR,
Zhihao

-Original Message-
From: gaoliming  
Sent: Saturday, June 15, 2024 11:16 AM
To: Li, Zhihao ; devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Duggapu, Chinni B 
; Chen, Gang C 
Subject: 回复: [edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: Install 
MigrateTempRamPpi

Zhihao:
  I have no other comment for the change in MdeModulePkg. Please create pull 
request for it. 

Thanks
Liming
> -邮件原件-
> 发件人: Li, Zhihao 
> 发送时间: 2024年6月11日 15:36
> 收件人: gaoliming ; devel@edk2.groups.io
> 抄送: Chiu, Chasel ; Desimone, Nathaniel L 
> ; Duggapu, Chinni B 
> ; Chen, Gang C 
> 主题: RE: [edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: Install 
> MigrateTempRamPpi
> 
> Hi Liming
> 
> If there are no concerns about it, could you please help to review the 
> patch in MdeModulePkg scope and check in?
> And then, I contact with the maintainers of IntelFsp2WrapperPkg for 
> another patch review.
> 
> BR,
> Zhihao
> 
> -Original Message-
> From: Li, Zhihao
> Sent: Thursday, May 30, 2024 2:32 PM
> To: gaoliming ; devel@edk2.groups.io
> Cc: Chiu, Chasel ; Desimone, Nathaniel L 
> ; Duggapu, Chinni B 
> ; Chen, Gang C 
> Subject: RE: [edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: 
> Install MigrateTempRamPpi
> 
> Yes, they are used.
> Refer to https://bugzilla.tianocore.org/show_bug.cgi?id=2376 , Fsp 
> binary measurement has been implemented and controlled by 
> PcdFspMeasurementConfig.
> Current defect:
> 1. FSP-T/FSP-M may not be migrated.
> 2. Even if FSP-M has been migrated, its measurement still used the 
> original address.
> Corresponding modifications:
> In MdeModulePkg scope:
> 1. Add the gEdkiiPeiMigrateTempRamPpiGuid and install it after 
> EvacuateTempRam is called.
> In IntelFsp2WrapperPkg scope:
> 1. Add MigrateTempRamPpi notification which will check the migration 
> of FSP-T/M and migrate them if they are not migrated but need to be measured.
> 2. Fix Tcg notification to use migrated address if the binaries had been 
> migrated.
> 
> BR,
> Zhihao
> 
> -Original Message-
> From: gaoliming 
> Sent: Thursday, May 30, 2024 1:12 PM
> To: devel@edk2.groups.io; Li, Zhihao 
> Cc: Chiu, Chasel ; Desimone, Nathaniel L 
> ; Duggapu, Chinni B 
> ; Chen, Gang C 
> Subject: 回复: [edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: 
> Install MigrateTempRamPpi
> 
> Zhihao:
>   If Fsp-T/M is not installed, are they still used in PEI boot? If 
> they are used, I agree they should be measured.
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: devel@edk2.groups.io  代表 Li, Zhihao
> > 发送时间: 2024年5月29日 11:36
> > 收件人: gaoliming ; devel@edk2.groups.io
> > 抄送: Chiu, Chasel ; Desimone, Nathaniel L 
> > ; Duggapu, Chinni B 
> > ; Chen, Gang C 
> > 主题: Re: [edk2-devel] [PATCH v1 1/2] MdeModulePkg/Core/Pei: Install 
> > MigrateTempRamPpi
> >
> > Issue description:
> > 1. PeiCore only migrates Fsp-M in dispatch mode and doesn't migrate 
> > Fsp-T and Fsp-M in Api mode.
> > 2. Fsp-T and Fsp-M will be measured in post-mem PEI and the 
> > measurement uses original addresses.
> > RootCause:
> > PeiCore only migrates installed FVs and Fsp-T/M may not be installed.
> >
> > Defect in implementation:
> > In MdeModulePkg/Core/Pei/PeiMain/PeiMain.c line 450:
> > EvacuateTempRam will migrate installed content from Temporary RAM to 
> > Permanent RAM because of BootGuard TOCTOU 
> > vulnerability(https://bugzilla.tianocore.org/show_bug.cgi?id=1614).
> > In IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c line 220:
> > FspmWrapperInit will install Fspm in dispatch mode or directly call 
> > PeiFspMemoryInit function in api mode.
> > ==>
> > Api mode: Fsp-T and Fsp-M are not migrated because they are not installed.
> > Dispatch mode: Fsp-T is not migrated because it is not installed.
> >
> > In IntelFsp2WrapperPkg/FspmWrapperPeim/FspmWrapperPeim.c line 291,
> 300:
> > TcgPpiNotify transmits original addresses(PcdFsptBaseAddress,
> > PcdFspmBaseAddress) to MeasureFspFirmwareBlob which will trigger 
> > HashLogExtendEvent.
> > In SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c line 966:
> > TcgPpi will be installed in PeimEntryMP which will be called when 
> > the PEI Foundation discovers permanent memory(line 1059 
> > mImageInMemory =
> TRUE).
> > ==>
> > Original addresses of Fsp-T and Fsp-M will be used for measurement 
> > after permanent memory is ready and installed FVs are migrated.
> >
> >
> > Solution:
> > MdeModulePkg: PeiCore Installs MigrateTempRamPpi if 
> > PcdMigrateTemporaryRamFirmwareVolumes is True.
> > IntelFsp2WrapperPkg : 1. MigrateTempRamPpi nitification in 
> > FspmWrapperPeim migrates FspT/M binary to permanent memory and build
> MigatedFvInfoHob.
> >