[edk2-devel] [edk2-redfish-client][PATCH] RedfishClientPkg: Add ETag PCD and revise Redfish ETag functions

2024-01-02 Thread Chang, Abner via groups.io
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 |   2 +
 .../RedfishFeatureUtilityLib.inf  |   1 +
 .../Library/RedfishFeatureUtilityLib.h|  46 +++-
 .../RedfishFeatureUtilityLib.c| 212 --
 4 files changed, 180 insertions(+), 81 deletions(-)

diff --git a/RedfishClientPkg/RedfishClientPkg.dec 
b/RedfishClientPkg/RedfishClientPkg.dec
index 5f8a03501d..155eea9812 100644
--- a/RedfishClientPkg/RedfishClientPkg.dec
+++ b/RedfishClientPkg/RedfishClientPkg.dec
@@ -75,6 +75,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 fd66b8ac34..681c121a13 100644
--- 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf
+++ 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.inf
@@ -53,6 +53,7 @@
 
 [Pcd]
   gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishSystemRebootRequired
+  gEfiRedfishClientPkgTokenSpaceGuid.PcdRedfishServiceEtagSupported
 
 [Guids]
 
diff --git a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h 
b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
index 24f0ad2447..2f0833632c 100644
--- a/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
+++ b/RedfishClientPkg/Include/Library/RedfishFeatureUtilityLib.h
@@ -100,7 +100,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.
 
@@ -578,6 +578,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.
@@ -950,22 +963,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] LocationString buffer to return Location
 
 **/
 EFI_STATUS
-GetEtagAndLocation (
-  IN  REDFISH_RESPONSE *Response,
-  OUT CHAR8 **Etag, OPTIONAL
-  OUT EFI_STRING*LocationOPTIONAL
+GetHttpResponseLocation (
+  IN  REDFISH_RESPONSE  *Response,
+  OUT EFI_STRING*Location
   );
 
 /**
diff --git 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
index 01c054ae3b..a77758d0a2 100644
--- 
a/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
+++ 
b/RedfishClientPkg/Library/RedfishFeatureUtilityLib/RedfishFeatureUtilityLib.c
@@ -133,6 +133,11 @@ SetEtagFromUri (
   REDFISH_RESPONSE  Response;
   EFI_STRINGPendingSettingUri;
 
+  if (!CheckIsServerEtagSupported ()) {
+DEBUG ((DEBUG_INFO, "%a: WARNING - ETAG is not supported\n", __func__));
+return EFI_SUCCESS;
+  }
+
   if ((RedfishService == NULL) || IS_EMPTY_STRING (Uri)) {
 return EFI_INVALID_PARAMETER;
   }
@@ -156,9 +161,9 @@ SetEtagFromUri (
   //
   // Find etag in HTTP response header
   //
-  Status = GetEtagAndLocation (, , 

Re: [edk2-devel] [PATCH v2] NetworkPkg: Triger regularly scan only if not connect to AP

2024-01-02 Thread Heng Luo
Thank Liming, here is the PR:
https://github.com/tianocore/edk2/pull/5075

Thanks,
Heng

> -Original Message-
> From: gaoliming 
> Sent: Wednesday, January 3, 2024 8:55 AM
> To: devel@edk2.groups.io; Luo, Heng ; Kasbekar, Saloni
> ; Clark-williams, Zachary  willi...@intel.com>; Kinney, Michael D 
> Subject: 回复: [edk2-devel] [PATCH v2] NetworkPkg: Triger regularly scan only
> if not connect to AP
> 
> Heng:
>   Can you help create pull request for this patch? Once it pass CI, I will 
> merge
> it.
> 
> Thanks
> Liming
> > -邮件原件-
> > 发件人: devel@edk2.groups.io  代表 Heng Luo
> > 发送时间: 2024年1月2日 16:55
> > 收件人: Kasbekar, Saloni ; Clark-williams,
> > Zachary ; devel@edk2.groups.io;
> > Kinney, Michael D 
> > 主题: Re: [edk2-devel] [PATCH v2] NetworkPkg: Triger regularly scan only
> if
> > not connect to AP
> >
> > Hi Mike,
> > Would you like to help us merge the patch?
> >
> > Thanks,
> > Heng
> >
> > > -Original Message-
> > > From: Kasbekar, Saloni 
> > > Sent: Friday, December 15, 2023 4:36 AM
> > > To: Luo, Heng ; Clark-williams, Zachary
> >  > > willi...@intel.com>; devel@edk2.groups.io; Kinney, Michael D
> > > 
> > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if
> > > not
> > connect
> > > to AP
> > >
> > > Mike,
> > >
> > > Would you be able to help us merge the patch?
> > >
> > > Thanks,
> > > Saloni
> > >
> > > -Original Message-
> > > From: Luo, Heng 
> > > Sent: Thursday, December 14, 2023 3:20 AM
> > > To: Clark-williams, Zachary ;
> Kasbekar,
> > > Saloni ; devel@edk2.groups.io
> > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if
> > > not
> > connect
> > > to AP
> > >
> > > Hi Saloni,
> > > Could you help to merge the patch?
> > >
> > > Thanks,
> > > Heng
> > >
> > > > -Original Message-
> > > > From: Luo, Heng
> > > > Sent: Monday, December 11, 2023 4:13 PM
> > > > To: Clark-williams, Zachary ;
> > > > Kasbekar, Saloni ; devel@edk2.groups.io
> > > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if
> > > > not connect to AP
> > > >
> > > > Hi Zack,
> > > > Could you please review the change?
> > > > Thanks,
> > > > Heng
> > > >
> > > > > -Original Message-
> > > > > From: Kasbekar, Saloni 
> > > > > Sent: Saturday, December 2, 2023 5:25 AM
> > > > > To: Luo, Heng ; devel@edk2.groups.io
> > > > > Cc: Clark-williams, Zachary 
> > > > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only
> > > > > if not connect to AP
> > > > >
> > > > > Reviewed-by: Kasbekar, Saloni 
> > > > >
> > > > > Thanks,
> > > > > Saloni
> > > > >
> > > > > -Original Message-
> > > > > From: Luo, Heng 
> > > > > Sent: Monday, November 27, 2023 7:07 PM
> > > > > To: devel@edk2.groups.io
> > > > > Cc: Kasbekar, Saloni ;
> > > > > Clark-williams, Zachary 
> > > > > Subject: [PATCH v2] NetworkPkg: Triger regularly scan only if
> > > > > not connect to AP
> > > > >
> > > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4605
> > > > >
> > > > > When UEFI Wi-Fi is in BSS connected state, the platform is
> > > > > considered as a static and Wi-Fi roaming support is not needed.
> > > > > Wifi connection manager should not initiate Scan requests in
> > > > > this state affect BSS client connectivity and must be avoided.
> > > > > Triger regularly scan only if not connect to AP.
> > > > >
> > > > > Signed-off-by: Heng Luo 
> > > > > Cc: Saloni Kasbekar 
> > > > > Cc: Zachary Clark-williams 
> > > > > ---
> > > > >  NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c |
> > 4
> > > ++-
> > > > -
> > > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git
> > > > > a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > > index d1182e52bd..4c5460b65c 100644
> > > > > ---
> > a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > > +++
> > > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > > @@ -1506,8 +1506,8 @@ WifiMgrOnTimerTick (
> > > > >}Nic->ScanTickTime++;-  if (((Nic->ScanTickTime >
> > > > > WIFI_SCAN_FREQUENCY) || Nic->OneTimeScanRequest) &&-
> > (Nic-
> > > > > >ScanState == WifiMgrScanFinished))+  if Nic->ScanTickTime >
> > > > > WIFI_SCAN_FREQUENCY) && (Nic->ConnectState !=
> > > > WifiMgrConnectedToAp))
> > > > > ||+   Nic->OneTimeScanRequest) && (Nic->ScanState ==
> > > > > WifiMgrScanFinished))   { Nic->OneTimeScanRequest = FALSE;
> > Nic-
> > > > > >ScanTickTime   = 0;--
> > > > > 2.31.1.windows.1
> >
> >
> >
> > 
> >
> 
> 



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




[edk2-devel] [PATCH] MdePkg/BaseLib: Fix InternalSwitchStack bug for RISCV64.

2024-01-02 Thread yorange
From: yorange 

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

Fixed the InternalSwitchStack error of RISCV64. LongJump is no
longer used for stack switch. Refer to Arm and AArch64 and
use InternalSwitchStackAsm instead.

Signed-off-by: yorange 
---
 MdePkg/Library/BaseLib/BaseLib.inf|  1 +
 .../BaseLib/RiscV64/InternalSwitchStack.c | 31 ---
 .../BaseLib/RiscV64/RiscVSwitchStack.S| 38 +++
 3 files changed, 64 insertions(+), 6 deletions(-)
 create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S

diff --git a/MdePkg/Library/BaseLib/BaseLib.inf 
b/MdePkg/Library/BaseLib/BaseLib.inf
index 5338938944..10382111ef 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -405,6 +405,7 @@
   RiscV64/ReadTimer.S   | GCC
   RiscV64/RiscVMmu.S| GCC
   RiscV64/SpeculationBarrier.S  | GCC
+  RiscV64/RiscVSwitchStack.S| GCC
 
 [Sources.LOONGARCH64]
   Math64.c
diff --git a/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c 
b/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
index b78424c163..c9d92920df 100644
--- a/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
+++ b/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
@@ -8,6 +8,30 @@
 
 #include "BaseLibInternals.h"
 
+/**
+  Transfers control to a function starting with a new stack.
+
+  This internal worker function transfers control to the function
+  specified by EntryPoint using the new stack specified by NewStack,
+  and passes in the parameters specified by Context1 and Context2.
+  Context1 and Context2 are optional and may be NULL.
+  The function EntryPoint must never return.
+
+  @param EntryPoint   The pointer to the function to enter.
+  @param Context1 The first parameter to pass in.
+  @param Context2 The second Parameter to pass in
+  @param NewStack The new Location of the stack
+
+**/
+VOID
+EFIAPI
+InternalSwitchStackAsm (
+  IN  SWITCH_STACK_ENTRY_POINT  EntryPoint,
+  IN  VOID  *Context1OPTIONAL,
+  IN  VOID  *Context2OPTIONAL,
+  IN  VOID  *NewStack
+  );
+
 /**
   Transfers control to a function starting with a new stack.
 
@@ -42,12 +66,7 @@ InternalSwitchStack (
   IN  VA_LIST   Marker
   )
 {
-  BASE_LIBRARY_JUMP_BUFFER  JumpBuffer;
+  InternalSwitchStackAsm(EntryPoint, Context1, Context2, (void 
*)(UINTN)NewStack - sizeof (VOID *));
 
-  JumpBuffer.RA = (UINTN)EntryPoint;
-  JumpBuffer.SP = (UINTN)NewStack - sizeof (VOID *);
-  JumpBuffer.S0 = (UINT64)(UINTN)Context1;
-  JumpBuffer.S1 = (UINT64)(UINTN)Context2;
-  LongJump (, (UINTN)-1);
   ASSERT (FALSE);
 }
diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S 
b/MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S
new file mode 100644
index 00..7b316dd5e5
--- /dev/null
+++ b/MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S
@@ -0,0 +1,38 @@
+//--
+//
+// Switch Stack for RISC-V
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+//--
+
+/**
+//
+//  This allows the caller to switch the stack and goes to the new entry point
+//
+// @param  EntryPoint   The pointer to the location to enter
+// @param  Context  Parameter to pass in
+// @param  Context2 Parameter2 to pass in
+// @param  NewStack New Location of the stack
+//
+// @return Nothing. Goes to the Entry Point passing in the new parameters
+//
+VOID
+EFIAPI
+InternalSwitchStackAsm (
+  SWITCH_STACK_ENTRY_POINT EntryPoint,
+  VOID  *Context,
+  VOID  *Context2,
+  VOID  *NewStack
+  );
+**/
+
+.align 3
+.globl  InternalSwitchStackAsm
+InternalSwitchStackAsm:
+  mv  ra, a0
+  mv  a0, a1
+  mv  a1, a2
+  mv  sp, a3
+
+  ret
-- 
2.34.1



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




[edk2-devel] Event: TianoCore Bug Triage - APAC / NAMO - Tuesday, January 2, 2024 #cal-reminder

2024-01-02 Thread Group Notification
*Reminder: TianoCore Bug Triage - APAC / NAMO*

*When:*
Tuesday, January 2, 2024
6:30pm to 7:30pm
(UTC-08:00) America/Los Angeles

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

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

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

*Description:*

TianoCore Bug Triage - APAC / NAMO

Hosted by Liming Gao



Microsoft Teams meeting

*Join on your computer or mobile app*

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

*Join with a video conferencing device*

te...@conf.intel.com

Video Conference ID: 116 062 094 0

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

*Or call in (audio only)*

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

Phone Conference ID: 774 638 21#

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

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


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




Re: [edk2-devel] [PATCH V2 1/3] MdePkg: Add EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY

2024-01-02 Thread Dandan Bi
Reviewed-by: Dandan Bi  for this patch serial.


Thanks,
Dandan 
-Original Message-
From: Tan, Ming  
Sent: Tuesday, January 2, 2024 11:13 PM
To: devel@edk2.groups.io
Cc: Kinney, Michael D ; Gao, Liming 
; Liu, Zhiguang ; Bi, Dandan 

Subject: [PATCH V2 1/3] MdePkg: Add EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY

REF: UEFI_Spec_2_10_Aug29.pdf page 1694

In 35.5.4 EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack() parameter ActionRequest, 
add EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY.

Signed-off-by: Ming Tan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Dandan Bi 
---
 MdePkg/Include/Protocol/FormBrowser2.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdePkg/Include/Protocol/FormBrowser2.h 
b/MdePkg/Include/Protocol/FormBrowser2.h
index 436a7723c1..7498dc2a07 100644
--- a/MdePkg/Include/Protocol/FormBrowser2.h
+++ b/MdePkg/Include/Protocol/FormBrowser2.h
@@ -55,6 +55,7 @@ typedef UINTN EFI_BROWSER_ACTION_REQUEST;
 #define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6 #define 
EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD   7 #define 
EFI_BROWSER_ACTION_REQUEST_RECONNECT  8+#define 
EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY 9  /**   Initialize the browser 
to display the specified configuration forms.-- 
2.39.1.windows.1



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




Re: [edk2-devel] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build

2024-01-02 Thread Marcin Wojtas
śr., 3 sty 2024 o 00:39 Marcin Wojtas  napisał(a):
>
> Hi Narinder,
>
> wt., 2 sty 2024 o 21:57 Narinder Dhillon  napisał(a):
> >
> > Marcin,
> > I don't see this folder in code, how is it generated ?
>
> It's simply exisitng there:
> Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc in edk2-platforms,
> nothing is generated.
>

If you meant the device tree itself, it's part of edk2-non-osi:
https://github.com/tianocore/edk2-non-osi/tree/master/Silicon/Marvell/Armada7k8k/DeviceTree

> Here's part of the patch, that introduced regression:
> https://github.com/tianocore/edk2-platforms/commit/ec5de71d83f3a6327c90887456782d15565e6e36#diff-ce7de187b6e203a8e22916145bdc2a35f7c922609105c4282932f02dee7bb84fL34
>
> Best regards,
> Marcin
>
>
> > Thanks
> > Narinder
> >
> > > -Original Message-
> > > From: Marcin Wojtas 
> > > Sent: Sunday, December 31, 2023 3:07 AM
> > > To: devel@edk2.groups.io
> > > Cc: quic_llind...@quicinc.com; ardb+tianoc...@kernel.org;
> > > m...@semihalf.com; Narinder Dhillon ; Marcin
> > > Wojtas 
> > > Subject: [EXT] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build
> > >
> > > External Email
> > >
> > > --
> > > Commit ec5de71d83 ("Silicon/Marvell: Restructure package") broke
> > > Armada80x0Db build by unintentional removal of device tree component.
> > > Restore it.
> > >
> > > Signed-off-by: Marcin Wojtas 
> > > ---
> > >  Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > index 22a0040265..501811a050 100644
> > > --- a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > +++ b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > @@ -31,6 +31,9 @@
> > >   !include MdePkg/MdeLibs.dsc.inc +[Components.common]+
> > > Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0Db.inf+
> > > [Components.AARCH64]
> > > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf --
> > > 2.34.1
> >


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

2024-01-02 Thread Igniculus.Fu via groups.io
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.PcdSystemRebootAfterCapsuleProcessFlag
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 (#113052): https://edk2.groups.io/g/devel/message/113052
Mute This Topic: https://groups.io/mt/103494173/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/1] SbsaQemu: add memory space for the high memory nodes

2024-01-02 Thread Xiong Yining
To support more memory nodes, we refer to the implement of
"OvmfPkg/Fdt/HighMemDxe" to add memory space for the high memory nodes
except the first one.

Signed-off-by: Xiong Yining 
Signed-off-by: Chen Baozi 
---
 Platform/Qemu/SbsaQemu/SbsaQemu.dsc   |   3 +-
 Platform/Qemu/SbsaQemu/SbsaQemu.fdf   |   1 +
 .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf |  43 ++
 .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c   | 133 ++
 4 files changed, 179 insertions(+), 1 deletion(-)
 create mode 100644 
Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf
 create mode 100644 
Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c

diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc 
b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
index 378600050df9..21acc188b75e 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.dsc
@@ -78,7 +78,7 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
-  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
+  
ImagePropertiesRecordLib|MdeModulePkg/Library/ImagePropertiesRecordLib/ImagePropertiesRecordLib.inf
 
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
@@ -675,6 +675,7 @@ DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
   ArmPkg/Drivers/TimerDxe/TimerDxe.inf
   OvmfPkg/VirtNorFlashDxe/VirtNorFlashDxe.inf
   MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
+  Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf
 
   #
   # FAT filesystem + GPT/MBR partitioning
diff --git a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf 
b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
index 6fcfd25faaeb..b35f42e11aa4 100644
--- a/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
+++ b/Platform/Qemu/SbsaQemu/SbsaQemu.fdf
@@ -161,6 +161,7 @@ READ_LOCK_STATUS   = TRUE
 
   INF MdeModulePkg/Core/Dxe/DxeMain.inf
   INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  INF Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf
 
   #
   # PI DXE Drivers producing Architectural Protocols (EFI Services)
diff --git 
a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf 
b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf
new file mode 100644
index ..27a7ef649685
--- /dev/null
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf
@@ -0,0 +1,43 @@
+## @file
+#  High memory node enumeration DXE driver for SbsaQemu
+#
+#  Copyright (c) 2023, Linaro Ltd. All rights reserved.
+#
+#  SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = SbsaQemuHighMemDxe
+  FILE_GUID  = 9E749C5E-C282-32F8-7CC3-E5A3DDE15329
+  MODULE_TYPE= DXE_DRIVER
+  VERSION_STRING = 1.0
+
+  ENTRY_POINT= InitializeHighMemDxe
+
+[Sources]
+  SbsaQemuHighMemDxe.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  Silicon/Qemu/SbsaQemu/SbsaQemu.dec
+
+[LibraryClasses]
+  BaseLib
+  DebugLib
+  DxeServicesTableLib
+  PcdLib
+  UefiBootServicesTableLib
+  UefiDriverEntryPoint
+  SbsaQemuSmc
+
+[Protocols]
+  gEfiCpuArchProtocolGuid ## CONSUMES
+
+[Pcd]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy
+
+[Depex]
+  gEfiCpuArchProtocolGuid
diff --git 
a/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c 
b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c
new file mode 100644
index ..01b74a1247cd
--- /dev/null
+++ b/Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c
@@ -0,0 +1,133 @@
+/** @file
+*  High memory node enumeration DXE driver for SbsaQemu
+*  Virtual Machines
+*
+*  Copyright (c) 2023, Linaro Ltd. All rights reserved.
+*
+*  SPDX-License-Identifier: BSD-2-Clause-Patent
+*
+**/
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+EFI_STATUS
+EFIAPI
+InitializeHighMemDxe (
+  IN EFI_HANDLEImageHandle,
+  IN EFI_SYSTEM_TABLE  *SystemTable
+  )
+{
+
+
+  UINT64   CurBase;
+  UINT64   CurSize;
+  UINT64   Attributes;
+  UINT32   NumMemNodes;
+  UINT32   index;
+  MemoryNode   MemNode;
+  EFI_STATUS   Status;
+  EFI_GCD_MEMORY_SPACE_DESCRIPTOR  GcdDescriptor;
+  EFI_CPU_ARCH_PROTOCOL*Cpu;
+
+  Status = gBS->LocateProtocol (
+  ,
+  NULL,
+  (VOID **)
+  );
+  ASSERT_EFI_ERROR (Status);
+
+  //
+  // Check for memory node and add 

[edk2-devel] [PATCH v2 0/1] Support multi memory nodes

2024-01-02 Thread Xiong Yining
When SaSbQemu platform is configured with multi memory nodes, like 
numa architecture, os will ignore any memory node in the device tree 
except the first one.The kernel reads UEFI memory map for memory 
information when booting via UEFI.However UEFI only allocates the 
first memory node memory space for SbsaQemu platform, in this 
scenario we can use the GCD services to add memory spaces 
for high memory node.

Changes in v2:
- get the information of memory via SMC rather than FdtClientDxe.
- add a new driver rather than use HighMemDxe. 

Xiong Yining (1):
  SbsaQemu: add memory space for the high memory nodes

 Platform/Qemu/SbsaQemu/SbsaQemu.dsc   |   3 +-
 Platform/Qemu/SbsaQemu/SbsaQemu.fdf   |   1 +
 .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf |  43 ++
 .../SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c   | 133 ++
 4 files changed, 179 insertions(+), 1 deletion(-)
 create mode 100644 
Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.inf
 create mode 100644 
Silicon/Qemu/SbsaQemu/Drivers/SbsaQemuHighMemDxe/SbsaQemuHighMemDxe.c

-- 
2.34.1



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




Re: [edk2-devel] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build

2024-01-02 Thread Marcin Wojtas
Hi Narinder,

wt., 2 sty 2024 o 21:57 Narinder Dhillon  napisał(a):
>
> Marcin,
> I don't see this folder in code, how is it generated ?

It's simply exisitng there:
Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc in edk2-platforms,
nothing is generated.

Here's part of the patch, that introduced regression:
https://github.com/tianocore/edk2-platforms/commit/ec5de71d83f3a6327c90887456782d15565e6e36#diff-ce7de187b6e203a8e22916145bdc2a35f7c922609105c4282932f02dee7bb84fL34

Best regards,
Marcin


> Thanks
> Narinder
>
> > -Original Message-
> > From: Marcin Wojtas 
> > Sent: Sunday, December 31, 2023 3:07 AM
> > To: devel@edk2.groups.io
> > Cc: quic_llind...@quicinc.com; ardb+tianoc...@kernel.org;
> > m...@semihalf.com; Narinder Dhillon ; Marcin
> > Wojtas 
> > Subject: [EXT] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build
> >
> > External Email
> >
> > --
> > Commit ec5de71d83 ("Silicon/Marvell: Restructure package") broke
> > Armada80x0Db build by unintentional removal of device tree component.
> > Restore it.
> >
> > Signed-off-by: Marcin Wojtas 
> > ---
> >  Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > index 22a0040265..501811a050 100644
> > --- a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > +++ b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > @@ -31,6 +31,9 @@
> >   !include MdePkg/MdeLibs.dsc.inc +[Components.common]+
> > Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0Db.inf+
> > [Components.AARCH64]
> > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf --
> > 2.34.1
>


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




[edk2-devel] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build

2024-01-02 Thread Marcin Wojtas
Commit ec5de71d83 ("Silicon/Marvell: Restructure package")
broke Armada80x0Db build by unintentional removal of
device tree component. Restore it.

Signed-off-by: Marcin Wojtas 
---
 Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc 
b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
index 22a0040265..501811a050 100644
--- a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
+++ b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
@@ -31,6 +31,9 @@
 
 !include MdePkg/MdeLibs.dsc.inc
 
+[Components.common]
+  Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0Db.inf
+
 [Components.AARCH64]
   Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf
 
-- 
2.34.1



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




[edk2-devel] [PATCH] MdePkg/BaseLib: Fix InternalSwitchStack bug for RISCV64.

2024-01-02 Thread yorange
From: yorange1 

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

Fixed the InternalSwitchStack error of RISCV64. LongJump is no
longer used for stack switch. Refer to Arm and AArch64 and
use InternalSwitchStackAsm instead.

Signed-off-by: yorange1 
---
 MdePkg/Library/BaseLib/BaseLib.inf|  1 +
 .../BaseLib/RiscV64/InternalSwitchStack.c | 31 ---
 .../BaseLib/RiscV64/RiscVSwitchStack.S| 38 +++
 3 files changed, 64 insertions(+), 6 deletions(-)
 create mode 100644 MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S

diff --git a/MdePkg/Library/BaseLib/BaseLib.inf 
b/MdePkg/Library/BaseLib/BaseLib.inf
index 5338938944..10382111ef 100644
--- a/MdePkg/Library/BaseLib/BaseLib.inf
+++ b/MdePkg/Library/BaseLib/BaseLib.inf
@@ -405,6 +405,7 @@
   RiscV64/ReadTimer.S   | GCC
   RiscV64/RiscVMmu.S| GCC
   RiscV64/SpeculationBarrier.S  | GCC
+  RiscV64/RiscVSwitchStack.S| GCC
 
 [Sources.LOONGARCH64]
   Math64.c
diff --git a/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c 
b/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
index b78424c163..c9d92920df 100644
--- a/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
+++ b/MdePkg/Library/BaseLib/RiscV64/InternalSwitchStack.c
@@ -8,6 +8,30 @@
 
 #include "BaseLibInternals.h"
 
+/**
+  Transfers control to a function starting with a new stack.
+
+  This internal worker function transfers control to the function
+  specified by EntryPoint using the new stack specified by NewStack,
+  and passes in the parameters specified by Context1 and Context2.
+  Context1 and Context2 are optional and may be NULL.
+  The function EntryPoint must never return.
+
+  @param EntryPoint   The pointer to the function to enter.
+  @param Context1 The first parameter to pass in.
+  @param Context2 The second Parameter to pass in
+  @param NewStack The new Location of the stack
+
+**/
+VOID
+EFIAPI
+InternalSwitchStackAsm (
+  IN  SWITCH_STACK_ENTRY_POINT  EntryPoint,
+  IN  VOID  *Context1OPTIONAL,
+  IN  VOID  *Context2OPTIONAL,
+  IN  VOID  *NewStack
+  );
+
 /**
   Transfers control to a function starting with a new stack.
 
@@ -42,12 +66,7 @@ InternalSwitchStack (
   IN  VA_LIST   Marker
   )
 {
-  BASE_LIBRARY_JUMP_BUFFER  JumpBuffer;
+  InternalSwitchStackAsm(EntryPoint, Context1, Context2, (void 
*)(UINTN)NewStack - sizeof (VOID *));
 
-  JumpBuffer.RA = (UINTN)EntryPoint;
-  JumpBuffer.SP = (UINTN)NewStack - sizeof (VOID *);
-  JumpBuffer.S0 = (UINT64)(UINTN)Context1;
-  JumpBuffer.S1 = (UINT64)(UINTN)Context2;
-  LongJump (, (UINTN)-1);
   ASSERT (FALSE);
 }
diff --git a/MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S 
b/MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S
new file mode 100644
index 00..7b316dd5e5
--- /dev/null
+++ b/MdePkg/Library/BaseLib/RiscV64/RiscVSwitchStack.S
@@ -0,0 +1,38 @@
+//--
+//
+// Switch Stack for RISC-V
+//
+// SPDX-License-Identifier: BSD-2-Clause-Patent
+//
+//--
+
+/**
+//
+//  This allows the caller to switch the stack and goes to the new entry point
+//
+// @param  EntryPoint   The pointer to the location to enter
+// @param  Context  Parameter to pass in
+// @param  Context2 Parameter2 to pass in
+// @param  NewStack New Location of the stack
+//
+// @return Nothing. Goes to the Entry Point passing in the new parameters
+//
+VOID
+EFIAPI
+InternalSwitchStackAsm (
+  SWITCH_STACK_ENTRY_POINT EntryPoint,
+  VOID  *Context,
+  VOID  *Context2,
+  VOID  *NewStack
+  );
+**/
+
+.align 3
+.globl  InternalSwitchStackAsm
+InternalSwitchStackAsm:
+  mv  ra, a0
+  mv  a0, a1
+  mv  a1, a2
+  mv  sp, a3
+
+  ret
-- 
2.34.1



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




回复: [edk2-devel] [PATCH V2 3/3] MdeModulePkg/DriverSampleDxe: EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY

2024-01-02 Thread gaoliming via groups.io
Reviewed-by: Liming Gao  for this patch set. 

> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Tan, Ming
> 发送时间: 2024年1月2日 23:13
> 收件人: devel@edk2.groups.io
> 抄送: Liming Gao ; Dandan Bi
> 
> 主题: [edk2-devel] [PATCH V2 3/3] MdeModulePkg/DriverSampleDxe:
> EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY
> 
> REF: UEFI_Spec_2_10_Aug29.pdf page 1695.
> 
> In 35.5.4 EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack():
> If the callback function returns with the ActionRequest set to
> _QUESTION_APPLY, then the Forms Browser will write the current modified
> question value on the selected form to storage.
> 
> Update the DriverSampleDxe, add a new question "Question apply test".
> 
> Signed-off-by: Ming Tan 
> Cc: Liming Gao 
> Cc: Dandan Bi 
> ---
>  .../Universal/DriverSampleDxe/DriverSample.c| 13
> +
>  .../Universal/DriverSampleDxe/NVDataStruc.h |  1 +
>  MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr  | 10 ++
>  .../Universal/DriverSampleDxe/VfrStrings.uni|  4 
>  4 files changed, 28 insertions(+)
> 
> diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
> b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
> index 62ba52e940..003cb499b5 100644
> --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
> +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
> @@ -858,6 +858,7 @@ ExtractConfig (
>@retval EFI_INVALID_PARAMETER  Configuration is NULL.
> 
>@retval EFI_NOT_FOUND  Routing data doesn't match any
> storage in this
> 
>   driver.
> 
> +  @retval EFI_DEVICE_ERROR   If value is 44, return error for
> testing.
> 
> 
> 
>  **/
> 
>  EFI_STATUS
> 
> @@ -1065,6 +1066,11 @@ RouteConfig (
>  return Status;
> 
>}
> 
> 
> 
> +  if (PrivateData->Configuration.QuestionApply == 44) {
> 
> +// Return error for verify the error handling of caller.
> 
> +return EFI_DEVICE_ERROR;
> 
> +  }
> 
> +
> 
>//
> 
>// Store Buffer Storage back to EFI variable
> 
>//
> 
> @@ -1599,6 +1605,13 @@ DriverCallback (
>*ActionRequest =
> EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
> 
>break;
> 
> 
> 
> +case 0x1253:
> 
> +  //
> 
> +  // User change the value of "Question apply test".
> 
> +  //
> 
> +  *ActionRequest =
> EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY;
> 
> +  break;
> 
> +
> 
>  case 0x1231:
> 
>//
> 
>// 1. Check to see whether system support keyword.
> 
> diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> index 489d7bcbf3..3f5388946d 100644
> --- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> +++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
> @@ -95,6 +95,7 @@ typedef struct {
>MY_EFI_UNION_DATAMyUnionData;
> 
>UINT8QuestionXUefiKeywordRestStyle;
> 
>UINT8QuestionNonXUefiKeywordRestStyle;
> 
> +  UINT8QuestionApply;
> 
>  } DRIVER_SAMPLE_CONFIGURATION;
> 
> 
> 
>  //
> 
> diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> index 5323e2b411..0c376fe9b7 100644
> --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
> @@ -513,6 +513,16 @@ formset
>  default = 18,
> 
>  endnumeric;
> 
> 
> 
> +numeric varid   = MyIfrNVData.QuestionApply,
> 
> +questionid = 0x1253,
> 
> +prompt  =
> STRING_TOKEN(STR_QUESTION_APPLY_TEST_PROMPT),
> 
> +help=
> STRING_TOKEN(STR_QUESTION_APPLY_TEST_HELP),
> 
> +flags   = INTERACTIVE,
> 
> +minimum = 0,
> 
> +maximum = 255,
> 
> +default = 19,
> 
> +endnumeric;
> 
> +
> 
>  text
> 
>help  = STRING_TOKEN(STR_POPUP_TEST_HELP),
> 
>text  = STRING_TOKEN(STR_POPUP_TEST_PROMPT),
> 
> diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
> b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
> index 8a3e286bec..ed906045fd 100644
> --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
> +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
> @@ -269,6 +269,10 @@
>   #language
> fr-FR "Submitted callback test"
> 
>  #string STR_SUBMITTED_CALLBACK_TEST_HELP #language
> en-US "Change the value and press F10 to submit will pop up a dialogue to
> show SUBMITTED Callback has been triggered"
> 
>   #language
> fr-FR "Change the value and press F10 to submit will pop up a dialogue to
> show SUBMITTED Callback has been triggered"
> 
> +#string STR_QUESTION_APPLY_TEST_PROMPT   #language
> en-US "Question apply test"
> 
> + #language
> fr-FR "Question apply test"
> 

回复: [edk2-devel] [PATCH v2] NetworkPkg: Triger regularly scan only if not connect to AP

2024-01-02 Thread gaoliming via groups.io
Heng:
  Can you help create pull request for this patch? Once it pass CI, I will
merge it. 

Thanks
Liming
> -邮件原件-
> 发件人: devel@edk2.groups.io  代表 Heng Luo
> 发送时间: 2024年1月2日 16:55
> 收件人: Kasbekar, Saloni ; Clark-williams,
> Zachary ; devel@edk2.groups.io; Kinney,
> Michael D 
> 主题: Re: [edk2-devel] [PATCH v2] NetworkPkg: Triger regularly scan only
if
> not connect to AP
> 
> Hi Mike,
> Would you like to help us merge the patch?
> 
> Thanks,
> Heng
> 
> > -Original Message-
> > From: Kasbekar, Saloni 
> > Sent: Friday, December 15, 2023 4:36 AM
> > To: Luo, Heng ; Clark-williams, Zachary
>  > willi...@intel.com>; devel@edk2.groups.io; Kinney, Michael D
> > 
> > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if not
> connect
> > to AP
> >
> > Mike,
> >
> > Would you be able to help us merge the patch?
> >
> > Thanks,
> > Saloni
> >
> > -Original Message-
> > From: Luo, Heng 
> > Sent: Thursday, December 14, 2023 3:20 AM
> > To: Clark-williams, Zachary ;
Kasbekar,
> > Saloni ; devel@edk2.groups.io
> > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if not
> connect
> > to AP
> >
> > Hi Saloni,
> > Could you help to merge the patch?
> >
> > Thanks,
> > Heng
> >
> > > -Original Message-
> > > From: Luo, Heng
> > > Sent: Monday, December 11, 2023 4:13 PM
> > > To: Clark-williams, Zachary ;
> > > Kasbekar, Saloni ; devel@edk2.groups.io
> > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if not
> > > connect to AP
> > >
> > > Hi Zack,
> > > Could you please review the change?
> > > Thanks,
> > > Heng
> > >
> > > > -Original Message-
> > > > From: Kasbekar, Saloni 
> > > > Sent: Saturday, December 2, 2023 5:25 AM
> > > > To: Luo, Heng ; devel@edk2.groups.io
> > > > Cc: Clark-williams, Zachary 
> > > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if
> > > > not connect to AP
> > > >
> > > > Reviewed-by: Kasbekar, Saloni 
> > > >
> > > > Thanks,
> > > > Saloni
> > > >
> > > > -Original Message-
> > > > From: Luo, Heng 
> > > > Sent: Monday, November 27, 2023 7:07 PM
> > > > To: devel@edk2.groups.io
> > > > Cc: Kasbekar, Saloni ; Clark-williams,
> > > > Zachary 
> > > > Subject: [PATCH v2] NetworkPkg: Triger regularly scan only if not
> > > > connect to AP
> > > >
> > > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4605
> > > >
> > > > When UEFI Wi-Fi is in BSS connected state, the platform is
> > > > considered as a static and Wi-Fi roaming support is not needed.
> > > > Wifi connection manager should not initiate Scan requests in this
> > > > state affect BSS client connectivity and must be avoided.
> > > > Triger regularly scan only if not connect to AP.
> > > >
> > > > Signed-off-by: Heng Luo 
> > > > Cc: Saloni Kasbekar 
> > > > Cc: Zachary Clark-williams 
> > > > ---
> > > >  NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c |
> 4
> > ++-
> > > -
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git
> > > > a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > index d1182e52bd..4c5460b65c 100644
> > > > ---
> a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > +++
> > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > > @@ -1506,8 +1506,8 @@ WifiMgrOnTimerTick (
> > > >}Nic->ScanTickTime++;-  if (((Nic->ScanTickTime >
> > > > WIFI_SCAN_FREQUENCY) || Nic->OneTimeScanRequest) &&-
> (Nic-
> > > > >ScanState == WifiMgrScanFinished))+  if Nic->ScanTickTime >
> > > > WIFI_SCAN_FREQUENCY) && (Nic->ConnectState !=
> > > WifiMgrConnectedToAp))
> > > > ||+   Nic->OneTimeScanRequest) && (Nic->ScanState ==
> > > > WifiMgrScanFinished))   { Nic->OneTimeScanRequest = FALSE;
> Nic-
> > > > >ScanTickTime   = 0;--
> > > > 2.31.1.windows.1
> 
> 
> 
> 
> 





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

2024-01-02 Thread gaoliming via groups.io
Reviewed-by: Liming Gao  for this patch set. 

> -邮件原件-
> 发件人: Xu, Wei6 
> 发送时间: 2024年1月2日 9:43
> 收件人: Li, Yi1 ; devel@edk2.groups.io
> 抄送: Kinney, Michael D ; Gao, Liming
> ; Liu, Zhiguang 
> 主题: RE: [PATCH V2 0/2] Add DECLARE_LENGTH opcode of dependency
> expression
> 
> Reviewed-by: Wei6 Xu 
> 
> -Original Message-
> From: Li, Yi1 
> Sent: Wednesday, December 20, 2023 9:55 AM
> To: devel@edk2.groups.io
> Cc: Li, Yi1 ; Kinney, Michael D
> ; Gao, Liming ;
> Liu, Zhiguang ; Xu, Wei6 
> Subject: [PATCH V2 0/2] Add DECLARE_LENGTH opcode of dependency
> expression
> 
> To avoid messy parsing of the Depex section of a Capsule, it would be a
lot
> easier for everyone involved if we preceded the Capsule Depex Section with
a
> length declaration. It provides simple bounds checking to avoid having to
> parse the op-codes, but in the case of a malformed depex being parsed,
avoid
> other issues which can be messy.
> 
> Syntax
> DECLARE_LENGTH <32-bit Length>
> Description
> Declares an 32-bit byte length of the entire dependency expression.
> Behaviors and Restrictions
> This opcode must be the first one in a dependency expression.
> 
> REF: UEFI spec 2.10 Table 23.4
> 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Zhiguang Liu 
> Cc: Wei6 Xu 
> 
> Yi Li (2):
>   MdePkg: Add DECLARE_LENGTH opcode of dependency expression
>   FmpDevicePkg: Add DECLARE_LENGTH opcode of dependency expression
> 
>  .../FmpDependencyLib/FmpDependencyLib.c   | 35 
>  .../PrivateInclude/FmpLastAttemptStatus.h |  3 +
>  .../EvaluateDependencyUnitTest.c  | 84
> ---
>  MdePkg/Include/Protocol/FirmwareManagement.h  | 29 +++
>  4 files changed, 125 insertions(+), 26 deletions(-)
> 
> --
> 2.42.0.windows.2





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

2024-01-02 Thread gaoliming via groups.io
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 (#113044): https://edk2.groups.io/g/devel/message/113044
Mute This Topic: https://groups.io/mt/103494012/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-




Re: [edk2-devel] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build

2024-01-02 Thread Narinder Dhillon
Sorry, that was my mistake.

> -Original Message-
> From: Marcin Wojtas 
> Sent: Tuesday, January 2, 2024 3:46 PM
> To: Narinder Dhillon 
> Cc: devel@edk2.groups.io; quic_llind...@quicinc.com;
> ardb+tianoc...@kernel.org; m...@semihalf.com
> Subject: Re: [EXT] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix
> build
> 
> śr., 3 sty 2024 o 00:39 Marcin Wojtas 
> napisał(a):
> >
> > Hi Narinder,
> >
> > wt., 2 sty 2024 o 21:57 Narinder Dhillon  napisał(a):
> > >
> > > Marcin,
> > > I don't see this folder in code, how is it generated ?
> >
> > It's simply exisitng there:
> > Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc in edk2-platforms,
> > nothing is generated.
> >
> 
> If you meant the device tree itself, it's part of edk2-non-osi:
> https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_tianocore_edk2-2Dnon-
> 2Dosi_tree_master_Silicon_Marvell_Armada7k8k_DeviceTree=DwIFaQ
> =nKjWec2b6R0mOyPaz7xtfQ=1o2VA7xKsHvmQ4HFRY2JZggF-
> gGh1t4bxHFABsB1WTo=08gOJ2_xAynyvW3O-
> oNDWKoDc3FWWZiADHsHA1mnARRZOkvbYWJ4uGoI6qAZcinn=5fqFKjdJ3
> B1m_UCEsRzwqJ8rVqshTAD_ZyN0IlUHTFQ=
> 
> > Here's part of the patch, that introduced regression:
> > https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__github.com_tianoc
> > ore_edk2-
> 2Dplatforms_commit_ec5de71d83f3a6327c90887456782d15565e6e36-2
> > 3diff-
> 2Dce7de187b6e203a8e22916145bdc2a35f7c922609105c4282932f02dee7bb8
> >
> 4fL34=DwIFaQ=nKjWec2b6R0mOyPaz7xtfQ=1o2VA7xKsHvmQ4HFRY
> 2JZggF-gGh
> > 1t4bxHFABsB1WTo=08gOJ2_xAynyvW3O-
> oNDWKoDc3FWWZiADHsHA1mnARRZOkvbYWJ4
> > uGoI6qAZcinn=35ZI6uHnNjYbaOe39H4hr7Z0ljJLZl_ODejRzU9WBDk=
> >
> > Best regards,
> > Marcin
> >
> >
> > > Thanks
> > > Narinder
> > >
> > > > -Original Message-
> > > > From: Marcin Wojtas 
> > > > Sent: Sunday, December 31, 2023 3:07 AM
> > > > To: devel@edk2.groups.io
> > > > Cc: quic_llind...@quicinc.com; ardb+tianoc...@kernel.org;
> > > > m...@semihalf.com; Narinder Dhillon ; Marcin
> > > > Wojtas 
> > > > Subject: [EXT] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db:
> > > > Fix build
> > > >
> > > > External Email
> > > >
> > > > --
> > > >  Commit ec5de71d83 ("Silicon/Marvell: Restructure package")
> > > > broke Armada80x0Db build by unintentional removal of device tree
> > > > component.
> > > > Restore it.
> > > >
> > > > Signed-off-by: Marcin Wojtas 
> > > > ---
> > > >  Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc | 3 +++
> > > >  1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > > b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > > index 22a0040265..501811a050 100644
> > > > --- a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > > +++ b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> > > > @@ -31,6 +31,9 @@
> > > >   !include MdePkg/MdeLibs.dsc.inc +[Components.common]+
> > > > Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0Db.inf+
> > > > [Components.AARCH64]
> > > > Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf --
> > > > 2.34.1
> > >


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




Re: [edk2-devel] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build

2024-01-02 Thread Narinder Dhillon
Marcin,
I don't see this folder in code, how is it generated ?
Thanks
Narinder

> -Original Message-
> From: Marcin Wojtas 
> Sent: Sunday, December 31, 2023 3:07 AM
> To: devel@edk2.groups.io
> Cc: quic_llind...@quicinc.com; ardb+tianoc...@kernel.org;
> m...@semihalf.com; Narinder Dhillon ; Marcin
> Wojtas 
> Subject: [EXT] [edk2-platforms: PATCH v4] Marvell/Armada80x0Db: Fix build
> 
> External Email
> 
> --
> Commit ec5de71d83 ("Silicon/Marvell: Restructure package") broke
> Armada80x0Db build by unintentional removal of device tree component.
> Restore it.
> 
> Signed-off-by: Marcin Wojtas 
> ---
>  Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> index 22a0040265..501811a050 100644
> --- a/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> +++ b/Platform/Marvell/Armada80x0Db/Armada80x0Db.dsc
> @@ -31,6 +31,9 @@
>   !include MdePkg/MdeLibs.dsc.inc +[Components.common]+
> Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0Db.inf+
> [Components.AARCH64]
> Silicon/Marvell/Armada7k8k/AcpiTables/Armada80x0Db.inf --
> 2.34.1



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




Re: [edk2-devel] [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

2024-01-02 Thread Saloni Kasbekar
Hi Ashish,

+Ip4NvData->Policy = Ip4Config2PolicyDhcp;
+Status= Ip4Cfg2->SetData (
+   Ip4Cfg2,
+   Ip4Config2DataTypePolicy,
+   sizeof (EFI_IP4_CONFIG2_POLICY),
+   >Policy
+   );

Here we're assuming IfrFormNvData->DhcpEnable is TRUE. Should we check it 
before setting the policy and calling SetData()?

Thanks,
Saloni


From: Ashish Singhal 
Sent: Monday, January 1, 2024 8:48 AM
To: devel@edk2.groups.io; Kasbekar, Saloni ; 
Clark-williams, Zachary ; Jeff Brasen 

Subject: Re: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Hello,

Checking again for some feedback on this.

Thanks
Ashish


From: Ashish Singhal mailto:ashishsin...@nvidia.com>>
Sent: Thursday, December 14, 2023 4:42 PM
To: devel@edk2.groups.io 
mailto:devel@edk2.groups.io>>; 
saloni.kasbe...@intel.com 
mailto:saloni.kasbe...@intel.com>>; 
zachary.clark-willi...@intel.com 
mailto:zachary.clark-willi...@intel.com>>; 
Jeff Brasen mailto:jbra...@nvidia.com>>
Cc: Ashish Singhal mailto:ashishsin...@nvidia.com>>
Subject: [PATCH] NetworkPkg/Ip4Dxe: Fix Reset To Default

Exercising reset to default does not reset the settings.
Add handler code for the case where configuration is
disabled.

Signed-off-by: Ashish Singhal 
mailto:ashishsin...@nvidia.com>>
---
 NetworkPkg/Ip4Dxe/Ip4Config2Nv.c | 25 +
 1 file changed, 25 insertions(+)

diff --git a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
index e0b6a4d4a9..dac5817b7c 100644
--- a/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
+++ b/NetworkPkg/Ip4Dxe/Ip4Config2Nv.c
@@ -586,6 +586,31 @@ Ip4Config2ConvertIfrNvDataToConfigNvData (
   }

   if (IfrFormNvData->Configure != TRUE) {
+if (Ip4NvData->DnsAddress != NULL) {
+  FreePool (Ip4NvData->DnsAddress);
+  Ip4NvData->DnsAddress  = NULL;
+  Ip4NvData->DnsAddressCount = 0;
+}
+
+if (Ip4NvData->GatewayAddress != NULL) {
+  FreePool (Ip4NvData->GatewayAddress);
+  Ip4NvData->GatewayAddress  = NULL;
+  Ip4NvData->GatewayAddressCount = 0;
+}
+
+if (Ip4NvData->ManualAddress != NULL) {
+  FreePool (Ip4NvData->ManualAddress);
+  Ip4NvData->ManualAddress  = NULL;
+  Ip4NvData->ManualAddressCount = 0;
+}
+
+Ip4NvData->Policy = Ip4Config2PolicyDhcp;
+Status= Ip4Cfg2->SetData (
+   Ip4Cfg2,
+   Ip4Config2DataTypePolicy,
+   sizeof (EFI_IP4_CONFIG2_POLICY),
+   >Policy
+   );
 return EFI_SUCCESS;
   }

--
2.17.1
Hello,


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




Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2024-01-02 Thread Michael Brown

On 02/01/2024 16:31, Chang, Abner via groups.io wrote:

From: Michael Brown 
- Allow the call to Request() to perform its normal TLS configuration
via TlsConfigureSession(), as though the connection were going to
perform host verification etc as per the platform default policy.  This
configuration should succeed, with no error returned.


This is not correct. The first Request would be failed at 
TlsConfigureCertificate here 
https://github.com/tianocore/edk2/blob/master/NetworkPkg/HttpDxe/HttpsSupport.c#L711


I assume this is because we expect that the TlsCaCertificate variable 
may be empty or non-existent?


Would it make sense to have an EFI_NOT_FOUND from TlsConfigCertificate() 
be ignored, as is already done for TlsConfigCipherList() just above? 
Something like:


  Status = TlsConfigCertificate (HttpInstance);
  if (EFI_ERROR (Status) && (Status != EFI_NOT_FOUND)) {
DEBUG ((DEBUG_ERROR, "TLS Certificate Config Error!\n"));
return Status;
  }

i.e. treat an absent TlsCaCertificate variable as meaning "there are no 
explicit CA certificates", allowing TlsDxe to do whatever it does in 
that situation (which is presumably to fail any attempted certificate 
verifications).


That would eliminate this problem in the RedfishRestExDxe case.


and  SetSessionData to EfiTlsVerifyHost here: 
https://github.com/tianocore/edk2/blob/master/NetworkPkg/HttpDxe/HttpsSupport.c#L679.


I don't understand why this call would be expected to fail.  It's not 
performing any verification at this stage, just recording the hostname 
from the URI for subsequent use in certificate verification.


I would expect this call to succeed and record whatever hostname is 
present in the request from RedfishRestExDxe.  This hostname will 
subsequently be ignored for verification, since the HttpEventInitSession 
callback will set EFI_TLS_VERIFY_NONE.



- In the RedfishRestExDxe callback, check for HttpEventInitSession and
use calls to EFI_TLS_CONFIGURATION_PROTOCOL.SetData() to modify the TLS
configuration to e.g. set EFI_TLS_VERIFY_NONE.

Here is the thing. Even we reconfigure TLS configuration data at 
HttpEventInitSession in RestEx, the EfiHttpRequest still returns fail to the 
caller here: 
https://github.com/tianocore/edk2/blob/master/NetworkPkg/HttpDxe/HttpImpl.c#L599.
 Not to mention the reason of failures may not be caused by 
TlsConfigureSession. There are failures for some other reasons in 
HttpInitSession. Also, what the caller suppose to do when it gets error 
returned? How does caller knows the error is just because the TLS configuration 
failure and it has to reconfigure TLS and retry HttpRequest? The logic doesn’t 
make sense if the caller assumes the failure is caused by TLS configure at 
HttpEventInitSession callback. Actually, having a high layer application to 
reconfigure TLS configuration data because the failure caused by not 
well-considered default TLS config values also doesn’t make sense, right?


I would expect this to be resolved by the above suggestions. 
HttpInitSession() should succeed.  The HttpEventInitSession callback 
should be called with an EFI_SUCCESS status code, and there is no need 
for the caller to retry anything.



To make the callback implementation easier, you may want to extend
HttpNotify() to take HTTP_PROTOCOL *HttpInstance as its first parameter,
and then pass HttpInstance->Handle as an additional parameter to the
callback method, i.e.:

typedef
VOID
(EFIAPI *EDKII_HTTP_CALLBACK)(
IN EDKII_HTTP_CALLBACK_PROTOCOL *This,
IN EFI_HANDLE   HttpHandle,
IN EDKII_HTTP_CALLBACK_EVENTEvent,
IN EFI_STATUS   EventStatus
);

We shouldn’t change the prototype as the callback mechanism may used by OEM/ODM 
platform code which is not part of tianocore. This change breaks backward 
compatible. Honestly, leverage HTTP callback function doesn’t really serve the 
purpose well. This is the HttpDxe design defect as we don’t the used case like 
in-band Redfish communication.


OEM/ODM code should restrict itself to using APIs covered by the UEFI 
specification.  If OEM/ODMs choose to rely on EDK2 private 
implementation details (such as EDKII_HTTP_CALLBACK) then they must be 
prepared to update their code when the private implementation detail 
changes.


Thanks,

Michael



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#113040): https://edk2.groups.io/g/devel/message/113040
Mute This Topic: https://groups.io/mt/103368438/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/1] MdePkg/IndustryStandard: Add _PSD/_CPC/Coord types definitions

2024-01-02 Thread PierreGondois
Add definitions for:
- _PSD version: added in ACPI 3.0
- C-state Coordination Types: added in ACPI 3.0
- _CPC version: added in ACPI 5.0

Signed-off-by: Pierre Gondois 
Reviewed-by: Sami Mujawar 
---

Notes:
v2:
- Correct EFI_ACPI_5_1_AML_CPC_REVISION value [Sami]

 MdePkg/Include/IndustryStandard/Acpi30.h | 14 ++
 MdePkg/Include/IndustryStandard/Acpi40.h |  5 +
 MdePkg/Include/IndustryStandard/Acpi50.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi51.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi60.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi61.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi62.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi63.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi64.h | 10 ++
 MdePkg/Include/IndustryStandard/Acpi65.h | 10 ++
 10 files changed, 99 insertions(+)

diff --git a/MdePkg/Include/IndustryStandard/Acpi30.h 
b/MdePkg/Include/IndustryStandard/Acpi30.h
index 29f0d5535593..cb50b1d8f71a 100644
--- a/MdePkg/Include/IndustryStandard/Acpi30.h
+++ b/MdePkg/Include/IndustryStandard/Acpi30.h
@@ -17,6 +17,20 @@
 
 #define ACPI_EXTENDED_ADDRESS_SPACE_DESCRIPTOR  0x8B
 
+///
+/// C-state Coordination Types
+/// See s8.4.2.2 _CSD (C-State Dependency)
+///
+#define ACPI_AML_COORD_TYPE_SW_ALL  0xFC
+#define ACPI_AML_COORD_TYPE_SW_ANY  0xFD
+#define ACPI_AML_COORD_TYPE_HW_ALL  0xFE
+
+///
+/// _PSD Revision for ACPI 3.0
+// See s8.4.4.5 _PSD (P-State Dependency)
+///
+#define EFI_ACPI_3_0_AML_PSD_REVISION  0
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi40.h 
b/MdePkg/Include/IndustryStandard/Acpi40.h
index a2da09346f1c..0e30f4f8417d 100644
--- a/MdePkg/Include/IndustryStandard/Acpi40.h
+++ b/MdePkg/Include/IndustryStandard/Acpi40.h
@@ -10,6 +10,11 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 4.0
+///
+#define EFI_ACPI_4_0_AML_PSD_REVISION  0
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi50.h 
b/MdePkg/Include/IndustryStandard/Acpi50.h
index 76706aa640f8..a00b8259b8f7 100644
--- a/MdePkg/Include/IndustryStandard/Acpi50.h
+++ b/MdePkg/Include/IndustryStandard/Acpi50.h
@@ -23,6 +23,16 @@
 #define ACPI_GPIO_CONNECTION_DESCRIPTOR0x8C
 #define ACPI_GENERIC_SERIAL_BUS_CONNECTION_DESCRIPTOR  0x8E
 
+///
+/// _PSD Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 5.0
+///
+#define EFI_ACPI_5_0_AML_CPC_REVISION  1
+
 #pragma pack(1)
 
 ///
diff --git a/MdePkg/Include/IndustryStandard/Acpi51.h 
b/MdePkg/Include/IndustryStandard/Acpi51.h
index 01ef544c3a29..4241b8f198f1 100644
--- a/MdePkg/Include/IndustryStandard/Acpi51.h
+++ b/MdePkg/Include/IndustryStandard/Acpi51.h
@@ -13,6 +13,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 5.1
+///
+#define EFI_ACPI_5_1_AML_CPC_REVISION  2
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi60.h 
b/MdePkg/Include/IndustryStandard/Acpi60.h
index 5ac3be6ad71c..3757d3f82792 100644
--- a/MdePkg/Include/IndustryStandard/Acpi60.h
+++ b/MdePkg/Include/IndustryStandard/Acpi60.h
@@ -12,6 +12,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.0
+///
+#define EFI_ACPI_6_0_AML_CPC_REVISION  2
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi61.h 
b/MdePkg/Include/IndustryStandard/Acpi61.h
index 7af67d832bb2..c3facc6e376e 100644
--- a/MdePkg/Include/IndustryStandard/Acpi61.h
+++ b/MdePkg/Include/IndustryStandard/Acpi61.h
@@ -12,6 +12,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 6.1
+///
+#define EFI_ACPI_6_1_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.1
+///
+#define EFI_ACPI_6_1_AML_CPC_REVISION  2
+
 //
 // Ensure proper structure formats
 //
diff --git a/MdePkg/Include/IndustryStandard/Acpi62.h 
b/MdePkg/Include/IndustryStandard/Acpi62.h
index e27775a85ade..4dd3e21c2325 100644
--- a/MdePkg/Include/IndustryStandard/Acpi62.h
+++ b/MdePkg/Include/IndustryStandard/Acpi62.h
@@ -29,6 +29,16 @@
 #define ACPI_PIN_GROUP_FUNCTION_DESCRIPTOR   0x91
 #define ACPI_PIN_GROUP_CONFIGURATION_DESCRIPTOR  0x92
 
+///
+/// _PSD Revision for ACPI 6.2
+///
+#define EFI_ACPI_6_2_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.2
+///
+#define EFI_ACPI_6_2_AML_CPC_REVISION  3
+
 #pragma pack(1)
 
 ///
diff --git a/MdePkg/Include/IndustryStandard/Acpi63.h 
b/MdePkg/Include/IndustryStandard/Acpi63.h
index 10bdf5fe5a57..7582dccf649b 100644
--- a/MdePkg/Include/IndustryStandard/Acpi63.h
+++ b/MdePkg/Include/IndustryStandard/Acpi63.h
@@ -12,6 +12,16 @@
 
 #include 
 
+///
+/// _PSD Revision for ACPI 6.3
+///
+#define EFI_ACPI_6_3_AML_PSD_REVISION  0
+
+///
+/// _CPC Revision for ACPI 6.3
+///
+#define EFI_ACPI_6_3_AML_CPC_REVISION  3
+
 

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2024-01-02 Thread Chang, Abner via groups.io
[AMD Official Use Only - General]

> -Original Message-
> From: Michael Brown 
> Sent: Tuesday, January 2, 2024 8:42 PM
> To: devel@edk2.groups.io; Chang, Abner 
> Cc: Saloni Kasbekar ; Zachary Clark-williams
> ; Nickle Wang ; Igor
> Kulchytskyy 
> Subject: Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS
> policy
>
> Caution: This message originated from an External Source. Use proper caution
> when opening attachments, clicking links, or responding.
>
>
> On 02/01/2024 06:06, Chang, Abner via groups.io wrote:
> >> What do you think about:
> >>
> >> - installing TLS on HTTP handle (as you have already implemented)
> >>
> >> - using EDKII_HTTP_CALLBACK_PROTOCOL to catch the
> HttpEventInitSession
> >> and perform whatever calls are needed to SetData() to modify the TLS
> >> configuration?
> >
> > Leverage HttpNotify is good but still has some problems, as HttpNotify is
> designed to notify callback owner about a specific task was done. In order to
> keep this HttpNotify nature, we can create a callback point at the end of
> TlsCreateChild() with a newly introduced event type says
> HttpEventTlsChildCreated. The reason we have to create this notification
> before TlsConfigureSession() is because this function uses the default
> configuration data to configure TLS. However, it doesn't have to do
> EfiTlsVerifyHost and TlsConfigCertificate if there is nothing to verify.
> > The problem in configuring  EfiTlsVerifyHost is It always checks 
> > verification
> method with EFI_TLS_VERIFY_PEER, while the problem of TlsConfigCertificate
> is it considers platform always can provide the certificate.  Anyway to
> configure TLS after TlsConfigCertificate is to late as the error status 
> already
> returned earlier. Furthermore the design of HttpNotify doesn't provide the
> output information for caller to determine the different code paths.  So with
> above, how can we skip configuring TLS again with the default values in
> HttpSupport.c even platform code already configured it before
> TlsConfigureSession()?
>
> I may not have been clear enough: I'm suggesting that we allow
> TlsConfigureSession() to perform its normal configuration, and then use
> the HttpEventInitSession callback to modify this configuration (e.g.
> setting EFI_TLS_VERIFY_NONE).
>
> Yes, this would mean that a tiny amount of unnecessary work is done
> (e.g. first setting EFI_TLS_VERIFY_PEER, then later changing it to
> EFI_TLS_VERIFY_NONE) but this is a negligible amount of execution time
> and allows us to keep the code simple.
>
> The HttpEventInitSession callback is guaranteed to be called before the
> calls to HttpGenRequestMessage() and HttpTransmitTcp() (even if running
> at TPL_APPLICATION with network polling taking place) and so is
> guaranteed to be a safe point at which to perform additional TLS
> configuration via SetData().
>
> So, to expand on what I wrote before, I'm suggesting:
>
> - refactor TlsCreateChild() to install the TLS protocols on the HTTP
> handle (as you have already implemented).
>
> - (optional) Remove TlsChildHandle and replace with a boolean flag.
>
Hi Michael,
Above has no problems.


> - No further changes required to HttpDxe, as far as I can tell.
>
> - In RedfishRestExDxe, install an EDKII_HTTP_CALLBACK_PROTOCOL before
> calling EFI_HTTP_PROTOCOL.Request().
>
> - Allow the call to Request() to perform its normal TLS configuration
> via TlsConfigureSession(), as though the connection were going to
> perform host verification etc as per the platform default policy.  This
> configuration should succeed, with no error returned.

This is not correct. The first Request would be failed at 
TlsConfigureCertificate here 
https://github.com/tianocore/edk2/blob/master/NetworkPkg/HttpDxe/HttpsSupport.c#L711
 and  SetSessionData to EfiTlsVerifyHost here: 
https://github.com/tianocore/edk2/blob/master/NetworkPkg/HttpDxe/HttpsSupport.c#L679.
The default values is the key issue we are trying to fix in the past week, the 
root cause is because the hardcoded default value.

>
> - In the RedfishRestExDxe callback, check for HttpEventInitSession and
> use calls to EFI_TLS_CONFIGURATION_PROTOCOL.SetData() to modify the TLS
> configuration to e.g. set EFI_TLS_VERIFY_NONE.
Here is the thing. Even we reconfigure TLS configuration data at 
HttpEventInitSession in RestEx, the EfiHttpRequest still returns fail to the 
caller here: 
https://github.com/tianocore/edk2/blob/master/NetworkPkg/HttpDxe/HttpImpl.c#L599.
 Not to mention the reason of failures may not be caused by 
TlsConfigureSession. There are failures for some other reasons in 
HttpInitSession. Also, what the caller suppose to do when it gets error 
returned? How does caller knows the error is just because the TLS configuration 
failure and it has to reconfigure TLS and retry HttpRequest? The logic doesn’t 
make sense if the caller assumes the failure is caused by TLS configure at 
HttpEventInitSession callback. Actually, having a high layer application to 

[edk2-devel] [PATCH V2 0/3] Add support of EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY

2024-01-02 Thread Tan, Ming
*** BLURB HERE ***

V2: Fix code style issue.
Test CI PR: https://github.com/tianocore/edk2/pull/5201

Ming Tan (3):
  MdePkg: Add EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY
  MdeModulePkg/SetupBrowserDxe:
EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY
  MdeModulePkg/DriverSampleDxe:
EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY

 .../Universal/DriverSampleDxe/DriverSample.c| 13 +
 .../Universal/DriverSampleDxe/NVDataStruc.h |  1 +
 MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr  | 10 ++
 .../Universal/DriverSampleDxe/VfrStrings.uni|  4 
 .../Universal/SetupBrowserDxe/Presentation.c|  9 +
 MdePkg/Include/Protocol/FormBrowser2.h  |  1 +
 6 files changed, 38 insertions(+)

-- 
2.39.1.windows.1



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

2024-01-02 Thread Tan, Ming
REF: UEFI_Spec_2_10_Aug29.pdf page 1695.

In 35.5.4 EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack():
If the callback function returns with the ActionRequest set to
_QUESTION_APPLY, then the Forms Browser will write the current modified
question value on the selected form to storage.

Update the SetupBrowserDxe, if callback function return
EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY, then call SetQuestionValue
with GetSetValueWithHiiDriver to apply the change immediately.

Signed-off-by: Ming Tan 
Cc: Liming Gao 
Cc: Dandan Bi 
---
 MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c | 9 +
 1 file changed, 9 insertions(+)

diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c 
b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
index babef21497..de7e79e8ab 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c
@@ -2145,6 +2145,15 @@ ProcessCallBackFunction (
   gCallbackReconnect = TRUE;
   break;
 
+case EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY:
+  Status = SetQuestionValue (
+ gCurrentSelection->FormSet,
+ gCurrentSelection->Form,
+ Statement,
+ GetSetValueWithHiiDriver
+ );
+  break;
+
 default:
   break;
   }
-- 
2.39.1.windows.1



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

2024-01-02 Thread Tan, Ming
REF: UEFI_Spec_2_10_Aug29.pdf page 1694

In 35.5.4 EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack() parameter
ActionRequest, add EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY.

Signed-off-by: Ming Tan 
Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Zhiguang Liu 
Cc: Dandan Bi 
---
 MdePkg/Include/Protocol/FormBrowser2.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdePkg/Include/Protocol/FormBrowser2.h 
b/MdePkg/Include/Protocol/FormBrowser2.h
index 436a7723c1..7498dc2a07 100644
--- a/MdePkg/Include/Protocol/FormBrowser2.h
+++ b/MdePkg/Include/Protocol/FormBrowser2.h
@@ -55,6 +55,7 @@ typedef UINTN EFI_BROWSER_ACTION_REQUEST;
 #define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY 6
 #define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD   7
 #define EFI_BROWSER_ACTION_REQUEST_RECONNECT  8
+#define EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY 9
 
 /**
   Initialize the browser to display the specified configuration forms.
-- 
2.39.1.windows.1



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




[edk2-devel] [PATCH V2 3/3] MdeModulePkg/DriverSampleDxe: EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY

2024-01-02 Thread Tan, Ming
REF: UEFI_Spec_2_10_Aug29.pdf page 1695.

In 35.5.4 EFI_HII_CONFIG_ACCESS_PROTOCOL.CallBack():
If the callback function returns with the ActionRequest set to
_QUESTION_APPLY, then the Forms Browser will write the current modified
question value on the selected form to storage.

Update the DriverSampleDxe, add a new question "Question apply test".

Signed-off-by: Ming Tan 
Cc: Liming Gao 
Cc: Dandan Bi 
---
 .../Universal/DriverSampleDxe/DriverSample.c| 13 +
 .../Universal/DriverSampleDxe/NVDataStruc.h |  1 +
 MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr  | 10 ++
 .../Universal/DriverSampleDxe/VfrStrings.uni|  4 
 4 files changed, 28 insertions(+)

diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c 
b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 62ba52e940..003cb499b5 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -858,6 +858,7 @@ ExtractConfig (
   @retval EFI_INVALID_PARAMETER  Configuration is NULL.
   @retval EFI_NOT_FOUND  Routing data doesn't match any storage in this
  driver.
+  @retval EFI_DEVICE_ERROR   If value is 44, return error for testing.
 
 **/
 EFI_STATUS
@@ -1065,6 +1066,11 @@ RouteConfig (
 return Status;
   }
 
+  if (PrivateData->Configuration.QuestionApply == 44) {
+// Return error for verify the error handling of caller.
+return EFI_DEVICE_ERROR;
+  }
+
   //
   // Store Buffer Storage back to EFI variable
   //
@@ -1599,6 +1605,13 @@ DriverCallback (
   *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT;
   break;
 
+case 0x1253:
+  //
+  // User change the value of "Question apply test".
+  //
+  *ActionRequest = EFI_BROWSER_ACTION_REQUEST_QUESTION_APPLY;
+  break;
+
 case 0x1231:
   //
   // 1. Check to see whether system support keyword.
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h 
b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
index 489d7bcbf3..3f5388946d 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
+++ b/MdeModulePkg/Universal/DriverSampleDxe/NVDataStruc.h
@@ -95,6 +95,7 @@ typedef struct {
   MY_EFI_UNION_DATAMyUnionData;
   UINT8QuestionXUefiKeywordRestStyle;
   UINT8QuestionNonXUefiKeywordRestStyle;
+  UINT8QuestionApply;
 } DRIVER_SAMPLE_CONFIGURATION;
 
 //
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr 
b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
index 5323e2b411..0c376fe9b7 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
+++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr
@@ -513,6 +513,16 @@ formset
 default = 18,
 endnumeric;
 
+numeric varid   = MyIfrNVData.QuestionApply,
+questionid = 0x1253,
+prompt  = STRING_TOKEN(STR_QUESTION_APPLY_TEST_PROMPT),
+help= STRING_TOKEN(STR_QUESTION_APPLY_TEST_HELP),
+flags   = INTERACTIVE,
+minimum = 0,
+maximum = 255,
+default = 19,
+endnumeric;
+
 text
   help  = STRING_TOKEN(STR_POPUP_TEST_HELP),
   text  = STRING_TOKEN(STR_POPUP_TEST_PROMPT),
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni 
b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
index 8a3e286bec..ed906045fd 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
+++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni
@@ -269,6 +269,10 @@
  #language fr-FR 
"Submitted callback test"
 #string STR_SUBMITTED_CALLBACK_TEST_HELP #language en-US "Change 
the value and press F10 to submit will pop up a dialogue to show SUBMITTED 
Callback has been triggered"
  #language fr-FR "Change 
the value and press F10 to submit will pop up a dialogue to show SUBMITTED 
Callback has been triggered"
+#string STR_QUESTION_APPLY_TEST_PROMPT   #language en-US "Question 
apply test"
+ #language fr-FR "Question 
apply test"
+#string STR_QUESTION_APPLY_TEST_HELP #language en-US "Change 
the value and it will be applied automaticlly. If set to 44, then return 
failed."
+ #language fr-FR "Change 
the value and it will be applied automaticlly. If set to 44, then return 
failed."
 #string STR_POPUP_TEST_PROMPT#language en-US "Select 
it to invoke Hii Popup Protocol"
  #language fr-FR "Select 
it to invoke Hii Popup Protocol"
 #string STR_POPUP_TEST_HELP  #language en-US "Select 
this question will pop up a message box, then user can decide whether 

Re: [edk2-devel] [RFC][PATCH 0/2] Introduce HTTPS Platform TLS policy

2024-01-02 Thread Michael Brown

On 02/01/2024 06:06, Chang, Abner via groups.io wrote:

What do you think about:

- installing TLS on HTTP handle (as you have already implemented)

- using EDKII_HTTP_CALLBACK_PROTOCOL to catch the HttpEventInitSession
and perform whatever calls are needed to SetData() to modify the TLS
configuration?


Leverage HttpNotify is good but still has some problems, as HttpNotify is 
designed to notify callback owner about a specific task was done. In order to 
keep this HttpNotify nature, we can create a callback point at the end of 
TlsCreateChild() with a newly introduced event type says 
HttpEventTlsChildCreated. The reason we have to create this notification before 
TlsConfigureSession() is because this function uses the default configuration 
data to configure TLS. However, it doesn't have to do EfiTlsVerifyHost and 
TlsConfigCertificate if there is nothing to verify.
The problem in configuring  EfiTlsVerifyHost is It always checks verification 
method with EFI_TLS_VERIFY_PEER, while the problem of TlsConfigCertificate is 
it considers platform always can provide the certificate.  Anyway to configure 
TLS after TlsConfigCertificate is to late as the error status already returned 
earlier. Furthermore the design of HttpNotify doesn't provide the output 
information for caller to determine the different code paths.  So with above, 
how can we skip configuring TLS again with the default values in HttpSupport.c 
even platform code already configured it before TlsConfigureSession()?


I may not have been clear enough: I'm suggesting that we allow 
TlsConfigureSession() to perform its normal configuration, and then use 
the HttpEventInitSession callback to modify this configuration (e.g. 
setting EFI_TLS_VERIFY_NONE).


Yes, this would mean that a tiny amount of unnecessary work is done 
(e.g. first setting EFI_TLS_VERIFY_PEER, then later changing it to 
EFI_TLS_VERIFY_NONE) but this is a negligible amount of execution time 
and allows us to keep the code simple.


The HttpEventInitSession callback is guaranteed to be called before the 
calls to HttpGenRequestMessage() and HttpTransmitTcp() (even if running 
at TPL_APPLICATION with network polling taking place) and so is 
guaranteed to be a safe point at which to perform additional TLS 
configuration via SetData().


So, to expand on what I wrote before, I'm suggesting:

- refactor TlsCreateChild() to install the TLS protocols on the HTTP 
handle (as you have already implemented).


- (optional) Remove TlsChildHandle and replace with a boolean flag.

- No further changes required to HttpDxe, as far as I can tell.

- In RedfishRestExDxe, install an EDKII_HTTP_CALLBACK_PROTOCOL before 
calling EFI_HTTP_PROTOCOL.Request().


- Allow the call to Request() to perform its normal TLS configuration 
via TlsConfigureSession(), as though the connection were going to 
perform host verification etc as per the platform default policy.  This 
configuration should succeed, with no error returned.


- In the RedfishRestExDxe callback, check for HttpEventInitSession and 
use calls to EFI_TLS_CONFIGURATION_PROTOCOL.SetData() to modify the TLS 
configuration to e.g. set EFI_TLS_VERIFY_NONE.


To make the callback implementation easier, you may want to extend 
HttpNotify() to take HTTP_PROTOCOL *HttpInstance as its first parameter, 
and then pass HttpInstance->Handle as an additional parameter to the 
callback method, i.e.:


typedef
VOID
(EFIAPI *EDKII_HTTP_CALLBACK)(
  IN EDKII_HTTP_CALLBACK_PROTOCOL *This,
  IN EFI_HANDLE   HttpHandle,
  IN EDKII_HTTP_CALLBACK_EVENTEvent,
  IN EFI_STATUS   EventStatus
  );

VOID
HttpNotify (
  IN  HTTP_PROTOCOL  *HttpInstance,
  IN  EDKII_HTTP_CALLBACK_EVENT  Event,
  IN  EFI_STATUS EventStatus
  )
{
  ...
  HttpCallback->Callback (
HttpCallback,
HttpInstance->Handle,
Event,
EventStatus
);
  ...
}

Since EDKII_HTTP_CALLBACK_PROTOCOL is internal to EDK2 (and not covered 
by the UEFI specification), this change should be possible.  I've 
checked all of the HttpNotify() call sites in the EDK2 repo, and they do 
all have an HttpInstance available to use.


Thanks,

Michael



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




[edk2-devel][edk2-platforms][PATCH v4] MinPlatformPkg: Support SecFspWrapperPlatformSecLib in X64

2024-01-02 Thread Kuo, Ted
https://bugzilla.tianocore.org/show_bug.cgi?id=4623
1.Added PeiCoreEntry.nasm, SecEntry.nasm and Stack.nasm for X64.
2.Made changes in common files to support both IA32 and X64.
3.Added the PCDs below for FSP-T UPD revisions and reset vector in FSP.
 - PcdFspWrapperBfvforResetVectorInFsp
 - PcdFsptUpdHeaderRevision
 - PcdFsptArchUpdRevision

Cc: Sai Chaganty 
Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Eric Dong 
Cc: Ashraf Ali S 
Cc: Chinni B Duggapu 
Cc: Liming Gao 
Signed-off-by: Ted Kuo 
---
 .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h |  25 ++-
 .../Ia32/SecEntry.nasm|   4 +-
 .../SecFspWrapperPlatformSecLib.inf   |   9 +-
 ...pWrapperPlatformSecLibResetVectorInFsp.inf | 101 +
 .../SecGetPerformance.c   |  11 +-
 .../SecPlatformInformation.c  |   8 +-
 .../SecRamInitData.c  |  73 +--
 .../X64/PeiCoreEntry.nasm | 202 ++
 .../X64/SecEntry.nasm |  71 ++
 .../X64/Stack.nasm|  72 +++
 .../Ia32 => Include}/Fsp.h|   6 +-
 .../Intel/MinPlatformPkg/MinPlatformPkg.dec   |  17 +-
 12 files changed, 565 insertions(+), 34 deletions(-)
 create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLibResetVectorInFsp.inf
 create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/X64/PeiCoreEntry.nasm
 create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/X64/SecEntry.nasm
 create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/X64/Stack.nasm
 rename 
Platform/Intel/MinPlatformPkg/{FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32
 => Include}/Fsp.h (79%)

diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
index 7c0f605b92..24c18f25b8 100644
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
+++ 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
@@ -1,6 +1,6 @@
 /** @file
 
-Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2024, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -10,6 +10,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 #pragma pack(1)
 
+#if FixedPcdGet8 (PcdFsptArchUpdRevision) <= 1
 /** Fsp T Core UPD
 **/
 typedef struct {
@@ -34,6 +35,28 @@ typedef struct {
 **/
   UINT8   Reserved[16];
 } FSPT_CORE_UPD;
+#else
+/** Fsp T Core UPD
+**/
+typedef struct {
+
+/** Offset 0x0040
+**/
+  EFI_PHYSICAL_ADDRESSMicrocodeRegionBase;
+
+/** Offset 0x0048
+**/
+  UINT64  MicrocodeRegionSize;
+
+/** Offset 0x0050
+**/
+  EFI_PHYSICAL_ADDRESSCodeRegionBase;
+
+/** Offset 0x0058
+**/
+  UINT64  CodeRegionSize;
+} FSPT_CORE_UPD;
+#endif
 
 #pragma pack()
 
diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
index 7f6d771e41..0b3f343991 100644
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
+++ 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm
@@ -1,6 +1,6 @@
 ;--
 ;
-; Copyright (c) 2019, Intel Corporation. All rights reserved.
+; Copyright (c) 2019 - 2024, Intel Corporation. All rights reserved.
 ; SPDX-License-Identifier: BSD-2-Clause-Patent
 ; Module Name:
 ;
@@ -13,7 +13,7 @@
 ;
 ;--
 
-#include "Fsp.h"
+#include 
 
 SECTION .text
 
diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
index 2e0d67eae4..6806e000ce 100644
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
+++ 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLib.inf
@@ -1,7 +1,7 @@
 ## @file
-#  Provide FSP wrapper platform sec related function.
+#  Provide FSP wrapper platform sec related function for IA32.
 #
-#  Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.
+#  Copyright (c) 2017 - 2024, Intel Corporation. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -25,7 +25,7 @@
 #
 # The following information is 

Re: [edk2-devel] [PATCH v2] NetworkPkg: Triger regularly scan only if not connect to AP

2024-01-02 Thread Heng Luo
Hi Mike,
Would you like to help us merge the patch?

Thanks,
Heng

> -Original Message-
> From: Kasbekar, Saloni 
> Sent: Friday, December 15, 2023 4:36 AM
> To: Luo, Heng ; Clark-williams, Zachary  willi...@intel.com>; devel@edk2.groups.io; Kinney, Michael D
> 
> Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if not connect
> to AP
> 
> Mike,
> 
> Would you be able to help us merge the patch?
> 
> Thanks,
> Saloni
> 
> -Original Message-
> From: Luo, Heng 
> Sent: Thursday, December 14, 2023 3:20 AM
> To: Clark-williams, Zachary ; Kasbekar,
> Saloni ; devel@edk2.groups.io
> Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if not connect
> to AP
> 
> Hi Saloni,
> Could you help to merge the patch?
> 
> Thanks,
> Heng
> 
> > -Original Message-
> > From: Luo, Heng
> > Sent: Monday, December 11, 2023 4:13 PM
> > To: Clark-williams, Zachary ;
> > Kasbekar, Saloni ; devel@edk2.groups.io
> > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if not
> > connect to AP
> >
> > Hi Zack,
> > Could you please review the change?
> > Thanks,
> > Heng
> >
> > > -Original Message-
> > > From: Kasbekar, Saloni 
> > > Sent: Saturday, December 2, 2023 5:25 AM
> > > To: Luo, Heng ; devel@edk2.groups.io
> > > Cc: Clark-williams, Zachary 
> > > Subject: RE: [PATCH v2] NetworkPkg: Triger regularly scan only if
> > > not connect to AP
> > >
> > > Reviewed-by: Kasbekar, Saloni 
> > >
> > > Thanks,
> > > Saloni
> > >
> > > -Original Message-
> > > From: Luo, Heng 
> > > Sent: Monday, November 27, 2023 7:07 PM
> > > To: devel@edk2.groups.io
> > > Cc: Kasbekar, Saloni ; Clark-williams,
> > > Zachary 
> > > Subject: [PATCH v2] NetworkPkg: Triger regularly scan only if not
> > > connect to AP
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4605
> > >
> > > When UEFI Wi-Fi is in BSS connected state, the platform is
> > > considered as a static and Wi-Fi roaming support is not needed.
> > > Wifi connection manager should not initiate Scan requests in this
> > > state affect BSS client connectivity and must be avoided.
> > > Triger regularly scan only if not connect to AP.
> > >
> > > Signed-off-by: Heng Luo 
> > > Cc: Saloni Kasbekar 
> > > Cc: Zachary Clark-williams 
> > > ---
> > >  NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c | 4
> ++-
> > -
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git
> > > a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > index d1182e52bd..4c5460b65c 100644
> > > --- a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > +++
> b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrImpl.c
> > > @@ -1506,8 +1506,8 @@ WifiMgrOnTimerTick (
> > >}Nic->ScanTickTime++;-  if (((Nic->ScanTickTime >
> > > WIFI_SCAN_FREQUENCY) || Nic->OneTimeScanRequest) &&-  (Nic-
> > > >ScanState == WifiMgrScanFinished))+  if Nic->ScanTickTime >
> > > WIFI_SCAN_FREQUENCY) && (Nic->ConnectState !=
> > WifiMgrConnectedToAp))
> > > ||+   Nic->OneTimeScanRequest) && (Nic->ScanState ==
> > > WifiMgrScanFinished))   { Nic->OneTimeScanRequest = FALSE; Nic-
> > > >ScanTickTime   = 0;--
> > > 2.31.1.windows.1



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




Re: [edk2-devel][edk2-platforms][PATCH v3] MinPlatformPkg: Support SecFspWrapperPlatformSecLib in X64

2024-01-02 Thread Kuo, Ted
Hi Sai,

Thanks for the feedback. I'll change SecFspWrapperPlatformSecLibFspO to 
SecFspWrapperPlatformSecLibResetVectorInFsp in patch V4. Regarding the 
timestamp, I'm planning to save the TSC value near the entry of FspSecCoreO in 
FSP. In patch V4, FSP wrapper/platform code reads the timestamp from mm5 
instead of ymm6 and then push it to stack.

Thanks,
Ted

-Original Message-
From: Chaganty, Rangasai V  
Sent: Saturday, December 30, 2023 4:34 AM
To: Kuo, Ted ; devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Dong, Eric ; S, Ashraf 
Ali ; Duggapu, Chinni B ; 
Gao, Liming 
Subject: RE: [edk2-devel][edk2-platforms][PATCH v3] MinPlatformPkg: Support 
SecFspWrapperPlatformSecLib in X64

Hi Ted, 
I see good improvements on V3. Thanks!
Few comments/feedback:
1. Minor feedback - The module name choice SecFspWrapperPlatformSecLibFspO.inf 
is assuming FSP owning reset vector will be part of FSP-O. it's an 
implementation choice. Perhaps consider the name to be 
SecFspWrapperPlatformSecLibResetVectorInFsp or 
SecFspWrapperPlatformSecLibFor64Bit (to be more relevant to the purpose of the 
file).
2. I see TSC values are pushed into stack. However, I am not seeing a rdtsc 
instruction to read the TSC value. Can you clarify how are we getting the TSC 
values?

Thanks,
Sai

-Original Message-
From: Kuo, Ted  
Sent: Friday, December 22, 2023 2:14 AM
To: devel@edk2.groups.io
Cc: Chaganty, Rangasai V ; Chiu, Chasel 
; Desimone, Nathaniel L 
; Dong, Eric ; S, Ashraf 
Ali ; Duggapu, Chinni B ; 
Gao, Liming 
Subject: [edk2-devel][edk2-platforms][PATCH v3] MinPlatformPkg: Support 
SecFspWrapperPlatformSecLib in X64

https://bugzilla.tianocore.org/show_bug.cgi?id=4623
1.Added PeiCoreEntry.nasm, SecEntry.nasm and Stack.nasm for X64.
2.Made changes in common file to support both IA32 and X64.
3.Added the PCDs below for FSP-T UPD revisions and reset vector in FSP.
 - PcdFspWrapperBfvforResetVectorInFsp
 - PcdFsptUpdHeaderRevision
 - PcdFsptArchUpdRevision

Cc: Sai Chaganty 
Cc: Chasel Chiu 
Cc: Nate DeSimone 
Cc: Eric Dong 
Cc: Ashraf Ali S 
Cc: Chinni B Duggapu 
Cc: Liming Gao 
Signed-off-by: Ted Kuo 
---
 .../SecFspWrapperPlatformSecLib/FsptCoreUpd.h |  25 +-
 .../Ia32/SecEntry.nasm|   4 +-
 .../SecFspWrapperPlatformSecLib.inf   |   9 +-
 .../SecFspWrapperPlatformSecLibFspO.inf   | 101 
 .../SecGetPerformance.c   |  11 +-
 .../SecPlatformInformation.c  |   8 +-
 .../SecRamInitData.c  |  73 --
 .../X64/PeiCoreEntry.nasm | 218 ++
 .../X64/SecEntry.nasm |  71 ++
 .../X64/Stack.nasm|  72 ++
 .../Ia32 => Include}/Fsp.h|   4 +-
 .../Intel/MinPlatformPkg/MinPlatformPkg.dec   |  15 ++
 12 files changed, 579 insertions(+), 32 deletions(-)  create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/SecFspWrapperPlatformSecLibFspO.inf
create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/X64/PeiCoreEntry.nasm
 create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/X64/SecEntry.nasm
 create mode 100644 
Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/X64/Stack.nasm
 rename 
Platform/Intel/MinPlatformPkg/{FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32
 => Include}/Fsp.h (86%)

diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
 
b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
index 7c0f605b92..cc36334227 100644
--- 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/FsptCoreUpd.h
+++ b/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlat
+++ formSecLib/FsptCoreUpd.h
@@ -1,6 +1,6 @@
 /** @file -Copyright (c) 2017, Intel Corporation. All rights 
reserved.+Copyright (c) 2017 - 2023, Intel Corporation. All rights 
reserved. SPDX-License-Identifier: BSD-2-Clause-Patent  **/@@ -10,6 +10,7 
@@ SPDX-License-Identifier: BSD-2-Clause-Patent
  #pragma pack(1) +#if FixedPcdGet8 (PcdFsptArchUpdRevision) <= 1 /** Fsp T 
Core UPD **/ typedef struct {@@ -34,6 +35,28 @@ typedef struct {
 **/   UINT8   Reserved[16]; } FSPT_CORE_UPD;+#else+/** Fsp 
T Core UPD+**/+typedef struct {++/** Offset 0x0040+**/+  EFI_PHYSICAL_ADDRESS   
 MicrocodeRegionBase;++/** Offset 0x0048+**/+  UINT64  
MicrocodeRegionSize;++/** Offset 0x0050+**/+  EFI_PHYSICAL_ADDRESS
CodeRegionBase;++/** Offset 0x0058+**/+  UINT64  
CodeRegionSize;+} FSPT_CORE_UPD;+#endif  #pragma pack() diff --git 
a/Platform/Intel/MinPlatformPkg/FspWrapper/Library/SecFspWrapperPlatformSecLib/Ia32/SecEntry.nasm