Re: [edk2-devel] [PATCH 1/5] NetwokrPkg/HttpDxe: Refactor TlsCreateChild
[AMD Official Use Only - General] Hi Saloni, We still create TLS child via service binding protocol, the difference is we give HTTP handle to TLS service binding for installing TLS protocol on the HTTP handle instead of a on a new EFI handle. The logic is still the same just the code is moved around, I think we can just keep the function name the same.. Thanks Abner > -Original Message- > From: devel@edk2.groups.io On Behalf Of Saloni > Kasbekar via groups.io > Sent: Saturday, January 6, 2024 5:32 AM > To: devel@edk2.groups.io; mc...@ipxe.org; Chang, Abner > > Cc: Clark-williams, Zachary ; Nickle Wang > ; Igor Kulchytskyy > Subject: Re: [edk2-devel] [PATCH 1/5] NetwokrPkg/HttpDxe: Refactor > TlsCreateChild > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > // > // Check whether we need to create Tls child and open the TLS protocol. > // > +if (HttpInstance->UseHttps && !HttpInstance->TlsAlreadyCreated) { > + // Create TLS child for this HTTP instance. > + Status = TlsCreateChild (HttpInstance); > + if (EFI_ERROR (Status)) { > return EFI_DEVICE_ERROR; >} > > Considering we're not creating TlsChildHandle anymore, we should probably > rename TlsCreateChild() to TlsCreateHandle(). Also update the comments > accordingly. > > -Original Message- > From: devel@edk2.groups.io On Behalf Of Michael > Brown > Sent: Friday, January 5, 2024 9:12 AM > To: abner.ch...@amd.com; devel@edk2.groups.io > Cc: Kasbekar, Saloni ; Clark-williams, Zachary > ; Nickle Wang ; Igor > Kulchytskyy > Subject: Re: [edk2-devel] [PATCH 1/5] NetwokrPkg/HttpDxe: Refactor > TlsCreateChild > > On 05/01/2024 08:37, abner.ch...@amd.com wrote: > > From: Abner Chang > > > > - Use HTTP instance as the parameter for TlsCreateChild function. > > - Install TLS protocol on the HTTP instance thats create TLS child. > > Logic looks good to me, just some minor cosmetic comments. > > Commit title has "NetwokrPkg" typo, should be "NetworkPkg". > > > - @return The child handle with opened EFI_TLS_PROTOCOL and > EFI_TLS_CONFIGURATION_PROTOCOL. > > + @return EFI_SUCCESSTLS child handle is returned in HttpInstance- > >TlsChildHandle > > + with opened EFI_TLS_PROTOCOL and > EFI_TLS_CONFIGURATION_PROTOCOL. > > Comment refers to TlsChildHandle, which no longer exists after this patch. > > > - @return The child handle with opened EFI_TLS_PROTOCOL and > EFI_TLS_CONFIGURATION_PROTOCOL. > > + @return EFI_SUCCESSTLS child handle is returned in HttpInstance- > >TlsChildHandle > > + with opened EFI_TLS_PROTOCOL and > EFI_TLS_CONFIGURATION_PROTOCOL. > > As above. > > Reviewed-by: Michael Brown > > Michael > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113324): https://edk2.groups.io/g/devel/message/113324 Mute This Topic: https://groups.io/mt/103539578/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 3/5] NetwokrPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event
[AMD Official Use Only - General] > -Original Message- > From: Michael Brown > Sent: Saturday, January 6, 2024 1:15 AM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Saloni Kasbekar ; Zachary Clark-williams > ; Nickle Wang ; Igor > Kulchytskyy > Subject: Re: [PATCH 3/5] NetwokrPkg/HttpDxe: Add HttpEventTlsConfigured > HTTP callback event > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > On 05/01/2024 08:37, abner.ch...@amd.com wrote: > > + /// > > + /// The Status of Event to configure TLS configuration data. > > + /// EventStatus: > > + /// EFI_SUCCESSThe TLS is configured successfully with the > > default > value. > > + /// EFI_INVALID_PARAMETER One or more input parameters to > SetSessionData() is invalid. > > + /// EFI_NOT_READY Current TLS session state is NOT > EfiTlsSessionStateNotStarted. > > + /// EFI_NOT_FOUND Fail to get 'HttpTlsCipherList' variable. > > + /// Others Other error as indicated. > > + /// > > + HttpEventTlsConfigured, > > + > > Since this changes the ABI, you may want to also update the protocol > GUID to prevent strange errors if old and new binaries are used on the > same system. This makes sense, will send out V2. Thanks Abner > > Reviewed-by: Michael Brown > > Thanks, > > Michael -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113325): https://edk2.groups.io/g/devel/message/113325 Mute This Topic: https://groups.io/mt/103539580/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 3/5] NetwokrPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event
[AMD Official Use Only - General] > -Original Message- > From: Chang, Abner > Sent: Sunday, January 7, 2024 8:19 PM > To: Michael Brown ; devel@edk2.groups.io > Cc: Saloni Kasbekar ; Zachary Clark-williams > ; Nickle Wang ; Igor > Kulchytskyy > Subject: RE: [PATCH 3/5] NetwokrPkg/HttpDxe: Add HttpEventTlsConfigured > HTTP callback event > > > > -Original Message- > > From: Michael Brown > > Sent: Saturday, January 6, 2024 1:15 AM > > To: Chang, Abner ; devel@edk2.groups.io > > Cc: Saloni Kasbekar ; Zachary Clark-williams > > ; Nickle Wang ; > Igor > > Kulchytskyy > > Subject: Re: [PATCH 3/5] NetwokrPkg/HttpDxe: Add > HttpEventTlsConfigured > > HTTP callback event > > > > Caution: This message originated from an External Source. Use proper > caution > > when opening attachments, clicking links, or responding. > > > > > > On 05/01/2024 08:37, abner.ch...@amd.com wrote: > > > + /// > > > + /// The Status of Event to configure TLS configuration data. > > > + /// EventStatus: > > > + /// EFI_SUCCESSThe TLS is configured successfully with the > > > default > > value. > > > + /// EFI_INVALID_PARAMETER One or more input parameters to > > SetSessionData() is invalid. > > > + /// EFI_NOT_READY Current TLS session state is NOT > > EfiTlsSessionStateNotStarted. > > > + /// EFI_NOT_FOUND Fail to get 'HttpTlsCipherList' variable. > > > + /// Others Other error as indicated. > > > + /// > > > + HttpEventTlsConfigured, > > > + > > > > Since this changes the ABI, you may want to also update the protocol > > GUID to prevent strange errors if old and new binaries are used on the > > same system. > This makes sense, will send out V2. Hi Michael, In order to minimize the change, I decided to relocate HttpEventTlsConfigured to the end of enum declaration to keep the enum number backward compatible. Please check it in V2 patch. Thanks Abner > > Thanks > Abner > > > > > Reviewed-by: Michael Brown > > > > Thanks, > > > > Michael -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113326): https://edk2.groups.io/g/devel/message/113326 Mute This Topic: https://groups.io/mt/103539580/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 0/6] Refactor HTTP DXE to provide TLS reconfiguration capability
From: Abner Chang For the HTTPS connetion that doesn't require TLS peer verification, We introduce a new HTTP event HttpEventTlsConfigured to notify HTTP callback functions after TlsConfigureSession(). With this event, the upper layer HTTP application can listen to HttpEventTlsConfigured HTTP event and reconfigure TLS configuration data in the callback function to set TLS verify method to TLS_VERIFY_NONE. The use case such as Redfish service connction which doesn't require the TLS peer verification on the cetificate, especially to the Redfish service connection through the in-band network interface. The root cause we are fixing is the TLS config data is hardcoded in TlsConfigureSession() for any TLS child in HttpSupport.c. With this hardcoded code, HTTP application has no way to give the proper TLS config data when TLS session is initiated. In V2, total six patches. Relocate HttpEventTlsConfigured event to the end of enum. This keeps the enum number backward compatiable. - Add 5/6 patch to uncrustify RedfishRestExDriver.h. - Fix typo in the commit sibject. In V1, total five patches: Patch 1/5: We agreed to refactor TlsCreateChild and install TLS on the given HTTP handle. Patch 2/5: We consider TLS certificate not found as a success case to ensures HTTP session is still initiated and HttpInitSession() returns EFI_SUCCESS to the caller. The failure is pushed back to TLS DXE driver if the HTTP communication actually requires certificate. Patch 3/5: Introduce HttpEventTlsConfigured HTTP callback event Patch 4/5: REST EX DXE provides HTTP event callback protocol Patch 5/5: REST EX DXE fix. Signed-off-by: Abner Chang Cc: Saloni Kasbekar Cc: Zachary Clark-williams Cc: Michael Brown Cc: Nickle Wang Cc: Igor Kulchytskyy Abner Chang (6): NetworkPkg/HttpDxe: Refactor TlsCreateChild NetworkPkg/HttpDxe: Consider TLS certificate not found as a success case NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event RedfishPkg/RedfishRestExDxe: Implement EDKII_HTTP_CALLBACK_PROTOCOL RedfishPkg/RedfishRestExDxe: Uncrustify RedfishRestExDriver.h RedfishPkg/RedfishRestExDxe: Update Supported function .../RedfishRestExDxe/RedfishRestExDxe.inf | 3 + NetworkPkg/HttpDxe/HttpProto.h| 3 +- NetworkPkg/HttpDxe/HttpsSupport.h | 18 ++-- NetworkPkg/Include/Protocol/HttpCallback.h| 15 ++- .../RedfishRestExDxe/RedfishRestExDriver.h| 32 +-- NetworkPkg/HttpDxe/HttpImpl.c | 23 + NetworkPkg/HttpDxe/HttpProto.c| 8 +- NetworkPkg/HttpDxe/HttpsSupport.c | 95 --- .../RedfishRestExDxe/RedfishRestExDriver.c| 85 + 9 files changed, 204 insertions(+), 78 deletions(-) -- 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113327): https://edk2.groups.io/g/devel/message/113327 Mute This Topic: https://groups.io/mt/103577241/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 1/6] NetworkPkg/HttpDxe: Refactor TlsCreateChild
From: Abner Chang - Use HTTP instance as the parameter for TlsCreateChild function. - Install TLS protocol on the HTTP instance thats create TLS child. Signed-off-by: Abner Chang Cc: Saloni Kasbekar Cc: Zachary Clark-williams Cc: Michael Brown Cc: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Michael Brown --- NetworkPkg/HttpDxe/HttpProto.h| 3 +- NetworkPkg/HttpDxe/HttpsSupport.h | 18 --- NetworkPkg/HttpDxe/HttpImpl.c | 23 ++--- NetworkPkg/HttpDxe/HttpProto.c| 7 +-- NetworkPkg/HttpDxe/HttpsSupport.c | 78 ++- 5 files changed, 64 insertions(+), 65 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpProto.h b/NetworkPkg/HttpDxe/HttpProto.h index 012f1f4b467..7e77b389a78 100644 --- a/NetworkPkg/HttpDxe/HttpProto.h +++ b/NetworkPkg/HttpDxe/HttpProto.h @@ -3,6 +3,7 @@ Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved. (C) Copyright 2016 Hewlett Packard Enterprise Development LP +Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -171,7 +172,7 @@ typedef struct _HTTP_PROTOCOL { BOOLEAN UseHttps; EFI_SERVICE_BINDING_PROTOCOL *TlsSb; - EFI_HANDLETlsChildHandle; /// Tls ChildHandle + BOOLEAN TlsAlreadyCreated; TLS_CONFIG_DATA TlsConfigData; EFI_TLS_PROTOCOL *Tls; EFI_TLS_CONFIGURATION_PROTOCOL*TlsConfiguration; diff --git a/NetworkPkg/HttpDxe/HttpsSupport.h b/NetworkPkg/HttpDxe/HttpsSupport.h index 3c70825e8c3..5b44c7ac395 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.h +++ b/NetworkPkg/HttpDxe/HttpsSupport.h @@ -2,6 +2,7 @@ The header files of miscellaneous routines specific to Https for HttpDxe driver. Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved. +Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -30,21 +31,18 @@ IsHttpsUrl ( /** Creates a Tls child handle, open EFI_TLS_PROTOCOL and EFI_TLS_CONFIGURATION_PROTOCOL. - @param[in] ImageHandle The firmware allocated handle for the UEFI image. - @param[out] TlsSb Pointer to the TLS SERVICE_BINDING_PROTOCOL. - @param[out] TlsProto Pointer to the EFI_TLS_PROTOCOL instance. - @param[out] TlsConfiguration Pointer to the EFI_TLS_CONFIGURATION_PROTOCOL instance. + @param[in] HttpInstance Pointer to HTTP_PROTOCOL structure. - @return The child handle with opened EFI_TLS_PROTOCOL and EFI_TLS_CONFIGURATION_PROTOCOL. + @return EFI_SUCCESSTLS child handle is returned in HttpInstance->TlsChildHandle + with opened EFI_TLS_PROTOCOL and EFI_TLS_CONFIGURATION_PROTOCOL. + EFI_DEVICE_ERROR TLS service binding protocol is not found. + Otherwise Fail to create TLS chile handle. **/ -EFI_HANDLE +EFI_STATUS EFIAPI TlsCreateChild ( - IN EFI_HANDLE ImageHandle, - OUT EFI_SERVICE_BINDING_PROTOCOL**TlsSb, - OUT EFI_TLS_PROTOCOL**TlsProto, - OUT EFI_TLS_CONFIGURATION_PROTOCOL **TlsConfiguration + IN HTTP_PROTOCOL *HttpInstance ); /** diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 7c5c925cf78..6606c293421 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -3,6 +3,7 @@ Copyright (c) 2015 - 2021, Intel Corporation. All rights reserved. (C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -248,7 +249,6 @@ EfiHttpRequest ( HTTP_TOKEN_WRAP*Wrap; CHAR8 *FileUrl; UINTN RequestMsgSize; - EFI_HANDLE ImageHandle; // // Initializations @@ -371,23 +371,10 @@ EfiHttpRequest ( // // Check whether we need to create Tls child and open the TLS protocol. // -if (HttpInstance->UseHttps && (HttpInstance->TlsChildHandle == NULL)) { - // - // Use TlsSb to create Tls child and open the TLS protocol. - // - if (HttpInstance->LocalAddressIsIPv6) { -ImageHandle = HttpInstance->Service->Ip6DriverBindingHandle; - } else { -ImageHandle = HttpInstance->Service->Ip4DriverBindingHandle; - } - - HttpInstance->TlsChildHandle = TlsCreateChild ( - ImageHandle, - &(HttpInstance->TlsSb), - &(HttpInstance->Tls), - &(HttpInstance->TlsConfiguration) - ); - if (HttpInstance->TlsChildHandle == NULL) { +if (HttpInstance->UseHttps && !HttpInstance->TlsAlreadyCreated) { + // Create TLS child for this HTTP
[edk2-devel] [PATCH V2 2/6] NetworkPkg/HttpDxe: Consider TLS certificate not found as a success case
From: Abner Chang We still return EFI_SUCCESS to the caller when TlsConfigCertificate returns error, for the use case the platform doesn't require certificate for the specific HTTP session. This ensures HttpInitSession function still initiated and returns EFI_SUCCESS to the caller. The failure is pushed back to TLS DXE driver if the HTTP communication actually requires certificate. Signed-off-by: Abner Chang Cc: Saloni Kasbekar Cc: Zachary Clark-williams Cc: Michael Brown Cc: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Michael Brown Reviewed-by: Saloni Kasbekar --- NetworkPkg/HttpDxe/HttpsSupport.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c index a07323ff0bd..04a830f7152 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -722,8 +722,21 @@ TlsConfigureSession ( // Status = TlsConfigCertificate (HttpInstance); if (EFI_ERROR (Status)) { -DEBUG ((DEBUG_ERROR, "TLS Certificate Config Error!\n")); -return Status; +if (Status == EFI_NOT_FOUND) { + DEBUG((DEBUG_WARN, "TLS Certificate is not found on the system!\n")); + // + // We still return EFI_SUCCESS to the caller when TlsConfigCertificate + // returns error, for the use case the platform doesn't require + // certificate for the specific HTTP session. This ensures + // HttpInitSession function still initiated and returns EFI_SUCCESS to + // the caller. The failure is pushed back to TLS DXE driver if the + // HTTP communication actually requires certificate. + // + Status = EFI_SUCCESS; +} else { + DEBUG((DEBUG_ERROR, "TLS Certificate Config Error!\n")); + return Status; +} } // -- 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113329): https://edk2.groups.io/g/devel/message/113329 Mute This Topic: https://groups.io/mt/103577245/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 4/6] RedfishPkg/RedfishRestExDxe: Implement EDKII_HTTP_CALLBACK_PROTOCOL
From: Abner Chang Implement EDKII_HTTP_CALLBACK_PROTOCOL that listens to HttpEventTlsConfigured event for reconfiguring TLS configuration data. Signed-off-by: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy --- .../RedfishRestExDxe/RedfishRestExDxe.inf | 3 + .../RedfishRestExDxe/RedfishRestExDriver.h| 32 ++--- .../RedfishRestExDxe/RedfishRestExDriver.c| 70 +++ 3 files changed, 95 insertions(+), 10 deletions(-) diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf b/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf index 64e6343bfbf..6da416ddb92 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDxe.inf @@ -5,6 +5,7 @@ # (C) Copyright 2020 Hewlett Packard Enterprise Development LP # Copyright (c) 2023, American Megatrends International LLC. # Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -57,6 +58,8 @@ gEfiHttpServiceBindingProtocolGuid ## TO_START gEfiHttpProtocolGuid## TO_START gEfiDevicePathProtocolGuid ## TO_START + gEdkiiHttpCallbackProtocolGuid ## CONSUMES + gEfiTlsProtocolGuid ## CONSUMES [Pcd] gEfiRedfishPkgTokenSpaceGuid.PcdRedfishRestExServiceAccessModeInBand ## CONSUMES diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h index 6b94e5814c4..929691cea35 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h @@ -4,6 +4,7 @@ Copyright (c) 2019, Intel Corporation. All rights reserved. (C) Copyright 2020 Hewlett Packard Enterprise Development LP Copyright (c) 2023, Ampere Computing LLC. All rights reserved. + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -32,6 +33,8 @@ #include #include #include +#include +#include /// /// Protocol instances @@ -67,6 +70,9 @@ typedef struct _RESTEX_INSTANCE RESTEX_INSTANCE; #define RESTEX_INSTANCE_FROM_THIS(a) \ CR (a, RESTEX_INSTANCE, RestEx, RESTEX_INSTANCE_SIGNATURE) +#define RESTEX_INSTANCE_FROM_HTTP_CALLBACK(a) \ + CR (a, RESTEX_INSTANCE, HttpCallbakFunction, RESTEX_INSTANCE_SIGNATURE) + #define RESTEX_STATE_UNCONFIGED 0 #define RESTEX_STATE_CONFIGED1 @@ -94,25 +100,31 @@ struct _RESTEX_SERVICE { #define RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY 0x0002 struct _RESTEX_INSTANCE { - UINT32 Signature; - LIST_ENTRY Link; + UINT32Signature; + LIST_ENTRYLink; - EFI_REST_EX_PROTOCOL RestEx; + EFI_REST_EX_PROTOCOL RestEx; - INTN State; - BOOLEANInDestroy; + INTN State; + BOOLEAN InDestroy; - RESTEX_SERVICE *Service; - EFI_HANDLE ChildHandle; + RESTEX_SERVICE*Service; + EFI_HANDLEChildHandle; - EFI_REST_EX_CONFIG_DATAConfigData; + EFI_REST_EX_CONFIG_DATA ConfigData; // // HTTP_IO to access the HTTP service // - HTTP_IOHttpIo; + HTTP_IO HttpIo; + + // + // EDKII_HTTP_CALLBACK_PROTOCOL that listens to + // HttpEventInitSession event. + // + EDKII_HTTP_CALLBACK_PROTOCOL HttpCallbakFunction; - UINT32 Flags; + UINT32Flags; }; typedef struct { diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c index 7036aed4268..39221989c49 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c @@ -4,6 +4,7 @@ Copyright (c) 2019, Intel Corporation. All rights reserved. (C) Copyright 2020 Hewlett Packard Enterprise Development LP Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -585,6 +586,53 @@ RedfishRestExDriverBindingStop ( return Status; } +/** + Callback function that is invoked when HTTP event occurs. + + @param[in] ThisPointer to the EDKII_HTTP_CALLBACK_PROTOCOL instance. + @param[in] Event The event that occurs in the current state. + @param[in] EventStatus The Status of Event, EFI_SUCCESS or other errors. +**/ +VOID +EFIAPI +RestExHttpCallback ( + IN EDKII_HTTP_CALLBACK_PROTOCOL *This, + IN EDKII_HTTP_CALLBACK_EVENT Event, + IN EFI_STATUSEventStatus + ) +{ + EFI_STATUSStatus; + EFI_TLS_
[edk2-devel] [PATCH V2 3/6] NetworkPkg/HttpDxe: Add HttpEventTlsConfigured HTTP callback event
From: Abner Chang Add HttpEventTlsConfigured HTTP callback event and notify callback functions when TlsConfigureSession () returns. Signed-off-by: Abner Chang Cc: Saloni Kasbekar Cc: Zachary Clark-williams Cc: Michael Brown Cc: Nickle Wang Cc: Igor Kulchytskyy Reviewed-by: Michael Brown --- NetworkPkg/Include/Protocol/HttpCallback.h | 15 ++- NetworkPkg/HttpDxe/HttpProto.c | 1 + NetworkPkg/HttpDxe/HttpsSupport.c | 4 ++-- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/NetworkPkg/Include/Protocol/HttpCallback.h b/NetworkPkg/Include/Protocol/HttpCallback.h index 3accd2f8424..ae66cc9f771 100644 --- a/NetworkPkg/Include/Protocol/HttpCallback.h +++ b/NetworkPkg/Include/Protocol/HttpCallback.h @@ -2,6 +2,7 @@ This file defines the EDKII HTTP Callback Protocol interface. Copyright (c) 2021, Intel Corporation. All rights reserved. + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -55,7 +56,19 @@ typedef enum { /// EFI_SUCCESSThe initialization of session is done. /// Others Other error as indicated. /// - HttpEventInitSession + HttpEventInitSession, + + /// + /// The Status of Event to configure TLS configuration data. + /// EventStatus: + /// EFI_SUCCESSThe TLS is configured successfully with the default value. + /// EFI_INVALID_PARAMETER One or more input parameters to SetSessionData() is invalid. + /// EFI_NOT_READY Current TLS session state is NOT EfiTlsSessionStateNotStarted. + /// EFI_NOT_FOUND Fail to get 'HttpTlsCipherList' variable. + /// Others Other error as indicated. + /// + HttpEventTlsConfigured + } EDKII_HTTP_CALLBACK_EVENT; /** diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 94900328ba9..9c3b497dce2 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1418,6 +1418,7 @@ HttpInitSession ( // if (TlsConfigure) { Status = TlsConfigureSession (HttpInstance); +HttpNotify (HttpEventTlsConfigured, Status); if (EFI_ERROR (Status)) { return Status; } diff --git a/NetworkPkg/HttpDxe/HttpsSupport.c b/NetworkPkg/HttpDxe/HttpsSupport.c index 04a830f7152..8d7bffe1e9c 100644 --- a/NetworkPkg/HttpDxe/HttpsSupport.c +++ b/NetworkPkg/HttpDxe/HttpsSupport.c @@ -723,7 +723,7 @@ TlsConfigureSession ( Status = TlsConfigCertificate (HttpInstance); if (EFI_ERROR (Status)) { if (Status == EFI_NOT_FOUND) { - DEBUG((DEBUG_WARN, "TLS Certificate is not found on the system!\n")); + DEBUG ((DEBUG_WARN, "TLS Certificate is not found on the system!\n")); // // We still return EFI_SUCCESS to the caller when TlsConfigCertificate // returns error, for the use case the platform doesn't require @@ -734,7 +734,7 @@ TlsConfigureSession ( // Status = EFI_SUCCESS; } else { - DEBUG((DEBUG_ERROR, "TLS Certificate Config Error!\n")); + DEBUG ((DEBUG_ERROR, "TLS Certificate Config Error!\n")); return Status; } } -- 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113331): https://edk2.groups.io/g/devel/message/113331 Mute This Topic: https://groups.io/mt/103577248/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 5/6] RedfishPkg/RedfishRestExDxe: Uncrustify RedfishRestExDriver.h
From: Abner Chang Signed-off-by: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy --- .../RedfishRestExDxe/RedfishRestExDriver.h| 22 +-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h index 929691cea35..f0107a453f7 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.h @@ -100,31 +100,31 @@ struct _RESTEX_SERVICE { #define RESTEX_INSTANCE_FLAGS_TCP_ERROR_RETRY 0x0002 struct _RESTEX_INSTANCE { - UINT32Signature; - LIST_ENTRYLink; + UINT32 Signature; + LIST_ENTRY Link; - EFI_REST_EX_PROTOCOL RestEx; + EFI_REST_EX_PROTOCOLRestEx; - INTN State; - BOOLEAN InDestroy; + INTNState; + BOOLEAN InDestroy; - RESTEX_SERVICE*Service; - EFI_HANDLEChildHandle; + RESTEX_SERVICE *Service; + EFI_HANDLE ChildHandle; - EFI_REST_EX_CONFIG_DATA ConfigData; + EFI_REST_EX_CONFIG_DATA ConfigData; // // HTTP_IO to access the HTTP service // - HTTP_IO HttpIo; + HTTP_IO HttpIo; // // EDKII_HTTP_CALLBACK_PROTOCOL that listens to // HttpEventInitSession event. // - EDKII_HTTP_CALLBACK_PROTOCOL HttpCallbakFunction; + EDKII_HTTP_CALLBACK_PROTOCOLHttpCallbakFunction; - UINT32Flags; + UINT32 Flags; }; typedef struct { -- 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113332): https://edk2.groups.io/g/devel/message/113332 Mute This Topic: https://groups.io/mt/103577250/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH V2 6/6] RedfishPkg/RedfishRestExDxe: Update Supported function
From: Abner Chang Update Supported function to check it the given controller handle is already started. Signed-off-by: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy --- RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c index 39221989c49..741a8c1e938 100644 --- a/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c +++ b/RedfishPkg/RedfishRestExDxe/RedfishRestExDriver.c @@ -357,6 +357,21 @@ RedfishRestExDriverBindingSupported ( IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL ) { + EFI_STATUS Status; + UINT32 *Id; + + Status = gBS->OpenProtocol ( + ControllerHandle, + &gEfiCallerIdGuid, + (VOID **)&Id, + This->DriverBindingHandle, + ControllerHandle, + EFI_OPEN_PROTOCOL_GET_PROTOCOL + ); + if (!EFI_ERROR (Status)) { +return EFI_ALREADY_STARTED; + } + // // Test for the HttpServiceBinding Protocol. // -- 2.37.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#11): https://edk2.groups.io/g/devel/message/11 Mute This Topic: https://groups.io/mt/103577253/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId from allskuset
Reviewed-by: Yuwei Chen > -Original Message- > From: S, Ashraf Ali > Sent: Monday, December 25, 2023 11:28 PM > To: devel@edk2.groups.io > Cc: S, Ashraf Ali ; Chen, Christine > ; Rebecca Cran ; Gao, Liming > ; Feng, Bob C ; Chan, > Amy ; Chaganty, Rangasai V > > Subject: [PATCH] BaseTools: Remove Duplicate sets of SkuName and SkuId > from allskuset > > Currently when the platform has many SKUs then allskuset will be having so > many duplicate. and while parsing the allskuset will take longer time while > assing Pcd.SkuInfoList. > This patch is to eliminate those duplicate entires to reduce the build time > > Cc: Yuwei Chen > Cc: Rebecca Cran > Cc: Liming Gao > Cc: Bob Feng > Cc: Amy Chan > Cc: Sai Chaganty > Signed-off-by: Ashraf Ali S > --- > BaseTools/Source/Python/AutoGen/PlatformAutoGen.py | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > index 592d4824a4..dac81454a9 100644 > --- a/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > +++ b/BaseTools/Source/Python/AutoGen/PlatformAutoGen.py > @@ -707,6 +707,8 @@ class PlatformAutoGen(AutoGen): > self._DynamicPcdList.extend(list(OtherPcdArray)) > self._DynamicPcdList.sort() > allskuset = [(SkuName, Sku.SkuId) for pcd in self._DynamicPcdList for > (SkuName, Sku) in pcd.SkuInfoList.items()] > +# Remove duplicate sets in the list > +allskuset = list(set(allskuset)) > for pcd in self._DynamicPcdList: > if len(pcd.SkuInfoList) == 1: > for (SkuName, SkuId) in allskuset: > -- > 2.39.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113334): https://edk2.groups.io/g/devel/message/113334 Mute This Topic: https://groups.io/mt/103360241/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, January 8, 2024 #cal-reminder
*Reminder: Tools, CI, Code base construction meeting series* *When:* Monday, January 8, 2024 4:30pm to 5:30pm (UTC-08: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=2159616 ) *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 (#113335): https://edk2.groups.io/g/devel/message/113335 Mute This Topic: https://groups.io/mt/103588662/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] [PATCH] BaseTools/GenFds: Apply OEM_CAPSULE_FLAGS during Capsule generation.
Reviewed-by: Liming Gao > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Igniculus.Fu > via groups.io > 发送时间: 2024年1月2日 14:27 > 收件人: devel@edk2.groups.io > 抄送: Bob Feng ; Liming Gao > ; Yuwei Chen ; Abner > Chang ; Eric Xing ; Abdul > Lateef Attar > 主题: [edk2-devel] [PATCH] BaseTools/GenFds: Apply OEM_CAPSULE_FLAGS > during Capsule generation. > > From: Igniculus Fu > > Bugzilla ticket #4633 > > FdfParser.py has defined a key named OEM_CAPSULE_FLAGS to set the > lower 16 bits of EFI_CAPSULE_HEADER.Flags. However, this key is totally > "forgotten" in Capsule.py, making it impossible to set lower 16 bits of > this field, and leading to an always FALSE when comparing to > gEfiMdeModulePkgTokenSpaceGuid.PcdSystemRebootAfterCapsuleProcessFla > g > in MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c: > ProcessTheseCapsules(). > > This patch ORs the value of OEM_CAPSULE_FLAGS with previously calculated > CAPSULE_FLAGS value, making the lower 16 bits of value being correctly set. > > Signed-off-by: Igniculus Fu > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen > Cc: Abner Chang > Cc: Eric Xing > Cc: Abdul Lateef Attar > > --- > BaseTools/Source/Python/GenFds/Capsule.py | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/BaseTools/Source/Python/GenFds/Capsule.py > b/BaseTools/Source/Python/GenFds/Capsule.py > index f4bfc74e55..d274d8f03e 100644 > --- a/BaseTools/Source/Python/GenFds/Capsule.py > +++ b/BaseTools/Source/Python/GenFds/Capsule.py > @@ -1,6 +1,7 @@ > ## @file > # generate capsule > # > +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. > # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -78,6 +79,8 @@ class Capsule (CapsuleClassObject): > Flags |= 0x0001 > elif flag == 'InitiateReset': > Flags |= 0x0004 > +if 'OEM_CAPSULE_FLAGS' in self.TokensDict: > +Flags |= int(self.TokensDict['OEM_CAPSULE_FLAGS'],16) > Header.write(pack('=I', Flags)) > # > # typedef struct { > -- > 2.38.1.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113336): https://edk2.groups.io/g/devel/message/113336 Mute This Topic: https://groups.io/mt/103589200/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
回复: [edk2-devel] [PATCH V3 0/2] Change the comments RFC1323 to RFC7323
This change looks good to me. Reviewed-by: Liming Gao I will merge it. Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Ren, Suqiang > 发送时间: 2024年1月3日 20:38 > 收件人: devel@edk2.groups.io; Gao, Liming > 抄送: Kinney, Michael D ; Liu, Zhiguang > ; Kasbekar, Saloni ; > Clark-williams, Zachary > 主题: Re: [edk2-devel] [PATCH V3 0/2] Change the comments RFC1323 to > RFC7323 > > Add the Pull Request link: https://github.com/tianocore/edk2/pull/5190. > > Thanks > Ren, Suqiang > > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ren, > Suqiang > Sent: Tuesday, January 2, 2024 2:33 PM > To: devel@edk2.groups.io; Ren, SuqiangX > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang ; > Kasbekar, Saloni ; Clark-williams, Zachary > > Subject: Re: [edk2-devel] [PATCH V3 0/2] Change the comments RFC1323 to > RFC7323 > > Hi Liming, > > This patch has reviewed by Kasbekar, Saloni: > https://edk2.groups.io/g/devel/message/112933 > > Could you help to merge this patch? > > > Thanks > Ren, Suqiang > > -Original Message- > From: devel@edk2.groups.io On Behalf Of Ren, > Suqiang > Sent: Tuesday, December 26, 2023 5:02 PM > To: devel@edk2.groups.io > Cc: Kinney, Michael D ; Gao, Liming > ; Liu, Zhiguang ; > Kasbekar, Saloni ; Clark-williams, Zachary > > Subject: [edk2-devel] [PATCH V3 0/2] Change the comments RFC1323 to > RFC7323 > > REF: UEFI spec 2.10 Table 28.2.5 > > Change the description of RFC1323 to align with UEFI spec 2.10. > > v3: > Add the NetworkPkg change for RFC1323. > > v2: > Update the commit message. > > Signed-off-by: Suqiang Ren > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Saloni Kasbekar > Cc: Zachary Clark-williams > > Suqiang Ren (2): > MdePkg: RFC1323 definition changed to RFC7323 > NetworkPkg: RFC1323 definition changed to RFC7323 > > MdePkg/Include/Protocol/Tcp6.h | 4 ++-- > NetworkPkg/TcpDxe/TcpInput.c | 2 +- > NetworkPkg/TcpDxe/TcpProto.h | 2 +- > 3 files changed, 4 insertions(+), 4 deletions(-) > > -- > 2.26.2.windows.1 > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113337): https://edk2.groups.io/g/devel/message/113337 Mute This Topic: https://groups.io/mt/103589398/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] BaseTools: Fix raw strings containing valid escape characters
Hi Joey, Thanks for fixing. Reviewed-by: Yuwei Chen > -Original Message- > From: Joey Vagedes > Sent: Friday, December 29, 2023 12:48 AM > To: devel@edk2.groups.io > Cc: Rebecca Cran ; Gao, Liming > ; Feng, Bob C ; Chen, > Christine > Subject: [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape > characters > > Fixes raw regex strings that contain valid (and purposeful) escape characters > as they are being treated as individual characters rather than the single > escaped character they represent (i.e. '\t' is being treated as a '\' and a > 't' > rather than a single tab character). > > Signed-off-by: Joey Vagedes > Cc: Rebecca Cran > Cc: Liming Gao > Cc: Bob Feng > Cc: Yuwei Chen > --- > BaseTools/Source/Python/AutoGen/GenMake.py| 2 +- > BaseTools/Source/Python/Common/Misc.py| 2 +- > BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py > b/BaseTools/Source/Python/AutoGen/GenMake.py > index c416fe172fe5..fbd35d498923 100755 > --- a/BaseTools/Source/Python/AutoGen/GenMake.py > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > @@ -28,7 +28,7 @@ from Common.DataType import TAB_COMPILER_MSFT > gIncludePattern = > re.compile(r"^[ \t]*[#%]?[ \t]*include(?:[ \t]*(?:\\(?:\r\n|\r|\n))*[ > \t]*)*(?:\(?[ > \"<]?[ \t]*)([-\w.\\/() \t]+)(?:[ \t]*[\">]?\)?)", re.MULTILINE | re.UNICODE | > re.IGNORECASE) ## Regular expression for matching macro used in header > file inclusion-gMacroPattern = re.compile(r"([_A-Z][_A-Z0-9]*)[ \t]*\((.+)\)", > re.UNICODE)+gMacroPattern = re.compile("([_A-Z][_A-Z0-9]*)[ \t]*\\((.+)\\)", > re.UNICODE) gIsFileMap = {} diff --git > a/BaseTools/Source/Python/Common/Misc.py > b/BaseTools/Source/Python/Common/Misc.py > index f87d9dbdba39..34bfc90abd94 100755 > --- a/BaseTools/Source/Python/Common/Misc.py > +++ b/BaseTools/Source/Python/Common/Misc.py > @@ -1926,4 +1926,4 @@ def CopyDict(ori_dict): > # Remove the c/c++ comments: // and /* */ # def > RemoveCComments(ctext):-return re.sub(r'//.*?\n|/\*.*?\*/', '\n', ctext, > flags=re.S)+return re.sub('//.*?\n|/\\*.*?\\*/', '\n', ctext, > flags=re.S)diff --git > a/BaseTools/Source/Python/Workspace/DscBuildData.py > b/BaseTools/Source/Python/Workspace/DscBuildData.py > index 817cdbe5f19c..4768099343e5 100644 > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > @@ -2840,7 +2840,7 @@ class DscBuildData(PlatformBuildClassObject): > # start generating makefile MakeApp = PcdMakefileHeader >if > sys.platform == "win32":-MakeApp = MakeApp + r'APPFILE > = %s\%s.exe\n' % (self.OutputPath, PcdValueInitName) + r'APPNAME > = %s\n' % (PcdValueInitName) + r'OBJECTS = %s\%s.obj %s.obj\n' % > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) + 'INC = '+MakeApp = MakeApp + 'APPFILE > = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME > = %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) + 'INC = ' else: MakeApp = MakeApp + > PcdGccMakefile MakeApp = MakeApp + 'APPFILE = %s/%s\n' % > (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % > (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, > PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) + > \@@ -2950,7 +2950,7 @@ class DscBuildData(PlatformBuildClassObject): > MakeApp += "$(OBJECTS) : %s\n" % include_file if > sys.platform == > "win32": PcdValueCommonPath = > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] > , "Source\C\Common\PcdValueCommon.c"))-MakeApp = MakeApp + > r'%s\PcdValueCommon.c : %s\n' % (self.OutputPath, PcdValueCommonPath)+ > MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, > PcdValueCommonPath) MakeApp = MakeApp + '\tcopy /y %s $@\n' % > (PcdValueCommonPath) else: PcdValueCommonPath = > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] > , "Source/C/Common/PcdValueCommon.c"))-- > 2.43.0.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113338): https://edk2.groups.io/g/devel/message/113338 Mute This Topic: https://groups.io/mt/103403582/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] 回复: [PATCH V2 0/2] Update keybaord map based on UEFI spec 2.10
Reviewed-by: Liming Gao > -邮件原件- > 发件人: Yi Li > 发送时间: 2023年12月25日 10:23 > 收件人: devel@edk2.groups.io > 抄送: Yi Li ; Michael D Kinney > ; Liming Gao ; > Zhiguang Liu ; Rebecca Cran ; > Bob Feng ; Yuwei Chen > 主题: [PATCH V2 0/2] Update keybaord map based on UEFI spec 2.10 > > REF: UEFI SPEC 2.10 34.8.10 EFI_KEY > > Add EfiKeyIntl0-9. > > Signed-off-by: Yi Li > > v2: > Remove changes in HiiFramework.h because it should follow HII spec. > > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Rebecca Cran > Cc: Liming Gao > Cc: Bob Feng > Cc: Yuwei Chen > > Yi Li (2): > MdePkg: Update keybaord map based on UEFI spec 2.10 > BaseTools: Update keybaord map based on UEFI spec 2.10 > > .../Include/Common/UefiInternalFormRepresentation.h | 12 > +++- > MdePkg/Include/Uefi/UefiInternalFormRepresentation.h | 12 > +++- > 2 files changed, 22 insertions(+), 2 deletions(-) > > -- > 2.42.0.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113339): https://edk2.groups.io/g/devel/message/113339 Mute This Topic: https://groups.io/mt/103589440/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
回复: [edk2-devel] [PATCH 1/1] MdePkg: Update the definition of CapsuleImageSize on EFI_CAPSULE_HEADER
I just add push label for this PR. Thanks Liming > -邮件原件- > 发件人: devel@edk2.groups.io 代表 Ren, Suqiang > 发送时间: 2024年1月3日 20:35 > 收件人: Gao, Liming ; devel@edk2.groups.io > 抄送: Kinney, Michael D ; Liu, Zhiguang > ; Li, Yi1 > 主题: Re: [edk2-devel] [PATCH 1/1] MdePkg: Update the definition of > CapsuleImageSize on EFI_CAPSULE_HEADER > > Hi Liming, > > Thanks for reminding me. Here are the PR for test CI: > https://github.com/tianocore/edk2/pull/5189. > > Could you help to merge this patch? > > Thanks > Ren, Suqiang > > -Original Message- > From: gaoliming > Sent: Wednesday, January 3, 2024 8:50 AM > To: Ren, SuqiangX ; devel@edk2.groups.io > Cc: Kinney, Michael D ; Liu, Zhiguang > ; Li, Yi1 > Subject: 回复: [edk2-devel] [PATCH 1/1] MdePkg: Update the definition of > CapsuleImageSize on EFI_CAPSULE_HEADER > > Sure. Can you help create Pull Request to make sure it can pass CI first? > > Thanks > Liming > > -邮件原件- > > 发件人: Ren, SuqiangX > > 发送时间: 2024年1月2日 10:30 > > 收件人: Gao, Liming ; devel@edk2.groups.io > > 抄送: Kinney, Michael D ; Liu, Zhiguang > > ; Li, Yi1 > > 主题: RE: [edk2-devel] [PATCH 1/1] MdePkg: Update the definition of > > CapsuleImageSize on EFI_CAPSULE_HEADER > > > > Hi Liming, > > > > This patch has also reviewed by Felix Polyudov: > > https://edk2.groups.io/g/devel/message/113003 > > > > Could you help to merge this patch? > > > > Thanks > > Ren, Suqiang > > > > -Original Message- > > From: gaoliming > > Sent: Saturday, December 23, 2023 10:01 AM > > To: devel@edk2.groups.io; Ren, SuqiangX > > Cc: Kinney, Michael D ; Liu, Zhiguang > > ; Li, Yi1 > > Subject: 回复: [edk2-devel] [PATCH 1/1] MdePkg: Update the definition of > > CapsuleImageSize on EFI_CAPSULE_HEADER > > > > Reviewed-by: Liming Gao > > > > > -邮件原件- > > > 发件人: devel@edk2.groups.io 代表 Ren, > > Suqiang > > > 发送时间: 2023年12月22日 16:11 > > > 收件人: devel@edk2.groups.io > > > 抄送: Michael D Kinney ; Liming Gao > > > ; Zhiguang Liu ; > > > Yi Li > > > 主题: [edk2-devel] [PATCH 1/1] MdePkg: Update the definition of > > > CapsuleImageSize on EFI_CAPSULE_HEADER > > > > > > Add the description of CapsuleImageSize to align with UEFI spec 2.10. > > > > > > REF: UEFI spec 2.10 Table 8.5.3.1 > > > > > > Signed-off-by: RenSuqiang > > > Cc: Michael D Kinney > > > Cc: Liming Gao > > > Cc: Zhiguang Liu > > > Cc: Yi Li > > > --- > > > MdePkg/Include/Uefi/UefiSpec.h | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/MdePkg/Include/Uefi/UefiSpec.h > > > b/MdePkg/Include/Uefi/UefiSpec.h index 5de00e8ea2af..ad80afbe3499 > > > 100644 > > > --- a/MdePkg/Include/Uefi/UefiSpec.h > > > +++ b/MdePkg/Include/Uefi/UefiSpec.h > > > @@ -1663,7 +1663,7 @@ typedef struct { > > >/// > > >UINT32 Flags; > > >/// > > > - /// Size in bytes of the capsule. > > > + /// Size in bytes of the capsule (including capsule header). > > >/// > > >UINT32 CapsuleImageSize; > > > } EFI_CAPSULE_HEADER; > > > -- > > > 2.26.2.windows.1 > > > > > > > > > > > > > > > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113340): https://edk2.groups.io/g/devel/message/113340 Mute This Topic: https://groups.io/mt/103589577/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] 回复: [PATCH v6 00/36] Enable LoongArch virtual machine in edk2
Chao: Thanks for your update. The changes in MdePkg are good to me. Reviewed-by: Liming Gao But, I still have one minor comment on [PATCH v6 11/36] UefiCpuPkg: Add CPU exception library for LoongArch. Can you separate the change in MdePkg to another single commit? Thanks Liming > -邮件原件- > 发件人: Chao Li > 发送时间: 2024年1月5日 17:41 > 收件人: devel@edk2.groups.io > 抄送: Michael D Kinney ; Liming Gao > ; Zhiguang Liu ; Eric > Dong ; Ray Ni ; Rahul Kumar > ; Gerd Hoffmann ; Leif > Lindholm ; Ard Biesheuvel > ; Abner Chang ; > Daniel Schaefer ; Sami Mujawar > ; Jiewen Yao ; Jordan > Justen ; Andrei Warkentin > ; Laszlo Ersek ; Sunil V L > ; Bibo Mao > 主题: [PATCH v6 00/36] Enable LoongArch virtual machine in edk2 > > This patch set will enable LoongArch virtual machine in edk2, the new > LoongArch virtual machine is located in OvmfPkg/LoongArchVirt/, it is a > generic platform that dose not require any actual hardware. > > Patch1-Patch14: Submit the common library and driver for LoongArch > virtual machine and real hardware. Such as base help functions, > exception handel, MMU library, multiprocessor library etc. > > Patch15-Patch16: Add PrePiCpuIoSize for LoongArch64. and move ArmVirtPkg > two PCDs into OvmfPkg for easier use by other architectures. > > Patch17-Patch29: LoongArch virtual machine private code, include SEC and > PEI phase code, some library and drivers. > > Patch30: Add LoongArchVirt's self introduction-file. > > Modfied modues: MdePkg, UefiCpuPkg, EmbeddedPkg, ArmVirtPkg, OvmfPkg. > > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 > > PR: https://github.com/tianocore/edk2/pull/5208 > > **Changes from V1 to V2:** > 1. Add Ray's Ack signature to patch 13. > 2. Add LoongArchVirt's self introduction-file. And made a standalone > patch for this change. > > **Changes from V2 to V3:** > Compared with V2, there are 9 more patches, removed 2 libraries and 1 > driver from OvmfPkg/LoongArchVrt. > > New patches: > MdePkg: Add a new library named PeiServicesTablePointerLibReg > MdePkg: Add method of LoongArch64 to PeiServicesTablePointerLibReg > MdePkg: Add a PCD feature flag named PcdPciIoTranslationIsEnabled > UefiCpuPkg: Add MMIO method in CpuIo2Dxe > ArmVirtPkg: Enable UefiCpuPkg version CpuIo2Dxe > ArmPkg: Remove ArmPciCpuIo2Dxe from ArmPkg > OvmfPkg/RiscVVirt: Enable UefiCpuPkg version CpuIo2Dxe > OvmfPkg/RiscVVirt: Remove PciCpuIo2Dxe from RiscVVirt > ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg > ArmVirtPkg: Move the PcdTerminalTypeGuidBuffer into OvmfPkg > ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg > > For the review opinions: > 1. Add MMIO method to CpuIo2Dxe driver to accommodate more ARCH that > require MMIO method, enable it on ARM, RISCV64 and LOONGARCH64. > Questioner: Gerd, Sunil. > > 2. Move the FdtSerialProtAddressLib to OvmfPkg and enabled it on ARM and > LOONGARCH64. Questioner: Gerd, Laszlo. > > 3. Add a new library in MdePkg named PeiServiceTablePointerLibReg for > the Register Mechanism and enabled it on LOONGARCH64. Questioner: > Laszlo. > > 4. Moved the ARM version of PlatformBootManagerLib to OvmfPkg/Library, > and > enabled it on ARM and LOONGARCH64. Questioner: Laszlo, Gerd. > > 5. Adjust the order of some inf file in ArmVirtPkg. Questioner: Sami. > > 6. Move the CpuMmuLib.h some architecture-specific PTE #defines into > Csr.h. Questioner: Andrei. > > **Changes from V3 to V4:** > Compared with V3, 1 patch moving ArmPciCpuIo2Dxe has been removed. > Adjusted the code of the LoongArch64 CPU timer library. Rename > PeiServiceTablePointerLibReg to PeiServiceTablePointerLibKs0. Fixed some > typos. Remove some APIs of CpuMmuLib. > > For the review opinions: > 1. Removed the patch that removed ArmPciCpuIo2Dxe, there are 15 platforms > in edk2-platforms were affected, so wait for this patch series to be > merged, then submit a patch to remove it. Questioner: Leif. > > 2. Renamed the PeiServiceTablePointLibReg to PeiServiceTablePointLibKs0. > Currently, this library is specific to LoongArch architecture. > Questioner: Laszlo, Liming. > > 3. Adjust some logic of LoongArch64 CPU timer library. Using the safe > INT library and adjust the bit width of stable counter. Questioner: Laszlo. > > 4. Removed some APIs from CpuMmuLib. Change some APIs to private. > Questioner: Ray. > > **Changes from V4 to V5:** > Compared with V4, 1 patch adding PcdPciIoTranslationIsEnabled in MdePkg > has been removed. > Copy ArmPciCpuIo2Dxe to UefiCpuPkg and renamed it to CpuMmio2Dxe. > Restore the definitions in MdePkg/Include/Protocol/DebugSupport.h, and > just add some comments. > > For the review opinions: > 1. Copy ArmPciCpuIo2Dxe to UefiCpuPkg so that more other ARCHs can use > it easily. Questioner: Ray, Ard. > > 2. Restore the changes of MdePkg/Include/Protocol/DebugSupport.h. > Questioner: Liming. > > 3. Ia32 X64 and LoongArch64 use a same API definition, > InitializeFloatingPointUnits in CpuLib.h. Questioner: Liming. > > 4. Adjust API def
Re: [edk2-devel] 回复: [PATCH v6 00/36] Enable LoongArch virtual machine in edk2
Hi Liming, Thanks, Chao On 2024/1/8 09:35, gaoliming via groups.io wrote: Chao: Thanks for your update. The changes in MdePkg are good to me. Reviewed-by: Liming Gao But, I still have one minor comment on [PATCH v6 11/36] UefiCpuPkg: Add CPU exception library for LoongArch. Can you separate the change in MdePkg to another single commit? Of course, let me separate them in V7 and submit in a few days. Thanks Liming -邮件原件- 发件人: Chao Li 发送时间: 2024年1月5日 17:41 收件人:devel@edk2.groups.io 抄送: Michael D Kinney; Liming Gao ; Zhiguang Liu; Eric Dong; Ray Ni; Rahul Kumar ; Gerd Hoffmann; Leif Lindholm; Ard Biesheuvel ; Abner Chang; Daniel Schaefer; Sami Mujawar ; Jiewen Yao; Jordan Justen; Andrei Warkentin ; Laszlo Ersek; Sunil V L ; Bibo Mao 主题: [PATCH v6 00/36] Enable LoongArch virtual machine in edk2 This patch set will enable LoongArch virtual machine in edk2, the new LoongArch virtual machine is located in OvmfPkg/LoongArchVirt/, it is a generic platform that dose not require any actual hardware. Patch1-Patch14: Submit the common library and driver for LoongArch virtual machine and real hardware. Such as base help functions, exception handel, MMU library, multiprocessor library etc. Patch15-Patch16: Add PrePiCpuIoSize for LoongArch64. and move ArmVirtPkg two PCDs into OvmfPkg for easier use by other architectures. Patch17-Patch29: LoongArch virtual machine private code, include SEC and PEI phase code, some library and drivers. Patch30: Add LoongArchVirt's self introduction-file. Modfied modues: MdePkg, UefiCpuPkg, EmbeddedPkg, ArmVirtPkg, OvmfPkg. BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=4584 PR:https://github.com/tianocore/edk2/pull/5208 **Changes from V1 to V2:** 1. Add Ray's Ack signature to patch 13. 2. Add LoongArchVirt's self introduction-file. And made a standalone patch for this change. **Changes from V2 to V3:** Compared with V2, there are 9 more patches, removed 2 libraries and 1 driver from OvmfPkg/LoongArchVrt. New patches: MdePkg: Add a new library named PeiServicesTablePointerLibReg MdePkg: Add method of LoongArch64 to PeiServicesTablePointerLibReg MdePkg: Add a PCD feature flag named PcdPciIoTranslationIsEnabled UefiCpuPkg: Add MMIO method in CpuIo2Dxe ArmVirtPkg: Enable UefiCpuPkg version CpuIo2Dxe ArmPkg: Remove ArmPciCpuIo2Dxe from ArmPkg OvmfPkg/RiscVVirt: Enable UefiCpuPkg version CpuIo2Dxe OvmfPkg/RiscVVirt: Remove PciCpuIo2Dxe from RiscVVirt ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg ArmVirtPkg: Move the PcdTerminalTypeGuidBuffer into OvmfPkg ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg For the review opinions: 1. Add MMIO method to CpuIo2Dxe driver to accommodate more ARCH that require MMIO method, enable it on ARM, RISCV64 and LOONGARCH64. Questioner: Gerd, Sunil. 2. Move the FdtSerialProtAddressLib to OvmfPkg and enabled it on ARM and LOONGARCH64. Questioner: Gerd, Laszlo. 3. Add a new library in MdePkg named PeiServiceTablePointerLibReg for the Register Mechanism and enabled it on LOONGARCH64. Questioner: Laszlo. 4. Moved the ARM version of PlatformBootManagerLib to OvmfPkg/Library, and enabled it on ARM and LOONGARCH64. Questioner: Laszlo, Gerd. 5. Adjust the order of some inf file in ArmVirtPkg. Questioner: Sami. 6. Move the CpuMmuLib.h some architecture-specific PTE #defines into Csr.h. Questioner: Andrei. **Changes from V3 to V4:** Compared with V3, 1 patch moving ArmPciCpuIo2Dxe has been removed. Adjusted the code of the LoongArch64 CPU timer library. Rename PeiServiceTablePointerLibReg to PeiServiceTablePointerLibKs0. Fixed some typos. Remove some APIs of CpuMmuLib. For the review opinions: 1. Removed the patch that removed ArmPciCpuIo2Dxe, there are 15 platforms in edk2-platforms were affected, so wait for this patch series to be merged, then submit a patch to remove it. Questioner: Leif. 2. Renamed the PeiServiceTablePointLibReg to PeiServiceTablePointLibKs0. Currently, this library is specific to LoongArch architecture. Questioner: Laszlo, Liming. 3. Adjust some logic of LoongArch64 CPU timer library. Using the safe INT library and adjust the bit width of stable counter. Questioner: Laszlo. 4. Removed some APIs from CpuMmuLib. Change some APIs to private. Questioner: Ray. **Changes from V4 to V5:** Compared with V4, 1 patch adding PcdPciIoTranslationIsEnabled in MdePkg has been removed. Copy ArmPciCpuIo2Dxe to UefiCpuPkg and renamed it to CpuMmio2Dxe. Restore the definitions in MdePkg/Include/Protocol/DebugSupport.h, and just add some comments. For the review opinions: 1. Copy ArmPciCpuIo2Dxe to UefiCpuPkg so that more other ARCHs can use it easily. Questioner: Ray, Ard. 2. Restore the changes of MdePkg/Include/Protocol/DebugSupport.h. Questioner: Liming. 3. Ia32 X64 and LoongArch64 use a same API definition, InitializeFloatingPointUnits in CpuLib.h. Questioner: Liming. 4. Adjust API definition in CpuMmuLib.h. Questioner: Ray. **Changes from V5 to V6:** 1. Added Sunil "Reviewed-by" message to pa
Re: [edk2-devel] [edk2-redfish-client][PATCH V3] RedfishClientPkg: Add ETag PCD and revise Redfish ETag functions
[AMD Official Use Only - General] Thanks for catching that, Igor. Will send out V4 for this change. Abner > -Original Message- > From: Igor Kulchytskyy > Sent: Thursday, January 4, 2024 10:59 PM > To: Chang, Abner ; devel@edk2.groups.io > Cc: Nickle Wang ; Mike Maslenkin > > Subject: RE: [EXTERNAL] [edk2-redfish-client][PATCH V3] RedfishClientPkg: > Add ETag PCD and revise Redfish ETag functions > > Caution: This message originated from an External Source. Use proper caution > when opening attachments, clicking links, or responding. > > > Hi Abner, > Some small correction in comments syntax (see below). > Thank you, > Igor > > -Original Message- > From: abner.ch...@amd.com > Sent: Thursday, January 4, 2024 4:09 AM > To: devel@edk2.groups.io > Cc: Nickle Wang ; Igor Kulchytskyy ; > Mike Maslenkin > Subject: [EXTERNAL] [edk2-redfish-client][PATCH V3] RedfishClientPkg: Add > ETag PCD and revise Redfish ETag functions > > > **CAUTION: The e-mail below is from an external source. Please exercise > caution before opening attachments, clicking links, or following guidance.** > > From: Abner Chang > > Add PCD to disable ETag capability for the case Redfish > service doesn't support ETag. > > Signed-off-by: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > Cc: Mike Maslenkin > --- > RedfishClientPkg/RedfishClientPkg.dec | 3 + > .../RedfishFeatureUtilityLib.inf | 2 + > .../Library/RedfishFeatureUtilityLib.h| 47 +++- > .../Features/Bios/v1_0_9/Dxe/BiosDxe.c| 19 +- > .../v1_0_4/Common/BootOptionCommon.c | 5 +- > .../BootOption/v1_0_4/Dxe/BootOptionDxe.c | 17 +- > .../v1_5_0/Dxe/ComputerSystemDxe.c| 13 +- > .../Features/Memory/V1_7_1/Dxe/MemoryDxe.c| 17 +- > .../RedfishFeatureUtilityLib.c| 209 -- > 9 files changed, 204 insertions(+), 128 deletions(-) > > diff --git a/RedfishClientPkg/RedfishClientPkg.dec > b/RedfishClientPkg/RedfishClientPkg.dec > index b350facae0..ce3b6d9752 100644 > --- a/RedfishClientPkg/RedfishClientPkg.dec > +++ b/RedfishClientPkg/RedfishClientPkg.dec > @@ -3,6 +3,7 @@ > # > # (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP > # Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > ## > @@ -76,6 +77,8 @@ > > gEfiRedfishClientPkgTokenSpaceGuid.PcdDefaultRedfishVersion|L"v1"|VOID* > |0x1004 >## The number of seconds that the firmware will wait before system reboot > > gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishSystemRebootTimeout|5|UI > NT16|0x2002 > + ## Default capability of Redfish service side ETAG support > + > gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishServiceEtagSupported|TRUE| > BOOLEAN|0x1005 > > [PcdsDynamicEx] >## The flag used to indicate that system reboot is required due to system > configuration change > diff --git > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.i > nf > b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.i > nf > index 718273b248..63330c8e9d 100644 > --- > a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.i > nf > +++ > b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.i > nf > @@ -3,6 +3,7 @@ > # > # (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP > # Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. > # > # SPDX-License-Identifier: BSD-2-Clause-Patent > # > @@ -54,6 +55,7 @@ > > [Pcd] >gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishSystemRebootRequired > + gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishServiceEtagSupported > > [Guids] > > diff --git a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > index 9513a65617..0f8aede5c4 100644 > --- a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > +++ b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h > @@ -3,6 +3,7 @@ > >(C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP >Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights > reserved. > + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. > >SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -81,7 +82,7 @@ CopyConfiglanguageList ( > > /** > > - Get number of node from the string. Node is seperated by '/'. > + Get number of node from the string. Node is separated by '/'. > >@param[in] NodeString The node string to parse. > > @@ -559,6 +560,19 @@ GetEtagWithUri ( >IN EFI_STRING Uri >); > > +/** > + > + This function returns a boolean of ETAG support on Redfish service side. > + > + @retva
[edk2-devel] [edk2-redfish-client][PATCH V4] RedfishClientPkg: Add ETag PCD and revise Redfish ETag functions
From: Abner Chang Add PCD to disable ETag capability for the case Redfish service doesn't support ETag. Signed-off-by: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Cc: Mike Maslenkin --- RedfishClientPkg/RedfishClientPkg.dec | 3 + .../RedfishFeatureUtilityLib.inf | 2 + .../Library/RedfishFeatureUtilityLib.h| 47 +++- .../Features/Bios/v1_0_9/Dxe/BiosDxe.c| 19 +- .../v1_0_4/Common/BootOptionCommon.c | 5 +- .../BootOption/v1_0_4/Dxe/BootOptionDxe.c | 17 +- .../v1_5_0/Dxe/ComputerSystemDxe.c| 13 +- .../Features/Memory/V1_7_1/Dxe/MemoryDxe.c| 17 +- .../RedfishFeatureUtilityLib.c| 209 -- 9 files changed, 204 insertions(+), 128 deletions(-) diff --git a/RedfishClientPkg/RedfishClientPkg.dec b/RedfishClientPkg/RedfishClientPkg.dec index b350facae0..ce3b6d9752 100644 --- a/RedfishClientPkg/RedfishClientPkg.dec +++ b/RedfishClientPkg/RedfishClientPkg.dec @@ -3,6 +3,7 @@ # # (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP # Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent ## @@ -76,6 +77,8 @@ gEfiRedfishClientPkgTokenSpaceGuid.PcdDefaultRedfishVersion|L"v1"|VOID*|0x1004 ## The number of seconds that the firmware will wait before system reboot gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishSystemRebootTimeout|5|UINT16|0x2002 + ## Default capability of Redfish service side ETAG support + gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishServiceEtagSupported|TRUE|BOOLEAN|0x1005 [PcdsDynamicEx] ## The flag used to indicate that system reboot is required due to system configuration change diff --git a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf index 718273b248..63330c8e9d 100644 --- a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf +++ b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf @@ -3,6 +3,7 @@ # # (C) Copyright 2020-2022 Hewlett Packard Enterprise Development LP # Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -54,6 +55,7 @@ [Pcd] gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishSystemRebootRequired + gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishServiceEtagSupported [Guids] diff --git a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h index 9513a65617..0f8aede5c4 100644 --- a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h +++ b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h @@ -3,6 +3,7 @@ (C) Copyright 2021-2022 Hewlett Packard Enterprise Development LP Copyright (c) 2023-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. + Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @@ -81,7 +82,7 @@ CopyConfiglanguageList ( /** - Get number of node from the string. Node is seperated by '/'. + Get number of node from the string. Node is separated by '/'. @param[in] NodeString The node string to parse. @@ -559,6 +560,19 @@ GetEtagWithUri ( IN EFI_STRING Uri ); +/** + + This function returns a boolean of ETAG support on Redfish service side. + + @retval TRUEETAG is supported on Redfish service. + @retval FALSE ETAG is not supported on Redfish service. + +**/ +BOOLEAN +CheckIsServerEtagSupported ( + VOID + ); + /** Get @odata.id from give HTTP payload. It's call responsibility to release returned buffer. @@ -931,22 +945,33 @@ CompareRedfishPropertyVagueValues ( ); /** + Find "ETag" from either HTTP header or Redfish response. - Find "ETag" and "Location" from either HTTP header or Redfish response. + @param[in] ResponseHTTP response + @param[out] EtagString buffer to return ETag - @param[in] ResponseHTTP response - @param[out] EtagString buffer to return ETag - @param[out] LocationString buffer to return Location + @retval EFI_SUCCESSETag is returned in Etag + @retval EFI_UNSUPPORTEDETag is unsupported + @retval EFI_INVALID_PARAMETER Response, Etag or both are NULL. - @retval EFI_SUCCESS Data is found and returned. - @retval Others Errors occur. +**/ +EFI_STATUS +GetHttpResponseEtag ( + IN REDFISH_RESPONSE *Response, + OUT CHAR8 **Etag + ); + +/** + Find "Location" from either HTTP header or Redfish response. + + @param[in] ResponseHTTP response + @param[out] Loca
Re: [edk2-devel] [PATCH v6 19/36] ArmVirtPkg: Enable CpuMmio2Dxe
Hi Ard, Leif, Sami, Gred, Can you please help to review this patch? Thanks, Chao On 2024/1/5 17:44, Chao Li wrote: CpuMmio2Dxe is supports MMIO, enable it. Build-tested only (with "ArmVirtQemu.dsc"). BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Signed-off-by: Chao Li --- ArmVirtPkg/ArmVirtCloudHv.dsc| 2 +- ArmVirtPkg/ArmVirtCloudHv.fdf| 2 +- ArmVirtPkg/ArmVirtKvmTool.dsc| 2 +- ArmVirtPkg/ArmVirtKvmTool.fdf| 2 +- ArmVirtPkg/ArmVirtQemu.dsc | 2 +- ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 2 +- ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ArmVirtPkg/ArmVirtCloudHv.dsc b/ArmVirtPkg/ArmVirtCloudHv.dsc index 76c0d28544..5cb2a609b1 100644 --- a/ArmVirtPkg/ArmVirtCloudHv.dsc +++ b/ArmVirtPkg/ArmVirtCloudHv.dsc @@ -341,7 +341,7 @@ # # PCI support # - ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf { + UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf { NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf } diff --git a/ArmVirtPkg/ArmVirtCloudHv.fdf b/ArmVirtPkg/ArmVirtCloudHv.fdf index 56d1ea6e8c..8554efc294 100644 --- a/ArmVirtPkg/ArmVirtCloudHv.fdf +++ b/ArmVirtPkg/ArmVirtCloudHv.fdf @@ -201,7 +201,7 @@ READ_LOCK_STATUS = TRUE # # PCI support # - INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf + INF UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/ArmVirtPkg/ArmVirtKvmTool.dsc b/ArmVirtPkg/ArmVirtKvmTool.dsc index cac4fe06d3..20da331966 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.dsc +++ b/ArmVirtPkg/ArmVirtKvmTool.dsc @@ -372,7 +372,7 @@ # # PCI support # - ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf { + UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf { NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf NULL|OvmfPkg/Library/BaseCachingPciExpressLib/BaseCachingPciExpressLib.inf diff --git a/ArmVirtPkg/ArmVirtKvmTool.fdf b/ArmVirtPkg/ArmVirtKvmTool.fdf index 82aff47673..cdf756c112 100644 --- a/ArmVirtPkg/ArmVirtKvmTool.fdf +++ b/ArmVirtPkg/ArmVirtKvmTool.fdf @@ -195,7 +195,7 @@ READ_LOCK_STATUS = TRUE # # PCI support # - INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf + INF UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index cf306cac08..dbd2396c78 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -526,7 +526,7 @@ # # PCI support # - ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf { + UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf { NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf } diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc index 9b3e37d5c9..c5d097ffb9 100644 --- a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc @@ -153,7 +153,7 @@ READ_LOCK_STATUS = TRUE # # PCI support # - INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf + INF UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf INF OvmfPkg/PciHotPlugInitDxe/PciHotPlugInit.inf diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index c0d079e28d..6a6ecfc12a 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -431,7 +431,7 @@ # # PCI support # - ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf { + UefiCpuPkg/CpuMmio2Dxe/CpuMmio2Dxe.inf { NULL|OvmfPkg/Fdt/FdtPciPcdProducerLib/FdtPciPcdProducerLib.inf } -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113345): https://edk2.groups.io/g/devel/message/113345 Mute This Topic: https://groups.io/mt/103591174/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v6 22/36] ArmVirtPkg: Move the FdtSerialPortAddressLib to OvmfPkg
Hi Ard, Leif, Sami, Gred, Can you please help to review this patch? Thanks, Chao On 2024/1/5 17:44, Chao Li wrote: Move the FdtSerialPortAddressLib to Ovmfpkg so that other ARCH can easily use it. Build-tested only (with "ArmVirtQemu.dsc"). BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Laszlo Ersek Signed-off-by: Chao Li --- ArmVirtPkg/ArmVirt.dsc.inc | 2 +- .../Include/Library/FdtSerialPortAddressLib.h | 0 .../Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.c | 0 .../Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf | 2 +- 4 files changed, 2 insertions(+), 2 deletions(-) rename {ArmVirtPkg => OvmfPkg}/Include/Library/FdtSerialPortAddressLib.h (100%) rename {ArmVirtPkg => OvmfPkg}/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.c (100%) rename {ArmVirtPkg => OvmfPkg}/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf (90%) diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc index 9b23ef97ec..2bc6a29eb1 100644 --- a/ArmVirtPkg/ArmVirt.dsc.inc +++ b/ArmVirtPkg/ArmVirt.dsc.inc @@ -122,7 +122,7 @@ # ARM PL011 UART Driver PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf SerialPortLib|ArmVirtPkg/Library/FdtPL011SerialPortLib/FdtPL011SerialPortLib.inf - FdtSerialPortAddressLib|ArmVirtPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf + FdtSerialPortAddressLib|OvmfPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf PeCoffExtraActionLib|ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.inf #PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf diff --git a/ArmVirtPkg/Include/Library/FdtSerialPortAddressLib.h b/OvmfPkg/Include/Library/FdtSerialPortAddressLib.h similarity index 100% rename from ArmVirtPkg/Include/Library/FdtSerialPortAddressLib.h rename to OvmfPkg/Include/Library/FdtSerialPortAddressLib.h diff --git a/ArmVirtPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.c b/OvmfPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.c similarity index 100% rename from ArmVirtPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.c rename to OvmfPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.c diff --git a/ArmVirtPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf b/OvmfPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf similarity index 90% rename from ArmVirtPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf rename to OvmfPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf index ae6d0d374b..e27742e9fa 100644 --- a/ArmVirtPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf +++ b/OvmfPkg/Library/FdtSerialPortAddressLib/FdtSerialPortAddressLib.inf @@ -18,9 +18,9 @@ FdtSerialPortAddressLib.c [Packages] - ArmVirtPkg/ArmVirtPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec + OvmfPkg/OvmfPkg.dec [LibraryClasses] BaseLib -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113346): https://edk2.groups.io/g/devel/message/113346 Mute This Topic: https://groups.io/mt/103591207/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH v6 23/36] ArmVirtPkg: Move two PCD variables into OvmfPkg
Hi Ard, Leif, Sami, Gred, Can you please help to review this patch? Thanks, Chao On 2024/1/5 17:45, Chao Li wrote: Move the PcdTerminalTypeGuidBuffer and PcdUninstallMemAttrProtocol into OvmfPkg so other ARCh can easily use it. BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Jiewen Yao Signed-off-by: Chao Li --- ArmVirtPkg/ArmVirtPkg.dec | 13 - ArmVirtPkg/ArmVirtQemu.dsc | 2 +- ArmVirtPkg/ArmVirtQemuKernel.dsc| 2 +- .../PlatformBootManagerLib.inf | 4 ++-- OvmfPkg/OvmfPkg.dec | 13 + 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 05d2d36c1d..315db4e8ea 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -42,21 +42,8 @@ gArmVirtTokenSpaceGuid.PcdTpm2SupportEnabled|FALSE|BOOLEAN|0x0004 [PcdsFixedAtBuild, PcdsPatchableInModule] - # - # Binary representation of the GUID that determines the terminal type. The - # size must be exactly 16 bytes. The default value corresponds to - # EFI_VT_100_GUID. - # - gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x0007 - ## # This is the physical address of Rsdp which is the core struct of Acpi. # Cloud Hypervisor has no other way to pass Rsdp address to the guest except use a PCD. # gArmVirtTokenSpaceGuid.PcdCloudHvAcpiRsdpBaseAddress|0x0|UINT64|0x0005 - - ## - # Whether the EFI memory attributes protocol should be uninstalled before - # invoking the OS loader. This may be needed to work around problematic - # builds of shim that use the protocol incorrectly. - gArmVirtTokenSpaceGuid.PcdUninstallMemAttrProtocol|FALSE|BOOLEAN|0x0006 diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index dbd2396c78..147180f645 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -182,7 +182,7 @@ !if $(TTY_TERMINAL) == TRUE gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID - gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94} + gUefiOvmfPkgTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94} !else gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1 !endif diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index 6a6ecfc12a..c22a422353 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -147,7 +147,7 @@ !if $(TTY_TERMINAL) == TRUE gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|4 # Set terminal type to TtyTerm, the value encoded is EFI_TTY_TERM_GUID - gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94} + gUefiOvmfPkgTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x80, 0x6d, 0x91, 0x7d, 0xb1, 0x5b, 0x8c, 0x45, 0xa4, 0x8f, 0xe2, 0x5f, 0xdd, 0x51, 0xef, 0x94} !else gEfiMdePkgTokenSpaceGuid.PcdDefaultTerminalType|1 !endif diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 70e4ebf94a..1ddcd107d2 100644 --- a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -56,14 +56,14 @@ UefiRuntimeServicesTableLib [FixedPcd] - gArmVirtTokenSpaceGuid.PcdUninstallMemAttrProtocol + gUefiOvmfPkgTokenSpaceGuid.PcdUninstallMemAttrProtocol gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits [Pcd] - gArmVirtTokenSpaceGuid.PcdTerminalTypeGuidBuffer + gUefiOvmfPkgTokenSpaceGuid.PcdTerminalTypeGuidBuffer gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut [Guids] diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec index 7bc2bf1674..a03c30995b 100644 --- a/OvmfPkg/OvmfPkg.dec +++ b/OvmfPkg/OvmfPkg.dec @@ -401,6 +401,19 @@ # gUefiOvmfPkgTokenSpaceGuid.PcdDeviceTreeAllocationPadding|256|UINT32|0x6f + # + # Binary representation of the GUID that determines the terminal type. The + # size must be exactly 16 bytes. The default value corresponds to + # EFI_VT_100_GUID. + # + gUefiOvmfPkgTokenSpaceGuid.PcdTerminalTypeGuidBuffer|{0x65, 0x60, 0xA6, 0xDF, 0x19, 0xB4, 0xD3, 0x11, 0x9A, 0x2D, 0x00, 0x90, 0x27, 0x3F, 0xC1, 0x4D}|VOID*|0x66 + + ## +
Re: [edk2-devel] [PATCH v6 24/36] ArmVirtPkg: Move PlatformBootManagerLib to OvmfPkg
Hi Ard, Leif, Sami, Gred, Can you please help to review this patch? Thanks, Chao On 2024/1/5 17:45, Chao Li wrote: Moved the PlatformBootManagerLib to OvmfPkg and renamed to PlatformBootManagerLibLight for easy use by other ARCH. Build-tested only (with "ArmVirtQemu.dsc"). BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Leif Lindholm Cc: Sami Mujawar Cc: Gerd Hoffmann Cc: Jiewen Yao Cc: Lazlo Ersek Signed-off-by: Chao Li --- ArmVirtPkg/ArmVirtPkg.ci.yaml | 1 - ArmVirtPkg/ArmVirtPkg.dec | 1 - ArmVirtPkg/ArmVirtQemu.dsc | 2 +- ArmVirtPkg/ArmVirtQemuKernel.dsc | 2 +- .../Library/PlatformBootManagerLibLight}/PlatformBm.c | 0 .../Library/PlatformBootManagerLibLight}/PlatformBm.h | 0 .../PlatformBootManagerLib.inf | 7 +++ .../Library/PlatformBootManagerLibLight}/QemuKernel.c | 0 OvmfPkg/OvmfPkg.dec| 4 9 files changed, 9 insertions(+), 8 deletions(-) rename {ArmVirtPkg/Library/PlatformBootManagerLib => OvmfPkg/Library/PlatformBootManagerLibLight}/PlatformBm.c (100%) rename {ArmVirtPkg/Library/PlatformBootManagerLib => OvmfPkg/Library/PlatformBootManagerLibLight}/PlatformBm.h (100%) rename {ArmVirtPkg/Library/PlatformBootManagerLib => OvmfPkg/Library/PlatformBootManagerLibLight}/PlatformBootManagerLib.inf (92%) rename {ArmVirtPkg/Library/PlatformBootManagerLib => OvmfPkg/Library/PlatformBootManagerLibLight}/QemuKernel.c (100%) diff --git a/ArmVirtPkg/ArmVirtPkg.ci.yaml b/ArmVirtPkg/ArmVirtPkg.ci.yaml index 506b0e72f0..b186d4eb42 100644 --- a/ArmVirtPkg/ArmVirtPkg.ci.yaml +++ b/ArmVirtPkg/ArmVirtPkg.ci.yaml @@ -24,7 +24,6 @@ ], ## Both file path and directory path are accepted. "IgnoreFiles": [ -"Library/PlatformBootManagerLib/PlatformBm.c" ] }, ## options defined .pytool/Plugin/CompilerPlugin diff --git a/ArmVirtPkg/ArmVirtPkg.dec b/ArmVirtPkg/ArmVirtPkg.dec index 315db4e8ea..6aa5ea05f4 100644 --- a/ArmVirtPkg/ArmVirtPkg.dec +++ b/ArmVirtPkg/ArmVirtPkg.dec @@ -27,7 +27,6 @@ [LibraryClasses] ArmVirtMemInfoLib|Include/Library/ArmVirtMemInfoLib.h - FdtSerialPortAddressLib|Include/Library/FdtSerialPortAddressLib.h [Guids.common] gArmVirtTokenSpaceGuid = { 0x0B6F5CA7, 0x4F53, 0x445A, { 0xB7, 0x6E, 0x2E, 0x36, 0x5B, 0x80, 0x63, 0x66 } } diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc index 147180f645..e48c75b5e9 100644 --- a/ArmVirtPkg/ArmVirtQemu.dsc +++ b/ArmVirtPkg/ArmVirtQemu.dsc @@ -70,7 +70,7 @@ CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf - PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf + PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBootManagerLib.inf PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc b/ArmVirtPkg/ArmVirtQemuKernel.dsc index c22a422353..668a65ba64 100644 --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc @@ -69,7 +69,7 @@ CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf - PlatformBootManagerLib|ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf + PlatformBootManagerLib|OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBootManagerLib.inf PlatformBmPrintScLib|OvmfPkg/Library/PlatformBmPrintScLib/PlatformBmPrintScLib.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf FrameBufferBltLib|MdeModulePkg/Library/FrameBufferBltLib/FrameBufferBltLib.inf diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c b/OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBm.c similarity index 100% rename from ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.c rename to OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBm.c diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h b/OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBm.h similarity index 100% rename from ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBm.h rename to OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBm.h diff --git a/ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/OvmfPkg/Library/PlatformBootManagerLibLight/PlatformBootManagerLib.inf similarity index 92% rename from ArmVirtPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf rename to OvmfPkg/Library/Platfo
[edk2-devel] [Patch V2 0/2] Change the usage of input parameter ProcessorNumber in MpInitLibGetProcessorInfo() of MpInitLibUp
In the V2 patch set: In "set EXTENDED_PROCESSOR_INFORMATION to 0", set EXTENDED_PROCESSOR_INFORMATION to 0 in API MpInitLibGetProcessorInfo() of MpInitLibUp. This commit use ZeroMem() to set all fileds in output EFI_PROCESSOR_INFORMATION to 0 before StatusFlag field is reassigned. In "Check lower 24 bits of ProcessorNumber", use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY to clearly tell that processor number only occupies the lower 24 bits. Dun Tan (2): UefiCpuPkg: set EXTENDED_PROCESSOR_INFORMATION to 0 UefiCpuPkg: Check lower 24 bits of ProcessorNumber UefiCpuPkg/Include/Library/MpInitLib.h | 2 ++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 ++ UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 19 +++ 3 files changed, 15 insertions(+), 8 deletions(-) -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113349): https://edk2.groups.io/g/devel/message/113349 Mute This Topic: https://groups.io/mt/103591526/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [Patch V2 1/2] UefiCpuPkg: set EXTENDED_PROCESSOR_INFORMATION to 0
Set EXTENDED_PROCESSOR_INFORMATION to 0 in API MpInitLibGetProcessorInfo() of MpInitLibUp. This commit use ZeroMem() to set all fileds in output EFI_PROCESSOR_INFORMATION to 0 before StatusFlag field is reassigned. Previously EXTENDED_PROCESSOR_INFORMATION in the API MpInitLibGetProcessorInfo() of MpInitLibUp is ignored. In PEI/DXE MpInitLib, EXTENDED_PROCESSOR_INFORMATION will be retrived when BIT24 of input ProcessorNumber is set. This commit can avoid garbage in the output structure in MpInitLibGetProcessorInfo() of MpInitLibUp. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Min Xu --- UefiCpuPkg/Include/Library/MpInitLib.h | 2 ++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 ++ UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 14 +++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/UefiCpuPkg/Include/Library/MpInitLib.h b/UefiCpuPkg/Include/Library/MpInitLib.h index 1853c46415..842c6f7ff9 100644 --- a/UefiCpuPkg/Include/Library/MpInitLib.h +++ b/UefiCpuPkg/Include/Library/MpInitLib.h @@ -63,6 +63,8 @@ MpInitLibGetNumberOfProcessors ( instant this call is made. This service may only be called from the BSP. @param[in] ProcessorNumber The handle number of processor. +Lower 24 bits contains the actual processor number. +BIT24 indicates if the EXTENDED_PROCESSOR_INFORMATION will be retrived. @param[out] ProcessorInfoBuffer A pointer to the buffer where information for the requested processor is deposited. @param[out] HealthDataReturn processor health data. diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index a359906923..cdfb570e61 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2333,6 +2333,8 @@ MpInitLibInitialize ( instant this call is made. This service may only be called from the BSP. @param[in] ProcessorNumber The handle number of processor. +Lower 24 bits contains the actual processor number. +BIT24 indicates if the EXTENDED_PROCESSOR_INFORMATION will be retrived. @param[out] ProcessorInfoBuffer A pointer to the buffer where information for the requested processor is deposited. @param[out] HealthDataReturn processor health data. diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c index 86f9fbf903..ea9a45c9c6 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -77,6 +77,8 @@ MpInitLibGetNumberOfProcessors ( instant this call is made. This service may only be called from the BSP. @param[in] ProcessorNumber The handle number of processor. +Lower 24 bits contains the actual processor number. +BIT24 indicates if the EXTENDED_PROCESSOR_INFORMATION will be retrived. @param[out] ProcessorInfoBuffer A pointer to the buffer where information for the requested processor is deposited. @param[out] HealthDataReturn processor health data. @@ -108,13 +110,11 @@ MpInitLibGetProcessorInfo ( return EFI_NOT_FOUND; } - ProcessorInfoBuffer->ProcessorId = 0; - ProcessorInfoBuffer->StatusFlag = PROCESSOR_AS_BSP_BIT | - PROCESSOR_ENABLED_BIT | - PROCESSOR_HEALTH_STATUS_BIT; - ProcessorInfoBuffer->Location.Package = 0; - ProcessorInfoBuffer->Location.Core= 0; - ProcessorInfoBuffer->Location.Thread = 0; + ZeroMem (ProcessorInfoBuffer, sizeof (*ProcessorInfoBuffer)); + ProcessorInfoBuffer->StatusFlag = PROCESSOR_AS_BSP_BIT | +PROCESSOR_ENABLED_BIT | +PROCESSOR_HEALTH_STATUS_BIT; + if (HealthData != NULL) { GuidHob = GetFirstGuidHob (&gEfiSecPlatformInformationPpiGuid); if (GuidHob != NULL) { -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113350): https://edk2.groups.io/g/devel/message/113350 Mute This Topic: https://groups.io/mt/103591527/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [Patch V2 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber
Check lower 24 bits of ProcessorNumber instead of the value of ProcessorNumber in the API MpInitLibGetProcessorInfo() of MpInitLibUp instance. Lower 24 bits of ProcessorNumber contains the actual processor number. The BIT24 of input ProcessorNumber might be set to indicate if the EXTENDED_PROCESSOR_INFORMATION will be retrived. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Min Xu --- UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c index ea9a45c9c6..30bdd8cfdd 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -106,7 +106,10 @@ MpInitLibGetProcessorInfo ( return EFI_INVALID_PARAMETER; } - if (ProcessorNumber != 0) { + // + // Lower 24 bits contains the actual processor number. + // + if ((ProcessorNumber & (BIT24 - 1)) != 0) { return EFI_NOT_FOUND; } -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113351): https://edk2.groups.io/g/devel/message/113351 Mute This Topic: https://groups.io/mt/103591528/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/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber
Thanks for the comments. The code has been updated in the V2 patch set. Thanks, Dun -Original Message- From: Laszlo Ersek Sent: Friday, January 5, 2024 9:56 PM To: Ni, Ray ; devel@edk2.groups.io; Tan, Dun Cc: Kumar, Rahul R ; Gerd Hoffmann ; Xu, Min M Subject: Re: [edk2-devel] [PATCH 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber On 1/5/24 13:55, Ni, Ray wrote: >>> - if (ProcessorNumber != 0) { >>> + // >>> + // Lower 24 bits contains the actual processor number. >>> + // >>> + if ((ProcessorNumber & (CPU_V2_EXTENDED_TOPOLOGY - 1)) != 0) { > I suggest we explicitly use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY. > Using BIT24 clearly tells that processor number only occupies the lower 24 > bits. Yes, I've noticed this discrepancy too; I agree BIT24 is clearer here! > > >>> return EFI_NOT_FOUND; >>>} >>> >> >> Reviewed-by: Laszlo Ersek > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113352): https://edk2.groups.io/g/devel/message/113352 Mute This Topic: https://groups.io/mt/103518743/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 0/4] RISC-V: Add support for Sstc extension
Hi Pedro, On Fri, Jan 05, 2024 at 07:10:40PM +, Pedro Falcato wrote: > On Wed, Jan 3, 2024 at 1:59 PM Sunil V L wrote: > > > > This series adds the support for RISV-V Sstc extension in EDK2 timer > > nit: RISC-V > > implementation. Sstc extension allows S-mode software to program the > > timer directly without using SBI calls. > > > > Currently, PCD variable is used to detect whether feature is enabled. By > > default the feature is enabled and platforms need to set the PCD to > > disable the feature if Sstc is not supported. > > > > For RiscVVirtQemu, it is disabled by default (until extension discovery > > feature is enabled). > > I'm curious, what do you want Sstc for? Is the performance difference > measurable (if so, please post numbers, and add them to the commit)? > Does it have any other advantages? > Good question. Without Sstc, timer needs to be programmed using SBI call. The number of instructions via SBI call is way more than a simple CSR access. So, when the CPU supports Sstc, there is no point in using SBI call. The issue with SBI call will be worse under KVM since it has to emulate the timer. Supporting Sstc is futuristic. The platforms can decide not to implement SBI TIME interface at all since they have Sstc. In that case, EDK2 needs to have option to support either. Thanks, Sunil -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113353): https://edk2.groups.io/g/devel/message/113353 Mute This Topic: https://groups.io/mt/103501836/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [Patch V3 0/2] Change the usage of input parameter ProcessorNumber in MpInitLibGetProcessorInfo() of MpInitLibUp
Please ignore the V2 PATCH set. No other change except adding BaseMemoryLib headfile and lib instance in .inf to pass build since ZeroMem() is used. Comparing to the V1 patch set: In "set EXTENDED_PROCESSOR_INFORMATION to 0", set EXTENDED_PROCESSOR_INFORMATION to 0 in API MpInitLibGetProcessorInfo() of MpInitLibUp. This commit use ZeroMem() to set all fileds in output EFI_PROCESSOR_INFORMATION to 0 before StatusFlag field is reassigned. In "Check lower 24 bits of ProcessorNumber", use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY to clearly tell that processor number only occupies the lower 24 bits. Dun Tan (2): UefiCpuPkg: set EXTENDED_PROCESSOR_INFORMATION to 0 UefiCpuPkg: Check lower 24 bits of ProcessorNumber UefiCpuPkg/Include/Library/MpInitLib.h | 2 ++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 ++ UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 20 UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf | 1 + 4 files changed, 17 insertions(+), 8 deletions(-) -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113354): https://edk2.groups.io/g/devel/message/113354 Mute This Topic: https://groups.io/mt/103592277/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [Patch V3 1/2] UefiCpuPkg: set EXTENDED_PROCESSOR_INFORMATION to 0
Set EXTENDED_PROCESSOR_INFORMATION to 0 in API MpInitLibGetProcessorInfo() of MpInitLibUp. This commit use ZeroMem() to set all fileds in output EFI_PROCESSOR_INFORMATION to 0 before StatusFlag field is reassigned. Previously EXTENDED_PROCESSOR_INFORMATION in the API MpInitLibGetProcessorInfo() of MpInitLibUp is ignored. In PEI/DXE MpInitLib, EXTENDED_PROCESSOR_INFORMATION will be retrived when BIT24 of input ProcessorNumber is set. This commit can avoid garbage in the output structure in MpInitLibGetProcessorInfo() of MpInitLibUp. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Min Xu --- UefiCpuPkg/Include/Library/MpInitLib.h | 2 ++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 ++ UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 15 --- UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf | 1 + 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/UefiCpuPkg/Include/Library/MpInitLib.h b/UefiCpuPkg/Include/Library/MpInitLib.h index 1853c46415..842c6f7ff9 100644 --- a/UefiCpuPkg/Include/Library/MpInitLib.h +++ b/UefiCpuPkg/Include/Library/MpInitLib.h @@ -63,6 +63,8 @@ MpInitLibGetNumberOfProcessors ( instant this call is made. This service may only be called from the BSP. @param[in] ProcessorNumber The handle number of processor. +Lower 24 bits contains the actual processor number. +BIT24 indicates if the EXTENDED_PROCESSOR_INFORMATION will be retrived. @param[out] ProcessorInfoBuffer A pointer to the buffer where information for the requested processor is deposited. @param[out] HealthDataReturn processor health data. diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c b/UefiCpuPkg/Library/MpInitLib/MpLib.c index a359906923..cdfb570e61 100644 --- a/UefiCpuPkg/Library/MpInitLib/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c @@ -2333,6 +2333,8 @@ MpInitLibInitialize ( instant this call is made. This service may only be called from the BSP. @param[in] ProcessorNumber The handle number of processor. +Lower 24 bits contains the actual processor number. +BIT24 indicates if the EXTENDED_PROCESSOR_INFORMATION will be retrived. @param[out] ProcessorInfoBuffer A pointer to the buffer where information for the requested processor is deposited. @param[out] HealthDataReturn processor health data. diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c index 86f9fbf903..d4f8611af8 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -12,6 +12,7 @@ #include #include #include +#include /** MP Initialize Library initialization. @@ -77,6 +78,8 @@ MpInitLibGetNumberOfProcessors ( instant this call is made. This service may only be called from the BSP. @param[in] ProcessorNumber The handle number of processor. +Lower 24 bits contains the actual processor number. +BIT24 indicates if the EXTENDED_PROCESSOR_INFORMATION will be retrived. @param[out] ProcessorInfoBuffer A pointer to the buffer where information for the requested processor is deposited. @param[out] HealthDataReturn processor health data. @@ -108,13 +111,11 @@ MpInitLibGetProcessorInfo ( return EFI_NOT_FOUND; } - ProcessorInfoBuffer->ProcessorId = 0; - ProcessorInfoBuffer->StatusFlag = PROCESSOR_AS_BSP_BIT | - PROCESSOR_ENABLED_BIT | - PROCESSOR_HEALTH_STATUS_BIT; - ProcessorInfoBuffer->Location.Package = 0; - ProcessorInfoBuffer->Location.Core= 0; - ProcessorInfoBuffer->Location.Thread = 0; + ZeroMem (ProcessorInfoBuffer, sizeof (*ProcessorInfoBuffer)); + ProcessorInfoBuffer->StatusFlag = PROCESSOR_AS_BSP_BIT | +PROCESSOR_ENABLED_BIT | +PROCESSOR_HEALTH_STATUS_BIT; + if (HealthData != NULL) { GuidHob = GetFirstGuidHob (&gEfiSecPlatformInformationPpiGuid); if (GuidHob != NULL) { diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf index 24ad29c03c..eb0a168f74 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.inf @@ -32,6 +32,7 @@ DebugLib LocalApicLib HobLib + BaseMemoryLib [Ppis] gEfiSecPlatformInformationPpiGuid ## SOMETIMES_CONSUMES -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113355): https://edk2.groups.io/g/devel/message/11335
[edk2-devel] [Patch V3 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber
Check lower 24 bits of ProcessorNumber instead of the value of ProcessorNumber in the API MpInitLibGetProcessorInfo() of MpInitLibUp instance. Lower 24 bits of ProcessorNumber contains the actual processor number. The BIT24 of input ProcessorNumber might be set to indicate if the EXTENDED_PROCESSOR_INFORMATION will be retrived. Signed-off-by: Dun Tan Cc: Ray Ni Cc: Laszlo Ersek Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Min Xu --- UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c index d4f8611af8..35590fb4e7 100644 --- a/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c +++ b/UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c @@ -107,7 +107,10 @@ MpInitLibGetProcessorInfo ( return EFI_INVALID_PARAMETER; } - if (ProcessorNumber != 0) { + // + // Lower 24 bits contains the actual processor number. + // + if ((ProcessorNumber & (BIT24 - 1)) != 0) { return EFI_NOT_FOUND; } -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113356): https://edk2.groups.io/g/devel/message/113356 Mute This Topic: https://groups.io/mt/103592279/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 0/2] Change the usage of input parameter ProcessorNumber in MpInitLibGetProcessorInfo() of MpInitLibUp
Please ignore the V2 patch set and help review the following V3 patch set. " [Patch V3 2/2] UefiCpuPkg: Check lower 24 bits of ProcessorNumber" " [Patch V3 1/2] UefiCpuPkg: set EXTENDED_PROCESSOR_INFORMATION to 0" There was build error in the v2 patch series and the error was fixed in V3 patch set. Thanks, Dun -Original Message- From: devel@edk2.groups.io On Behalf Of duntan Sent: Monday, January 8, 2024 11:56 AM To: devel@edk2.groups.io Subject: [edk2-devel] [Patch V2 0/2] Change the usage of input parameter ProcessorNumber in MpInitLibGetProcessorInfo() of MpInitLibUp In the V2 patch set: In "set EXTENDED_PROCESSOR_INFORMATION to 0", set EXTENDED_PROCESSOR_INFORMATION to 0 in API MpInitLibGetProcessorInfo() of MpInitLibUp. This commit use ZeroMem() to set all fileds in output EFI_PROCESSOR_INFORMATION to 0 before StatusFlag field is reassigned. In "Check lower 24 bits of ProcessorNumber", use BIT24 instead of CPU_V2_EXTENDED_TOPOLOGY to clearly tell that processor number only occupies the lower 24 bits. Dun Tan (2): UefiCpuPkg: set EXTENDED_PROCESSOR_INFORMATION to 0 UefiCpuPkg: Check lower 24 bits of ProcessorNumber UefiCpuPkg/Include/Library/MpInitLib.h | 2 ++ UefiCpuPkg/Library/MpInitLib/MpLib.c | 2 ++ UefiCpuPkg/Library/MpInitLibUp/MpInitLibUp.c | 19 +++ 3 files changed, 15 insertions(+), 8 deletions(-) -- 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113357): https://edk2.groups.io/g/devel/message/113357 Mute This Topic: https://groups.io/mt/103591526/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] BaseTools: Fix raw strings containing valid escape characters
Hi Liming and Cran, We should merge this fixing patch asap as it influences BaseTool's usage. Thanks, Christine > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuwei > Chen > Sent: Monday, January 8, 2024 9:16 AM > To: Joey Vagedes ; devel@edk2.groups.io > Cc: Rebecca Cran ; Gao, Liming > ; Feng, Bob C > Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Fix raw strings containing > valid escape characters > > Hi Joey, > > Thanks for fixing. > > Reviewed-by: Yuwei Chen > > > -Original Message- > > From: Joey Vagedes > > Sent: Friday, December 29, 2023 12:48 AM > > To: devel@edk2.groups.io > > Cc: Rebecca Cran ; Gao, Liming > > ; Feng, Bob C ; Chen, > > Christine > > Subject: [PATCH v1 1/1] BaseTools: Fix raw strings containing valid > > escape characters > > > > Fixes raw regex strings that contain valid (and purposeful) escape > > characters as they are being treated as individual characters rather > > than the single escaped character they represent (i.e. '\t' is being > > treated as > a '\' and a 't' > > rather than a single tab character). > > > > Signed-off-by: Joey Vagedes > > Cc: Rebecca Cran > > Cc: Liming Gao > > Cc: Bob Feng > > Cc: Yuwei Chen > > --- > > BaseTools/Source/Python/AutoGen/GenMake.py| 2 +- > > BaseTools/Source/Python/Common/Misc.py| 2 +- > > BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- > > 3 files changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py > > b/BaseTools/Source/Python/AutoGen/GenMake.py > > index c416fe172fe5..fbd35d498923 100755 > > --- a/BaseTools/Source/Python/AutoGen/GenMake.py > > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > > @@ -28,7 +28,7 @@ from Common.DataType import > TAB_COMPILER_MSFT > > gIncludePattern = re.compile(r"^[ \t]*[#%]?[ \t]*include(?:[ > > \t]*(?:\\(?:\r\n|\r|\n))*[ \t]*)*(?:\(?[ \"<]?[ \t]*)([-\w.\\/() > > \t]+)(?:[ \t]*[\">]?\)?)", re.MULTILINE | re.UNICODE | > > re.IGNORECASE) ## Regular expression for matching macro used in > > header file inclusion-gMacroPattern = re.compile(r"([_A-Z][_A-Z0-9]*)[ > > \t]*\((.+)\)", re.UNICODE)+gMacroPattern = > > re.compile("([_A-Z][_A-Z0-9]*)[ \t]*\\((.+)\\)", > > re.UNICODE) gIsFileMap = {} diff --git > > a/BaseTools/Source/Python/Common/Misc.py > > b/BaseTools/Source/Python/Common/Misc.py > > index f87d9dbdba39..34bfc90abd94 100755 > > --- a/BaseTools/Source/Python/Common/Misc.py > > +++ b/BaseTools/Source/Python/Common/Misc.py > > @@ -1926,4 +1926,4 @@ def CopyDict(ori_dict): > > # Remove the c/c++ comments: // and /* */ # def > > RemoveCComments(ctext):-return re.sub(r'//.*?\n|/\*.*?\*/', '\n', ctext, > > flags=re.S)+return re.sub('//.*?\n|/\\*.*?\\*/', '\n', ctext, > > flags=re.S)diff -- > git > > a/BaseTools/Source/Python/Workspace/DscBuildData.py > > b/BaseTools/Source/Python/Workspace/DscBuildData.py > > index 817cdbe5f19c..4768099343e5 100644 > > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > > @@ -2840,7 +2840,7 @@ class DscBuildData(PlatformBuildClassObject): > > # start generating makefile MakeApp = PcdMakefileHeader > > if > > sys.platform == "win32":-MakeApp = MakeApp + r'APPFILE > > = %s\%s.exe\n' % (self.OutputPath, PcdValueInitName) + r'APPNAME = > > %s\n' % (PcdValueInitName) + r'OBJECTS = %s\%s.obj %s.obj\n' % > > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > > PcdValueCommonName)) + 'INC = '+MakeApp = MakeApp + 'APPFILE > > = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = > > %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % > > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > > PcdValueCommonName)) + 'INC = ' else: MakeApp = MakeApp > > + > > PcdGccMakefile MakeApp = MakeApp + 'APPFILE = %s/%s\n' % > > (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % > > (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, > > PcdValueInitName, os.path.join(self.OutputPath, PcdValueCommonName)) > + > > \@@ -2950,7 +2950,7 @@ class DscBuildData(PlatformBuildClassObject): > > MakeApp += "$(OBJECTS) : %s\n" % include_file if > > sys.platform > == > > "win32": PcdValueCommonPath = > > > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] > > , "Source\C\Common\PcdValueCommon.c"))-MakeApp = MakeApp + > > r'%s\PcdValueCommon.c : %s\n' % (self.OutputPath, > PcdValueCommonPath)+ > > MakeApp = MakeApp + '%s\\PcdValueCommon.c : %s\n' % (self.OutputPath, > > PcdValueCommonPath) MakeApp = MakeApp + '\tcopy /y %s > $@\n' % > > (PcdValueCommonPath) else: PcdValueCommonPath = > > > os.path.normpath(mws.join(GlobalData.gGlobalDefines["EDK_TOOLS_PATH"] > > , "Source/C/Common/PcdValueCommon.c"))-- > > 2.43.0.windows.1 > > > >
Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Fix raw strings containing valid escape characters
Yes. Please! My local build cannot pass without this patch. Thanks, Ray > -Original Message- > From: devel@edk2.groups.io On Behalf Of Yuwei > Chen > Sent: Monday, January 8, 2024 1:37 PM > To: devel@edk2.groups.io; Chen, Christine ; Joey > Vagedes > Cc: Rebecca Cran ; Gao, Liming > ; Feng, Bob C ; Huang, > Yanbo ; Kinney, Michael D > > Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Fix raw strings containing > valid escape characters > > Hi Liming and Cran, > > We should merge this fixing patch asap as it influences BaseTool's usage. > > Thanks, > Christine > > > -Original Message- > > From: devel@edk2.groups.io On Behalf Of Yuwei > > Chen > > Sent: Monday, January 8, 2024 9:16 AM > > To: Joey Vagedes ; devel@edk2.groups.io > > Cc: Rebecca Cran ; Gao, Liming > > ; Feng, Bob C > > Subject: Re: [edk2-devel] [PATCH v1 1/1] BaseTools: Fix raw strings > containing > > valid escape characters > > > > Hi Joey, > > > > Thanks for fixing. > > > > Reviewed-by: Yuwei Chen > > > > > -Original Message- > > > From: Joey Vagedes > > > Sent: Friday, December 29, 2023 12:48 AM > > > To: devel@edk2.groups.io > > > Cc: Rebecca Cran ; Gao, Liming > > > ; Feng, Bob C ; Chen, > > > Christine > > > Subject: [PATCH v1 1/1] BaseTools: Fix raw strings containing valid > > > escape characters > > > > > > Fixes raw regex strings that contain valid (and purposeful) escape > > > characters as they are being treated as individual characters rather > > > than the single escaped character they represent (i.e. '\t' is being > > > treated as > > a '\' and a 't' > > > rather than a single tab character). > > > > > > Signed-off-by: Joey Vagedes > > > Cc: Rebecca Cran > > > Cc: Liming Gao > > > Cc: Bob Feng > > > Cc: Yuwei Chen > > > --- > > > BaseTools/Source/Python/AutoGen/GenMake.py| 2 +- > > > BaseTools/Source/Python/Common/Misc.py| 2 +- > > > BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- > > > 3 files changed, 4 insertions(+), 4 deletions(-) > > > > > > diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py > > > b/BaseTools/Source/Python/AutoGen/GenMake.py > > > index c416fe172fe5..fbd35d498923 100755 > > > --- a/BaseTools/Source/Python/AutoGen/GenMake.py > > > +++ b/BaseTools/Source/Python/AutoGen/GenMake.py > > > @@ -28,7 +28,7 @@ from Common.DataType import > > TAB_COMPILER_MSFT > > > gIncludePattern = re.compile(r"^[ \t]*[#%]?[ \t]*include(?:[ > > > \t]*(?:\\(?:\r\n|\r|\n))*[ \t]*)*(?:\(?[ \"<]?[ \t]*)([-\w.\\/() > > > \t]+)(?:[ \t]*[\">]?\)?)", re.MULTILINE | re.UNICODE | > > > re.IGNORECASE) ## Regular expression for matching macro used in > > > header file inclusion-gMacroPattern = re.compile(r"([_A-Z][_A-Z0-9]*)[ > > > \t]*\((.+)\)", re.UNICODE)+gMacroPattern = > > > re.compile("([_A-Z][_A-Z0-9]*)[ \t]*\\((.+)\\)", > > > re.UNICODE) gIsFileMap = {} diff --git > > > a/BaseTools/Source/Python/Common/Misc.py > > > b/BaseTools/Source/Python/Common/Misc.py > > > index f87d9dbdba39..34bfc90abd94 100755 > > > --- a/BaseTools/Source/Python/Common/Misc.py > > > +++ b/BaseTools/Source/Python/Common/Misc.py > > > @@ -1926,4 +1926,4 @@ def CopyDict(ori_dict): > > > # Remove the c/c++ comments: // and /* */ # def > > > RemoveCComments(ctext):-return re.sub(r'//.*?\n|/\*.*?\*/', '\n', > ctext, > > > flags=re.S)+return re.sub('//.*?\n|/\\*.*?\\*/', '\n', ctext, > > > flags=re.S)diff > -- > > git > > > a/BaseTools/Source/Python/Workspace/DscBuildData.py > > > b/BaseTools/Source/Python/Workspace/DscBuildData.py > > > index 817cdbe5f19c..4768099343e5 100644 > > > --- a/BaseTools/Source/Python/Workspace/DscBuildData.py > > > +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py > > > @@ -2840,7 +2840,7 @@ class DscBuildData(PlatformBuildClassObject): > > > # start generating makefile MakeApp = PcdMakefileHeader > > >if > > > sys.platform == "win32":-MakeApp = MakeApp + r'APPFILE > > > = %s\%s.exe\n' % (self.OutputPath, PcdValueInitName) + r'APPNAME = > > > %s\n' % (PcdValueInitName) + r'OBJECTS = %s\%s.obj %s.obj\n' % > > > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > > > PcdValueCommonName)) + 'INC = '+MakeApp = MakeApp + 'APPFILE > > > = %s\\%s.exe\n' % (self.OutputPath, PcdValueInitName) + 'APPNAME = > > > %s\n' % (PcdValueInitName) + 'OBJECTS = %s\\%s.obj %s.obj\n' % > > > (self.OutputPath, PcdValueInitName, os.path.join(self.OutputPath, > > > PcdValueCommonName)) + 'INC = ' else: MakeApp = > > > MakeApp + > > > PcdGccMakefile MakeApp = MakeApp + 'APPFILE = %s/%s\n' % > > > (self.OutputPath, PcdValueInitName) + 'APPNAME = %s\n' % > > > (PcdValueInitName) + 'OBJECTS = %s/%s.o %s.o\n' % (self.OutputPath, > > > PcdValueInitName, os.path.join(self.OutputPath, > PcdValueCommonName)) > > + > > > \@@ -2950,7 +2950,7 @@ class DscBuildData(PlatformBuildClassObject): > > > MakeApp += "$(OBJECTS) : %s\n" % include_file if > > > s
Re: [edk2-devel] [PATCH v6 33/36] OvmfPkg/LoongArchVirt: Support SEC phase
On 2024/1/5 下午5:46, Chao Li wrote: Add SEC code for LoongArch virtual machine. BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4584 Cc: Ard Biesheuvel Cc: Jiewen Yao Cc: Jordan Justen Cc: Gerd Hoffmann Cc: Bibo Mao Cc: Dongyan Qian Signed-off-by: Chao Li Co-authored-by: Xianglai Li Co-authored-by: Bibo Mao --- OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S | 180 +++ OvmfPkg/LoongArchVirt/Sec/SecMain.c | 507 ++ OvmfPkg/LoongArchVirt/Sec/SecMain.inf | 53 ++ 3 files changed, 740 insertions(+) create mode 100644 OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S create mode 100644 OvmfPkg/LoongArchVirt/Sec/SecMain.c create mode 100644 OvmfPkg/LoongArchVirt/Sec/SecMain.inf diff --git a/OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S b/OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S new file mode 100644 index 00..ed099ba0fc --- /dev/null +++ b/OvmfPkg/LoongArchVirt/Sec/LoongArch64/Start.S @@ -0,0 +1,180 @@ +#-- +# +# Start for Loongson LoongArch processor +# +# Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +# @par Glossary: +#- CSR - CPU Status Register +#- EBASE - Exception Base Address +#-- +#ifndef __ASSEMBLY__ +#define __ASSEMBLY__ +#endif + +#include +#include +#include + +#define BOOTCORE_ID 0 +// +// For coding convenience, define the maximum valid +// LoongArch exception. +// Since UEFI V2.11, it will be present in DebugSupport.h. +// +#define MAX_LOONGARCH_EXCEPTION 64 + +ASM_GLOBAL ASM_PFX(_ModuleEntryPoint) +ASM_PFX(_ModuleEntryPoint): + /* Disable interrupt */ + li.d $t0, (1 << 2) + csrxchg $zero, $t0, LOONGARCH_CSR_CRMD + + /* Read physical cpu number id */ + bl GetApicId + li.d $t0, BOOTCORE_ID //0 + bne $a0, $t0, SlaveMain + + /* Set BSP stack */ + li.d $t0, FixedPcdGet64(PcdOvmfSecPeiTempRamBase) + FixedPcdGet32(PcdOvmfSecPeiTempRamSize) # stack base + move $sp, $t0 + addi.d $sp, $sp, -0x8 + + /* Load the exception vector base address */ + li.d $s0, FixedPcdGet64(PcdCpuExceptionVectorBaseAddress) + + /* Construct SEC and PEI step exception environment */ + la.pcrel $a1, ExceptionEntryStart + la.pcrel $t0, ExceptionEntryEnd + sub.d$a2, $t0, $a1 + li.w $t0, (MAX_LOONGARCH_EXCEPTION + MAX_LOONGARCH_INTERRUPT) * 512 + bgeu $a2, $t0, DeadLoop + move $a0, $s0 + bl CopyMem + + /* Configure BSP reset ebase */ + move $a0, $s0 + bl SetExceptionBaseAddress + +CallEntry: + /* Call C function make sure parameter true */ + li.d $a0, FixedPcdGet64(PcdOvmfFdBaseAddress) # FW base + addi.d $a1, $sp, 0x8 + bl SecCoreStartupWithStack +# End of _ModuleEntryPoint + +ASM_PFX(ClearMailBox): + /* Clear mailbox */ + li.d $t1, LOONGARCH_IOCSR_MBUF3 + iocsrwr.d $zero, $t1 + li.d $t1, LOONGARCH_IOCSR_MBUF2 + iocsrwr.d $zero, $t1 + li.d $t1, LOONGARCH_IOCSR_MBUF1 + iocsrwr.d $zero, $t1 + li.d $t1, LOONGARCH_IOCSR_MBUF0 + iocsrwr.d $zero, $t1 + jirl $zero, $ra, 0 +# End of ClearMailBox + +ASM_PFX(EnableIPI): + /* Enable IPI interrupt */ + li.d $t1, (1 << 12) + csrxchg $t1, $t1, LOONGARCH_CSR_ECFG + + addi.d$t2, $zero, -1 + li.d $t1, LOONGARCH_IOCSR_IPI_EN + iocsrwr.w $t2, $t1 + jirl $zero, $ra, 0 +# End of EeableIPI + +#/** +# Get APIC ID for every CPU. +# +# @param NULL +# @return APICID +# +# UINTN +# EFI_API +# GetApicId ( +# VOID +# ) +#**/ +ASM_PFX(GetApicId): + csrrd $a0, LOONGARCH_CSR_CPUNUM + andi $a0, $a0, 0x3ff + jirl $zero, $ra, 0 +# End of GetApicId + +ASM_PFX(ApInitStack): + li.d $t1, SIZE_1KB + csrrd $t0, LOONGARCH_CSR_TMID + mul.d $t1, $t0, $t1 + li.d $t2, FixedPcdGet32(PcdCpuMaxLogicalProcessorNumber) + bgeu $t0, $t2, DeadLoop + li.d $t0, FixedPcdGet64(PcdOvmfSecPeiTempRamBase) + FixedPcdGet32(PcdOvmfSecPeiTempRamSize) - SIZE_64KB + sub.d $sp, $t0, $t1 + addi.d $sp, $sp, -0x8 + jirl $zero, $ra, 0 +# End of ApInitStack + +ASM_PFX(SlaveMain): + /* Set AP exception handle in flash */ + la.pcrel $a0, ApException + blSetExceptionBaseAddress + + /* Clean up local mail box and open INT */ + blClearMailBox + blEnableIPI + blEnableInterrupts + +WaitForWake: + /* Wait for wakeup */ + blCpuSleep + b WaitForWake +# End of SlaveMain + +.align 12 +ASM_PFX(ApException): + csrrd $t0, LOONGARCH_CSR_ESTAT + srli.d$t0, $t0, 12 + beqz $t0, DeadLoop + + li.d $t0, LOONGARCH_IOCSR_IPI_STATUS + iocsrrd.w $t1, $t0 + li.d $t0, LOONGARCH_IOCSR_IPI_CLEAR + iocsrwr.w $t1, $t0 + + /* Read mail buf and jump to specified entry */ + li.d $t1, LOONGARCH_IOCSR_MBUF0 + iocsrrd.d $t0, $t1 + beqz $t0, Out
[edk2-devel] [PATCH] UefiPayloadPkg: CbParseLib: Fix integer overflow
The IMD entry uses the 32bit start field as relative offset to root. On Ia32X64 this works fine as UINTN is also 32 bit and negative relative offsets are properly calculated due to an integer overflow. On X64 this doesn't work as UINTN is 64 bit and the offset is no longer subtracted, but it's added to the root. Fix that by sign extending the start field to 64 bit. Test: Booting UefiPayloadPkg still works on Ia32X64 and now also works on X64. Signed-off-by: Patrick Rudolph --- UefiPayloadPkg/Library/CbParseLib/CbParseLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c b/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c index 8a353f77f6..9e149532a7 100644 --- a/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c +++ b/UefiPayloadPkg/Library/CbParseLib/CbParseLib.c @@ -282,7 +282,7 @@ FindCbMemTable ( for (Idx = 0; Idx < Root->num_entries; Idx++) { if (Entries[Idx].id == TableId) { if (IsImdEntry) { -*MemTable = (VOID *)((UINTN)Entries[Idx].start + (UINTN)Root); +*MemTable = (VOID *)((INTN)(INT32)Entries[Idx].start + (UINTN)Root); } else { *MemTable = (VOID *)(UINTN)Entries[Idx].start; } -- 2.43.0 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113361): https://edk2.groups.io/g/devel/message/113361 Mute This Topic: https://groups.io/mt/103593206/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] Remove SCI status check from UPL
Check SCI status too early will cause the below error message will be printed out always: ERROR: The ACPI enabling status is inconsistent: SCI is not enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd. This may cause issues in OS. SCI will be set in BDS. So check the SCI in UPL is too early. Remove the SCI status check code from UPL. Gang Chen (1): UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c | 38 - 1 file changed, 38 deletions(-) -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113362): https://edk2.groups.io/g/devel/message/113362 Mute This Topic: https://groups.io/mt/103593435/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check
It's too early to check the SCI enable status, which is set in the BDS phase ususally. Remove the check from UPL. Signed-off-by: Gang Chen Cc: Gua Guo Cc: Guo Dong Cc: James Lu Cc: Sean Rhodes --- UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c | 38 - 1 file changed, 38 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c index 1b9208b6d3..748728981a 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c +++ b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c @@ -134,44 +134,6 @@ Done: ASSERT (Fadt->Pm1aEvtBlk != 0); ASSERT (Fadt->Gpe0Blk != 0); - DEBUG_CODE_BEGIN (); - BOOLEAN SciEnabled; - - // - // Check the consistency of SCI enabling - // - - // - // Get SCI_EN value - // - if (Fadt->Pm1CntLen == 4) { -SciEnabled = (IoRead32 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE; - } else { -// -// if (Pm1CntLen == 2), use 16 bit IO read; -// if (Pm1CntLen != 2 && Pm1CntLen != 4), use 16 bit IO read as a fallback -// -SciEnabled = (IoRead16 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE; - } - - if (!(Fadt->Flags & EFI_ACPI_5_0_HW_REDUCED_ACPI) && - (Fadt->SmiCmd == 0) && - !SciEnabled) - { -// -// The ACPI enabling status is inconsistent: SCI is not enabled but ACPI -// table does not provide a means to enable it through FADT->SmiCmd -// -DEBUG (( - DEBUG_ERROR, - "ERROR: The ACPI enabling status is inconsistent: SCI is not" - " enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd." - " This may cause issues in OS.\n" - )); - } - - DEBUG_CODE_END (); - return RETURN_SUCCESS; } -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113363): https://edk2.groups.io/g/devel/message/113363 Mute This Topic: https://groups.io/mt/103593438/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] Remove SCI status check from UPL
Check SCI status too early will cause the below error message will be printed out always: ERROR: The ACPI enabling status is inconsistent: SCI is not enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd. This may cause issues in OS. SCI will be set in BDS. So check the SCI in UPL is too early. Remove the SCI status check code from UPL. Gang Chen (1): UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c | 38 - 1 file changed, 38 deletions(-) -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113364): https://edk2.groups.io/g/devel/message/113364 Mute This Topic: https://groups.io/mt/103593435/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[edk2-devel] [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check
It's too early to check the SCI enable status, which is set in the BDS phase ususally. Remove the check from UPL. Signed-off-by: Gang Chen Cc: Gua Guo Cc: Guo Dong Cc: James Lu Cc: Sean Rhodes --- UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c | 38 - 1 file changed, 38 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c index 1b9208b6d3..748728981a 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c +++ b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c @@ -134,44 +134,6 @@ Done: ASSERT (Fadt->Pm1aEvtBlk != 0); ASSERT (Fadt->Gpe0Blk != 0); - DEBUG_CODE_BEGIN (); - BOOLEAN SciEnabled; - - // - // Check the consistency of SCI enabling - // - - // - // Get SCI_EN value - // - if (Fadt->Pm1CntLen == 4) { -SciEnabled = (IoRead32 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE; - } else { -// -// if (Pm1CntLen == 2), use 16 bit IO read; -// if (Pm1CntLen != 2 && Pm1CntLen != 4), use 16 bit IO read as a fallback -// -SciEnabled = (IoRead16 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE; - } - - if (!(Fadt->Flags & EFI_ACPI_5_0_HW_REDUCED_ACPI) && - (Fadt->SmiCmd == 0) && - !SciEnabled) - { -// -// The ACPI enabling status is inconsistent: SCI is not enabled but ACPI -// table does not provide a means to enable it through FADT->SmiCmd -// -DEBUG (( - DEBUG_ERROR, - "ERROR: The ACPI enabling status is inconsistent: SCI is not" - " enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd." - " This may cause issues in OS.\n" - )); - } - - DEBUG_CODE_END (); - return RETURN_SUCCESS; } -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113365): https://edk2.groups.io/g/devel/message/113365 Mute This Topic: https://groups.io/mt/103593439/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check
Reviewed-by: Gua Guo -Original Message- From: Chen, Gang C Sent: Monday, January 8, 2024 3:26 PM To: devel@edk2.groups.io Cc: Guo, Gua ; Dong, Guo ; Lu, James ; Rhodes, Sean ; Chen, Gang C Subject: [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check It's too early to check the SCI enable status, which is set in the BDS phase ususally. Remove the check from UPL. Signed-off-by: Gang Chen Cc: Gua Guo Cc: Guo Dong Cc: James Lu Cc: Sean Rhodes --- UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c | 38 - 1 file changed, 38 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c index 1b9208b6d3..748728981a 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c +++ b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c @@ -134,44 +134,6 @@ Done: ASSERT (Fadt->Pm1aEvtBlk != 0); ASSERT (Fadt->Gpe0Blk != 0); - DEBUG_CODE_BEGIN ();- BOOLEAN SciEnabled;-- //- // Check the consistency of SCI enabling- //-- //- // Get SCI_EN value- //- if (Fadt->Pm1CntLen == 4) {-SciEnabled = (IoRead32 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE;- } else {-//-// if (Pm1CntLen == 2), use 16 bit IO read;-// if (Pm1CntLen != 2 && Pm1CntLen != 4), use 16 bit IO read as a fallback-//- SciEnabled = (IoRead16 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE;- }-- if (!(Fadt->Flags & EFI_ACPI_5_0_HW_REDUCED_ACPI) &&- (Fadt->SmiCmd == 0) &&- !SciEnabled)- {-//-// The ACPI enabling status is inconsistent: SCI is not enabled but ACPI-// table does not provide a means to enable it through FADT->SmiCmd-//-DEBUG ((- DEBUG_ERROR,- "ERROR: The ACPI enabling status is inconsistent: SCI is not"- " enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd."- " This may cause issues in OS.\n"- ));- }-- DEBUG_CODE_END ();- return RETURN_SUCCESS; } -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113366): https://edk2.groups.io/g/devel/message/113366 Mute This Topic: https://groups.io/mt/103593439/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/1] MdePkg: Update the comments of callback in EFI_FORM_BROWSER2_PROTOCOL
Add the Pull Request link: https://github.com/tianocore/edk2/pull/5186. Hi Liming, Could you please have a check and merge this patch? Thanks Ren, Suqiang -Original Message- From: Ren, SuqiangX Sent: Tuesday, January 2, 2024 10:43 AM To: 'gaoliming' ; devel@edk2.groups.io Cc: Kinney, Michael D ; Liu, Zhiguang ; Li, Yi1 Subject: RE: [edk2-devel] [PATCH 1/1] MdePkg: Update the comments of callback in EFI_FORM_BROWSER2_PROTOCOL Hi Liming, This patch has also reviewed by Felix Polyudov: https://edk2.groups.io/g/devel/message/113002 Could you help to merge this patch? Thanks Ren, Suqiang -Original Message- From: gaoliming Sent: Saturday, December 23, 2023 10:02 AM To: devel@edk2.groups.io; Ren, SuqiangX Cc: Kinney, Michael D ; Liu, Zhiguang ; Li, Yi1 Subject: 回复: [edk2-devel] [PATCH 1/1] MdePkg: Update the comments of callback in EFI_FORM_BROWSER2_PROTOCOL Reviewed-by: Liming Gao > -邮件原件- > 发件人: devel@edk2.groups.io 代表 SuqiangX Ren > 发送时间: 2023年12月22日 14:33 > 收件人: devel@edk2.groups.io > 抄送: Michael D Kinney ; Liming Gao > ; Zhiguang Liu ; Yi > Li > 主题: [edk2-devel] [PATCH 1/1] MdePkg: Update the comments of callback > in EFI_FORM_BROWSER2_PROTOCOL > > Add status code return for BROWSER callback in > EFI_FORM_BROWSER2_PROTOCOL to align with UEFI spec 2.10. > > REF: UEFI spec 2.10 Table 35.6.3 > > Signed-off-by: RenSuqiang > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Yi Li > --- > MdePkg/Include/Protocol/FormBrowser2.h | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/MdePkg/Include/Protocol/FormBrowser2.h > b/MdePkg/Include/Protocol/FormBrowser2.h > index 436a7723c1da..bc214caa7d93 100644 > --- a/MdePkg/Include/Protocol/FormBrowser2.h > +++ b/MdePkg/Include/Protocol/FormBrowser2.h > @@ -138,10 +138,13 @@ EFI_STATUS >@retval EFI_SUCCESS The results have been distributed or > are > awaiting distribution. > > - @retval EFI_OUT_OF_RESOURCES The ResultsDataSize specified > + @retval EFI_BUFFER_TOO_SMALL The ResultsDataSize specified > was too small to contain the > results data. > > + @retval EFI_UNSUPPORTED Uncommitted browser state is not > available > +at the current stage of execution. > + > **/ > typedef > EFI_STATUS > -- > 2.26.2.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113367): https://edk2.groups.io/g/devel/message/113367 Mute This Topic: https://groups.io/mt/103475485/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] [MdePkg] Updated the definition of EFI_NVDIMM_LABEL_FLAGS_LOCAL
Hi Liming, Could you please have a check and merge this patch? https://github.com/tianocore/edk2/pull/5167 Thanks Ren, Suqiang -Original Message- From: gaoliming Sent: Thursday, December 21, 2023 9:02 AM To: devel@edk2.groups.io; Ren, SuqiangX Cc: Kinney, Michael D ; Liu, Zhiguang ; Li, Yi1 Subject: 回复: [edk2-devel] [PATCH V2 1/1] [MdePkg] Updated the definition of EFI_NVDIMM_LABEL_FLAGS_LOCAL Reviewed-by: Liming Gao > -邮件原件- > 发件人: devel@edk2.groups.io 代表 SuqiangX Ren > 发送时间: 2023年12月20日 13:36 > 收件人: devel@edk2.groups.io > 抄送: Michael D Kinney ; Liming Gao > ; Zhiguang Liu ; Yi > Li > 主题: [edk2-devel] [PATCH V2 1/1] [MdePkg] Updated the definition of > EFI_NVDIMM_LABEL_FLAGS_LOCAL > > Add the description of EFI_NVDIMM_LABEL_FLAGS_LOCAL to align with UEFI > spec 2.10. > > REF: UEFI spec 2.10 Table 13.19.4 > > Signed-off-by: SuqiangX Ren > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu > Cc: Yi Li > --- > MdePkg/Include/Protocol/NvdimmLabel.h | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MdePkg/Include/Protocol/NvdimmLabel.h > b/MdePkg/Include/Protocol/NvdimmLabel.h > index e46999a3ab4a..59416f11cb03 100644 > --- a/MdePkg/Include/Protocol/NvdimmLabel.h > +++ b/MdePkg/Include/Protocol/NvdimmLabel.h > @@ -108,6 +108,8 @@ typedef struct { > /// > /// When set, the complete label set is local to a single NVDIMM > Label Storage Area. > /// When clear, the complete label set is contained on multiple > NVDIMM Label Storage Areas. > +/// If NLabel is 1 then setting this flag is optional and it is > +implied that the > +/// EFI_NVDIMM_LABEL_FLAGS_LOCAL flag is set as the complete label > +set > is local to a single NVDIMM Label Storage Area. > /// > #define EFI_NVDIMM_LABEL_FLAGS_LOCAL 0x0002 > > -- > 2.26.2.windows.1 > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113368): https://edk2.groups.io/g/devel/message/113368 Mute This Topic: https://groups.io/mt/103593584/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [edk2-devel] [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check
Reviewed-by: James Lu Thanks, James -Original Message- From: Guo, Gua Sent: Monday, January 8, 2024 3:30 PM To: Chen, Gang C ; devel@edk2.groups.io Cc: Dong, Guo ; Lu, James ; Rhodes, Sean Subject: RE: [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check Reviewed-by: Gua Guo -Original Message- From: Chen, Gang C Sent: Monday, January 8, 2024 3:26 PM To: devel@edk2.groups.io Cc: Guo, Gua ; Dong, Guo ; Lu, James ; Rhodes, Sean ; Chen, Gang C Subject: [PATCH 1/1] UefiPayloadPkg/UefiPayloadEntry: Remove SCI enabling check It's too early to check the SCI enable status, which is set in the BDS phase ususally. Remove the check from UPL. Signed-off-by: Gang Chen Cc: Gua Guo Cc: Guo Dong Cc: James Lu Cc: Sean Rhodes --- UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c | 38 - 1 file changed, 38 deletions(-) diff --git a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c index 1b9208b6d3..748728981a 100644 --- a/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c +++ b/UefiPayloadPkg/UefiPayloadEntry/AcpiTable.c @@ -134,44 +134,6 @@ Done: ASSERT (Fadt->Pm1aEvtBlk != 0); ASSERT (Fadt->Gpe0Blk != 0); - DEBUG_CODE_BEGIN ();- BOOLEAN SciEnabled;-- //- // Check the consistency of SCI enabling- //-- //- // Get SCI_EN value- //- if (Fadt->Pm1CntLen == 4) {-SciEnabled = (IoRead32 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE;- } else {-//-// if (Pm1CntLen == 2), use 16 bit IO read;-// if (Pm1CntLen != 2 && Pm1CntLen != 4), use 16 bit IO read as a fallback-//- SciEnabled = (IoRead16 (Fadt->Pm1aCntBlk) & BIT0) ? TRUE : FALSE;- }-- if (!(Fadt->Flags & EFI_ACPI_5_0_HW_REDUCED_ACPI) &&- (Fadt->SmiCmd == 0) &&- !SciEnabled)- {-//-// The ACPI enabling status is inconsistent: SCI is not enabled but ACPI-// table does not provide a means to enable it through FADT->SmiCmd-//-DEBUG ((- DEBUG_ERROR,- "ERROR: The ACPI enabling status is inconsistent: SCI is not"- " enabled but the ACPI table does not provide a means to enable it through FADT->SmiCmd."- " This may cause issues in OS.\n"- ));- }-- DEBUG_CODE_END ();- return RETURN_SUCCESS; } -- 2.40.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#113369): https://edk2.groups.io/g/devel/message/113369 Mute This Topic: https://groups.io/mt/103593439/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-