Re: [edk2-devel] [Patch V4 10/10] BaseTools/tools_def.template: Add -gdwarf to XCODE5 X64

2019-08-15 Thread Liming Gao
Reviewed-by: Liming Gao >-Original Message- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Michael D Kinney >Sent: Friday, August 16, 2019 10:15 AM >To: devel@edk2.groups.io >Cc: Justen, Jordan L ; Ni, Ray ; >Andrew Fish >Subject: [edk2-devel] [Patch V4 10/10]

Re: [edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-15 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: Kuo, Donald > Sent: Thursday, August 15, 2019 5:11 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Zeng, Star ; Dong, Eric > ; Chan, Amy ; Chaganty, > Rangasai V > Subject: [PATCH] UefiCpuPkg: Adding a new TSC library by using

Re: [edk2-devel] [PATCH 1/1] UefiCpuPkg/Cpuid: Add description for parameter LeafFunction

2019-08-15 Thread Dong, Eric
Reviewed-by: Eric Dong > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Zhang, Shenglei > Sent: Thursday, August 15, 2019 4:15 PM > To: devel@edk2.groups.io > Cc: Dong, Eric ; Ni, Ray ; Laszlo > Ersek > Subject: [edk2-devel] [PATCH 1/1]

Re: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Initialize local variables

2019-08-15 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Zhang, Shenglei > Sent: Thursday, August 15, 2019 1:42 PM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > Gao, Zhichao > Subject:

Re: [edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Replace shift logical left

2019-08-15 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao Thanks, Zhichao > -Original Message- > From: Zhang, Shenglei > Sent: Thursday, August 15, 2019 3:38 PM > To: devel@edk2.groups.io > Cc: Carsey, Jaben ; Ni, Ray ; > Gao, Zhichao > Subject: [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Replace shift > logical

Re: [edk2-devel] [PATCH v6 0/5] Build cache enhancement

2019-08-15 Thread Bob Feng
For this patch set, Reviewed-by: Bob Feng -Original Message- From: Shi, Steven Sent: Thursday, August 15, 2019 10:26 PM To: devel@edk2.groups.io Cc: Gao, Liming ; Feng, Bob C ; Rodriguez, Christian ; Johnson, Michael ; ler...@redhat.com; leif.lindh...@linaro.org; af...@apple.com;

Re: [edk2-devel] [PATCH v1 00/11] Test against invalid pointers in acpiview

2019-08-15 Thread Liming Gao
Krzysztof: Can you submit BZ in https://bugzilla.tianocore.org/ for this change? Thanks Liming >-Original Message- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Krzysztof Koch >Sent: Thursday, August 15, 2019 9:11 PM >To: devel@edk2.groups.io >Cc: Carsey,

Re: [edk2-devel] [PATCH 1/1] CryptoPkg/OpensslLib: Add missing header files in INF file

2019-08-15 Thread Wang, Jian J
Pushed at 8906f076de35b222a7d62bcf6ed1a4a2498a5791 Regards, Jian > -Original Message- > From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of > Wang, Jian J > Sent: Thursday, August 15, 2019 4:59 PM > To: Zhang, Shenglei ; devel@edk2.groups.io > Cc: Ye, Ting > Subject:

[edk2-devel] [Patch v4 5/6] UefiCpuPkg/RegisterCpuFeaturesLib: Supports test then write new value logic.

2019-08-15 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 Supports new logic which test current value before write new value. Only write new value when current value not same as new value. Signed-off-by: Eric Dong Cc: Ray Ni Acked-by: Laszlo Ersek --- .../CpuFeaturesInitialize.c

[edk2-devel] [Patch v4 3/6] UefiCpuPkg/PiSmmCpuDxeSmm: Supports test then write new value logic.

2019-08-15 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 Supports new logic which test current value before write new value. Only write new value when current value not same as new value. Signed-off-by: Eric Dong Cc: Ray Ni Reviewed-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 29

[edk2-devel] [Patch v4 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-15 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 Add below new micros which test the current value before write the new value. Only write new value when current value not same as new value. CPU_REGISTER_TABLE_TEST_THEN_WRITE32 CPU_REGISTER_TABLE_TEST_THEN_WRITE64

[edk2-devel] [Patch v4 6/6] UefiCpuPkg/CpuCommonFeaturesLib: Use new macros.

2019-08-15 Thread Dong, Eric
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2040 Below code is current implementation: if (MsrRegister[ProcessorNumber].Bits.Lock == 0) { CPU_REGISTER_TABLE_WRITE_FIELD ( ProcessorNumber, Msr, MSR_IA32_FEATURE_CONTROL, MSR_IA32_FEATURE_CONTROL_REGISTER,

[edk2-devel] [Patch v4 2/6] UefiCpuPkg/PiSmmCpuDxeSmm: Combine CR read/write action.

2019-08-15 Thread Dong, Eric
Signed-off-by: Eric Dong Cc: Ray Ni Reviewed-by: Laszlo Ersek --- UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c | 104 ++ 1 file changed, 62 insertions(+), 42 deletions(-) diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c b/UefiCpuPkg/PiSmmCpuDxeSmm/CpuS3.c index

[edk2-devel] [Patch v4 0/6] Add "test then write" mechanism

2019-08-15 Thread Dong, Eric
v4 changes: 1. Split Reserved field and use one byte as TestThenWrite field. v3 changes: 1. Avoid changing exist API CpuRegisterTableWrite, add new API CpuRegisterTableTestThenWrite which align new adds macros. Only 1/6 patch been changed in v3. V2 changes: 1. Split CR read/write action in to

[edk2-devel] [Patch v4 4/6] UefiCpuPkg/RegisterCpuFeaturesLib: Combine CR read/write action.

2019-08-15 Thread Dong, Eric
Signed-off-by: Eric Dong Cc: Ray Ni Acked-by: Laszlo Ersek --- .../CpuFeaturesInitialize.c | 110 ++ 1 file changed, 63 insertions(+), 47 deletions(-) diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c

Re: [edk2-devel] [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-15 Thread Liming Gao
Eric: >-Original Message- >From: Dong, Eric >Sent: Friday, August 16, 2019 10:20 AM >To: Zeng, Star ; devel@edk2.groups.io >Cc: Ni, Ray ; Laszlo Ersek ; Yao, >Jiewen ; Gao, Liming ; >Kinney, Michael D >Subject: RE: [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test >Then Write"

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-15 Thread Yao, Jiewen
Comment below: > -Original Message- > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Friday, August 16, 2019 12:21 AM > To: Laszlo Ersek ; devel@edk2.groups.io; Yao, Jiewen > > Cc: edk2-rfc-groups-io ; qemu devel list > ; Igor Mammedov ; > Chen, Yingwen ; Nakajima, Jun > ;

Re: [edk2-devel] [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-15 Thread Dong, Eric
> -Original Message- > From: Zeng, Star > Sent: Friday, August 16, 2019 10:08 AM > To: Dong, Eric ; devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek ; Yao, > Jiewen ; Gao, Liming ; Kinney, > Michael D ; Zeng, Star > Subject: RE: [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add

[edk2-devel] [Patch V4 05/10] EmulatorPkg/Unix/Host: Disable inline/optimizations

2019-08-15 Thread Michael D Kinney
* Disable XCODE5 compiler optimizations fort Unix/Host. * Disable inline of SecGdbScriptBreak() to improve compatibility with XCODE5 * For X64 XCODE5 builds place output Host application in $(BIN_DIR) to match all other EmulatorPkg Host application builds. Cc: Jordan Justen Cc: Andrew Fish

[edk2-devel] [Patch V4 03/10] EmulatorPkg: Add -D DISABLE_NEW_DEPRECATED_INTERFACES

2019-08-15 Thread Michael D Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=162 Update EmulatorPkg specific modules and libraries to use safe string functions in BaseLib and safe PcdSetxx() functions in PcdLib. With these updates, the define DISABLE_NEW_DEPRECATED_INTERFACES is enabled in the DSC file. Cc: Jordan Justen

[edk2-devel] [Patch V4 07/10] EmulatorPkg/Unix/Host: Fix BerkeleyPacketFilter.c issues

2019-08-15 Thread Michael D Kinney
* Fix uninitialized Private->ReadBuffer. * Remove old debug code that generates an exception. Cc: Jordan Justen Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Andrew Fish --- EmulatorPkg/Unix/Host/BerkeleyPacketFilter.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git

Re: [edk2-devel] [PATCH 1/1] CryptoPkg/OpensslLib: Add missing header files in INF file

2019-08-15 Thread Wang, Jian J
Shenglei, Sorry that I forgot to mention that these two inf files are generated by process_files.pl in the same folder. Please file another BZ to update this perl script to add those header files into inf file. Regards, Jian > -Original Message- > From: devel@edk2.groups.io

[edk2-devel] [Patch V4 01/10] EmulatorPkg: Fix VS20xx IA32 boot failure

2019-08-15 Thread Michael D Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=2056 The IA32 build of the EmulatorPkg for VS20xx does not boot because the default value of PCD PcdPeiServicesTablePage rarely succeeds to be mapped on IA32 Windows Host Environments. Change the DEC default value for this PCD to a value that is

[edk2-devel] [Patch V4 09/10] EmulatorPkg/Sec: Change local variable scope for XCODE5

2019-08-15 Thread Michael D Kinney
The local variable PpiArray[10] is declared in middle of the SEC module _ModuleEntryPoint(). When building for XCODE5 with optimizations enabled, this results in corruption and an exception. The fix is to move the declaration of PpiArray[10] to the standard location at the beginning of the

[edk2-devel] [Patch V4 06/10] EmulatorPkg: Fix XCODE5 lldb issues

2019-08-15 Thread Michael D Kinney
Fix scripts to support lldb symbolic debugging when using XCODE5 tool chain. Cc: Jordan Justen Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Andrew Fish --- EmulatorPkg/Unix/lldbefi.py | 8 +--- EmulatorPkg/build.sh| 17 ++--- 2 files changed, 7 insertions(+), 18

[edk2-devel] [Patch V4 02/10] EmulatorPkg: Remove UNIX_SEC_BUILD/WIN_SEC_BUILD

2019-08-15 Thread Michael D Kinney
https://bugzilla.tianocore.org/show_bug.cgi?id=2055 Remove the use of the defines UNIX_SEC_BUILD and WIN_SEC_BUILD. This simplifies the build command for the EmulatorPkg. Instead, use !if statements in the DSC file using $(ARCH) and $(FAMILY) to determine if the build is for a Windows or POSIX

[edk2-devel] [Patch V4 08/10] EmulatorPkg: Disable TftpDynamicCommand and LogoDxe for XCODE5

2019-08-15 Thread Michael D Kinney
Disable TftpDynamicCommand for XCODE5 because this command places HII content in an PE/COFF resource section that is not supported by the XCODE5 tool chain, and the missing HII content causes the load of this command to ASSERT(). Disable the LogoDxe module that places the logo bitmap in a PE/COFF

[edk2-devel] [Patch V4 00/10] EmulatorPkg: Fix VS20xx IA32 boot and simplify build config

2019-08-15 Thread Michael D Kinney
New in V4 (Resolve XCODE5 issues) == * Disable inline if SecGdbScriptBreak() for XCODE5 issues * Disable XCODE5 compiler optimizations of Unix/Host * Fix Host output location for XCODE5 X64 builds * Update lldb scripts for XCODE5 symbiolic debugging * Clean up

[edk2-devel] [Patch V4 10/10] BaseTools/tools_def.template: Add -gdwarf to XCODE5 X64

2019-08-15 Thread Michael D Kinney
Add -gdwarf to XCODE5 X64 builds to generate symbols for source level debug using lldb. Cc: Jordan Justen Cc: Ray Ni Cc: Michael D Kinney Signed-off-by: Andrew Fish --- BaseTools/Conf/tools_def.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[edk2-devel] [Patch V4 04/10] EmulatorPkg: Add support for NOOPT target

2019-08-15 Thread Michael D Kinney
Add NOOPT to BUILD_TARGETS in DSC file. Cc: Jordan Justen Cc: Andrew Fish Cc: Ray Ni Signed-off-by: Michael D Kinney Reviewed-by: Hao A Wu Reviewed-by: Jordan Justen --- EmulatorPkg/EmulatorPkg.dsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [edk2-devel] [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-15 Thread Zeng, Star
> -Original Message- > From: Dong, Eric > Sent: Friday, August 16, 2019 9:27 AM > To: Zeng, Star ; devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek > Subject: RE: [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test > Then Write" Macros. > > > -Original Message- > >

Re: [edk2-devel] ovmf build fail with gcc 4.8.5

2019-08-15 Thread Chen, Farrah
Thanks, we use the latest commit and it works well now. Thanks, Fan -Original Message- From: Laszlo Ersek [mailto:ler...@redhat.com] Sent: Tuesday, August 13, 2019 8:23 PM To: devel@edk2.groups.io; Chen, Farrah Cc: Hao, Xudong Subject: Re: [edk2-devel] ovmf build fail with gcc

Re: [edk2-devel] [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-15 Thread Dong, Eric
> -Original Message- > From: Zeng, Star > Sent: Friday, August 16, 2019 9:15 AM > To: Dong, Eric ; devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek ; Zeng, > Star > Subject: RE: [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test > Then Write" Macros. > > > > > -Original

Re: [edk2-devel] [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then Write" Macros.

2019-08-15 Thread Zeng, Star
> -Original Message- > From: Dong, Eric > Sent: Thursday, August 15, 2019 10:51 AM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Laszlo Ersek ; Zeng, > Star > Subject: [Patch v3 1/6] UefiCpuPkg/RegisterCpuFeaturesLib: Add "Test Then > Write" Macros. > > REF:

Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry

2019-08-15 Thread Wu, Hao A
> -Original Message- > From: Gao, Liming > Sent: Thursday, August 15, 2019 4:31 PM > To: Wu, Hao A; Zhang, Shenglei; devel@edk2.groups.io > Cc: Bi, Dandan > Subject: RE: [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer > PageMapLevel5Entry > > That's fine. Thanks! > >

[edk2-devel] Determining TSC frequency programmatically

2019-08-15 Thread Vitaly Cheptsov via Groups.Io
Hello, I initially raised this question in a new TimerLib patch[1], but as the discussion was getting more distracted, I decided to create a separate thread in hopes new people could join. The issue is that our UEFI bootloader needs to obtain TSC frequency to pass it to our specialised

Re: [edk2-devel] [edk2-platform patch 7/7] Platform/Intel: Add build option for SIMICS QSP Platform

2019-08-15 Thread Nate DeSimone
Hi David, Here are my comments: 1. Please remove " Contributed-under: TianoCore Contribution Agreement 1.0" from your commit message as it is no longer needed. 2. Please don't add this entry: WhiskeylakeURvp = WhiskeylakeOpenBoardPkg/WhiskeylakeURvp/build_config.cfg WhiskeylakeOpenBoardPkg

Re: [edk2-devel] [edk2-platform patch 4/7] SimicsOpenBoardPkg: Add DXE driver for Legacy Sio

2019-08-15 Thread Nate DeSimone
Hi David, Here are my comments: 1. What is the purpose of this driver? My guess this is just a dummy driver that provides the EFI_SIO_PROTOCOL and does resource management without actually accessing the SIO? 2. All of the copyright years need to be updated to 2019. 3. Please remove "

Re: [edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-15 Thread Michael D Kinney
Vitaly, When implementing a UEFI Application, if you want maximum compatibility, you should use UEFI Services/Protocols and minimize as many HW assumptions as possible. I understand, especially for accurate time and clock related services, the that the UEFI Specification defined

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-15 Thread Igor Mammedov
On Thu, 15 Aug 2019 17:00:16 +0200 Laszlo Ersek wrote: > On 08/14/19 16:04, Paolo Bonzini wrote: > > On 14/08/19 15:20, Yao, Jiewen wrote: > >>> - Does this part require a new branch somewhere in the OVMF SEC code? > >>> How do we determine whether the CPU executing SEC is BSP or > >>>

Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro

2019-08-15 Thread Michael D Kinney
Reviewed-by: Michael D Kinney Mike > -Original Message- > From: devel@edk2.groups.io > [mailto:devel@edk2.groups.io] On Behalf Of vit9696 via > Groups.Io > Sent: Tuesday, August 13, 2019 1:17 AM > To: devel@edk2.groups.io > Subject: [edk2-devel] [PATCH v2 1/1] MdePkg: Add >

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-15 Thread Paolo Bonzini
On 15/08/19 11:55, Yao, Jiewen wrote: > Hi Paolo > I am not sure what do you mean - "You do not need a reset vector ...". > If so, where is the first instruction of the new CPU in the virtualization > environment? > Please help me understand that at first. Then we can continue the discussion.

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-15 Thread Igor Mammedov
On Wed, 14 Aug 2019 16:04:50 +0200 Paolo Bonzini wrote: > On 14/08/19 15:20, Yao, Jiewen wrote: > >> - Does this part require a new branch somewhere in the OVMF SEC code? > >> How do we determine whether the CPU executing SEC is BSP or > >> hot-plugged AP? > > [Jiewen] I think this is

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-15 Thread Laszlo Ersek
On 08/14/19 16:04, Paolo Bonzini wrote: > On 14/08/19 15:20, Yao, Jiewen wrote: >>> - Does this part require a new branch somewhere in the OVMF SEC code? >>> How do we determine whether the CPU executing SEC is BSP or >>> hot-plugged AP? >> [Jiewen] I think this is blocked from hardware

[edk2-devel] [PATCH v6 4/5] BaseTools: Add GenFds multi-thread support in build cache

2019-08-15 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1923 Fix the issue that the GenFds multi-thread will build fail if enable the build cache together. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/ModuleAutoGen.py | 23

[edk2-devel] [PATCH v6 3/5] BaseTools: Change the [Arch][Name] module key in Build cache

2019-08-15 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1951 Current build cache use the module's [self.Arch][self.Name] info as the ModuleAutoGen object key in hash list and dictionary. The [self.Arch][self.Name] is not safe as the module key because there could be two modules

[edk2-devel] [PATCH v6 5/5] BaseTools: Improve the file saving and copying reliability

2019-08-15 Thread Steven Shi
From: "Shi, Steven" BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=2079 The Basetool CopyFileOnChange() and SaveFileOnChange() functions might raise the IOError occasionally when build in Windows with multi-process and build cache enabled. The CopyFileOnChange() and SaveFileOnChange() might

[edk2-devel] [PATCH v6 1/5] BaseTools: Improve the cache hit in the edk2 build cache

2019-08-15 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1927 Current cache hash algorithm does not parse and generate the makefile to get the accurate dependency files for a module. It instead use the platform and package meta files to get the module depenedency in a quick but

[edk2-devel] [PATCH v6 2/5] BaseTools: Print first cache missing file for build cachle

2019-08-15 Thread Steven Shi
From: "Shi, Steven" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1925 When a module build cache miss, add support to print the first cache missing file path and name. Cc: Liming Gao Cc: Bob Feng Signed-off-by: Steven Shi --- BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 2 ++

[edk2-devel] [PATCH v6 0/5] Build cache enhancement

2019-08-15 Thread Steven Shi
From: "Shi, Steven" This patch set is for the 201908 stable tag Enhance the edk2 build cache with below patches: Patch 01/05: Improve the cache hit rate through new cache checkpoint and hash algorithm Patch 02/05: Print more info to explain why a module build cache miss Patch 03/05: Fix the

[edk2-devel] [PATCH v1 11/11] ShellPkg: acpiview: DBG2: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if global (in the scope of the DBG2 parser) pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof]

[edk2-devel] [PATCH v1 10/11] ShellPkg: acpiview: GTDT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if global (in the scope of the GTDT parser) pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof]

[edk2-devel] [PATCH v1 07/11] ShellPkg: acpiview: MADT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if the MadtInterruptControllerType and MadtInterruptControllerLength pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof]

[edk2-devel] [PATCH v1 09/11] ShellPkg: acpiview: IORT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if global (in the scope of the IORT parser) pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof]

[edk2-devel] [PATCH v1 08/11] ShellPkg: acpiview: PPTT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if the NumberOfPrivateResources, ProcessorTopologyStructureType and ProcessorTopologyStructureLength pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof]

[edk2-devel] [PATCH v1 05/11] ShellPkg: acpiview: SLIT: Validate System Locality count

2019-08-15 Thread Krzysztof Koch
1. Check if the 'Number of System Localities' provided can be represented in the SLIT table. The table 'Length' field is a 32-bit value while the 'Number of System Localities' field is 64-bit long. 2. Check if the SLIT matrix fits in the table buffer. If N is the SLIT locality count, then the

[edk2-devel] [PATCH v1 01/11] ShellPkg: acpiview: Set ItemPtr to NULL for unprocessed table fields

2019-08-15 Thread Krzysztof Koch
For fields outside the buffer length provided, reset any pointers, which were supposed to be updated by a ParseAcpi() function call to NULL. This way one can easily validate if a pointer was successfully updated. The ParseAcpi() function parses the given ACPI table buffer by a number of bytes

[edk2-devel] [PATCH v1 02/11] ShellPkg: acpiview: RSDP: Validate global pointer before use

2019-08-15 Thread Krzysztof Koch
Check if XsdtAddress pointer has been successfully updated before it is used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c | 12 1

[edk2-devel] [PATCH v1 03/11] ShellPkg: acpiview: FADT: Validate global pointer before use

2019-08-15 Thread Krzysztof Koch
Check if global pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c | 14 ++ 1

Re: [edk2-devel] [edk2-platforms: PATCH 1/1] Platforms/RPi3: Add multiple embedded Device Tree selection

2019-08-15 Thread Pete Batard
Hi Leif, On 2019.08.15 13:13, Leif Lindholm wrote: On Mon, Aug 12, 2019 at 02:06:34PM +0100, Pete Batard wrote: The Raspberry Pi 3 platform currently has 2 different models, each with a different Device Tree. Rather than embedding a single one, and requiring users to manually provide the

[edk2-devel] [PATCH v1 00/11] Test against invalid pointers in acpiview

2019-08-15 Thread Krzysztof Koch
Prevent the use of invalid pointers when parsing ACPI tables in the UEFI shell acpiview tool. The parsing of ACPI tables is often controlled with the values read earlier from the same table. For example, the 'Offset' or 'Count' fields found in a structure are later used to parse the

[edk2-devel] [PATCH v1 04/11] ShellPkg: acpiview: SLIT: Validate global pointer before use

2019-08-15 Thread Krzysztof Koch
Check if SlitSystemLocalityCount pointer has been successfully updated before it is used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Slit/SlitParser.c | 16

[edk2-devel] [PATCH v1 06/11] ShellPkg: acpiview: SRAT: Validate global pointers before use

2019-08-15 Thread Krzysztof Koch
Check if SratRAType and SratRALength pointers have been successfully updated before they are used for further table parsing. Signed-off-by: Krzysztof Koch --- Notes: v1: - Test against NULL pointers [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c |

Re: [edk2-devel] [PATCH v1 0/1] Added GOP driver for DisplayLink-based Universal USB Docks to edk2-platforms

2019-08-15 Thread Andy Hayes
On Thu, Aug 15, 2019 at 10:15:48AM +, Andy Hayes wrote: > Thanks very much for the very quick feedback from both of you - I > really appreciate it. I'll fix the issues that you pointed out and > re-submit the patch. Thanks! > I've been testing the build with VisualStudio 2015 and GCC 7.3.

Re: [edk2-devel] [edk2-platforms: PATCH 1/1] Platforms/RPi3: Add multiple embedded Device Tree selection

2019-08-15 Thread Leif Lindholm
On Mon, Aug 12, 2019 at 02:06:34PM +0100, Pete Batard wrote: > The Raspberry Pi 3 platform currently has 2 different models, each with a > different Device Tree. Rather than embedding a single one, and requiring > users to manually provide the other, this patch ensures that we now embed > both and

Re: [edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-15 Thread Vitaly Cheptsov via Groups.Io
Hi Donald, Glad to hear it helped a little, and sorry for some outdated quotes. Your clarification regarding model range is very helpful. Xeon W being client and thus having client clock makes sense, though I must say it was quite not obvious. I was referring to the same SDM table, and it

Re: [edk2-devel] [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx

2019-08-15 Thread Zhang, Shenglei
Jian, Yes, you are right. According to CCS_2_1_Draft, 4.3.3.3, Pointer variables may optionally be prefixed with a 'p'. So please skip this change. Thanks, Shenglei > -Original Message- > From: Wang, Jian J > Sent: Thursday, August 15, 2019 5:01 PM > To: Zhang, Shenglei ;

Re: [edk2-devel] [PATCH v5 00/35] Specific platform to run OVMF in Xen PVH and HVM guests

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:30, Anthony PERARD wrote: > Patch series available in this git branch: > https://xenbits.xen.org/git-http/people/aperard/ovmf.git > br.platform-xen-pvh-v5 > > Changes in v5: > - patch 23 got a rework of the lapic range skipping > - small fixups in patch 20, 22, 23, 31, 32, 33. >

Re: [edk2-devel] CPU hotplug using SMM with QEMU+OVMF

2019-08-15 Thread Yao, Jiewen
Hi Paolo I am not sure what do you mean - "You do not need a reset vector ...". If so, where is the first instruction of the new CPU in the virtualization environment? Please help me understand that at first. Then we can continue the discussion. Thank you Yao Jiewen > -Original Message-

Re: [edk2-devel] [PATCH v5 32/35] OvmfPkg: Introduce PcdXenGrantFrames

2019-08-15 Thread Laszlo Ersek
On 08/15/19 11:40, Laszlo Ersek wrote: > On 08/13/19 13:31, Anthony PERARD wrote: >> Introduce PcdXenGrantFrames to replace a define in XenBusDxe and allow >> the same value to be used in a different module. >> >> The reason for the number of page to be 4 doesn't exist anymore, so >> simply remove

Re: [edk2-devel] [PATCH v5 33/35] OvmfPkg: Introduce XenIoPvhDxe to initialize Grant Tables

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:31, Anthony PERARD wrote: > XenIoPvhDxe use XenIoMmioLib to reserve some space to be use by the > Grant Tables. > > The call is only done if it is necessary, we simply detect if the > guest is PVH, as in this case there is currently no PCI bus, and no > PCI Xen platform device

Re: [edk2-devel] [PATCH v5 32/35] OvmfPkg: Introduce PcdXenGrantFrames

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:31, Anthony PERARD wrote: > Introduce PcdXenGrantFrames to replace a define in XenBusDxe and allow > the same value to be used in a different module. > > The reason for the number of page to be 4 doesn't exist anymore, so > simply remove the comment. > > Signed-off-by: Anthony

Re: [edk2-devel] [PATCH v5 31/35] OvmfPkg/PlatformBootManagerLib: Use a Xen console for ConOut/ConIn

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:31, Anthony PERARD wrote: > On a Xen PVH guest, none of the existing serial or console interface > works, so we add a new one, based on XenConsoleSerialPortLib, and > implemented via SerialDxe. > > That is a simple console implementation that can work on both PVH > guest and HVM

Re: [edk2-devel] [PATCH V2 00/10] Multiple Controllers Support solution

2019-08-15 Thread Liming Gao
Eric: I push the change for edk2platform. And, I push the remaining patches a6ee24fbddcd901347014e045611eb6108f4f741..a5944b6a13e227da23daa0ab59b5d6f4b06bb49b Thanks Liming >-Original Message- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Liming Gao >Sent:

Re: [edk2-devel] [PATCH v5 23/35] OvmfPkg/XenPlatformPei: Rework memory detection

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:31, Anthony PERARD wrote: > When running as a Xen PVH guest, there is no CMOS to read the memory > size from. Rework GetSystemMemorySize(Below|Above)4gb() so they can > work without CMOS by reading the e820 table. > > Rework XenPublishRamRegions to also care for the reserved and

Re: [edk2-devel] [PATCH v2 0/3] add DwMmcHcDxe driver

2019-08-15 Thread Loh, Tien Hock
Hi Leif, Ard, Christopher, Haojian and I have tested the driver on 2 platforms, any further comments on this? Thanks Tien Hock > -Original Message- > From: Haojian Zhuang > Sent: Tuesday, July 30, 2019 3:33 PM > To: Loh, Tien Hock ; leif.lindh...@linaro.org; >

[edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-15 Thread Donald Kuo
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1909 Cc: Ray Ni Cc: Star Zeng Cc: Eric Dong Cc: Amy Chan Cc: Rangasai V Chaganty Signed-off-by: Donald Kuo --- UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.c | 41 +++ UefiCpuPkg/Library/CpuTimerLib/BaseCpuTimerLib.inf | 35 +++

Re: [edk2-devel] [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx

2019-08-15 Thread Wang, Jian J
Shenglei, I remember the edk2 coding style allows prefix 'p' (optional) to represent a pointer variable. Regards, Jian > -Original Message- > From: Zhang, Shenglei > Sent: Thursday, August 15, 2019 4:49 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Ye, Ting > Subject: [PATCH

Re: [edk2-devel] [PATCH v5 22/35] OvmfPkg/XenPlatformPei: no hvmloader: get the E820 table via hypercall

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:31, Anthony PERARD wrote: > When the Xen PVH entry point has been used, hvmloader hasn't run and > hasn't prepared an E820 table. The only way left to get an E820 table > is to ask Xen via an hypercall. We keep the result cached to avoid > making a second hypercall which would give

Re: [edk2-devel] [PATCH 1/1] CryptoPkg/OpensslLib: Add missing header files in INF file

2019-08-15 Thread Wang, Jian J
Reviewed-by: Jian J Wang > -Original Message- > From: Zhang, Shenglei > Sent: Tuesday, August 13, 2019 4:50 PM > To: devel@edk2.groups.io > Cc: Wang, Jian J ; Ye, Ting > Subject: [PATCH 1/1] CryptoPkg/OpensslLib: Add missing header files in INF > file > > The header files are used

Re: [edk2-devel] [PATCH v5 20/35] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected

2019-08-15 Thread Laszlo Ersek
On 08/13/19 13:31, Anthony PERARD wrote: > XenPvhDetected() can be used to figure out if OVMF has started via the > Xen PVH entry point. > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689 > Signed-off-by: Anthony PERARD > Acked-by: Laszlo Ersek > --- > > Notes: > v5: > - in

[edk2-devel] [PATCH 1/1] CryptoPkg/BaseCryptLib: Update pHkdfCtx to PHkdfCtx

2019-08-15 Thread Zhang, Shenglei
Update pHkdfCtx to PHkdfCtx, to follow the variable naming rule. Cc: Jian Wang Cc: Ting Ye Signed-off-by: Shenglei Zhang --- .../Library/BaseCryptLib/Kdf/CryptHkdf.c | 22 +-- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

Re: [edk2-devel] [PATCH 1/1] CryptoPkg/OpensslLib: Add missing header files in INF file

2019-08-15 Thread Liming Gao
Reviewed-by: Liming Gao >-Original Message- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Zhang, Shenglei >Sent: Tuesday, August 13, 2019 4:50 PM >To: devel@edk2.groups.io >Cc: Wang, Jian J ; Ye, Ting >Subject: [edk2-devel] [PATCH 1/1] CryptoPkg/OpensslLib: Add

Re: [edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-15 Thread Donald Kuo
Hi Vitaly, Appreciated for reviewing very detail. And looks your captured some piece of code is older version. And should be ok, I do got your point. Item #1 - I do missed RegEax error handling in case for CpuidCoreClockCalculateTscFrequency () should return 0 and EFI_UNSUPPORTED.

Re: [edk2-devel] [edk2-platform patch 1/7] SimicsX58SktPkg: Add CPU Pkg for SimicsX58

2019-08-15 Thread Nate DeSimone
Hi David, Here are my comments: 1. All of the copyright years need to be updated to 2019. 2. Please remove " Contributed-under: TianoCore Contribution Agreement 1.0" from your commit message as it is no longer needed. 3. Silicon/Intel/SimicsX58SktPkg/Override/UefiCpuPkg/SecCore/SecMain.c -

Re: [edk2-devel] [edk2-non-osi][PATCH V2 2/2] edk2-non-osi: Add CoffeelakeSiliconBinPkg maintainers

2019-08-15 Thread Chaganty, Rangasai V
Reviewed-by: Sai Chaganty -Original Message- From: Kubacki, Michael A Sent: Wednesday, August 14, 2019 9:15 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Chiu, Chasel ; Desimone, Nathaniel L ; Kinney, Michael D Subject: [edk2-non-osi][PATCH V2 2/2] edk2-non-osi: Add

Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry

2019-08-15 Thread Liming Gao
That's fine. Thanks! >-Original Message- >From: Wu, Hao A >Sent: Thursday, August 15, 2019 3:23 PM >To: Gao, Liming ; Zhang, Shenglei >; devel@edk2.groups.io >Cc: Bi, Dandan >Subject: RE: [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer >PageMapLevel5Entry > >> -Original

Re: [edk2-devel] [edk2-non-osi patch 1/1] SimicsICH10SiliconBinPkg: Add UNDI ROM for SIMICS QSP Platform

2019-08-15 Thread Nate DeSimone
Hi David, Please add an .inf file to make it convenient for the platform code to include this binary. Please see the following for an example: edk2-non-osi/Platform/Hisilicon/Drivers/Sm750Dxe/UefiSmi.inf Also, please add the Maintainers.txt entries and change the package name per my previous

[edk2-devel] [PATCH 1/1] UefiCpuPkg/Cpuid: Add description for parameter LeafFunction

2019-08-15 Thread Zhang, Shenglei
LeafFunction needs to be described in comments. https://bugzilla.tianocore.org/show_bug.cgi?id=2052 Cc: Eric Dong Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Shenglei Zhang --- UefiCpuPkg/Application/Cpuid/Cpuid.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[edk2-devel] [PATCH 1/1] ShellPkg/UefiShellAcpiViewCommandLib: Replace shift logical left

2019-08-15 Thread Zhang, Shenglei
Replace the operation to shift logical left with the function LShiftU64, which has the same functionality. The original code causes ShellPkg build failure with build target"-b NOOPT". Cc: Jaben Carsey Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Shenglei Zhang ---

Re: [edk2-devel] [PATCH v2 1/1] MdePkg: Add STATIC_ASSERT macro

2019-08-15 Thread Yao, Jiewen
Acked-by: Jiewen Yao Reviewed-by: Jiewen Yao From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Vitaly Cheptosv via Groups.Io Sent: Thursday, August 15, 2019 10:22 AM To: Gao, Liming ; devel@edk2.groups.io; Yao, Jiewen ; Kinney, Michael D Cc: Laszlo Ersek ;

Re: [edk2-devel] [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer PageMapLevel5Entry

2019-08-15 Thread Wu, Hao A
> -Original Message- > From: Gao, Liming > Sent: Thursday, August 15, 2019 10:27 AM > To: Zhang, Shenglei; devel@edk2.groups.io > Cc: Bi, Dandan; Wu, Hao A > Subject: RE: [PATCH v2 1/1] MdeModulePkg/DxeIplPeim: Initialize pointer > PageMapLevel5Entry > > Shenglei: > > > -Original

Re: [edk2-devel] [PATCH] UefiCpuPkg: Adding a new TSC library by using CPUID(0x15) TSC leaf

2019-08-15 Thread Vitaly Cheptsov via Groups.Io
Hello, Thank you for the patch! I reviewed the code and noticed select issues explained below. 1. The following construction: if (RegEbx == 0) { DEBUG ((DEBUG_ERROR, "The CPU is not capble for Core Crystal Clock Frequency !!\n")); ASSERT (RegEbx != 0); } Does not look good to me, and in my

Re: [edk2-devel] [edk2-non-osi][PATCH V2 2/2] edk2-non-osi: Add CoffeelakeSiliconBinPkg maintainers

2019-08-15 Thread Nate DeSimone
Reviewed-by: Nate DeSimone -Original Message- From: Kubacki, Michael A Sent: Wednesday, August 14, 2019 9:15 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Chiu, Chasel ; Desimone, Nathaniel L ; Kinney, Michael D Subject: [edk2-non-osi][PATCH V2 2/2] edk2-non-osi: Add