[edk2] [Patch 2/2] UefiCpuPkg/CpuDxe: Fix one dead lock issue in ProcessorToIdleState()

2015-10-27 Thread Jeff Fan
There is one dead lock issue between BSP and AP. AP has one logic to enter into Sleep state (hlt) if it found its state is Idle state in one loop. In ProcessorToIdleState() function, AP will get current AP state, if its state is Sleep state, then it will go into real sleep(hlt) state. The dead lock

[edk2] [Patch 0/2] Fix 2 dead lock issues for StartupThisAp()

2015-10-27 Thread Jeff Fan
I found and fixed 2 dead lock issues when StartupThisAp(). Because AP will change its wait state from Idle to Sleep dynamically. It introduced some complexity in MP services. Most cases, CPU will be in Sleep state. For long term, we could drop this dynamic changing if there is no much performance b

[edk2] [Patch 1/2] UefiCpuPkg/CpuDxe: Fix one dead lock issue in StartupThisAP()

2015-10-27 Thread Jeff Fan
There is one dead lock issue between BSP and AP. AP has one logic to enter into Sleep state (hlt) if it found its state is Idle in one loop. In StartupThisAp() function, BSP will get current AP state (Sleep or Idle) to know how to wakeup AP. If AP is in Idle state, BSP will write one semaphore to w

[edk2] [PATCH 1/1] EmbeddedPkg: Add EFIAPI to several Ebl functions

2015-10-27 Thread Thomas Palmer
The EFIAPI function declaration is missing for several functions in the EmbeddedPkg/Ebl directory. A few function pointer struct members expect EFIAPI though and GCC46/X64 will fail to compile the directory without them. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thom

Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: fix ExitBootServices() callback in the presence of SMIs

2015-10-27 Thread Fan, Jeff
Jordan, Sending Fixed Interrupt IPI to wakeup AP required set EFLAGS.IF bit on AP from my experience. (Please correct me if I am wrong.) As a result, system timer interrupt maybe handled by AP instead of BSP. Most of cases, AP will be in hlt state and require INIT-SIPI-SIPI to be wakeup and w

[edk2] [Patch] MdeModulePkg: Do not dump NULL padding resource descriptor

2015-10-27 Thread Ruiyu Ni
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Feng Tian --- MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 4 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/

Re: [edk2] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Smbios3Table used as SmbiosTable wrongly

2015-10-27 Thread Ard Biesheuvel
On 28 October 2015 at 13:26, Zeng, Star wrote: > On 2015/10/28 9:44, Ard Biesheuvel wrote: >> >> On 28 October 2015 at 10:33, Star Zeng wrote: >>> >>> This patch does below things. >>> 1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from >>> configuration table. >>> 2. Correct t

Re: [edk2] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Smbios3Table used as SmbiosTable wrongly

2015-10-27 Thread Zeng, Star
On 2015/10/28 10:58, Yao, Jiewen wrote: Thanks. Can we use CopyGuid() for below assignment? HandoffTables.TableEntry[0].VendorGuid = gEfiSmbiosTableGuid; Yes, have included this into PATCH 1/5 of the new split patch set and with your Reviewed-by. Thanks, Star Reviewed-by: jiewen@inte

Re: [edk2] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Smbios3Table used as SmbiosTable wrongly

2015-10-27 Thread Zeng, Star
On 2015/10/28 9:44, Ard Biesheuvel wrote: On 28 October 2015 at 10:33, Star Zeng wrote: This patch does below things. 1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table. 2. Correct the return comments of entrypoint function. 3. Add parameters' comments f

[edk2] [PATCH 1/5] MdeModulePkg SmbiosMeasurementDxe: Use SMBIOS table and GUID correctly

2015-10-27 Thread Star Zeng
1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table. 2. Use correct VendorGuid and VendorTable to measure. Cc:Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao --- .../SmbiosMeasurementDxe

[edk2] [PATCH 5/5] MdeModulePkg SmbiosMeasurementDxe: Correct the comments

2015-10-27 Thread Star Zeng
1. Correct the return comments of entrypoint function. 2. Add parameters' comments for MeasureSmbiosTable(). 3. Correct the Protocols and Guids usage comments in SmbiosMeasurementDxe.inf. Cc:Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by:

[edk2] [PATCH 3/5] MdeModulePkg SmbiosMeasurementDxe: Use EFI_D_VERBOSE for internal dump functions

2015-10-27 Thread Star Zeng
Use EFI_D_VERBOSE instead of EFI_D_INFO in InternalDumpData() and InternalDumpHex(). And also add DEBUG_CODE wrapper to InternalDumpHex() call. It is to avoid the bother from the internal verbose debug information. Cc:Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-

[edk2] [PATCH 4/5] MdeModulePkg SmbiosMeasurementDxe: Remove the tailing whitespace

2015-10-27 Thread Star Zeng
Cc:Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao --- .../SmbiosMeasurementDxe/SmbiosMeasurementDxe.c| 26 +++--- .../SmbiosMeasurementDxe/SmbiosMeasurementDxe.inf | 2 +- 2 files changed, 14 insertions(+

[edk2] [PATCH 0/5] MdeModulePkg: Enhance SmbiosMeasurementDxe

2015-10-27 Thread Star Zeng
This patch set do below things. 1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table. 2. Use correct VendorGuid and VendorTable to measure. 3. Add (VOID **) typecast in LocateProtocol call for GCC build failure. 4. Use EFI_D_VERBOSE instead of EFI_D_INFO in I

[edk2] [PATCH 2/5] MdeModulePkg SmbiosMeasurementDxe: Add (VOID **) typecast for GCC build failure

2015-10-27 Thread Star Zeng
Cc:Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Star Zeng Reviewed-by: Jiewen Yao --- MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdeModulePkg/Universal/SmbiosMeasurem

Re: [edk2] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Smbios3Table used as SmbiosTable wrongly

2015-10-27 Thread Yao, Jiewen
Thanks. Can we use CopyGuid() for below assignment? HandoffTables.TableEntry[0].VendorGuid = gEfiSmbiosTableGuid; Reviewed-by: jiewen@intel.com -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Star Zeng Sent: Wednesday, October 28, 2015 9:33

[edk2] [Patch] MdeModulePkg FileExplorerLib: Create file explorer library.

2015-10-27 Thread Eric Dong
This library support select one file from the specified directory or from system root directory. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eric Dong --- MdeModulePkg/Include/Library/FileExplorerLib.h | 57 + .../Library/FileExplorerLib/FileExpl

Re: [edk2] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Smbios3Table used as SmbiosTable wrongly

2015-10-27 Thread Ard Biesheuvel
On 28 October 2015 at 10:33, Star Zeng wrote: > This patch does below things. > 1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from > configuration table. > 2. Correct the return comments of entrypoint function. > 3. Add parameters' comments for MeasureSmbiosTable(). > 4. Remov

[edk2] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Smbios3Table used as SmbiosTable wrongly

2015-10-27 Thread Star Zeng
This patch does below things. 1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table. 2. Correct the return comments of entrypoint function. 3. Add parameters' comments for MeasureSmbiosTable(). 4. Remove the tailing space from SmbiosMeasurementDxe.c. 5. Correct

Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: fix ExitBootServices() callback in the presence of SMIs

2015-10-27 Thread Laszlo Ersek
On 10/27/15 23:54, Jordan Justen wrote: > On 2015-10-27 05:20:12, Laszlo Ersek wrote: >> On 10/27/15 07:48, Jordan Justen wrote: >>> What about adding this code to mStartupCodeTemplate and sending the >>> APs there using the MP services? >> >> That was the idea in Jeff's earlier series, but it come

Re: [edk2] [PATCH] UefiCpuPkg: SmmCpuFeaturesLib: Add MSR_SMM_FEATURE_CONTROL support

2015-10-27 Thread Yao, Jiewen
Looks good. Reviewed by: jiewen@intel.com Thank you Yao Jiewen -Original Message- From: Kinney, Michael D Sent: Wednesday, October 28, 2015 2:09 AM To: edk2-devel@lists.01.org Cc: Yao, Jiewen; Fan, Jeff Subject: [PATCH] UefiCpuPkg: SmmCpuFeaturesLib: Add MSR_SMM_FEATURE_CONTROL supp

Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: fix ExitBootServices() callback in the presence of SMIs

2015-10-27 Thread Jordan Justen
On 2015-10-27 05:20:12, Laszlo Ersek wrote: > On 10/27/15 07:48, Jordan Justen wrote: > > What about adding this code to mStartupCodeTemplate and sending the > > APs there using the MP services? > > That was the idea in Jeff's earlier series, but it comes with a number > of complications. The main

[edk2] [PATCH] UefiCpuPkg: SmmCpuFeaturesLib: Add MSR_SMM_FEATURE_CONTROL support

2015-10-27 Thread Michael Kinney
Add support for the reading and writing MSR_SMM_FEATURE_CONTROL through the SmmCpuFeaturesIsSmmRegisterSupported(), SmmCpuFeaturesGetSmmRegister(), and SmmCpuFeaturesSetSmmRegister() functions. This MSR is supported if the Family/Model is 06_3C, 06_45, or 06_46. Contributed-under: TianoCore Contr

Re: [edk2] EFI pe version number

2015-10-27 Thread Carsey, Jaben
Is there a reason that you don't just set the version number in the INF file for your application? There is an entry in the [DEFINES] section. I think that one is retained. > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Miller, Carl H >

[edk2] EFI pe version number

2015-10-27 Thread Miller, Carl H
I am trying to set an image version number into my .efi application, using the /VERSION:x.y linker option. I am building using UDK2014 and visual studio 2013. I see that the version is being inserted into the appplication.dll file, but it gets stripped out in the application.efi file. is there

Re: [edk2] [PATCH] MdeModulePkg: Add a BDS platform hook function PlatformBootManagerDefaultBootFail to PlatformBootManagerLib

2015-10-27 Thread El-Haj-Mahmoud, Samer
Reviewed-by: Samer El-Haj-Mahmoud -Original Message- From: Wang, Sunny (HPS SW) Sent: Tuesday, October 27, 2015 4:21 AM To: edk2-devel@lists.01.org Cc: El-Haj-Mahmoud, Samer ; Wang, Sunny (HPS SW) Subject: [PATCH] MdeModulePkg: Add a BDS platform hook function PlatformBootManagerDefau

Re: [edk2] [PATCH] MdeModulePkg: Add a BDS platform hook function PlatformBootManagerBeforeDefaultBoot to PlatformBootManagerLib

2015-10-27 Thread El-Haj-Mahmoud, Samer
Reviewed-by: Samer El-Haj-Mahmoud -Original Message- From: Wang, Sunny (HPS SW) Sent: Tuesday, October 27, 2015 4:38 AM To: edk2-devel@lists.01.org Cc: El-Haj-Mahmoud, Samer ; Wang, Sunny (HPS SW) Subject: [PATCH] MdeModulePkg: Add a BDS platform hook function PlatformBootManagerBefor

Re: [edk2] [PATCH] MdeModulePkg: Fix memory leak issues

2015-10-27 Thread El-Haj-Mahmoud, Samer
Reviewed-by: Samer El-Haj-Mahmoud -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Wang, Sunny (HPS SW) Sent: Tuesday, October 27, 2015 3:47 AM To: edk2-devel@lists.01.org Cc: El-Haj-Mahmoud, Samer Subject: [edk2] [PATCH] MdeModulePkg: Fix memory

Re: [edk2] [PATCH] ShellPkg: Refine code by initializing local variable and adding ASSERT statement.

2015-10-27 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey > -Original Message- > From: Qiu, Shumin > Sent: Tuesday, October 27, 2015 6:38 AM > To: edk2-devel@lists.01.org > Cc: Qiu, Shumin ; Carsey, Jaben > > Subject: [PATCH] ShellPkg: Refine code by initializing local variable and > adding > ASSERT statement. > Impor

Re: [edk2] [PATCH] ShellPkg: Refine code by initializing local variable and adding ASSERT statement.

2015-10-27 Thread Carsey, Jaben
Reviewed-by: Jaben Carsey -Original Message- From: Qiu, Shumin Sent: Tuesday, October 27, 2015 6:38 AM To: edk2-devel@lists.01.org Cc: Qiu, Shumin ; Carsey, Jaben Subject: [PATCH] ShellPkg: Refine code by initializing local variable and adding ASSERT statement. Importance: High Add AS

Re: [edk2] Is there an array search function in EDK2 ? Like a binary search of UINT64 numbers ?

2015-10-27 Thread Laszlo Ersek
On 10/27/15 03:30, Shubha Ramani wrote: > Thanks, > Shubha Shubha D. ramanishubharam...@gmail.com > shubharam...@yahoo.com > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel > Binary search is no

[edk2] [PATCH] ShellPkg: Refine code by initializing local variable and adding ASSERT statement.

2015-10-27 Thread Qiu Shumin
Add ASSERT statement and initialize local variable to make code more readable. Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin --- ShellPkg/Application/Shell/ShellProtocol.c | 2 ++ ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c | 1 + 2

Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: fix ExitBootServices() callback in the presence of SMIs

2015-10-27 Thread Laszlo Ersek
On 10/27/15 03:37, Fan, Jeff wrote: > Laszlo, > > This method is better. > > Please correct subject, 'fix' to 'Fix'. I'll do that. > The others are good. Thanks! > > Reviewed-by: Jeff Fan Thank you! I'll await Jordan's next email and then send a v2. Cheers Laszlo > > -Original Messa

Re: [edk2] [PATCH] UefiCpuPkg/CpuDxe: fix ExitBootServices() callback in the presence of SMIs

2015-10-27 Thread Laszlo Ersek
On 10/27/15 07:48, Jordan Justen wrote: > What about adding this code to mStartupCodeTemplate and sending the > APs there using the MP services? That was the idea in Jeff's earlier series, but it comes with a number of complications. The main one is that the HLT loop is entered as a "normal" Start

Re: [edk2] [PATCH] MdePkg/BaseSynchronizationLib: fix return value

2015-10-27 Thread Leif Lindholm
On Tue, Oct 27, 2015 at 06:15:07PM +0900, Ard Biesheuvel wrote: > Hi Haojian, > > On 27 October 2015 at 16:15, Haojian Zhuang wrote: > > Fix the wrong return value of both InternalSyncIncrement() > > and InternalSyncDecrement(). The return value shouldn't > > be the address of input parameter. It

Re: [edk2] [patch] MdeModulePkg:Add HiiGetFormSetFromHiiHandle function into UefiHiiLib

2015-10-27 Thread Gao, Liming
Reviewed-by: Liming Gao -Original Message- From: Bi, Dandan Sent: Friday, October 23, 2015 4:05 PM To: Dong, Eric; Gao, Liming; edk2-devel@lists.01.org Subject: [patch] MdeModulePkg:Add HiiGetFormSetFromHiiHandle function into UefiHiiLib This function is mainly through the Hii handle t

[edk2] [PATCH] MdeModulePkg: Add a BDS platform hook function PlatformBootManagerBeforeDefaultBoot to PlatformBootManagerLib

2015-10-27 Thread Sunny Wang
Add a BDS platform hook function PlatformBootManagerBeforeDefaultBoot to PlatformBootManagerLib PlatformBootManagerBeforeDefaultBoot would be helpful for us to do some platform actions like printing a specific message on the screen before booting the boot devices in boot order and after booting

[edk2] [PATCH] MdeModulePkg: Add a BDS platform hook function PlatformBootManagerDefaultBootFail to PlatformBootManagerLib

2015-10-27 Thread Sunny Wang
Add a BDS platform hook function PlatformBootManagerDefaultBootFail to PlatformBootManagerLib Why we need this hook function : 1) According to UEFI 2.5 Section 3.4.3, the 3rd paragraph, It seems we need to have a hook function (PlatformBootManagerDefaultBootFail) for platform firmware to do pl

Re: [edk2] [PATCH] MdePkg/BaseSynchronizationLib: fix return value

2015-10-27 Thread Ard Biesheuvel
Hi Haojian, On 27 October 2015 at 16:15, Haojian Zhuang wrote: > Fix the wrong return value of both InternalSyncIncrement() > and InternalSyncDecrement(). The return value shouldn't > be the address of input parameter. It should be the updated > value of input parameter instead. > > Contributed-u

[edk2] [PATCH] MdeModulePkg: Fix memory leak issues

2015-10-27 Thread Sunny Wang
Fix memory leak issues Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Sunny Wang --- MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c b/MdeM

Re: [edk2] [UEFI2.5] HTTP Boot for IPv6

2015-10-27 Thread Ye, Ting
Yes we are working on this now. Thanks, Ye Ting -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ted Chang (???) Sent: Tuesday, October 27, 2015 4:38 PM To: edk2-devel@lists.01.org Subject: [edk2] [UEFI2.5] HTTP Boot for IPv6 Hi NetworkStack own

[edk2] [UEFI2.5] HTTP Boot for IPv6

2015-10-27 Thread ��耿�S
Hi NetworkStack owner, We notice HTTPBoot for IPv6 is not yet ready on EDKII trunk, do you have schedule/plan for this feature? Thank you. B.R. Ted ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel

Re: [edk2] [PATCH] UefiCpuPkg CpuDxe: Sync up the settings of Execute Disable to APs

2015-10-27 Thread Zeng, Star
On 2015/10/27 15:01, Jordan Justen wrote: On 2015-08-06 19:14:43, Star Zeng wrote: when stack NX has been enabled for BSP. Is there a reason this could not be initialized in the C AP init code instead? For IA32, maybe it is doable, but I did not do the investigation to find the right place.

[edk2] [PATCH] MdePkg/BaseSynchronizationLib: fix return value

2015-10-27 Thread Haojian Zhuang
Fix the wrong return value of both InternalSyncIncrement() and InternalSyncDecrement(). The return value shouldn't be the address of input parameter. It should be the updated value of input parameter instead. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Haojian Zhuang --

Re: [edk2] [PATCH] UefiCpuPkg CpuDxe: Sync up the settings of Execute Disable to APs

2015-10-27 Thread Jordan Justen
On 2015-08-06 19:14:43, Star Zeng wrote: > when stack NX has been enabled for BSP. Is there a reason this could not be initialized in the C AP init code instead? -Jordan > DxeIpl may have enabled Execute Disable for BSP, > APs need to get the status and sync up the settings, > otherwise EFI_MP_S