Re: [edk2] [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if judgments

2016-11-09 Thread Ni, Ruiyu
Bell, FreePool (Blt) purposely frees the pool of Image.Bitmap, which was returned from previous loop. It's useful. Thanks/Ray > -Original Message- > From: Song, BinX > Sent: Thursday, November 10, 2016 1:42 PM > To: Gao, Liming ; edk2-devel@lists.01.org > Cc: Ni,

Re: [edk2] [patch] MdeModulePkg/BMMUI: add comments for function parameter

2016-11-09 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: Bi, Dandan > Sent: Thursday, November 10, 2016 3:40 PM > To: edk2-devel@lists.01.org > Cc: Dong, Eric > Subject: [patch] MdeModulePkg/BMMUI: add comments for function parameter > > Cc: Eric Dong

Re: [edk2] [patch] ShellPkg: Fix the coding style issue

2016-11-09 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Bi, Dandan > Sent: Thursday, November 10, 2016 3:40 PM > To: edk2-devel@lists.01.org > Cc: Ni, Ruiyu > Subject: [patch] ShellPkg: Fix the coding style issue > > Cc: Ruiyu Ni

Re: [edk2] [PATCH 1/4] MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxe

2016-11-09 Thread Zhang, Chao B
Reviewed-by : Chao Zhang Thanks & Best regards Chao Zhang -Original Message- From: Ni, Ruiyu Sent: Friday, November 04, 2016 9:00 AM To: edk2-devel@lists.01.org Cc: Gao, Liming; Yao, Jiewen; Zhang, Chao B Subject: [PATCH 1/4] MdeModulePkg/SecurityStubDxe:

[edk2] [patch] MdeModulePkg/BMMUI: add comments for function parameter

2016-11-09 Thread Dandan Bi
Cc: Eric Dong Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c | 1 + 1 file changed, 1 insertion(+) diff --git

[edk2] [patch] ShellPkg: Fix the coding style issue

2016-11-09 Thread Dandan Bi
Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- ShellPkg/Application/Shell/FileHandleWrappers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[edk2] [patch] CryptoPkg/BaseCryptLib: Make comments consistent with the function

2016-11-09 Thread Dandan Bi
Cc: Qin Long Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256.c | 2 +- CryptoPkg/Library/BaseCryptLib/Hmac/CryptHmacSha256Null.c | 2 +- 2 files changed, 2

Re: [edk2] [PATCH 4/4] MdeModulePkg/SecurityStubDxe: Report failure if image is load earlier

2016-11-09 Thread Yao, Jiewen
Reviewed-by: jiewen@intel.com > -Original Message- > From: Ni, Ruiyu > Sent: Friday, November 4, 2016 9:00 AM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen > Subject: [PATCH 4/4] MdeModulePkg/SecurityStubDxe: Report failure if > image is load earlier > > The

Re: [edk2] [PATCH v2 1/9] MdeModulePkg/SecurityStubDxe: Defer 3rd party image before EndOfDxe

2016-11-09 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Ruiyu Ni > Sent: Tuesday, November 08, 2016 8:29 PM > To: edk2-devel@lists.01.org > Cc: Yao, Jiewen ; Zhang, Chao B >

[edk2] [PATCH] ShellPkg/ShellCommandLib: Add missing EFIAPI for public library APIs

2016-11-09 Thread Ruiyu Ni
DumpHex() and CatSDumpHex() are public library APIs but don't have EFIAPI modifier. Add the missing EFIAPI. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jaben Carsey ---

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Fan, Jeff
Laszlo, I just sent the patch to place AP into safe hlt-loop code (in NVS range > 1MB, 32 bit protected mode). Could you check if it could solve the S3 unstable issue on OVMF? Thanks! Jeff From: Yao, Jiewen Sent: Thursday, November 10, 2016 9:13 AM To: Laszlo Ersek; Paolo Bonzini Cc: Kinney,

[edk2] [PATCH 1/2] UefiCpuPkg/PiSmmCpuDxeSmm: Put AP into safe hlt-loop code on S3 path

2016-11-09 Thread Jeff Fan
On S3 path, we will wake up APs to restore CPU context in PiSmmCpuDxeSmm driver. However, we place AP in hlt-loop under 1MB space borrowed after CPU restoring CPU contexts. In case, one NMI or SMI happens, APs may exit from hlt state and execute the instruction after HLT instruction. But the code

[edk2] [PATCH 0/2] Put AP into safe hlt-loop code on S3 path

2016-11-09 Thread Jeff Fan
On S3 path, we will wake up APs to restore CPU context in PiSmmCpuDxeSmm driver. In case, one NMI or SMI happens, APs may exit from hlt state and execute the instruction after HLT instruction. But APs are not running on safe code, it leads OVMF S3 boot unstable.

[edk2] [PATCH 2/2] UefiCpuPkg/PiSmmCpuDxeSmm: Place AP to 32bit protected mode on S3 path

2016-11-09 Thread Jeff Fan
On S3 path, we may transfer to long mode (if DXE is long mode) to restore CPU contexts with CR3 = SmmS3Cr3 (in SMM). AP will execute hlt-loop after CPU contexts restoration. Once one NMI or SMI happens, APs may exit from hlt state and execute the instruction after HLT instruction. If APs are

Re: [edk2] [PATCH v2 3/9] MdeModulePkg/BdsDxe: Check deferred images before booting to OS

2016-11-09 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Ni, Ruiyu > Sent: Tuesday, November 08, 2016 8:29 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Zhang, Chao B > > Subject: [PATCH v2 3/9] MdeModulePkg/BdsDxe:

Re: [edk2] [PATCH v2 2/9] MdeModulePkg/UefiBootManager: Add EfiBootManagerDispatchDeferredImages

2016-11-09 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: Ni, Ruiyu > Sent: Tuesday, November 08, 2016 8:29 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming ; Zhang, Chao B > > Subject: [PATCH v2 2/9]

Re: [edk2] [PATCH v2 0/9] Defer 3rd party images loading to after EndOfDxe

2016-11-09 Thread Wang, Sunny (HPS SW)
Reviewed all BDS related patches including PlatformBds libraries. All look good to me. Thanks for offline addressing my PlatformBds related questions. Reviewed-by: Sunny Wang -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of

Re: [edk2] [PATCH v2 2/9] MdeModulePkg/UefiBootManager: Add EfiBootManagerDispatchDeferredImages

2016-11-09 Thread Wang, Sunny (HPS SW)
Thanks for addressing my offline comments. This patch looks good to me. Reviewed-by: Sunny Wang Regards, Sunny Wang -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni Sent: Tuesday, November 08, 2016 8:29 PM To:

Re: [edk2] [PATCH v2 3/9] MdeModulePkg/BdsDxe: Check deferred images before booting to OS

2016-11-09 Thread Wang, Sunny (HPS SW)
Thanks for addressing my offline comments. This updated patch looks good to me. Reviewed-by: Sunny Wang -Original Message- From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Ruiyu Ni Sent: Tuesday, November 08, 2016 8:29 PM To:

Re: [edk2] [PATCH] MdeModulePkg/BootLogoLib: Remove invalid if judgments

2016-11-09 Thread Song, BinX
Hi Liming, In BootLogoEnableLogo() function, the FreePool(Blt) function will never be called, some Blt related code as below: a. Blt = NULL; -> Step 1, Blt was initialized. .. b.if (Blt != NULL) { \ FreePool (Blt); -- Step 2, Blt was checked, the judgment is always false.

Re: [edk2] [PATCH] IntelFsp2Pkg: Support to return error status from FSP API done

2016-11-09 Thread Yao, Jiewen
Reivewed-by: jiewen@intel.com > -Original Message- > From: Thomaiyar, Richard Marian > Sent: Tuesday, November 8, 2016 5:45 PM > To: edk2-devel@lists.01.org > Cc: Ma, Maurice ; Yao, Jiewen > ; Mudusuru, Giri P ; >

[edk2] [patch] MdePkg: Fix spec mismatch in string representation of EMMC dev node

2016-11-09 Thread Feng Tian
Cc: Eric Jin Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian --- MdePkg/Library/UefiDevicePathLib/DevicePathFromText.c | 2 +- MdePkg/Library/UefiDevicePathLib/DevicePathToText.c |

Re: [edk2] [PATCH] IntelFsp2Pkg: Support to return error status from FSP API done

2016-11-09 Thread Mudusuru, Giri P
Thanks Richard. Can you please add comments in the code to describe it? Other than that it looks good to me. Reviewed-by: Giri P Mudusuru > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Mudusuru, Giri P > Sent:

Re: [edk2] [PATCH 0/2] Handle input file of size 0 for GenFfs/GenSec tools

2016-11-09 Thread Gao, Liming
Reviewed-by: Liming Gao > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Hao Wu > Sent: Thursday, November 10, 2016 12:22 PM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Gao, Liming

[edk2] [PATCH 2/2] BaseTools/GenSec: Return correct status when input file size is 0

2016-11-09 Thread Hao Wu
Cc: Liming Gao Cc: Yonghong Zhu Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu --- BaseTools/Source/C/GenSec/GenSec.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff

[edk2] [PATCH 1/2] BaseTools/GenFfs: Fix return too early when input file is of size 0

2016-11-09 Thread Hao Wu
Commit 2cb874352423fcfd180199e6de8298567dff8e7f eliminates possible NULL pointer dereference in GenFfs tool source codes. However, it doesn't correctly handle the case when the input file is of size 0. This will lead to possible build issues. This commits refine the logic to handle the above

Re: [edk2] [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug

2016-11-09 Thread Fan, Jeff
Reviewed-by: Jeff Fan -Original Message- From: Ni, Ruiyu Sent: Tuesday, November 08, 2016 10:26 AM To: edk2-devel@lists.01.org Cc: Fan, Jeff Subject: [PATCH] IntelFrameworkModulePkg/LegacyBios: Fix legacy serial redirection bug Upon booting to a legacy OS,

Re: [edk2] [PATCH 0/2] MdePkg: UiLib library

2016-11-09 Thread Yao, Jiewen
HI Poludov It is a good idea to have a new UiLib. Both Mike and I give the suggestion to "You could define new lib and update all the code that uses the old API to use the new API." IMHO, I do not think it is right way to let UefiLib depend on a UiLib. We have plan to resolve it, but since you

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Yao, Jiewen
Fix a typo. From: Yao, Jiewen Sent: Thursday, November 10, 2016 8:49 AM To: 'Paolo Bonzini' ; Laszlo Ersek Cc: Kinney, Michael D ; Tian, Feng ; edk2-de...@ml01.01.org; Zeng, Star ;

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Yao, Jiewen
> Anyway, I think if the BSP and the APs are properly synchronized around > the SMI injections in S3ResumeExecuteBootScript(), then this bug is > fixed. In that case, the APs' RSMs will restore the full context for the > APs, including their sleep in the HLT instruction, in CpuMpPei's wakeup >

Re: [edk2] GenFv error 3000 building OvmfPkg X64 RELEASE

2016-11-09 Thread Wu, Hao A
Hi Cran, This issue was introduced by commit 2ff3293. And it has been fixed via commit 49d8f53. Could you help to update the repository and see whether this issue still exists? Thanks in advance. Best Regards, Hao Wu > -Original Message- > From: edk2-devel

Re: [edk2] [PATCH] ArmPkg/ArmDmaLib: add support for fixed host-to-device DMA offset

2016-11-09 Thread Leif Lindholm
On Thu, Nov 10, 2016 at 01:31:38AM +0400, Ard Biesheuvel wrote: > > > > On 10 Nov 2016, at 01:13, Leif Lindholm wrote: > > > >> On Tue, Nov 08, 2016 at 01:04:55PM +, Ard Biesheuvel wrote: > >> Some devices, such as the Raspberry Pi3, have a fixed offset between

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Laszlo Ersek
On 11/09/16 23:59, Paolo Bonzini wrote: > >> Another question I have -- and I feel I should really know it, but I >> don't... -- is *why* the APs are executing code from the page at >> 0x9f000. > > This I can answer. :) > > The APs have done their INIT-SIPI-SIPI, and then went into the

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Paolo Bonzini
> Another question I have -- and I feel I should really know it, but I > don't... -- is *why* the APs are executing code from the page at > 0x9f000. This I can answer. :) The APs have done their INIT-SIPI-SIPI, and then went into the CLI;HLT;JMP loop. When the AP exits SMM, it is in the JMP

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Laszlo Ersek
On 11/09/16 16:54, Paolo Bonzini wrote: > > > On 09/11/2016 16:01, Yao, Jiewen wrote: >> 1) CpuS3.c – EarlyInitializeCpu() >> 2) CpuS3.c – SmmRelocateBases() >> 3) CpuS3.c – InitializeCpu() >> 4) S3Resume.c – SendSmiIpiAllExcludingSelf() >> >> I believe we can guarantee 1/2/3

Re: [edk2] [PATCH] ArmPkg/ArmDmaLib: add support for fixed host-to-device DMA offset

2016-11-09 Thread Ard Biesheuvel
> On 10 Nov 2016, at 01:13, Leif Lindholm wrote: > >> On Tue, Nov 08, 2016 at 01:04:55PM +, Ard Biesheuvel wrote: >> Some devices, such as the Raspberry Pi3, have a fixed offset between memory >> addresses as seen by the host and as seen by the other bus masters.

Re: [edk2] [PATCH] ArmPkg/ArmDmaLib: add support for fixed host-to-device DMA offset

2016-11-09 Thread Leif Lindholm
On Tue, Nov 08, 2016 at 01:04:55PM +, Ard Biesheuvel wrote: > Some devices, such as the Raspberry Pi3, have a fixed offset between memory > addresses as seen by the host and as seen by the other bus masters. So add > a new PCD that allows this fixed offset to be recorded, and to be used when >

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Laszlo Ersek
On 11/09/16 07:25, Yao, Jiewen wrote: > Hi Laszlo > I will fix DEBUG message issue in V3 patch. > > Below is rest issues: > > > l Case 13: S3 fails randomly. > A good news: I worked with Jeff Fan to root-cause the S3 resume issue. Here > is detail. > > > 1) We believe the dead CPU is

Re: [edk2] [Wiki] Draft of documentation for Signed Capsule Feature

2016-11-09 Thread Kinney, Michael D
Jiewen, Thanks for the feedback. I think you are saying that the support for the EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED is not implemented. Right? In MdeModulePkg/Application/CapsuleApp, I see the following 2 unused #defines: #define EFI_CAPSULE_FROM_FILE_DIR

[edk2] GenFv error 3000 building OvmfPkg X64 RELEASE

2016-11-09 Thread Bruce Cran
I'm getting a failure when building (with gcc 6.2.1) OVMF X64 RELEASE (DEBUG builds fine) with the latest edk2 git master: > ./OvmfPkg/build.sh -a X64 -t GCC49 -b RELEASE . Generating PEIFV FV ### Generate Region at Offset 0x10 Region Size = 0xA0

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Paolo Bonzini
On 09/11/2016 16:54, Paolo Bonzini wrote: >> > and 2) AP is in protected mode with paging disabled. > It is not clear to me what the (4) SIPI done is there for, and why it is > triggered in S3Resume.c rather than CpuS3.c. And why does it take so > much for APs to complete it? SMI of course,

[edk2] [staging/AArch64StandaloneMm] Branch to implement MM in Standalone Mode on AArch64

2016-11-09 Thread achin.gupta
From: Achin Gupta This patch captures a brief description of the intent behind the 'AArch64StandaloneMm' branch in the Readme.MD file. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Achin Gupta --- Readme.MD | 31

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Paolo Bonzini
On 09/11/2016 16:01, Yao, Jiewen wrote: > 1) CpuS3.c – EarlyInitializeCpu() > 2) CpuS3.c – SmmRelocateBases() > 3) CpuS3.c – InitializeCpu() > 4) S3Resume.c – SendSmiIpiAllExcludingSelf() > > I believe we can guarantee 1/2/3 is good, because I found we check BSP > check

[edk2] [PATCH 1/2] MdePkg: UiLib library. Add UiLib. Update UefiLib.

2016-11-09 Thread Felix Poludov
1. New UiLib library class is added to MdePkg. The library is intended for functions that produce UI elements. The patch introduces two functions that produce a popup window: UiCreatePopUp and UiCreatePopUpVaList. 2. An instance of UiLib library class is added to MdePkg. Popup implementation is

[edk2] [PATCH 2/2] MdePkg: UiLib library. Update DSC files.

2016-11-09 Thread Felix Poludov
Platform DSC files are updated to add UiLib instance Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Felix Polyudov --- AppPkg/AppPkg.dsc | 1 + ArmPkg/ArmPkg.dsc | 1 +

[edk2] [PATCH 0/2] MdePkg: UiLib library

2016-11-09 Thread Felix Poludov
This series of two patches introduces new UiLib library. 1. New UiLib library class is added to MdePkg. The library is intended for functions that produce UI elements. The patch introduces two functions that produce a popup window: UiCreatePopUp and UiCreatePopUpVaList. 2. An instance of UiLib

Re: [edk2] BaseTools issue finding PCDs in non-COMMON modules

2016-11-09 Thread Huber, Brandon
Hi All, I'm seeing an issue with the latest BaseTools where it fails to find a PCD when parsing the FDF unless there is a COMMON version of module (e.g., built under [LibraryClasses.common] in the DSC) that includes the DEC in which the PCD is declared. In other words, when gathering PCDs,

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Yao, Jiewen
Great work! I appreciate that. It seems the slow emulated SMM keeps exposing the corner case on the code. :) We will fix the bad AP in another patch. Thank you Yao Jiewen From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Wednesday, November 9, 2016 7:24 PM To: Laszlo Ersek

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Yao, Jiewen
What I found is that the BSP doesn't wait for the AP rendezvous before closing SMRAM. [Jiewen] That is a good catch. Thanks to explain. I believe that is more convincible than AP getting interrupt. :) We have some places where BSP talking to AP in S3. 1) CpuS3.c - EarlyInitializeCpu() 2)

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Paolo Bonzini
On 09/11/2016 07:25, Yao, Jiewen wrote: > Current BSP just uses its own context to initialize AP. So that AP > takes BSP CR3, which is SMM CR3, unfortunately. After BSP initialized > APs, the AP is put to HALT-LOOP in X64 mode. It is the last straw, > because X64 mode halt still need paging. >

Re: [edk2] [PATCH V2 0/6] Enable SMM page level protection.

2016-11-09 Thread Paolo Bonzini
> * Second, the instruction that causes things to blow up is <0f aa>, > i.e., RSM. I have absolutely no clue why RSM is executed: It's probably not RSM. RSM is probably the last instruction executed before, and it's still in the buffer because, as you said, there's no way that you can

[edk2] [Patch] BaseTools: Fix the bug to support generate FFS by Align=Auto

2016-11-09 Thread Yonghong Zhu
FDF spec support to use 'Auto' as , but current Tool report error about -a=Auto is invalid option when we set Align=Auto for RAW File. Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu ---