Re: [edk2] [PATCH v2 05/12] ArmPkg: introduce EDKII Platform Has ACPI Protocol, and plug-in library

2017-03-27 Thread Gao, Liming
Ersek: I don't want to block your patch. You can still check in Guid header file if you think it is necessary. Thanks Liming > -Original Message- > From: Laszlo Ersek [mailto:ler...@redhat.com] > Sent: Tuesday, March 28, 2017 1:32 AM > To: Ard Biesheuvel ;

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Gao, Liming
If platform decides not to fix them in platform code, they can redefine /D GLOBAL_REMOVE_IF_UNREFERENCED =_declspec(selectany) in [BuildOptions] section of Platform.dsc. Thanks Liming > -Original Message- > From: Kinney, Michael D > Sent: Tuesday, March 28, 2017 1:07 AM > To: Felix

Re: [edk2] VFR IMAGE_TOKEN Macro

2017-03-27 Thread Gao, Liming
Thanks for report this issue. VfrCompiler needs to update to support IMAGE_TOKEN. Could you help submit one bug in Bugzilla? We need to fix it. Thanks Liming > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of Jannis > ?tjengerdes > Sent:

Re: [edk2] [PATCH] ShellPkg/Shell: Avoid potential null pointer deference

2017-03-27 Thread Wu, Hao A
Reviewed-by: Hao Wu Best Regards, Hao Wu > -Original Message- > From: Ni, Ruiyu > Sent: Tuesday, March 28, 2017 10:27 AM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A > Subject: [PATCH] ShellPkg/Shell: Avoid potential null pointer deference > > Contributed-under:

Re: [edk2] [RFC] [PATCH 0/3] Add IOMMU support.

2017-03-27 Thread Yao, Jiewen
I think IOMMU protocol can be the hint. From: Ni, Ruiyu Sent: Tuesday, March 28, 2017 10:25 AM To: Yao, Jiewen ; Duran, Leo ; edk2-devel@lists.01.org Cc: Singh, Brijesh Subject: RE: [RFC] [PATCH 0/3] Add IOMMU support. Jiewen, For

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Duran, Leo
Jeff, Perhaps you missed my response to this earlier today… Here it is again: Leo Given that: 1) UefiCpuPkg/Include/Register/Cpuid.h... Does reference an Intel SDM 2) UefiCpuPkg/Include/Register/Msr... Includes intel SoC's I vote for: 1) UefiCpuPkg/Include/Register/Amd/Cpuid.h 2)

Re: [edk2] [PATCH] MdeModulePkg/SmmCore: Fix memory leak on Profile unregistered.

2017-03-27 Thread Fan, Jeff
Reviewed-by: Jeff Fan -Original Message- From: Yao, Jiewen Sent: Monday, March 27, 2017 11:02 PM To: edk2-devel@lists.01.org Cc: Fan, Jeff; Tian, Feng; Zeng, Star; Bret Barkelew Subject: [PATCH] MdeModulePkg/SmmCore: Fix memory leak on Profile unregistered. Issue

Re: [edk2] [patch 2/2] ShellPkg/Shell: Make comments align with the function

2017-03-27 Thread Ni, Ruiyu
Reviewed-by: Ruiyu Ni Thanks/Ray > -Original Message- > From: Bi, Dandan > Sent: Tuesday, March 28, 2017 9:02 AM > To: edk2-devel@lists.01.org > Cc: Chen, Chen A ; Ni, Ruiyu > Subject: [patch 2/2] ShellPkg/Shell: Make

Re: [edk2] [RFC] [PATCH 0/3] Add IOMMU support.

2017-03-27 Thread Yao, Jiewen
I forget mentioning that I have to do it in PciIo instead of PciRootBridgeIo. The reason is that Intel VTd solution need know which PCI device submit the DMA access request, so that it can only modify the IOMMU paging for this specific device. I believe AMD IOMMU has similar requirement.

Re: [edk2] [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Change Reset Type.

2017-03-27 Thread Wei, David
Reviewed-by: zwei4 Thanks, David Wei -Original Message- From: Lu, ShifeiX A Sent: Tuesday, March 28, 2017 9:46 AM To: edk2-devel@lists.01.org Cc: Wei, David Subject: [Patch][edk2-platforms]

[edk2] [Patch][edk2-platforms] Vlv2DeviceRefCodePkg: Change Reset Type.

2017-03-27 Thread lushifex
Change RESET_VALUE of FADT from 0x0E to 0x06. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: lushifex --- Vlv2DeviceRefCodePkg/AcpiTablesPCAT/Facp/Facp.aslc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [edk2] [PATCH v2] UefiCpuPkg/MpLib.c: Add checking CR0 PG bit

2017-03-27 Thread Tian, Feng
Reviewed-by: Feng Tian Thanks Feng -Original Message- From: Fan, Jeff Sent: Tuesday, March 28, 2017 8:57 AM To: edk2-devel@lists.01.org Cc: Tian, Feng ; Kinney, Michael D Subject: [PATCH v2] UefiCpuPkg/MpLib.c: Add

Re: [edk2] [RFC] [PATCH 0/3] Add IOMMU support.

2017-03-27 Thread Yao, Jiewen
Hi Leo I do intercept 4 I/O operation in *PciIo*, instead of *PciRootBridgeIo*. See: https://lists.01.org/pipermail/edk2-devel/2017-March/009021.html There are 4 gIoMmuProtocol->SetAttribute() I believe you can clear/set SEV action there. Would you please double check that? Thank you Yao

[edk2] [patch 2/2] ShellPkg/Shell: Make comments align with the function

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

[edk2] [patch 1/2] MdeModulePkg/MemoryProtection: Fix coding style issue

2017-03-27 Thread Dandan Bi
Cc: Ard Biesheuvel Cc: Feng Tian Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[edk2] [PATCH v2] UefiCpuPkg/MpLib.c: Add checking CR0 PG bit

2017-03-27 Thread Jeff Fan
If CR0 PG bit is not set, it means paging is not enabled on BSP. Thus, Execute Disable feature is not working actually. Thus, we cannot enable it on APs. v2: Correct the commit log. Cc: Feng Tian Cc: Michael Kinney Contributed-under: TianoCore

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Fan, Jeff
Brijesh, UefiCpuPkg/Include/Register/Cpuid.h declared to support one version of Intel SDM. Before the new SDM publishing, we cannot assume what CPUID naming and definitions are. If new SDM adopts the exactly same definitions of CPUID in the future, we could simply include

Re: [edk2] [PATCH 00/12] OvmfPkg: Enable variable access in PEI

2017-03-27 Thread Jordan Justen
On 2017-03-27 11:03:42, Laszlo Ersek wrote: > On 03/27/17 10:05, Jordan Justen wrote: > > web: https://github.com/jljusten/edk2/tree/pei-vars-v1 > > > > git: https://github.com/jljusten/edk2.git pei-vars-v1 > > > > This series moves flash detection into PEI to allow the PEI variable > > access

Re: [edk2] [RFC] [PATCH 0/3] Add IOMMU support.

2017-03-27 Thread Duran, Leo
Hi Yao, This patch-set, in its current form, does not address all of the required SEV functionality for PcIHostBridgeIo. Basically, we need to intercept all 4 I/O Operations: - IoMap() - IoUnmap() - IoAllocateBuffer() - IoFreeBuffer() SEV I/O intercepts would do this: 1) IoMap() - Allocate an

Re: [edk2] [RFC PATCH v2 09/10] OvmfPkg/QemuFwCfgLib: Add Secure Encrypted Virtualization (SEV) support

2017-03-27 Thread Brijesh Singh
On Mon, Mar 27, 2017 at 5:19 AM, Laszlo Ersek wrote: > On 03/21/17 22:13, Brijesh Singh wrote: > > The patch adds SEV support in QemuFwCfgLib. When SEV is enabled: > > > > * Pei phase support IO-style operations. This is mainly because we need > to > >use a bounce buffer

Re: [edk2] [RFC PATCH v2 04/10] OvmfPkg/BaseMemcryptSevLib: Add SEV helper library

2017-03-27 Thread Brijesh Singh
On Mon, Mar 27, 2017 at 5:07 AM, Laszlo Ersek wrote: > On 03/27/17 11:19, Laszlo Ersek wrote: > > On 03/21/17 22:13, Brijesh Singh wrote: > > >> + Returns a boolean to indicate whether SEV is enabled > >> + > >> + @retval TRUE When SEV is active > >> + @retval

Re: [edk2] [RFC PATCH v2 06/10] OvmfPkg/DxeBmDmaLib: Fix AllocateBounceBuffer parameter

2017-03-27 Thread Brijesh Singh
On Mon, Mar 27, 2017 at 4:21 AM, Laszlo Ersek wrote: > On 03/21/17 22:13, Brijesh Singh wrote: > > The patch fixes AllocateBounceBuffer parameters. > > > > Signed-off-by: Brijesh Singh > > --- > > OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c |2 +- > >

Re: [edk2] [edk2-staging][PATCH 0/2] Create new acpiview branch

2017-03-27 Thread Evan Lloyd
Hi. I submitted this request (with 2 patches) for a new branch on edk2-staging some weeks ago. Is there something else I need to do to get a branch created? Have I missed someone from the distribution? I have a fork on GitHub and can make a pull request if that is better. Regards, Evan

Re: [edk2] [PATCH 00/12] OvmfPkg: Enable variable access in PEI

2017-03-27 Thread Laszlo Ersek
On 03/27/17 10:05, Jordan Justen wrote: > web: https://github.com/jljusten/edk2/tree/pei-vars-v1 > > git: https://github.com/jljusten/edk2.git pei-vars-v1 > > This series moves flash detection into PEI to allow the PEI variable > access drivers to run. If flash is writable, the PCDs are set to

Re: [edk2] [PATCH v2 05/12] ArmPkg: introduce EDKII Platform Has ACPI Protocol, and plug-in library

2017-03-27 Thread Ard Biesheuvel
On 27 March 2017 at 18:31, Laszlo Ersek wrote: > On 03/27/17 09:00, Ard Biesheuvel wrote: >> On 27 March 2017 at 03:42, Gao, Liming wrote: >>> Laszlo: >>> On GUID header file, some header file are here, because they are added >>> before BaseTools

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Laszlo Ersek
On 03/27/17 13:58, Brijesh Singh wrote: > On Mon, Mar 27, 2017 at 2:57 AM, Fan, Jeff wrote: > >> Laszlo, >> >> One Amd directory under UefiCpuPkg/Include/Register is better. >> >> Does Brijesh/Leo have any comments, or have other suggestions? >> >> > > I am not sure if

Re: [edk2] [PATCH v2 05/12] ArmPkg: introduce EDKII Platform Has ACPI Protocol, and plug-in library

2017-03-27 Thread Laszlo Ersek
On 03/27/17 09:00, Ard Biesheuvel wrote: > On 27 March 2017 at 03:42, Gao, Liming wrote: >> Laszlo: >> On GUID header file, some header file are here, because they are added >> before BaseTools supports it. Now, we allow not to add header file if the >> header file only

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Kinney, Michael D
Felix, We need to find all instances of that usage and fix them. We can make sure this issue is fixed for all open source packages and open source platforms before this change is committed to master. I recommend you generate a new version of the patch based on feedback from this thread and ask

[edk2] VFR IMAGE_TOKEN Macro

2017-03-27 Thread Jannis Ötjengerdes
Hello, I think I found a bug in edk2, in the buildscripts or vfr to be precisely. As I don't know what is happening exactly in your build scripts, I'll describe here what I expect and what's actually happen (or don't happen). I am using IMAGE_TOKEN which I use similar to STRING_TOKEN For

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Felix Poludov
Mike, I completely agree. As far as code that breaks, the most typical problem I've seen is variable or constant defined in a header file included by more than one C file. Are you going to make these modifications or do you want me to submit a patch? -Original Message- From: Kinney,

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Brijesh Singh
On Mon, Mar 27, 2017 at 10:59 AM, Duran, Leo wrote: > Jeff, et al, > > Given that: > 1) UefiCpuPkg/Include/Register/Cpuid.h... Does reference an Intel SDM > 2) UefiCpuPkg/Include/Register/Msr... Includes intel SoC's > > I vote for: > 1) UefiCpuPkg/Include/Register/Amd/Cpuid.h

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Kinney, Michael D
Felix, What is the condition that will fail if /Gw is set and GLOBAL_REMOVE_IF_UNREFERENCED is defined to nothing? If these are real bugs, then I think we should identify those bugs and fix them and then apply this strong policy for newer VS compilers. Mike > -Original Message- >

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Duran, Leo
Jeff, et al, Given that: 1) UefiCpuPkg/Include/Register/Cpuid.h... Does reference an Intel SDM 2) UefiCpuPkg/Include/Register/Msr... Includes intel SoC's I vote for: 1) UefiCpuPkg/Include/Register/Amd/Cpuid.h 2) UefiCpuPkg/Include/Register/Amd/Msr.h +

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Felix Poludov
Mike, What do you think about defining GLOBAL_REMOVE_IF_UNREFERENCED in the tool chain definition file as an empty macro for a newer VS compilers? If this is done, as Liming pointed out, some code that compiles today may break. If this is not done, variables declared with

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Andrew Fish
> On Mar 27, 2017, at 8:35 AM, Kinney, Michael D > wrote: > > Felix, > > I prefer the default policy to break the build if multiple defined symbols > are detected. > +1 Thanks, Andrew Fish > Exceptions should only be allowed to support a specific compiler or

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Kinney, Michael D
Felix, I prefer the default policy to break the build if multiple defined symbols are detected. Exceptions should only be allowed to support a specific compiler or a specific level of compiler optimizations. I do like the addition of the /Gw switch to the newer VS compilers. Adding the

Re: [edk2] [RFC] GLOBAL_REMOVE_IF_UNREFERENCED, multiply defined symbols, and MSFT/GCC tool chains.

2017-03-27 Thread Felix Poludov
Liming, Yes surrounding GLOBAL_REMOVE_IF_UNREFERENCED with #ifndef would be an improvement. Can you make this change? On the other note, don't you think that EDKII should have a generic policy regarding multiply defined symbols (whether they are allowed or not)? Today, they may or may not work

[edk2] [PATCH] MdeModulePkg/SmmCore: Fix memory leak on Profile unregistered.

2017-03-27 Thread Jiewen Yao
Issue reported at bugzillar 445. Cc: Jeff Fan Cc: Feng Tian Cc: Star Zeng Cc: Bret Barkelew Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiewen Yao ---

Re: [edk2] [PATCH 3/3] ArmPkg/ArmExceptionLib: use EL0 stack for synchronous exceptions

2017-03-27 Thread Ard Biesheuvel
On 27 March 2017 at 13:54, Ard Biesheuvel wrote: > On 22 March 2017 at 13:18, Leif Lindholm wrote: >> On Mon, Mar 20, 2017 at 08:53:01PM +, Ard Biesheuvel wrote: >>> In order to be able to produce meaningful diagnostic output when taking

Re: [edk2] [PATCH 3/3] ArmPkg/ArmExceptionLib: use EL0 stack for synchronous exceptions

2017-03-27 Thread Ard Biesheuvel
On 22 March 2017 at 13:18, Leif Lindholm wrote: > On Mon, Mar 20, 2017 at 08:53:01PM +, Ard Biesheuvel wrote: >> In order to be able to produce meaningful diagnostic output when taking >> synchronous exceptions that have been caused by corruption of the stack >>

Re: [edk2] [RFC PATCH v2 03/10] OvmfPkg/PlatformPei: Add Secure Encrypted Virutualization (SEV) support

2017-03-27 Thread Brijesh Singh
On Mon, Mar 27, 2017 at 3:23 AM, Laszlo Ersek wrote: > Please fix the typo ("Virutualization") in the subject. > > On 03/21/17 22:13, Brijesh Singh wrote: > > Initialize Secure Encrypted Virtualization support and set the memory > encryption mask PCD. > > Please wrap commit

[edk2] [PATCH] MdeModulePkg/PeiCore: avoid EFI_IMAGE_MACHINE_TYPE_SUPPORTED to check arch

2017-03-27 Thread Ard Biesheuvel
The EFI_IMAGE_MACHINE_TYPE_SUPPORTED() macro is abused in the PeiCore code to decide whether the system we are compiling for can deal with executable code being copied elsewhere and executed from there. As stated in the comment, this is fundamentally a property of the compiler target, and so this

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Brijesh Singh
On Mon, Mar 27, 2017 at 2:57 AM, Fan, Jeff wrote: > Laszlo, > > One Amd directory under UefiCpuPkg/Include/Register is better. > > Does Brijesh/Leo have any comments, or have other suggestions? > > I am not sure if creating a new UefiCpuPkg/Include/Register/Amd/Cpuid is a

[edk2] [PATCH] MdeModulePkg/DxeCore: add missing id-to-string mapping for AARCH64

2017-03-27 Thread Ard Biesheuvel
Add a mapping for EFI_IMAGE_MACHINE_AARCH64 to mMachineTypeInfo[] Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel --- MdeModulePkg/Core/Dxe/Image/Image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [edk2] [RFC PATCH v2 10/10] OvmfPkg/QemuVideoDxe: Clear the C-bit from framebuffer region when SEV is enabled

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > Since the framebuffer memory region is shared between the guest and hypervisor > hence we must clear the memory encryption bit from this memory region when SEV > is enabled. > > Signed-off-by: Brijesh Singh > --- >

[edk2] Administrator Password Problem

2017-03-27 Thread Sergio Perales Tornero
Good morning everyone, This is my first time asking for a problem, so if this isn't the right place please tell me. I'm trying to set an "Administrator Password" to EDKII BIOS Intel MinnowBoard Firmware version 0.92 without success. I introduce password twice, I do F10 and "Save and Commit

Re: [edk2] [RFC PATCH v2 09/10] OvmfPkg/QemuFwCfgLib: Add Secure Encrypted Virtualization (SEV) support

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > The patch adds SEV support in QemuFwCfgLib. When SEV is enabled: > > * Pei phase support IO-style operations. This is mainly because we need to >use a bounce buffer inorder to support DMA operation. Allocate a memory >for bounce buffer can get

[edk2] [PATCH] EmbeddedPkg: add DT platform driver to select between DT and ACPI

2017-03-27 Thread Ard Biesheuvel
As a follow up to the changes proposed by Laszlo to make ACPI and DT mutually exclusive on ArmVirtQemu, this patch proposes a DT platform DXE driver that either installs the NULL protocol PlatformHasAcpiGuid, or installs the FV embedded DTB binary as a configuration table under the appropriate

Re: [edk2] [RFC PATCH v2 04/10] OvmfPkg/BaseMemcryptSevLib: Add SEV helper library

2017-03-27 Thread Laszlo Ersek
On 03/27/17 11:19, Laszlo Ersek wrote: > On 03/21/17 22:13, Brijesh Singh wrote: >> + Returns a boolean to indicate whether SEV is enabled >> + >> + @retval TRUE When SEV is active >> + @retval FALSE When SEV is not enabled >> + **/ >> +BOOLEAN >> +EFIAPI >>

Re: [edk2] [PATCH v2 05/11] CryptoPkg/OpensslLib: Add new OpenSSL-HOWTO document.

2017-03-27 Thread Gary Lin
On Thu, Mar 23, 2017 at 09:19:26PM +0800, Qin Long wrote: > Add one new OpenSSL-HOWTO.txt to introduce how to clone / download > the latest OpenSSL release source for build. > ALso update buildinf.h to reflect the latest update time. > > Cc: Ting Ye > Cc: Laszlo Ersek

Re: [edk2] [PATCH v2 09/11] CryptoPkg: Update HMAC Wrapper with opaque HMAC_CTX object.

2017-03-27 Thread Gary Lin
On Thu, Mar 23, 2017 at 07:37:08PM +0100, Laszlo Ersek wrote: > On 03/23/17 14:19, Qin Long wrote: > > OpenSSL-1.1.xx makes most data structures opaque. > > This patch updated HMAC Wrapper implementation with opaque > > HMAC_CTX object. > > The HmacXXGetContextSize() is marked as deprecated, and

Re: [edk2] [PATCH v2 10/11] CryptoPkg: Update PK Cipher Wrappers work with opaque objects.

2017-03-27 Thread Gary Lin
On Thu, Mar 23, 2017 at 09:19:31PM +0800, Qin Long wrote: > OpenSSL-1.1.xx makes most data structures opaque. > This patch updates Public Key Cipher Wrapper implementations in > BaseCryptLib to use the accessor APIs for opaque object access. > The impacted interfaces includes RSA, DH, X509, PKCS7,

Re: [edk2] [PATCH v2 07/11] CryptoPkg: Clean-up CRT Library Wrapper.

2017-03-27 Thread Gary Lin
On Thu, Mar 23, 2017 at 09:19:28PM +0800, Qin Long wrote: > Cleaning-up CRT Library Wrapper for the third-party cryptography > library building. The changes includes > 1. Rename OpenSslSupport.h to CrtLibSupport.h for future alternative >crypto provider support. > 2. Remove all un-referenced

Re: [edk2] [PATCH v2 06/11] CryptoPkg: Fix handling of function pointers

2017-03-27 Thread Gary Lin
On Thu, Mar 23, 2017 at 09:19:27PM +0800, Qin Long wrote: > In a couple of places, OpenSSL code uses the address of the > strcmp() function, and assigns it to another comparator function > pointer. > > Unfortunately, this falls foul of the inconsistent function ABI > that we use in EDKII. We

Re: [edk2] [PATCH v2 01/11] CryptoPkg/OpensslLib: Update INF files to support OpenSSL-1.1.0x build

2017-03-27 Thread Gary Lin
On Thu, Mar 23, 2017 at 09:19:22PM +0800, Qin Long wrote: > Update OpensslLib INF files to support OpenSSL-1.1.0x source build. > The file list was generated from the latest OpenSSL-1.1.0e release. > > Main changes to support OpensslLib build in this patch include: > 1. Use "openssl" instead of

Re: [edk2] [RFC PATCH v2 08/10] OvmfPkg/QemuFwCfgLib: Provide Pei and Dxe specific library support

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > Current QemuFwCfgLib.inf is used in both Pei and Dxe phases. The patch adds > Pei and Dxe inf file to provide a seperate QemuFwCfg library for Pei and Dxe > phases. There is no code change in this patch other than rearranging the files > and updating inf

Re: [edk2] [RFC PATCH v2 07/10] OvmfPkg/BmDmaLib: Add SEV support

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > When SEV is enabled, the DMA operations must be performed on a shared > (i.e unencrypted) pages. The patch adds SEV specific hooks to use the > bounce buffer when caller map/unmap host address to a DMA address and > similarly clears/set memory encryption

Re: [edk2] [RFC PATCH v2 05/10] OvmfPkg/DxeBmDmaLib: Import DxeBmDmaLib package

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > Import DxeBmDmaLib package in OvmfPkg, we need to modify the package to > include SEV support. > > The BmDmaLib is proposed by Leo Duran > https://lists.01.org/pipermail/edk2-devel/2017-March/008109.html > > Signed-off-by: Brijesh Singh

Re: [edk2] [RFC PATCH v2 06/10] OvmfPkg/DxeBmDmaLib: Fix AllocateBounceBuffer parameter

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > The patch fixes AllocateBounceBuffer parameters. > > Signed-off-by: Brijesh Singh > --- > OvmfPkg/Library/DxeBmDmaLib/DxeBmDmaLib.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [edk2] [RFC PATCH v2 04/10] OvmfPkg/BaseMemcryptSevLib: Add SEV helper library

2017-03-27 Thread Laszlo Ersek
On 03/21/17 22:13, Brijesh Singh wrote: > Add Secure Encrypted Virtualization (SEV) helper library. The library provides > the routines to set or clear memory encryption bit for a given memory region > and functions to check whether SEV is enabled. Please rewrap this commit message to 74

Re: [edk2] [RFC PATCH v2 03/10] OvmfPkg/PlatformPei: Add Secure Encrypted Virutualization (SEV) support

2017-03-27 Thread Laszlo Ersek
Please fix the typo ("Virutualization") in the subject. On 03/21/17 22:13, Brijesh Singh wrote: > Initialize Secure Encrypted Virtualization support and set the memory > encryption mask PCD. Please wrap commit messages at 74 characters. > > Signed-off-by: Brijesh Singh

[edk2] [PATCH 12/12] OvmfPkg QemuFlashFvbServicesRuntimeDxe: Cleanup init now done in PEI

2017-03-27 Thread Jordan Justen
This is now done in PEI since commit "OvmfPkg PlatformPei: Set flash variable PCDs". Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- .../FvbServicesRuntimeDxe.inf | 4

[edk2] [PATCH 11/12] OvmfPkg: Enable PEI variable access

2017-03-27 Thread Jordan Justen
We have to make sure PlatformPei runs early to set flash variable PCDs, so we add it to the APIORI list. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/OvmfPkgIa32.dsc| 2 ++

[edk2] [PATCH 08/12] OvmfPkg/EmuVariableFvbRuntimeDxe: Use PcdOvmfFlashVariablesEnable

2017-03-27 Thread Jordan Justen
Previously we looked at PcdFlashNvStorageVariableBase64, which would not be set unless flash was in use, but soon we will set PcdFlashNvStorageVariableBase64 even for the memory based variable store. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [PATCH 10/12] OvmfPkg PlatformPei: Initialize memory based variable store buffer

2017-03-27 Thread Jordan Justen
This is similar to the initialization in OvmfPkg/EmuVariableFvbRuntimeDxe/Fvb.c. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/PlatformPei/PlatformPei.inf | 1 +

[edk2] [PATCH 06/12] OvmfPkg QemuFlash: Add DetectFlashBaseLib.inf 'NULL' library

2017-03-27 Thread Jordan Justen
This library attempts to detect QEMU flash. If writable flash is detected, then PcdOvmfFlashVariablesEnable is set to TRUE. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen ---

[edk2] [PATCH 04/12] OvmfPkg QemuFlash: Make QemuFlash.* Base class safe

2017-03-27 Thread Jordan Justen
We will create a small 'NULL' base library to detect flash in PEI. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c | 30

[edk2] [PATCH 05/12] OvmfPkg QemuFlash: Make QemuFlashDetected external

2017-03-27 Thread Jordan Justen
QemuFlashDetected is also changed to not use global variables. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/QemuFlashFvbServicesRuntimeDxe/QemuFlash.c | 29 +-

[edk2] [PATCH 07/12] OvmfPkg PlatformPei: Detect and set PcdOvmfFlashVariablesEnable

2017-03-27 Thread Jordan Justen
Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/OvmfPkgIa32.dsc| 5 - OvmfPkg/OvmfPkgIa32X64.dsc | 5 - OvmfPkg/OvmfPkgX64.dsc | 5 - 3 files changed, 12

[edk2] [PATCH 09/12] OvmfPkg PlatformPei: Set flash variable PCDs

2017-03-27 Thread Jordan Justen
This allows the PEI based variable drivers to run. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/PlatformPei/Platform.c | 34 +- OvmfPkg/PlatformPei/Platform.h |

[edk2] [PATCH 03/12] OvmfPkg: resolve PcdLib for PEIMs to PeiPcdLib by default

2017-03-27 Thread Jordan Justen
From: Laszlo Ersek In the previous patch we had to add two explicit Null resolutions, but here we can remove five PeiPcdLib ones, after setting the default to it. Cc: Jordan Justen Contributed-under: TianoCore Contribution Agreement 1.0

[edk2] [PATCH 02/12] OvmfPkg: resolve PcdLib for all PEIMs individually

2017-03-27 Thread Jordan Justen
From: Laszlo Ersek Currently the default (module type independent) PcdLib resolution is to BasePcdLibNull.inf, which is inherited by all PEIMs. In the next patch, we'll flip the PEIM default resolution to PeiPcdLib.inf, but in order to keep that patch both correct and simple

[edk2] [PATCH 00/12] OvmfPkg: Enable variable access in PEI

2017-03-27 Thread Jordan Justen
web: https://github.com/jljusten/edk2/tree/pei-vars-v1 git: https://github.com/jljusten/edk2.git pei-vars-v1 This series moves flash detection into PEI to allow the PEI variable access drivers to run. If flash is writable, the PCDs are set to point at the flash memory. If flash is not writable,

[edk2] [PATCH 01/12] OvmfPkg/build.sh: Add support for --disable-flash switch

2017-03-27 Thread Jordan Justen
This is mainly useful to test the boot paths when flash hasn't been enabled. Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen --- OvmfPkg/build.sh | 10 -- 1 file changed, 8

Re: [edk2] [RFC PATCH v2 01/10] OvmfPkg/Include: Define SEV specific CPUID and MSR

2017-03-27 Thread Fan, Jeff
Laszlo, One Amd directory under UefiCpuPkg/Include/Register is better. Does Brijesh/Leo have any comments, or have other suggestions? Thanks! Jeff -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Thursday, March 23, 2017 5:20 PM To: Fan, Jeff; Brijesh Singh;

[edk2] [PATCH] UefiCpuPkg/MpLib.c: Add checking CR0 PG bit

2017-03-27 Thread Jeff Fan
If CR0 PG bit is not set, it means paging is enabled on BSP. Thus, Execute Disable feature is not working actually. We cannot enable it on APs. Cc: Feng Tian Cc: Michael Kinney Contributed-under: TianoCore Contribution Agreement 1.0

Re: [edk2] [PATCH v2 05/12] ArmPkg: introduce EDKII Platform Has ACPI Protocol, and plug-in library

2017-03-27 Thread Ard Biesheuvel
On 27 March 2017 at 03:42, Gao, Liming wrote: > Laszlo: > On GUID header file, some header file are here, because they are added > before BaseTools supports it. Now, we allow not to add header file if the > header file only has GUID value definition. I have to agree

[edk2] [Patch] MdeModulePkg/DxeHttpLib: Fix the incorrect return status if URI port is invalid

2017-03-27 Thread Jiaxin Wu
Cc: Zhang Lubo Cc: Ye Ting Cc: Fu Siyuan Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 15 +++

Re: [edk2] [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support.

2017-03-27 Thread Ni, Ruiyu
Thank you! Thanks/Ray From: Yao, Jiewen Sent: Monday, March 27, 2017 2:24 PM To: Ni, Ruiyu ; edk2-devel@lists.01.org Cc: Leo Duran ; Brijesh Singh Subject: RE: [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support. Yes. I

Re: [edk2] [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support.

2017-03-27 Thread Yao, Jiewen
Yes. I agree. If there is an error, we should fix it at all places. I will also invite the module owner to double check your comment. Thank you Yao Jiewen From: Ni, Ruiyu Sent: Monday, March 27, 2017 2:19 PM To: Yao, Jiewen ; edk2-devel@lists.01.org Cc: Leo Duran

Re: [edk2] [RFC] [PATCH 3/3] MdeModulePkg/PciBus: Add IOMMU support.

2017-03-27 Thread Ni, Ruiyu
#1. If PciHostBridge driver doesn't consume IOMMU protocol, will the change in PciBus driver cause any negative impact? #2. Please check the PciHostBridgeDxe driver (searching “Maps”). It contains the code to manage the mapping in a list. Actually you modified the Map/Unmap code,

Re: [edk2] [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support.

2017-03-27 Thread Ni, Ruiyu
For #1, thank you for the explanation. I have no concerns. For #2, I agree copying code is a very fast way to do implementation. But it is also a very fast way to spread incorrectness. So copying is not encouraged. Can you check my comments in details to see whether

Re: [edk2] [RFC] [PATCH 3/3] MdeModulePkg/PciBus: Add IOMMU support.

2017-03-27 Thread Yao, Jiewen
Answer below: From: Ni, Ruiyu Sent: Monday, March 27, 2017 1:40 PM To: Yao, Jiewen ; edk2-devel@lists.01.org Cc: Leo Duran ; Brijesh Singh Subject: RE: [RFC] [PATCH 3/3] MdeModulePkg/PciBus: Add IOMMU support. #1. If PciHostBridge

Re: [edk2] [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support.

2017-03-27 Thread Yao, Jiewen
Answer below: From: Ni, Ruiyu Sent: Monday, March 27, 2017 1:32 PM To: Yao, Jiewen ; edk2-devel@lists.01.org Cc: Leo Duran ; Brijesh Singh Subject: RE: [RFC] [PATCH 2/3] MdeModulePkg/PciHostBridge: Add IOMMU support. Jiewen, #1. In