[edk2-devel] [PATCH] AlderlakeOpenBoardPkg: Change MinPlatform MinDsdt and Update SpiFlashCommonLib

2024-03-25 Thread dorax . hsueh
From: DoraX Hsueh 

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

1. Change MinPlatform MinDsdt to fix hang logo issue.
2. Update SecFspWrapperPlatformSecLib for FSP use.
3. Update SpiFlashCommonLib to fix boot assert issue.
4. Create SmmLocked callback to fix assert

Cc: Sai Chaganty 
Cc: Rosen Chuang 
Cc: Saloni Kasbekar 
Cc: Haoyu Tang 
Cc: Nate DeSimone 
Signed-off-by: DoraX Hsueh 
---
 .../Acpi/MinDsdt/MinDsdt.asl  |  68 ---
 .../Acpi/MinDsdt/MinDsdt.c| 232 ---
 .../Acpi/MinDsdt/MinDsdt.inf  |  48 ---
 .../AlderlakePRvp/OpenBoardPkg.dsc|   6 +-
 .../AlderlakePRvp/OpenBoardPkg.fdf|   2 +-
 .../AlderlakePRvp/OpenBoardPkgPcd.dsc |   8 +
 .../FspWrapperPlatformSecLib.c| 186 +
 .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h | 394 ++
 .../SecFspWrapperPlatformSecLib/Ia32/Fsp.h|  42 ++
 .../Ia32/PeiCoreEntry.nasm| 130 ++
 .../Ia32/SecEntry.nasm| 361 
 .../Ia32/Stack.nasm   |  72 
 .../PlatformInit.c|  47 +++
 .../SecFspWrapperPlatformSecLib.inf   | 106 +
 .../SecGetPerformance.c   |  89 
 .../SecPlatformInformation.c  |  78 
 .../SecRamInitData.c  |  57 +++
 .../SecTempRamDone.c  |  93 +
 .../Include/Library/SpiFlashCommon.h  |  99 -
 .../SmmSpiFlashCommonLib.inf  |  49 ---
 .../SmmSpiFlashCommonLib/SpiFlashCommon.c | 215 --
 .../SpiFlashCommonSmmLib.c|  60 ---
 .../OpenBoardPlatformInitPostMem.c|  96 +
 .../OpenBoardPlatformInitPostMem.inf  |  20 -
 .../DxeSaPolicyInit.c |  71 
 .../DxeSiliconPolicyUpdateLib.inf |   2 +
 .../PeiCpuPolicyUpdatePreMem.c|   3 -
 .../PeiPolicyUpdateLib/PeiPolicyUpdateLib.inf |   3 +-
 28 files changed, 1742 insertions(+), 895 deletions(-)
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
 delete mode 100644 Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.c
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FspWrapperPlatformSecLib.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Fsp.h
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/PeiCoreEntry.nasm
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/Stack.nasm
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/PlatformInit.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecGetPerformance.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecPlatformInformation.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecRamInitData.c
 create mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecTempRamDone.c
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Include/Library/SpiFlashCommon.h
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SmmSpiFlashCommonLib.inf
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommon.c
 delete mode 100644 
Platform/Intel/AlderlakeOpenBoardPkg/Library/SmmSpiFlashCommonLib/SpiFlashCommonSmmLib.c

diff --git a/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl 
b/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
deleted file mode 100644
index be110145..
--- a/Platform/Intel/AlderlakeOpenBoardPkg/Acpi/MinDsdt/MinDsdt.asl
+++ /dev/null
@@ -1,68 +0,0 @@
-/** @file
-  ACPI minimum DSDT table
-
-   Copyright (c) 2022, Intel Corporation. All rights reserved.
-   SPDX-License-Identifier: BSD-2-Clause-Patent
-
-**/
-
-DefinitionBlock (
-  "DSDT.aml",
-  "DSDT",
-  0x01, // DSDT revision.
-// A Revision field value greater than or equal to 2 signifies that 
integers
-// declared within the Definition Block are to be evaluated as 64-bit 
values
-  "INTEL ",   // OEM ID (6 byte 

Re: [edk2-devel] [PATCH 1/3] CryptoPkg/BaseCryptLib: add additional RSAEP-OAEP crypto functions

2024-03-25 Thread Li, Yi
Hi Chris,

1. Add BZ link to commit message,
2. Add null implementation of new APIs to BaseCryptLibMbedTls to avoid build 
error.
For other comments please check the PR: 
https://github.com/tianocore/edk2/pull/5473

Regards,
Yi

-Original Message-
From: Chris Ruffin  
Sent: Tuesday, March 19, 2024 10:16 PM
To: Li, Yi1 ; devel@edk2.groups.io
Cc: Chris Ruffin ; Yao, Jiewen 
; Hou, Wenxing 
Subject: RE: [PATCH 1/3] CryptoPkg/BaseCryptLib: add additional RSAEP-OAEP 
crypto functions


Hi Yi, thanks for  your email.  I created a Bugzilla ticket for this, see 
Bugzilla ID #4732: https://bugzilla.tianocore.org/show_bug.cgi?id=4732.  The 
Pkcs1v2Encrypt() API is maintained but the implementation is refactored.  There 
is currently no Pkcs1v2Decrypt(), this is also a newly implemented API but the 
converse of Pkcs1v2Encypt().  Pkcs1v2Encrypt() (existing) and Pkcs1v2Decrypt() 
(new) both take they keys from DER-encoded certificates/keys.  RsaOaepEncrypt() 
and RsaOaepDecrypt() both take keys from RsaContext.  The internal functions 
use a common ENV_PKEY.

More from the Bugzilla:

BasecryptLib currently only provides RSAES-OAEP encryption capability with 
Pkcs1v2Encrypt() which takes as input a DER encoded x.509 certificate.  A DXE 
application which needs access to RSAES-OAEP encryption and decryption 
capabilities currently only has the option of statically linking OpensslLib and 
using functions such as RSA_public_encrypt() and RSA_private_decrypt().  These 
applications would benefit from an expanded access to RSAES-OAEP encryption / 
decryption capability in BaseCryptLib so that the shared crypto driver can be 
used and the applciation can be migrated away from RSA_public_decrypt() and 
RSA_private_decrypt() which are deprecated in Openssl 3.

There is the following challenges with migrating to BaseCryptLib interfaces:

1) BaseCryptLib Pkcs1v2Encrypt() requires the use of an X.509 
DER-encoded certificate to pass the public key.  This interface is dissimilar 
from the rest of the RSA APIs in BasecryptLib.  Applications that have used 
other RSA APIs from BaseCryptLib for key generation and management such as 
RsaGenerateKey() and RsaSetKey() will not have such a structure available.
2) BaseCryptLib currently exposes no decryption capability.

This feature provides an easy migration path for drivers/applications which 
need access to RSAES-OAEP encryption / decryption and that are currently using 
an RsaContext structure to pass key components to OpensslLib. These 
applications can be easily migrated to one of the new APIs to remove the direct 
dependency on OpensslLib, migrate away from deprecated interfaces, take 
advantage of CryptoPkg/Driver, and get BasecryptLib access to RSAES-OAEP 
decryption.

Key changes proposed:
InternalPkcs1v2Encrypt(): New internal-only function created from refactoring 
of Pkcs1v2Encrypt().  Takes key input from an ENV_PKEY and is used by both 
public functions Pkcs1v2Encrypt() and RsaOaepEncrypt().

Pkcs1v2Encrypt(): has been refactored to create InternalPkcs1v2Encrypt() but 
the public interface is maintained.

RsaOaepEncrypt(): New function takes key input from an RsaContext, creates an 
ENV_PKEY, and calls InternalPkcs1v2Encrypt()

InternalPkcs1v2Decrypt(): New internal-only function InternalPkcs1v2Decrypt() 
takes key input from an ENV_PKEY and provides the RSAES-OAEP decryption 
capability to Pkcs1v2Decrypt() and RsaOaepDecrypt().

Pkcs1v2Decrypt(): New public function Pkcs1v2Decrypt() takes a DER-encoded 
private key, creates an ENV_PKEY, and calls InternalPkcs1v2Decrypt()

RsaOaepDecrypt(): New public function RsaOaepDecrypt() takes a pointer to 
RsaContext, creates an ENV_PKEY, and calls InternalPkcs1v2Decrypt()

Thanks,

Chris


-Original Message-
From: Li, Yi1  
Sent: Monday, March 18, 2024 11:52 PM
To: Chris Ruffin ; devel@edk2.groups.io
Cc: Chris Ruffin ; Yao, Jiewen 
; Hou, Wenxing 
Subject: RE: [PATCH 1/3] CryptoPkg/BaseCryptLib: add additional RSAEP-OAEP 
crypto functions

[You don't often get email from yi1...@intel.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

Hi Chris,

1. Please create a feature request BugZilla to introduce the background of the 
new API, such as purpose and application scenarios.
2. I took a quick look, the new API will make Pkcs1v2De/Encrypt support 
RsaContext input and the rest is same as old API right?

Regards,
Yi

-Original Message-
From: Chris Ruffin 
Sent: Tuesday, March 19, 2024 5:52 AM
To: devel@edk2.groups.io
Cc: Chris Ruffin ; Yao, Jiewen 
; Li, Yi1 ; Hou, Wenxing 

Subject: [PATCH 1/3] CryptoPkg/BaseCryptLib: add additional RSAEP-OAEP crypto 
functions

From: Chris Ruffin 

Expand the availability of the RSAEP-OAEP crypto capability in BaseCryptLib.  
Applications using RSA crypto functions directly from OpensslLib can transition 
to BaseCryptLib to take advantage of the shared crypto feature in CryptoDxe.

Pkcs1v2Decrypt(): decryption using 

Re: [edk2-devel] [PATCH] IpmiFeaturePkg: Add missed call to FreePool

2024-03-25 Thread Chiu, Chasel


Reviewed-by: Chasel Chiu 

Thanks,
Chasel


> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of
> phanindrax.babu.pa...@intel.com
> Sent: Thursday, February 22, 2024 10:52 PM
> To: devel@edk2.groups.io
> Cc: Pabba, PhanindraX Babu ; Desimone,
> Nathaniel L ; Liming Gao
> 
> Subject: [edk2-devel] [PATCH] IpmiFeaturePkg: Add missed call to FreePool
> 
> From: PhanindraX Babu Pabba 
> 
> Adding missed out call to FreePool API to free the allocated memory.
> 
> Cc: Nate DeSimone 
> Cc: Liming Gao 
> Signed-off-by: PhanindraX Babu Pabba 
> ---
>  .../Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c   | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
> index 990b4b9e..070a3452 100644
> ---
> a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
> +++
> b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.
> +++ c
> @@ -250,6 +250,7 @@ BmcAcpiEntryPoint (
>// Increment the instance   //   Instance++;+  FreePool
> (CurrentTable); }   } --
> 2.39.1.windows.1
> 
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#115876): https://edk2.groups.io/g/devel/message/115876
> Mute This Topic: https://groups.io/mt/104524860/1777047
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub [chasel.c...@intel.com] -=-
> =-=-=-=-=
> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117101): https://edk2.groups.io/g/devel/message/117101
Mute This Topic: https://groups.io/mt/104524860/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 00/13] Part 2 patch set to add LoongArch support into UefiCpuPkg

2024-03-25 Thread Chao Li

Hi Ray,

I responded your comments yesterday, it looks like we have different 
opinions on patches 10 and 11, the rest looks fine.


Could you please consider patches 10 and 11? I think this way is 
probably the best solution. I hope this series to be merged as soon as 
passable, because the next series is depedent on this series. :)


Hope to hear back from you!


Thanks,
Chao
On 2024/3/25 11:10, Chao Li wrote:


Hi Ray,

Thank you for reviewing my patch series very carefully.

Here are my comments:

On 2024/3/25 10:46, Ni, Ray wrote:

Chao,
Thank you for your patience for preparing the new version of patches.
However, I still have following minor comments:

For patches 1~6: Reviewed-by: Ray Ni 
For patches 7: can you define meaning of bits in the Attributes/Mask? 
It seems you are reusing the definitions defined for 7.2.3 
EFI_BOOT_SERVICES.GetMemoryMap(). It's fine. But please mention that 
in comments. Also please use UINT64 for Attributes instead of UINTN.
Yes, I'm reusing the definitions defined for 7.2.3, I will illustrate 
in the comments next time. About the UINTN, I will fix it next time.
For patches 8: Can you rename PcdCpuExceptionVectorBaseAddress to 
PcdLoongArch64ExceptionVectorBaseAddress and put the PCD 
definition/reference in the DEC/INF LoongArch64 section?

OK, I will rename it next time.
For patches 9: Please make accordingly changes when you address 
comments for patch 7.

OK.
For patches 10, 11: Can the lib be avoided if the logic is 
implemented in CpuDxe driver?


This library is will be called in the PEI stage, so I can't move it 
under the CpuDxe.


This library is the low-level libary of CpuMmuLib, which will consume 
CpuMmuLIb to configure the MMU.


This way is suggested by Laszlo, who saied if CpuMmuLib can not 
content the configure API(high-level libary is the basecal libaray, it 
should not include the configure API), we can split it into two, where 
the hight-livel is CpuMmuLib, and the low-level is CpuMmuInitLib.


For patch 12(UefiCpuPkg: Add multiprocessor library for LoongArch64): 
Reviewed-by: Ray Ni 
For patch 13: Please make accordingly changes when you address 
comments for patch 8.

OK.


Thanks,
Ray

*From:* Gerd Hoffmann 
*Sent:* Friday, March 22, 2024 20:39
*To:* Chao Li 
*Cc:* devel@edk2.groups.io ; Ni, Ray 
; Kumar, Rahul R ; Sami 
Mujawar ; Sunil V L ; 
Bibo Mao ; Dongyan Qian 
*Subject:* Re: [PATCH v2 00/13] Part 2 patch set to add LoongArch 
support into UefiCpuPkg

On Wed, Mar 20, 2024 at 04:41:52PM +0800, Chao Li wrote:
> This patch set adjusted some order in UefiCpuPig alphabetically, added
> LoongArch libraries and drivers into UefiCpuPkg, it is a 
continuation of

> the first patch series v8 submitted at
> https://edk2.groups.io/g/devel/message/114526.
>
> And also separated from https://edk2.groups.io/g/devel/message/116583.
>
> This series only contents the changes for UefiCpuPkg.
>
> Patch1-Patch4: Reorder some INF files located in UefiCpuPkg
> alphabetically.
>
> Patch5-Patch13: Added Timer, CpuMmuLib, CpuMmuInitLib, MpInitLib, 
CpuDxe

> for LoongArch, and added some PCD and header files requested by the
> above libraries and drivers.
>
> Modfied modules: UefiCpuPkg
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4726
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4734
>
> PR: https://github.com/tianocore/edk2/pull/5483
>
> V1 -> V2:
> 1. Removed PcdCpuMmuIsEnabled.
> 2. Removed API GetMemoryRegionAttributes API as it is no longer needed.
> 3. Patch3, added two empty line in DXE and PEI INF files.
> 4. Patch5, added the Status check in GetTimeInnanoSecond function.
> 5. Separated into two series, this is series one, and the second one is
> OvmfPkg.

While I can't comment on the loongarch architecture details the code
and the integration into build system looks overall sane to me.

Series:
Acked-by: Gerd Hoffmann 

take care,
  Gerd






-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117100): https://edk2.groups.io/g/devel/message/117100
Mute This Topic: https://groups.io/mt/105041080/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 - Tuesday, March 26, 2024 #cal-reminder

2024-03-25 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Tuesday, March 26, 2024
6:30pm to 7: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=2159771 )

*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=teams=conf.intel.com=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=46c98d88-e344-4ed4-8496-4ed7712e255d=19_meeting_OTUyZTg2NjgtNDhlNS00ODVlLTllYTUtYzg1OTNjNjdiZjFh@thread.v2=0=en-US
 )


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117099): https://edk2.groups.io/g/devel/message/117099
Mute This Topic: https://groups.io/mt/105151221/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]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH] Platform/Loongson: Remove minimium memory size limitation

2024-03-25 Thread maobibo




On 2024/3/25 下午5:25, xianglai wrote:

From: Bibo Mao 

Temparory stack memory on PEI is hardcoded now, also minimium memory
size 256M is hardcoded now. Here memory map table from fw cfg can be
parsed. If there is memory map entry contains pei stack, it can be
published as usable memory at PEI stage.

Signed-off-by: Bibo Mao 
Signed-off-by: Xianglai Li 
Cc: Bibo Mao 
Cc: Chao Li 
---
  .../Loongson/LoongArchQemuPkg/Loongson.dec|  2 -
  .../Loongson/LoongArchQemuPkg/Loongson.dsc|  6 ---
  .../LoongArchQemuPkg/PlatformPei/MemDetect.c  | 37 ++-
  .../PlatformPei/PlatformPei.inf   |  2 -
  4 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dec 
b/Platform/Loongson/LoongArchQemuPkg/Loongson.dec
index e638b835e4..c2c6cc9596 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dec
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dec
@@ -48,8 +48,6 @@
  
gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamBase|0|UINT64|0x000b

gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamSize|0|UINT32|0x000c
-  gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop|0x0|UINT64|0x000d
-  gLoongArchQemuPkgTokenSpaceGuid.PcdRamRegionsBottom|0x0|UINT64|0x000e
gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecFvBase|0x0|UINT64|0x000f
gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecFvSize|0x0|UINT32|0x0010
  
diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc

index 58aa16d3a9..aab2ca9b28 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
@@ -356,12 +356,6 @@
gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamBase | 
0x1
gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamSize | 
0x1
gLoongArchQemuPkgTokenSpaceGuid.PcdDeviceTreeBase| 
0x10
-  #
-  # minimal memory for uefi bios should be 512M
-  # 0x - 0x1000
-  # 0x9000 - 0xA000
-  #
-  gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop| 
0x1000
gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions   | 0x06
  
gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile| { 0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 0x66, 0x23, 0x31 }

diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c 
b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
index 7e6a4a3aa9..03d1b0b75d 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
@@ -40,12 +40,47 @@ PublishPeiMemory (
UINT64 Base;
UINT64  Size;
UINT64  RamTop;
+  FIRMWARE_CONFIG_ITEM FwCfgItem;
+  UINTNFwCfgSize;
+  UINTNProcessed;
+  LOONGARCH_MEMMAP_ENTRY  MemoryMapEntry;
  
//

// Determine the range of memory to use during PEI
//
Base = PcdGet64 (PcdSecPeiTempRamBase) + PcdGet32 (PcdSecPeiTempRamSize);
-  RamTop = PcdGet64 (PcdUefiRamTop);
+  RamTop = 0;
+
+  Status = QemuFwCfgFindFile ("etc/memmap", , );
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  if (FwCfgSize % sizeof MemoryMapEntry != 0) {
+return EFI_PROTOCOL_ERROR;
+  }
+
+  QemuFwCfgSelectItem (FwCfgItem);
+  for (Processed = 0; Processed < FwCfgSize; Processed += sizeof 
MemoryMapEntry) {
+QemuFwCfgReadBytes (sizeof MemoryMapEntry, );
+if (MemoryMapEntry.Type != EfiAcpiAddressRangeMemory) {
+  continue;
+}
+
+/*
+ * Find memory map entry where PEI temp stack is located
+ */
+if ((MemoryMapEntry.BaseAddr <= Base) &&
+(Base < (MemoryMapEntry.BaseAddr + MemoryMapEntry.Length))) {
+RamTop = MemoryMapEntry.BaseAddr + MemoryMapEntry.Length;

Xianglai,

Will it be better if there is one "break" sentence?

Regards
Bibo Mao


+}
+  }
+
+  if (RamTop == 0) {
+DEBUG ((DEBUG_ERROR, "ERROR: No memory map entry contains temp stack \n"));
+ASSERT (FALSE);
+  }
+
Size = RamTop - Base;
  
//

diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf 
b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
index 6cc3513b63..65591a4d7b 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
@@ -64,8 +64,6 @@
  [FixedPcd]
gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvBase
gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvSize
-  gLoongArchQemuPkgTokenSpaceGuid.PcdRamRegionsBottom
-  gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop
gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamBase
gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamSize
gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize





-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117098): 

Re: [edk2-devel] Cancelled Event: Tools, CI, Code base construction meeting series - Monday, March 25, 2024 #cal-cancelled

2024-03-25 Thread Sean
No requests listed here: Tools and CI Meeting - vNext - Date TBD · 
tianocore/edk2 · Discussion #5366 (github.com) 



Cancelling for today.


Thanks

Sean



On 3/25/2024 4:16 PM, Group Notification wrote:


*Cancelled: Tools, CI, Code base construction meeting series*

This event has been cancelled.

*When:*
Monday, March 25, 2024
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d 



*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to 
discuss build, CI, tools, and other related topics. If you are 
interested, have ideas/opinions please join us. These meetings will be 
Monday 4:30pm Pacific Time on Microsoft Teams.


MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614


Anyone is welcome to join.

  * tianocore/edk2: EDK II (github.com)
  * tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP
module (github.com) https://github.com/tianocore/edk2-basetools
  * tianocore/edk2-pytool-extensions: Extensions to the edk2 build
system allowing for a more robust and plugin based build system
and tool execution environment (github.com)
https://github.com/tianocore/edk2-pytool-extensions
  * tianocore/edk2-pytool-library: Python library package that
supports UEFI development (github.com)
https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client



devel@edk2.groups.io Group has cancelled this event: Tools, CI, Code 
base construction meeting series

Title:  Tools, CI, Code base construction meeting series
Location: 
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d 


When:   Monday, March 25, 2024 4:30 PM – 5:30 PM




Organizer:  
devel@edk2.groups.io Group 
Description:TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to 
discuss build, CI, tools, and other related topics. If you are 
interested, have ideas/opinions please join us. These meetings will be 
Monday 4:30pm Pacific Time on Microsoft Teams.


MS Teams Link in following discussion:
* https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP 
module (github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build 
system allowing for a more robust and plugin based build system and 
tool execution environment (github.com) 
https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports 
UEFI development (github.com) 
https://github.com/tianocore/edk2-pytool-library


MS Teams Browser Clients
* 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client 














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




[edk2-devel] Cancelled Event: Tools, CI, Code base construction meeting series - Monday, March 25, 2024 #cal-cancelled

2024-03-25 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:20231222T233358Z
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:2159776 
UID:rvop.1647284497725488626.j...@groups.io
DTSTAMP:20240325T231628Z
ORGANIZER;CN=devel@edk2.groups.io Group;SENT-BY="mailto:devel@edk2.groups
 .io":mailto:devel@edk2.groups.io
DTSTART:20240325T233000Z
DTEND:20240326T003000Z
SUMMARY:Tools\, CI\, Code base construction meeting series
DESCRIPTION:TianoCore community\,\n\nMicrosoft and Intel will be hosting 
 a series of open meetings to discuss build\, CI\, tools\, and other relat
 ed topics. If you are interested\, have ideas/opinions please join us. Th
 ese meetings will be Monday 4:30pm Pacific Time on Microsoft Teams.\n\nMS
  Teams Link in following discussion:\n* https://github.com/tianocore/edk2
 /discussions/2614\n\nAnyone is welcome to join.\n\n* tianocore/edk2: EDK 
 II (github.com)\n* tianocore/edk2-basetools: EDK II BaseTools Python tool
 s as a PIP module (github.com) https://github.com/tianocore/edk2-basetool
 s\n* tianocore/edk2-pytool-extensions: Extensions to the edk2 build syste
 m allowing for a more robust and plugin based build system and tool execu
 tion environment (github.com) https://github.com/tianocore/edk2-pytool-ex
 tensions\n* tianocore/edk2-pytool-library: Python library package that su
 pports UEFI development (github.com) https://github.com/tianocore/edk2-py
 tool-library\n\nMS Teams Browser Clients\n* https://docs.microsoft.com/en
 -us/microsoftteams/get-clients?tabs=Windows#browser-client
LOCATION:https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4N
 mMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%2
 2%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-
 6e1c-450d-b917-d9d674eb3cb6%22%7d
SEQUENCE:1
STATUS:CANCELLED
END:VEVENT
END:VCALENDAR


invite.ics
Description: application/ics


Re: [edk2-devel] [PATCH] MinPlatformPkg: Add missed call to FreePool

2024-03-25 Thread Nate DeSimone
Hi Babu,

If the call to InitializeHeader() fails then the buffer will still not be 
de-allcoated properly. Please add a Done: label and a goto Done; so that the 
buffer will still be freed in the case of an error.

Thanks,
Nate

-Original Message-
From: Pabba, PhanindraX Babu  
Sent: Thursday, February 22, 2024 10:01 PM
To: devel@edk2.groups.io
Cc: Pabba, PhanindraX Babu ; Chiu, Chasel 
; Desimone, Nathaniel L 
; Liming Gao ; Dong, 
Eric 
Subject: [PATCH] MinPlatformPkg: Add missed call to FreePool

From: PhanindraX Babu Pabba 

Adding missed out call to FreePool API to free the allocated memory.

Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Liming Gao 
Cc: Eric Dong 
Signed-off-by: PhanindraX Babu Pabba 
---
 Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c | 2 +-
 Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c 
b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
index 2a833ec9..f637e1c9 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/AcpiTables/AcpiPlatform.c
@@ -1002,7 +1002,7 @@ InstallMcfgFromScratch (
  McfgTable->Header.Length,  
  );-+  FreePool (McfgTable);   return 
Status; } diff --git a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c 
b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
index 9bc22245..f5b1a71c 100644
--- a/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
+++ b/Platform/Intel/MinPlatformPkg/Acpi/MinDsdt/MinDsdt.c
@@ -195,6 +195,7 @@ PublishAcpiTablesFromFv (
   // Increment the instance   //   Instance++;+  FreePool 
(CurrentTable);   CurrentTable = NULL; }   }-- 
2.39.1.windows.1



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




Re: [edk2-devel] [PATCH] IpmiFeaturePkg: Add missed call to FreePool

2024-03-25 Thread Nate DeSimone
Pushed as 6feac9b

-Original Message-
From: Pabba, PhanindraX Babu  
Sent: Thursday, February 22, 2024 10:52 PM
To: devel@edk2.groups.io
Cc: Pabba, PhanindraX Babu ; Desimone, 
Nathaniel L ; Liming Gao 

Subject: [PATCH] IpmiFeaturePkg: Add missed call to FreePool

From: PhanindraX Babu Pabba 

Adding missed out call to FreePool API to free the allocated memory.

Cc: Nate DeSimone 
Cc: Liming Gao 
Signed-off-by: PhanindraX Babu Pabba 
---
 .../Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
index 990b4b9e..070a3452 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
@@ -250,6 +250,7 @@ BmcAcpiEntryPoint (
   // Increment the instance
   //
   Instance++;
+  FreePool (CurrentTable);
 }
   }
 
-- 
2.39.1.windows.1



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




Re: [edk2-devel] [PATCH] IpmiFeaturePkg: Add missed call to FreePool

2024-03-25 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Pabba, PhanindraX Babu  
Sent: Thursday, February 22, 2024 10:52 PM
To: devel@edk2.groups.io
Cc: Pabba, PhanindraX Babu ; Desimone, 
Nathaniel L ; Liming Gao 

Subject: [PATCH] IpmiFeaturePkg: Add missed call to FreePool

From: PhanindraX Babu Pabba 

Adding missed out call to FreePool API to free the allocated memory.

Cc: Nate DeSimone 
Cc: Liming Gao 
Signed-off-by: PhanindraX Babu Pabba 
---
 .../Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c   | 1 +
 1 file changed, 1 insertion(+)

diff --git 
a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c 
b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
index 990b4b9e..070a3452 100644
--- a/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
+++ b/Features/Intel/OutOfBandManagement/IpmiFeaturePkg/BmcAcpi/BmcAcpi.c
@@ -250,6 +250,7 @@ BmcAcpiEntryPoint (
   // Increment the instance
   //
   Instance++;
+  FreePool (CurrentTable);
 }
   }
 
-- 
2.39.1.windows.1



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




[edk2-devel] Event: Tools, CI, Code base construction meeting series - Monday, March 25, 2024 #cal-reminder

2024-03-25 Thread Group Notification
*Reminder: Tools, CI, Code base construction meeting series*

*When:*
Monday, March 25, 2024
4:30pm to 5:30pm
(UTC-07:00) America/Los Angeles

*Where:*
https://teams.microsoft.com/l/meetup-join/19%3ameeting_ZDI2ZDg4NmMtMjI1My00MzI5LWFmYjAtMGQyNjUzNTBjZGYw%40thread.v2/0?context=%7b%22Tid%22%3a%2272f988bf-86f1-41af-91ab-2d7cd011db47%22%2c%22Oid%22%3a%2223af6561-6e1c-450d-b917-d9d674eb3cb6%22%7d

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

*Description:*

TianoCore community,

Microsoft and Intel will be hosting a series of open meetings to discuss build, 
CI, tools, and other related topics. If you are interested, have ideas/opinions 
please join us. These meetings will be Monday 4:30pm Pacific Time on Microsoft 
Teams.

MS Teams Link in following discussion: * 
https://github.com/tianocore/edk2/discussions/2614

Anyone is welcome to join.

* tianocore/edk2: EDK II (github.com)
* tianocore/edk2-basetools: EDK II BaseTools Python tools as a PIP module 
(github.com) https://github.com/tianocore/edk2-basetools
* tianocore/edk2-pytool-extensions: Extensions to the edk2 build system 
allowing for a more robust and plugin based build system and tool execution 
environment (github.com) https://github.com/tianocore/edk2-pytool-extensions
* tianocore/edk2-pytool-library: Python library package that supports UEFI 
development (github.com) https://github.com/tianocore/edk2-pytool-library

MS Teams Browser Clients * 
https://docs.microsoft.com/en-us/microsoftteams/get-clients?tabs=Windows#browser-client


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117092): https://edk2.groups.io/g/devel/message/117092
Mute This Topic: https://groups.io/mt/105129081/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]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [PATCH edk2-platforms v9 4/4] Platform/SbsaQemu: get the information of memory via SMC calls

2024-03-25 Thread Leif Lindholm
On Fri, Mar 22, 2024 at 17:08:50 +0100, Marcin Juszkiewicz wrote:
> From: Xiong Yining 
> 
> Provide functions to check for memory information:
> 
> - amount of memory nodes
> - memory address
> - NUMA node id for memory
> 
> Values are read from TF-A using platform specific SMC calls.

Same namespace comments as on 1/4, but given I've dragged my heels
reviewing, I see no need to delay further for that. Current naming can
go in, and we can worry about appropriate naming if we promote this
the hwinfo library to a core interface later.

You did however say this one needs reworking, so won't give r-b on
this one yet.

/
Leif

> Signed-off-by: Xiong Yining 
> Signed-off-by: Chen Baozi 
> Signed-off-by: Marcin Juszkiewicz 
> ---
>  .../SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf |  3 +-
>  .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h  |  2 +
>  .../Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h  | 28 ++
>  .../SbsaQemuHardwareInfoLib.c| 50 ++
>  .../Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuMem.c  | 54 
> +---
>  5 files changed, 94 insertions(+), 43 deletions(-)
> 
> diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf 
> b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf
> index 07e6bc4e9b11..384cbb349200 100644
> --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf
> +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf
> @@ -32,14 +32,13 @@ [LibraryClasses]
>ArmLib
>BaseMemoryLib
>DebugLib
> +  HardwareInfoLib
>MemoryAllocationLib
>PcdLib
> -  SbsaQemuHardwareInfoLib
>  
>  [Pcd]
>gArmTokenSpaceGuid.PcdSystemMemoryBase
>gArmTokenSpaceGuid.PcdSystemMemorySize
> -  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress
>  
>  [FixedPcd]
>gArmTokenSpaceGuid.PcdFdBaseAddress
> diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h 
> b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
> index 2317c1f0ae69..e3092007d27d 100644
> --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
> +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
> @@ -16,6 +16,8 @@
>  #define SIP_SVC_GET_GIC_ITSSMC_SIP_FUNCTION_ID(101)
>  #define SIP_SVC_GET_CPU_COUNT  SMC_SIP_FUNCTION_ID(200)
>  #define SIP_SVC_GET_CPU_NODE   SMC_SIP_FUNCTION_ID(201)
> +#define SIP_SVC_GET_MEMORY_NODE_COUNT SMC_SIP_FUNCTION_ID(300)
> +#define SIP_SVC_GET_MEMORY_NODE SMC_SIP_FUNCTION_ID(301)
>  
>  /*
>   *  SMCC does not define return codes for SiP functions.
> diff --git a/Silicon/Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h 
> b/Silicon/Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h
> index 9c7281f123d2..c7d397c590a8 100644
> --- a/Silicon/Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h
> +++ b/Silicon/Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h
> @@ -9,6 +9,12 @@
>  #ifndef HARDWARE_INFO_LIB
>  #define HARDWARE_INFO_LIB
>  
> +typedef struct{
> +  UINT32  NodeId;
> +  UINT64  AddressBase;
> +  UINT64  AddressSize;
> +} MemoryInfo;
> +
>  /**
>Get CPU count from information passed by Qemu.
>  
> @@ -42,4 +48,26 @@ GetCpuNumaNode (
>IN UINTN  CpuId
>);
>  
> +/**
> +  Get the number of memory node from device tree passed by Qemu.
> +
> +  @retval   the number of memory nodes.
> +**/
> +UINT32
> +GetMemNodeCount (
> +  VOID
> +  );
> +
> +/**
> +  Get memory infomation(node-id, addressbase, addresssize) for a given 
> memory node from device tree passed by Qemu.
> +
> +  @param [in]   MemoryIdIndex of memory to retrieve memory information.
> +
> +  @retval   memory infomation for given memory node.
> +**/
> +MemoryInfo
> +GetMemInfo (
> +  IN UINTN   MemoryId
> +  );
> +
>  #endif /* HARDWARE_INFO_LIB */
> diff --git 
> a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c
>  
> b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c
> index e96328978a55..4f49ae7e1862 100644
> --- 
> a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c
> +++ 
> b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.c
> @@ -94,3 +94,53 @@ GetCpuNumaNode (
>  
>return Arg0;
>  }
> +
> +UINT32
> +GetMemNodeCount (
> +  VOID
> +  )
> +{
> +  UINTNSmcResult;
> +  UINTNArg0;
> +
> +  SmcResult = ArmCallSmc0 (SIP_SVC_GET_MEMORY_NODE_COUNT, , NULL, NULL);
> +  if (SmcResult != SMC_SIP_CALL_SUCCESS) {
> +DEBUG ((DEBUG_ERROR, "%a: SIP_SVC_GET_MEMORY_NODE_COUNT call failed. We 
> have no memory information.\n", __FUNCTION__));
> +ResetShutdown ();
> +  }
> +
> +  DEBUG (( DEBUG_INFO, "%a: The number of the memory nodes is %ld\n", 
> __FUNCTION__, Arg0));
> +  return (UINT32)Arg0;
> +}
> +
> +MemoryInfo
> +GetMemInfo (
> +  IN UINTN   MemoryId
> +  )
> +{
> +  UINTN   SmcResult;
> +  UINTN   Arg0;
> +  UINTN   Arg1;
> +  UINTN  

Re: [edk2-devel] [PATCH edk2-platforms v9 3/4] Platform/SbsaQemu: drop use of DeviceTree

2024-03-25 Thread Leif Lindholm
On Fri, Mar 22, 2024 at 17:08:49 +0100, Marcin Juszkiewicz wrote:
> There is no need for EDK2 to know that there is DeviceTree around.
> All hardware information is read using functions from
> SbsaQemuHardwareInfoLib library.
> 
> Signed-off-by: Marcin Juszkiewicz 

Reviewed-by: Leif Lindholm 

/
Leif

> ---
>  Silicon/Qemu/SbsaQemu/SbsaQemu.dec   |  1 -
>  Platform/Qemu/SbsaQemu/SbsaQemu.dsc  |  6 --
>  .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf   | 33 ---
>  Silicon/Qemu/SbsaQemu/Include/Library/FdtHelperLib.h | 36 ---
>  .../SbsaQemuPlatformDxe/SbsaQemuPlatformDxe.c|  2 -
>  .../SbsaQemu/Library/FdtHelperLib/FdtHelperLib.c | 98 
> 
>  6 files changed, 176 deletions(-)
> 
> diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec 
> b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> index 427ff8b31aac..8f3533800767 100644
> --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> @@ -36,7 +36,6 @@ [PcdsFixedAtBuild.common]
>
> gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize|0x1|UINT32|0x0002
>
> gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciBase|0|UINT64|0x0003
>
> gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformXhciSize|0x1|UINT32|0x0004
> -  
> gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100|UINT64|0x0005
>  
># PCDs complementing PCIe layout pulled into ACPI tables
># Limit = Base + Size - 1
> diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
> b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> index 3c3d2449bff4..3d748e289b51 100644
> --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> @@ -80,7 +80,6 @@ [LibraryClasses.common]
>FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
>
> ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
>  
> -  FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
>UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
>
> OrderedCollectionLib|MdePkg/Library/BaseOrderedCollectionRedBlackTreeLib/BaseOrderedCollectionRedBlackTreeLib.inf
>  
> @@ -126,7 +125,6 @@ [LibraryClasses.common]
># ARM PL011 UART Driver
>PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf
>  
> -  FdtHelperLib|Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf
>OemMiscLib|Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
>
> HardwareInfoLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf
>  
> @@ -430,9 +428,6 @@ [PcdsFixedAtBuild.common]
>#
>gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|16
>  
> -  # Initial Device Tree Location
> -  
> gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress|0x100
> -
># Non discoverable devices (AHCI,XHCI)
>gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciBase|0x6010
>gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdPlatformAhciSize|0x0001
> @@ -731,7 +726,6 @@ [Components.common]
>#
>ArmPkg/Universal/Smbios/ProcessorSubClassDxe/ProcessorSubClassDxe.inf
>ArmPkg/Universal/Smbios/SmbiosMiscDxe/SmbiosMiscDxe.inf
> -  EmbeddedPkg/Library/FdtLib/FdtLib.inf
>MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
>Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuSmbiosDxe/SbsaQemuSmbiosDxe.inf
>  
> diff --git a/Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf 
> b/Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf
> deleted file mode 100644
> index 9c059f3e5851..
> --- a/Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf
> +++ /dev/null
> @@ -1,33 +0,0 @@
> -#/** @file
> -#
> -#  Component description file for FdtHelperLib module
> -#
> -#  Copyright (c) 2021, NUVIA Inc. All rights reserved.
> -#
> -#  SPDX-License-Identifier: BSD-2-Clause-Patent
> -#
> -#**/
> -
> -[Defines]
> -  INF_VERSION= 1.29
> -  BASE_NAME  = FdtHelperLib
> -  FILE_GUID  = 34e4396f-c2fc-4f9e-ad58-0f98e99e3875
> -  MODULE_TYPE= BASE
> -  VERSION_STRING = 1.0
> -  LIBRARY_CLASS  = FdtHelperLib
> -
> -[Sources.common]
> -  FdtHelperLib.c
> -
> -[Packages]
> -  EmbeddedPkg/EmbeddedPkg.dec
> -  MdePkg/MdePkg.dec
> -  Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> -
> -[LibraryClasses]
> -  DebugLib
> -  FdtLib
> -  PcdLib
> -
> -[FixedPcd]
> -  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress
> diff --git a/Silicon/Qemu/SbsaQemu/Include/Library/FdtHelperLib.h 
> b/Silicon/Qemu/SbsaQemu/Include/Library/FdtHelperLib.h
> deleted file mode 100644
> index ea9159857215..
> --- a/Silicon/Qemu/SbsaQemu/Include/Library/FdtHelperLib.h
> +++ /dev/null
> @@ -1,36 +0,0 @@
> -/** @file
> -*  FdtHelperLib.h
> -*
> -*  Copyright (c) 2021, NUVIA Inc. All rights reserved.
> -*
> -*  SPDX-License-Identifier: BSD-2-Clause-Patent
> -*
> -**/
> -
> -#ifndef 

Re: [edk2-devel] [PATCH edk2-platforms v9 2/4] Platform/SbsaQemu: use SbsaQemuHardwareInfoLib for cpu information

2024-03-25 Thread Leif Lindholm
On Fri, Mar 22, 2024 at 17:08:48 +0100, Marcin Juszkiewicz wrote:
> We have SbsaQemuHardwareInfoLib to ask for hardware details. No need to
> parse DeviceTree anymore.
> 
> Signed-off-by: Marcin Juszkiewicz 

Nitpicks or changing function calls based on what I commented on in
previous patch does not retract from:
Reviewed-by: Leif Lindholm 

> ---
>  Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf |  6 ++
>  .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf  |  5 ++---
>  .../SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf |  4 ++--
>  Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c   | 11 +-
>  .../Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.c| 21 
> +++-
>  5 files changed, 18 insertions(+), 29 deletions(-)
> 
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf 
> b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> index a34f54d431d4..f959d8e0e4ee 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> @@ -3,7 +3,7 @@
>  #
>  #Copyright (c) 2021, NUVIA Inc. All rights reserved.
>  #Copyright (c) 2018, Hisilicon Limited. All rights reserved.
> -#Copyright (c) 2018, Linaro Limited. All rights reserved.
> +#Copyright (c) 2018-2024, Linaro Ltd. All rights reserved.
>  #
>  #SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -29,8 +29,7 @@ [Packages]
>  
>  [LibraryClasses]
>BaseMemoryLib
> -  FdtLib
> -  FdtHelperLib
> +  HardwareInfoLib
>IoLib
>PcdLib
>  
> @@ -40,7 +39,6 @@ [Guids]
>  [Pcd]
>gArmTokenSpaceGuid.PcdEmbeddedControllerFirmwareRelease
>gArmTokenSpaceGuid.PcdSystemBiosRelease
> -  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdDeviceTreeBaseAddress
>  
>gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSystemManufacturer
>gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdSystemSerialNumber
> diff --git 
> a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf 
> b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
> index 291743b19115..727c8e82d16e 100644
> --- a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
> +++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuAcpiDxe/SbsaQemuAcpiDxe.inf
> @@ -1,7 +1,7 @@
>  ## @file
>  #  This driver modifies ACPI tables for the Qemu SBSA platform
>  #
> -#  Copyright (c) 2020, Linaro Ltd. All rights reserved.
> +#  Copyright (c) 2020-2024, Linaro Ltd. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -35,7 +35,7 @@ [LibraryClasses]
>BaseLib
>DebugLib
>DxeServicesLib
> -  FdtHelperLib
> +  HardwareInfoLib
>PcdLib
>PrintLib
>UefiDriverEntryPoint
> @@ -44,7 +44,6 @@ [LibraryClasses]
>  
>  [Pcd]
>gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiTableStorageFile
> -  gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdCoreCount
>gArmVirtSbsaQemuPlatformTokenSpaceGuid.PcdClusterCount
>  
>gArmTokenSpaceGuid.PcdGicDistributorBase
> diff --git a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf 
> b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf
> index c067a80cc715..07e6bc4e9b11 100644
> --- a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf
> +++ b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuLib/SbsaQemuLib.inf
> @@ -1,6 +1,6 @@
>  #/* @file
>  #
> -#  Copyright (c) 2019, Linaro Limited. All rights reserved.
> +#  Copyright (c) 2019-2024, Linaro Limited. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -32,9 +32,9 @@ [LibraryClasses]
>ArmLib
>BaseMemoryLib
>DebugLib
> -  FdtLib
>MemoryAllocationLib
>PcdLib
> +  SbsaQemuHardwareInfoLib

LibraryClass uses different name here?

>  
>  [Pcd]
>gArmTokenSpaceGuid.PcdSystemMemoryBase
> diff --git a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c 
> b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> index c38f2851904f..854f6f4072d5 100644
> --- a/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> +++ b/Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.c
> @@ -2,7 +2,7 @@
>  *  OemMiscLib.c
>  *
>  *  Copyright (c) 2021, NUVIA Inc. All rights reserved.
> -*  Copyright (c) 2020, Linaro Ltd. All rights reserved.
> +*  Copyright (c) 2020-2024, Linaro Ltd. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -12,14 +12,13 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
>  #include 
> +#include 

Move above HiiLib.h.

>  #include 
>  #include 
> -#include 
>  
>  /** Returns whether the specified processor is present or not.
>  
> @@ -33,7 +32,7 @@ OemIsProcessorPresent (
>UINTN ProcessorIndex
>)
>  {
> -  if (ProcessorIndex < FdtHelperCountCpus ()) {
> +  if (ProcessorIndex < GetCpuCount ()) {
>  return TRUE;
>}
>  
> @@ -76,7 +75,7 @@ OemGetProcessorInformation (
>  {
>UINT16 ProcessorCount;
>  
> -  ProcessorCount = FdtHelperCountCpus ();
> +  ProcessorCount = GetCpuCount ();
>  
>if (ProcessorIndex < 

Re: [edk2-devel] [PATCH edk2-platforms v9 1/4] Platform/SbsaQemu: add SbsaQemuHardwareInfoLib

2024-03-25 Thread Leif Lindholm
On Fri, Mar 22, 2024 at 17:08:47 +0100, Marcin Juszkiewicz wrote:
> This library provides functions to check for hardware information.
> For now it covers CPU ones:
> 
> - amount of cpu cores
> - MPIDR value for cpu core
> - NUMA node id for cpu core
> 
> Values are read from TF-A using platform specific SMC calls.
> 
> Signed-off-by: Marcin Juszkiewicz 

All comments below are of the variety: "should we namespace separate this"?

> ---
>  Silicon/Qemu/SbsaQemu/SbsaQemu.dec   |  2 +
>  Platform/Qemu/SbsaQemu/SbsaQemu.dsc  |  3 +-
>  .../SbsaQemuHardwareInfoLib.inf  | 29 ++
>  .../SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h  | 17 +++-
>  .../Qemu/SbsaQemu/Include/Library/HardwareInfoLib.h  | 45 +
>  .../SbsaQemuHardwareInfoLib.c| 96 
> 
>  6 files changed, 187 insertions(+), 5 deletions(-)
> 
> diff --git a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec 
> b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> index 913d1d75ef29..427ff8b31aac 100644
> --- a/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> +++ b/Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> @@ -12,6 +12,8 @@ [Defines]
>PACKAGE_GUID   = 8db32c5a-2821-43e2-b4ac-bc148e2b0b05
>PACKAGE_VERSION= 0.1
>  
> +[LibraryClasses]
> +HardwareInfoLib|Include/Library/HardwareInfoLib.h

We don't *have* to address this now, but it would be worth considering
what function this could have as a core, rather than
platform-specific, library.

What hardware? SoC or whole platform?

As it stands, the name is very generic.
I think we'll eventually want standardised APIs for these kinds of
queries. But maybe until then it would be easier to prepend SbsaQemu
to both filename and LibraryClass (like you do in the actual implementation)?

>  
> 
>  #
>  # Include Section - list of Include Paths that are provided by this package.
> diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
> b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> index 378600050df9..3c3d2449bff4 100644
> --- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> +++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
> @@ -1,6 +1,6 @@
>  #
>  #  Copyright (c) 2021, NUVIA Inc. All rights reserved.
> -#  Copyright (c) 2019, Linaro Limited. All rights reserved.
> +#  Copyright (c) 2019-2024, Linaro Ltd. All rights reserved.
>  #
>  #  SPDX-License-Identifier: BSD-2-Clause-Patent
>  #
> @@ -128,6 +128,7 @@ [LibraryClasses.common]
>  
>FdtHelperLib|Silicon/Qemu/SbsaQemu/Library/FdtHelperLib/FdtHelperLib.inf
>OemMiscLib|Platform/Qemu/SbsaQemu/OemMiscLib/OemMiscLib.inf
> +  
> HardwareInfoLib|Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf

Like you do here.

>  
># Debug Support
>
> PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf
> diff --git 
> a/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf
>  
> b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf
> new file mode 100644
> index ..2acb2a1e7c76
> --- /dev/null
> +++ 
> b/Silicon/Qemu/SbsaQemu/Library/SbsaQemuHardwareInfoLib/SbsaQemuHardwareInfoLib.inf
> @@ -0,0 +1,29 @@
> +#/* @file
> +#
> +#  Copyright (c) 2024, Linaro Ltd. All rights reserved.
> +#
> +#  SPDX-License-Identifier: BSD-2-Clause-Patent
> +#
> +#*/
> +
> +[Defines]
> +  INF_VERSION= 0x0001001c
> +  BASE_NAME  = SbsaQemuHardwareInfoLib
> +  FILE_GUID  = 6454006f-6502-46e2-9be4-4bba8d4b29fb
> +  MODULE_TYPE= BASE
> +  VERSION_STRING = 1.0
> +  LIBRARY_CLASS  = HardwareInfoLib
> +
> +[Sources]
> +  SbsaQemuHardwareInfoLib.c
> +
> +[Packages]
> +  ArmPkg/ArmPkg.dec
> +  EmbeddedPkg/EmbeddedPkg.dec
> +  MdePkg/MdePkg.dec
> +  MdeModulePkg/MdeModulePkg.dec
> +  Silicon/Qemu/SbsaQemu/SbsaQemu.dec
> +
> +[LibraryClasses]
> +  ArmSmcLib
> +  ResetSystemLib
> diff --git a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h 
> b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
> index 7934875e4aba..2317c1f0ae69 100644
> --- a/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
> +++ b/Silicon/Qemu/SbsaQemu/Include/IndustryStandard/SbsaQemuSmc.h
> @@ -1,6 +1,6 @@
>  /** @file
>  *
> -*  Copyright (c) 2023, Linaro Ltd. All rights reserved.
> +*  Copyright (c) 2023-2024, Linaro Ltd. All rights reserved.
>  *
>  *  SPDX-License-Identifier: BSD-2-Clause-Patent
>  *
> @@ -11,8 +11,17 @@
>  
>  #include 
>  
> -#define SIP_SVC_VERSION  SMC_SIP_FUNCTION_ID(1)
> -#define SIP_SVC_GET_GIC  SMC_SIP_FUNCTION_ID(100)
> -#define SIP_SVC_GET_GIC_ITS  SMC_SIP_FUNCTION_ID(101)
> +#define SIP_SVC_VERSIONSMC_SIP_FUNCTION_ID(1)
> +#define SIP_SVC_GET_GICSMC_SIP_FUNCTION_ID(100)
> +#define SIP_SVC_GET_GIC_ITSSMC_SIP_FUNCTION_ID(101)
> +#define 

Re: [edk2-devel] [RFC PATCH] OvmfPkg/SecurityPkg: Add build option for coexistance of vTPM and RTMR.

2024-03-25 Thread Dionna Glaze via groups.io
On Mon, Mar 25, 2024 at 6:07 AM Mikko Ylinen
 wrote:
>
> > >
> > > Looking at systemd-boot I see it will likewise not measure to both RTMR
> > > and vTPM, but with reversed priority (use vTPM not RTMR in case both are
> > > present).
> > >
> >
> > Interesting. Thanks for this report. We'll push for the changed
> > semantics here if the spec is indeed changed, and request partner
> > distros in the CCC to include the updated systemd-boot.
>
> FWIW, my RTMRs patch to systemd was merged quite recently so it's not
> included in any systemd release yet. (It was mainly implemented for the
> UKI case that allows TDVF to boot a UKI image directly and then have the
> image sections measured separately.)
>

Thank you, I've proposed a change in
https://github.com/systemd/systemd/pull/31939


-- 
-Dionna Glaze, PhD (she/her)


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




Re: [edk2-devel] [PATCH RESEND edk2-platforms v1 0/3] Platform/Arm: StandloneMm support for FVP.

2024-03-25 Thread Sami Mujawar
Merged as 80ee8b861edb..e090e6698bda

Thanks.

Regards,

Sami Mujawar


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




Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutive Pxe-Http Boot Issue

2024-03-25 Thread Sivaraman Nainar via groups.io
Hi Saloni:

" On 2/27/24 05:49, Sivaraman Nainar wrote:
> Hi Laszlo,
>
> We can see the issue not only with SLES, it can be seen with Ubuntu 22 also.
>
> Do we have any channel to work with grub team to fix this issue?

No particular channel. Oliver has been participating in upstream grub2 
development (CC'd), so I figure bug analysis and bugfix posting should occur on 
their normal development mailing list.

Laszlo"

This is the last update from Lazlo. I am not directly involved working with 
Grub team.

Thanks
Siva
-Original Message-
From: Kasbekar, Saloni 
Sent: Saturday, March 23, 2024 3:33 AM
To: Sivaraman Nainar ; devel@edk2.groups.io; Laszlo Ersek 
; Santhosh Kumar V ; Clark-williams, 
Zachary 
Cc: Raj V Akilan ; Soundharia R 
Subject: RE: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved 
Consecutive Pxe-Http Boot Issue

Hi Siva,

Have you looked into getting this fixed in grub as Laszlo suggested? What's the 
expected timeline for this workaround?

Thanks,
Saloni

-Original Message-
From: Sivaraman Nainar 
Sent: Tuesday, March 19, 2024 4:32 AM
To: devel@edk2.groups.io; Laszlo Ersek ; Santhosh Kumar V 
; Kasbekar, Saloni ; 
Clark-williams, Zachary 
Cc: Raj V Akilan ; Soundharia R 
Subject: RE: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved 
Consecutive Pxe-Http Boot Issue

@Saloni Kasbekar,

Can you please comment on the changes?

Thanks
Siva
-Original Message-
From: Sivaraman Nainar
Sent: Monday, February 26, 2024 4:01 PM
To: devel@edk2.groups.io; Sivaraman Nainar ; Laszlo Ersek 
; Santhosh Kumar V ; Saloni Kasbekar 
; Zachary Clark-williams 

Cc: Raj V Akilan ; Soundharia R 
Subject: RE: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved 
Consecutive Pxe-Http Boot Issue

@Saloni Kasbekar, @Zachary Clark-williams,

Could you please add your feedback on the changes proposed?

Thanks
Siva
-Original Message-
From: devel@edk2.groups.io  On Behalf Of Sivaraman Nainar 
via groups.io
Sent: Thursday, February 22, 2024 7:33 AM
To: Laszlo Ersek ; devel@edk2.groups.io; Santhosh Kumar V 
; Saloni Kasbekar ; Zachary 
Clark-williams 
Cc: Raj V Akilan ; Soundharia R 
Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutive 
Pxe-Http Boot Issue


**CAUTION: The e-mail below is from an external source. Please exercise caution 
before opening attachments, clicking links, or following guidance.**

Laszlo:

Thanks for the detailed feedback on the changes for this issue. Since we are 
not sure if this change are valid / violate some purpose of SNP driver, it 
mentioned as Workaround.

@Saloni Kasbekar and @Clark-williams, Zachary can add more on these changes.

As you recommended, we can have PCD which controls these changes till the 
changes are addressed in grub.

@Santhosh Kumar V is this issue can be seen only in SLES 15 or it can be found 
in any OS having Grub 2.x?

Thanks
Siva
-Original Message-
From: Laszlo Ersek 
Sent: Thursday, February 22, 2024 5:15 AM
To: devel@edk2.groups.io; Santhosh Kumar V 
Cc: Sivaraman Nainar ; Raj V Akilan ; 
Soundharia R ; Saloni Kasbekar 
; Zachary Clark-williams 

Subject: [EXTERNAL] Re: [edk2-devel] [PATCH] NetworkPkg:Resolved Consecutive 
Pxe-Http Boot Issue


**CAUTION: The e-mail below is from an external source. Please exercise caution 
before opening attachments, clicking links, or following guidance.**

On 2/21/24 18:15, Santhosh Kumar V via groups.io wrote:
> The customer has a server environment where PXE and HTTP service run in same 
> Linux Server. In this environment a SUT trying to boot to SLES 15 OS via PXE 
> from the Boot Menu. After PXE Boot file downloaded and grub Loaded without 
> continuing for installation Exit is pressed and control back to Setup.
> Now the HTTP boot to SLES 15 OS tried in the same environment and failed to 
> download the file. If there is a reconnect -r performed before this HTTP Boot 
> then boot file download and installation is getting success.
> Root cause of the issue is, when Exit from grub performed, boot Loader Stops 
> the SNP Driver and starts the same.

This sentence feels like the key one.

Are you saying that grub calls Snp->Start() just before it exits?

If so, am I right to suspect that that's a grub bug? It sounds like a resource 
leak, after all.

Can you perhaps include a grub source code location / pointer in the commit 
message?

> During this process SNP is in Initialized State. When HTTP boot is performed 
> immediately after PXE Failure, the MNP configure method initiates the SNP 
> Start again. Since the SNP already started by grub it returns 
> EFI_ALREADY_STARTED and none of the upper Layer drivers are getting started.
> As a work around in MNPConfigure(), if the SNP Start failed with Already 
> Started and in Initialized state we can return success so that rest of the 
> drivers can be loaded and HTTP boot can work.
>
>
> Cc: Saloni Kasbekar 
> Cc: Zachary Clark-williams 
>
> Signed-off-by: SanthoshKumar 
> ---
>  

[edk2-devel] [PATCH] Platform/Loongson: Remove minimium memory size limitation

2024-03-25 Thread xianglai
From: Bibo Mao 

Temparory stack memory on PEI is hardcoded now, also minimium memory
size 256M is hardcoded now. Here memory map table from fw cfg can be
parsed. If there is memory map entry contains pei stack, it can be
published as usable memory at PEI stage.

Signed-off-by: Bibo Mao 
Signed-off-by: Xianglai Li 
Cc: Bibo Mao 
Cc: Chao Li 
---
 .../Loongson/LoongArchQemuPkg/Loongson.dec|  2 -
 .../Loongson/LoongArchQemuPkg/Loongson.dsc|  6 ---
 .../LoongArchQemuPkg/PlatformPei/MemDetect.c  | 37 ++-
 .../PlatformPei/PlatformPei.inf   |  2 -
 4 files changed, 36 insertions(+), 11 deletions(-)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dec 
b/Platform/Loongson/LoongArchQemuPkg/Loongson.dec
index e638b835e4..c2c6cc9596 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dec
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dec
@@ -48,8 +48,6 @@
 
   gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamBase|0|UINT64|0x000b
   gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamSize|0|UINT32|0x000c
-  gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop|0x0|UINT64|0x000d
-  gLoongArchQemuPkgTokenSpaceGuid.PcdRamRegionsBottom|0x0|UINT64|0x000e
   gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecFvBase|0x0|UINT64|0x000f
   gLoongArchQemuPkgTokenSpaceGuid.PcdFlashSecFvSize|0x0|UINT32|0x0010
 
diff --git a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc 
b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
index 58aa16d3a9..aab2ca9b28 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
+++ b/Platform/Loongson/LoongArchQemuPkg/Loongson.dsc
@@ -356,12 +356,6 @@
   gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamBase | 
0x1
   gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamSize | 
0x1
   gLoongArchQemuPkgTokenSpaceGuid.PcdDeviceTreeBase| 
0x10
-  #
-  # minimal memory for uefi bios should be 512M
-  # 0x - 0x1000
-  # 0x9000 - 0xA000
-  #
-  gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop| 
0x1000
   gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions   | 0x06
 
   gEfiMdeModulePkgTokenSpaceGuid.PcdBootManagerMenuFile| { 
0x21, 0xaa, 0x2c, 0x46, 0x14, 0x76, 0x03, 0x45, 0x83, 0x6e, 0x8a, 0xb6, 0xf4, 
0x66, 0x23, 0x31 }
diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c 
b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
index 7e6a4a3aa9..03d1b0b75d 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/MemDetect.c
@@ -40,12 +40,47 @@ PublishPeiMemory (
   UINT64 Base;
   UINT64  Size;
   UINT64  RamTop;
+  FIRMWARE_CONFIG_ITEM FwCfgItem;
+  UINTNFwCfgSize;
+  UINTNProcessed;
+  LOONGARCH_MEMMAP_ENTRY  MemoryMapEntry;
 
   //
   // Determine the range of memory to use during PEI
   //
   Base = PcdGet64 (PcdSecPeiTempRamBase) + PcdGet32 (PcdSecPeiTempRamSize);
-  RamTop = PcdGet64 (PcdUefiRamTop);
+  RamTop = 0;
+
+  Status = QemuFwCfgFindFile ("etc/memmap", , );
+  if (EFI_ERROR (Status)) {
+return Status;
+  }
+
+  if (FwCfgSize % sizeof MemoryMapEntry != 0) {
+return EFI_PROTOCOL_ERROR;
+  }
+
+  QemuFwCfgSelectItem (FwCfgItem);
+  for (Processed = 0; Processed < FwCfgSize; Processed += sizeof 
MemoryMapEntry) {
+QemuFwCfgReadBytes (sizeof MemoryMapEntry, );
+if (MemoryMapEntry.Type != EfiAcpiAddressRangeMemory) {
+  continue;
+}
+
+/*
+ * Find memory map entry where PEI temp stack is located
+ */
+if ((MemoryMapEntry.BaseAddr <= Base) &&
+(Base < (MemoryMapEntry.BaseAddr + MemoryMapEntry.Length))) {
+RamTop = MemoryMapEntry.BaseAddr + MemoryMapEntry.Length;
+}
+  }
+
+  if (RamTop == 0) {
+DEBUG ((DEBUG_ERROR, "ERROR: No memory map entry contains temp stack \n"));
+ASSERT (FALSE);
+  }
+
   Size = RamTop - Base;
 
   //
diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf 
b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
index 6cc3513b63..65591a4d7b 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/PlatformPei.inf
@@ -64,8 +64,6 @@
 [FixedPcd]
   gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvBase
   gLoongArchQemuPkgTokenSpaceGuid.PcdFlashDxeFvSize
-  gLoongArchQemuPkgTokenSpaceGuid.PcdRamRegionsBottom
-  gLoongArchQemuPkgTokenSpaceGuid.PcdUefiRamTop
   gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamBase
   gLoongArchQemuPkgTokenSpaceGuid.PcdSecPeiTempRamSize
   gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
-- 
2.39.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117084): https://edk2.groups.io/g/devel/message/117084
Mute This Topic: https://groups.io/mt/105134610/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 

Re: [edk2-devel] [PATCH v2 0/2] ShellPkg/AcpiView: Adds HPET and WSMT parser

2024-03-25 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao 

Thanks,
Zhichao

> -Original Message-
> From: Attar, AbdulLateef (Abdul Lateef) 
> Sent: Thursday, March 21, 2024 11:19 AM
> To: devel@edk2.groups.io; Gao, Zhichao 
> Cc: Pierre Gondois 
> Subject: Re: [edk2-devel] [PATCH v2 0/2] ShellPkg/AcpiView: Adds HPET and
> WSMT parser
> 
> Gentle reminder, please review and merge the patch.
> 
> On 08-03-2024 12:52, Abdul Lateef Attar via groups.io wrote:
> > Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
> >
> >
> > From: Abdul Lateef Attar 
> >
> > PR : https://github.com/tianocore/edk2/pull/5449
> >
> > Adds HPET and WSMT parser for acpiview.
> > V2 delta changes:
> >Addressed review comments.
> >Added validation functions as per the comments.
> >
> > Cc: Zhichao Gao 
> > Cc: Pierre Gondois   Abdul Lateef Attar (2):
> >ShellPkg/Acpiview: Adds HPET parser
> >ShellPkg/Acpiview: Adds ACPI WSMT Table parse
> >
> >   .../UefiShellAcpiViewCommandLib/AcpiParser.h  |  34 +++
> >   .../Parsers/Hpet/HpetParser.c | 222 ++
> >   .../Parsers/Wsmt/WsmtParser.c | 147 
> >   .../UefiShellAcpiViewCommandLib.c |   2 +
> >   .../UefiShellAcpiViewCommandLib.inf   |   2 +
> >   5 files changed, 407 insertions(+)
> >   create mode 100644
> ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hpet/HpetParser.c
> >   create mode 100644
> >
> ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Wsmt/WsmtParser
> .c
> >
> > --
> > 2.34.1
> >
> >
> >
> > 
> >
> >


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




Re: [edk2-devel] [PATCH 2/4] ShellPkg: Update the comments of ReadKeyStroke and ReadKeyStrokeEx

2024-03-25 Thread Gao, Zhichao
Good catch. Please update the commit message. Then take my R-B.

Thanks,
Zhichao

From: Chao Li 
Sent: Wednesday, March 13, 2024 10:13 AM
To: devel@edk2.groups.io; Shang, Qingyu 
Cc: Liming Gao ; Gao, Zhichao 
Subject: Re: [edk2-devel] [PATCH 2/4] ShellPkg: Update the comments of 
ReadKeyStroke and ReadKeyStrokeEx


Hi Qingyu,

It may not be my domain, I think what you are trying to say is "Refer to UEFI 
spec 2.10 section 12.3.3",  not 13.3.3, because the 13.3.3 is "Number and 
Location of System Partitions", see me comment below. I recommend fixing all of 
the patch commit messages in this series.

The changes looks good to me and would recommend Liming and Zhichao to check 
again.

Thanks,
Chao
On 2024/3/11 16:41, Qingyu wrote:

Refer to Uefi spec 2.10 section 13.3.3, Add a new retval
It should be section 12.3.3, not 13.3.3.




EFI_UNSUPPORTED to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx

and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke().



Cc: Liming Gao 

Cc: Zhichao Gao 

Cc: Chao Li 

Signed-off-by: Qingyu 

---

 ShellPkg/Application/Shell/ConsoleWrappers.c | 4 +++-

 1 file changed, 3 insertions(+), 1 deletion(-)



diff --git a/ShellPkg/Application/Shell/ConsoleWrappers.c 
b/ShellPkg/Application/Shell/ConsoleWrappers.c

index eae11370e4e0..dbffae30cdf5 100644

--- a/ShellPkg/Application/Shell/ConsoleWrappers.c

+++ b/ShellPkg/Application/Shell/ConsoleWrappers.c

@@ -67,7 +67,9 @@ FileBasedSimpleTextInReset (

   @param[in] This  A pointer to the SimpleTextIn structure.

   @param[in, out] Key  A pointer to the Key structure to fill.



-  @retval   EFI_SUCCESS The read was successful.

+  @retval EFI_SUCCESS  The read was successful.

+  @retval EFI_UNSUPPORTED  The device does not support the ability to read

+   keystroke data.

 **/

 EFI_STATUS

 EFIAPI


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




Re: [edk2-devel] [PATCH 2/4] ShellPkg: Update the comments of ReadKeyStroke and ReadKeyStrokeEx

2024-03-25 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao 

Thanks,
Zhichao

> -Original Message-
> From: Shang, Qingyu 
> Sent: Monday, March 11, 2024 4:41 PM
> To: devel@edk2.groups.io
> Cc: Liming Gao ; Gao, Zhichao
> ; Chao Li 
> Subject: [PATCH 2/4] ShellPkg: Update the comments of ReadKeyStroke and
> ReadKeyStrokeEx
> 
> Refer to Uefi spec 2.10 section 13.3.3, Add a new retval EFI_UNSUPPORTED
> to EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.ReadKeyStrokeEx
> and EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke().
> 
> Cc: Liming Gao 
> Cc: Zhichao Gao 
> Cc: Chao Li 
> Signed-off-by: Qingyu 
> ---
>  ShellPkg/Application/Shell/ConsoleWrappers.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/ShellPkg/Application/Shell/ConsoleWrappers.c
> b/ShellPkg/Application/Shell/ConsoleWrappers.c
> index eae11370e4e0..dbffae30cdf5 100644
> --- a/ShellPkg/Application/Shell/ConsoleWrappers.c
> +++ b/ShellPkg/Application/Shell/ConsoleWrappers.c
> @@ -67,7 +67,9 @@ FileBasedSimpleTextInReset (
>@param[in] This  A pointer to the SimpleTextIn structure.
>@param[in, out] Key  A pointer to the Key structure to fill.
> 
> -  @retval   EFI_SUCCESS The read was successful.
> +  @retval EFI_SUCCESS  The read was successful.
> +  @retval EFI_UNSUPPORTED  The device does not support the ability to
> read
> +   keystroke data.
>  **/
>  EFI_STATUS
>  EFIAPI
> --
> 2.39.1.windows.1



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