Re: [edk2-devel] [PATCH] MinPlatformPkg: FSP Python script to python 3.x.

2019-06-27 Thread Bob Feng
Patch looks good.

Reviewed-by: Bob Feng 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42973): https://edk2.groups.io/g/devel/message/42973
Mute This Topic: https://groups.io/mt/32192703/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] ArmVirtPkg: handle NETWORK_TLS_ENABLE in ArmVirtQemu*

2019-06-27 Thread Gary Lin
On Mon, Jun 24, 2019 at 09:13:36PM +0200, Laszlo Ersek wrote:
> Port the [LibraryClasses], [PcdsFixedAtBuild] and [Components] settings
> that are related to NETWORK_TLS_ENABLE from OvmfPkg to ArmVirtPkg.
> ArmVirtXen is not modified because it doesn't include the edk2 network
> stack.
> 
> (This change is now simpler than it would have been when TianoCore#1009
> was originally filed, due to ArmVirtPkg consuming the NetworkPkg include
> fragments meanwhile, from TianoCore#1293 / commit 157a3b1aa50f.)
> 
> The usage hints from "OvmfPkg/README", section "HTTPS Boot", apply.
> 
I tested both HTTPS IPv4 and IPv6, and it worked as expected.
The bootloader was loaded after enrolling the correct certificate, and
the firmware rejected the connection when enrolling the wrong
certificate.

Tested-by: Gary Lin 

> Cc: Ard Biesheuvel 
> Cc: Gary Lin 
> Cc: Guillaume GARDET 
> Cc: Julien Grall 
> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1009
> Signed-off-by: Laszlo Ersek 
> ---
> 
> Notes:
> Repo:   https://github.com/lersek/edk2.git
> Branch: armvirt_tls_bz1009
> 
>  ArmVirtPkg/ArmVirt.dsc.inc   |  7 +++
>  ArmVirtPkg/ArmVirtQemu.dsc   | 18 ++
>  ArmVirtPkg/ArmVirtQemuKernel.dsc | 18 ++
>  3 files changed, 35 insertions(+), 8 deletions(-)
> 
> diff --git a/ArmVirtPkg/ArmVirt.dsc.inc b/ArmVirtPkg/ArmVirt.dsc.inc
> index 20bf011617a1..a4ae25d982a2 100644
> --- a/ArmVirtPkg/ArmVirt.dsc.inc
> +++ b/ArmVirtPkg/ArmVirt.dsc.inc
> @@ -71,6 +71,9 @@ [LibraryClasses.common]
>
># Networking Requirements
>  !include NetworkPkg/NetworkLibs.dsc.inc
> +!if $(NETWORK_TLS_ENABLE) == TRUE
> +  TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf
> +!endif
>
>
>#
> @@ -136,7 +139,11 @@ [LibraryClasses.common]
># CryptoPkg libraries needed by multiple firmware features
>#
>IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf
> +!if $(NETWORK_TLS_ENABLE) == TRUE
> +  OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf
> +!else
>OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
> +!endif
>BaseCryptLib|CryptoPkg/Library/BaseCryptLib/BaseCryptLib.inf
>
>#
> diff --git a/ArmVirtPkg/ArmVirtQemu.dsc b/ArmVirtPkg/ArmVirtQemu.dsc
> index cf28478977e1..7ae6702ac1f0 100644
> --- a/ArmVirtPkg/ArmVirtQemu.dsc
> +++ b/ArmVirtPkg/ArmVirtQemu.dsc
> @@ -43,10 +43,6 @@ [Defines]
>!error "NETWORK_SNP_ENABLE is IA32/X64/EBC only"
>  !endif
>
> -!if $(NETWORK_TLS_ENABLE) == TRUE
> -  !error "NETWORK_TLS_ENABLE is tracked at 
> "
> -!endif
> -
>  !include NetworkPkg/NetworkDefines.dsc.inc
>
>  !include ArmVirtPkg/ArmVirt.dsc.inc
> @@ -113,6 +109,14 @@ [PcdsFixedAtBuild.common]
>gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
> +!if $(NETWORK_TLS_ENABLE) == TRUE
> +  #
> +  # The cumulative and individual VOLATILE variable size limits should be set
> +  # high enough for accommodating several and/or large CA certificates.
> +  #
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x8
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x4
> +!endif
>
># Size of the region used by UEFI in permanent memory (Reserved 64MB)
>gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize|0x0400
> @@ -372,6 +376,12 @@ [Components.common]
># Networking stack
>#
>  !include NetworkPkg/NetworkComponents.dsc.inc
> +!if $(NETWORK_TLS_ENABLE) == TRUE
> +  NetworkPkg/TlsAuthConfigDxe/TlsAuthConfigDxe.inf {
> +
> +  NULL|OvmfPkg/Library/TlsAuthConfigLib/TlsAuthConfigLib.inf
> +  }
> +!endif
>
>#
># SCSI Bus and Disk Driver
> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.dsc 
> b/ArmVirtPkg/ArmVirtQemuKernel.dsc
> index 596e59739cab..3b0f04967a4b 100644
> --- a/ArmVirtPkg/ArmVirtQemuKernel.dsc
> +++ b/ArmVirtPkg/ArmVirtQemuKernel.dsc
> @@ -43,10 +43,6 @@ [Defines]
>!error "NETWORK_SNP_ENABLE is IA32/X64/EBC only"
>  !endif
>
> -!if $(NETWORK_TLS_ENABLE) == TRUE
> -  !error "NETWORK_TLS_ENABLE is tracked at 
> "
> -!endif
> -
>  !include NetworkPkg/NetworkDefines.dsc.inc
>
>  !include ArmVirtPkg/ArmVirt.dsc.inc
> @@ -118,6 +114,14 @@ [PcdsFixedAtBuild.common]
>gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize|0x4000
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000
>gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
> +!if $(NETWORK_TLS_ENABLE) == TRUE
> +  #
> +  # The cumulative and individual VOLATILE variable size limits should be set
> +  # high enough for accommodating several and/or large CA certificates.
> +  #
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdVariableStoreSize|0x8
> +  gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVolatileVariableSize|0x4
> +!endif
>
># Size of the region used by UEFI in permanent memory (Reserved 

[edk2-devel] [PATCH 3/3] MdePkg/BaseLib: Base64Decode: Add decription for RETURN_SUCCESS

2019-06-27 Thread Gao, Zhichao
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1891

While the convertion Base64 ascii string is null string (the
string only contain white space would be regard as null string),
there would be no decodeable data. Set *DestinationSize to zero
and return RETURN_SUCCESS. But it is not mention in the comment
of the function. So add this decription.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Laszlo Ersek 
Signed-off-by: Zhichao Gao 
---
 MdePkg/Library/BaseLib/String.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Library/BaseLib/String.c b/MdePkg/Library/BaseLib/String.c
index 7ebc2ecddd..8829d2cbbf 100644
--- a/MdePkg/Library/BaseLib/String.c
+++ b/MdePkg/Library/BaseLib/String.c
@@ -1929,7 +1929,8 @@ Base64Encode (
   @param DestinationSize   Caller is responsible for passing in buffer of at 
least DestinationSize.
Set 0 to get the size needed. Set to bytes stored 
on return.
 
-  @retval RETURN_SUCCESS When binary buffer is filled in.
+  @retval RETURN_SUCCESS When binary buffer is filled in. Or if 
the Base64 ascii string is empty, set
+ *DestinationSize to zero to indicate this 
case.
   @retval RETURN_INVALID_PARAMETER   If Source is NULL or DestinationSize is 
NULL.
   @retval RETURN_INVALID_PARAMETER   If SourceLength or DestinationSize is 
bigger than (MAX_ADDRESS -(UINTN)Destination ).
   @retval RETURN_INVALID_PARAMETER   If there is any invalid character in 
input stream.
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42971): https://edk2.groups.io/g/devel/message/42971
Mute This Topic: https://groups.io/mt/32238990/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] EmbeddedPkg: Fix various typos

2019-06-27 Thread Cœur
Fix various typos in EmbeddedPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
.../AndroidFastboot/AndroidBootImg.c          |  2 +-
.../AndroidFastboot/AndroidFastbootApp.c      |  2 +-
.../Drivers/ConsolePrefDxe/ConsolePrefDxe.c   |  2 +-
.../Drivers/DtPlatformDxe/DtPlatformDxe.c     |  2 +-
.../Drivers/Isp1761UsbDxe/Isp1761UsbDxe.c     |  4 ++--
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118Dxe.c   |  2 +-
EmbeddedPkg/Drivers/Lan9118Dxe/Lan9118DxeHw.h |  2 +-
.../Drivers/Lan9118Dxe/Lan9118DxeUtil.c       |  2 +-
EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxe.c     |  2 +-
EmbeddedPkg/Drivers/Lan91xDxe/Lan91xDxeHw.h   |  2 +-
.../SataSiI3132Dxe/SiI3132AtaPassThru.c       |  2 +-
EmbeddedPkg/EmbeddedPkg.dsc                   |  2 +-
EmbeddedPkg/GdbStub/Arm/Processor.c           |  2 +-
EmbeddedPkg/GdbStub/GdbStub.c                 | 20 
EmbeddedPkg/GdbStub/GdbStubInternal.h         | 24 +--
EmbeddedPkg/GdbStub/Ia32/Processor.c          |  4 ++--
EmbeddedPkg/GdbStub/SerialIo.c                | 24 +--
EmbeddedPkg/GdbStub/X64/Processor.c           |  4 ++--
.../Include/Library/DebugAgentTimerLib.h      |  2 +-
EmbeddedPkg/Include/Library/EfiFileLib.h      |  6 ++---
EmbeddedPkg/Include/Library/GdbSerialLib.h    |  8 +++
EmbeddedPkg/Include/Library/PrePiLib.h        |  4 ++--
.../Protocol/AndroidFastbootPlatform.h        |  4 ++--
.../Include/Protocol/HardwareInterrupt.h      |  2 +-
EmbeddedPkg/Include/Protocol/PeCoffLoader.h   |  4 ++--
.../DebugAgentTimerLib.c                      |  2 +-
.../GdbSerialDebugPortLib.c                   |  8 +++
.../Library/GdbSerialLib/GdbSerialLib.c       |  8 +++
EmbeddedPkg/Library/PrePiHobLib/Hob.c         |  2 +-
EmbeddedPkg/Library/PrePiLib/FwVol.c          |  4 ++--
.../MemoryAllocationLib.c                     |  2 +-
.../RealTimeClockLib.c                        |  4 ++--
.../SimpleTextInOutSerial/SimpleTextInOut.c   |  2 +-
EmbeddedPkg/Universal/MmcDxe/Mmc.h            |  2 +-
34 files changed, 84 insertions(+), 84 deletions(-)

diff --git a/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c 
b/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
index 896ad29afc..54b7bee162 100644
--- a/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
+++ b/EmbeddedPkg/Application/AndroidFastboot/AndroidBootImg.c
@@ -9,7 +9,7 @@
#include "AndroidFastbootApp.h"

// Find the kernel and ramdisk in an Android boot.img.
-// return EFI_INVALID_PARAMTER if the boot.img is invalid (i.e. doesn't have 
the
+// return EFI_INVALID_PARAMETER if the boot.img is invalid (i.e. doesn't have 
the
//  right magic value),
// return EFI_NOT_FOUND if there was no kernel in the boot.img.
// Note that the Ramdisk is optional - *Ramdisk won't be touched if it isn't
diff --git a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c 
b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
index c8e89173e6..3e3f4b7eb2 100644
--- a/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
+++ b/EmbeddedPkg/Application/AndroidFastboot/AndroidFastbootApp.c
@@ -300,7 +300,7 @@ AcceptCmd (
} else if (IS_LOWERCASE_ASCII (Command[0])) {
// Commands starting with lowercase ASCII characters are reserved for the
// Fastboot protocol. If we don't recognise it, it's probably the future
-    // and there are new commmands in the protocol.
+    // and there are new commands in the protocol.
// (By the way, the "oem" command mentioned above makes this reservation
//  redundant, but we handle it here to be spec-compliant)
SEND_LITERAL ("FAILCommand not recognised. Check Fastboot version.");
diff --git a/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c 
b/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c
index 8d0ffbe88d..c250844eda 100644
--- a/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c
+++ b/EmbeddedPkg/Drivers/ConsolePrefDxe/ConsolePrefDxe.c
@@ -224,7 +224,7 @@ OnReadyToBoot (
@retval EFI_ALREADY_STARTED     The driver already exists in system.
@retval EFI_OUT_OF_RESOURCES    Fail to execute entry point due to lack of
resources.
-  @retval EFI_SUCCES              All the related protocols are installed on
+  @retval EFI_SUCCESS             All the related protocols are installed on
the driver.

**/
diff --git a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c 
b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c
index 5ec95f7491..907d46a495 100644
--- a/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c
+++ b/EmbeddedPkg/Drivers/DtPlatformDxe/DtPlatformDxe.c
@@ -92,7 +92,7 @@ InstallHiiPages (
@retval EFI_ALREADY_STARTED     The driver already exists in system.
@retval EFI_OUT_OF_RESOURCES    Fail to execute entry point due to lack of
resources.
-  @retval EFI_SUCCES              All the related protocols are installed on
+  @retval EFI_SUCCESS             All the related protocols are installed on
the driver.

**/
diff --git a/EmbeddedPkg/Drivers/Isp1761UsbDxe/Isp1761UsbDxe.c 

[edk2-devel] [PATCH] ArmPlatformPkg: Fix various typos

2019-06-27 Thread Cœur
>From 0fdb05b34e5bfdcbd92d21cdf446eec06cf9035f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Antoine=20C=C5=93ur?= 
Date: Wed, 6 Feb 2019 23:40:38 +0800
Subject: [PATCH] ArmPlatformPkg: Fix various typos

Fix various typos in ArmPlatformPkg.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Coeur 
---
ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c   | 4 ++--
ArmPlatformPkg/Include/Library/ArmPlatformLib.h    | 2 +-
ArmPlatformPkg/Include/Library/PL011UartLib.h      | 2 +-
ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c | 2 +-
ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c      | 2 +-
ArmPlatformPkg/PlatformPei/PlatformPeim.c          | 2 +-
ArmPlatformPkg/PrePeiCore/PrePeiCore.c             | 2 +-
ArmPlatformPkg/PrePi/PrePi.c                       | 2 +-
8 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c 
b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
index 468dd00ae8..d9e196cbf1 100644
--- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
+++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.c
@@ -1109,7 +1109,7 @@ NorFlashWriteSingleBlock (
@retval EFI_SUCCESS           The data was read correctly from the device.
@retval EFI_DEVICE_ERROR      The device reported an error while performing the 
read.
@retval EFI_NO_MEDIA          There is no media in the device.
-  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current 
device.
+  @retval EFI_MEDIA_CHANGED     The MediaId does not match the current device.
@retval EFI_INVALID_PARAMETER The read request contains device addresses that 
are not
valid for the device.

@@ -1154,7 +1154,7 @@ NorFlashDiskIoReadDisk (
@retval EFI_WRITE_PROTECTED   The device can not be written to.
@retval EFI_DEVICE_ERROR      The device reported an error while performing the 
write.
@retval EFI_NO_MEDIA          There is no media in the device.
-  @retval EFI_MEDIA_CHNAGED     The MediaId does not matched the current 
device.
+  @retval EFI_MEDIA_CHANGED     The MediaId does not match the current device.
@retval EFI_INVALID_PARAMETER The write request contains device addresses that 
are not
valid for the device.

diff --git a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h 
b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
index b6cd647d05..225183af2c 100644
--- a/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
+++ b/ArmPlatformPkg/Include/Library/ArmPlatformLib.h
@@ -14,7 +14,7 @@
//
#include 
//
-// The protocols, PPI and GUID defintions for this module
+// The protocols, PPI and GUID definitions for this module
//
#include 
#include 
diff --git a/ArmPlatformPkg/Include/Library/PL011UartLib.h 
b/ArmPlatformPkg/Include/Library/PL011UartLib.h
index 7108587350..3bd2e294b0 100644
--- a/ArmPlatformPkg/Include/Library/PL011UartLib.h
+++ b/ArmPlatformPkg/Include/Library/PL011UartLib.h
@@ -112,7 +112,7 @@ PL011UartSetControl (
. EFI_SERIAL_OUTPUT_BUFFER_EMPTY : equal to one if the
transmit buffer is empty, 0 otherwise.
. EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE : equal to one if
-                           the hardware loopback is enabled (the ouput feeds 
the
+                           the hardware loopback is enabled (the output feeds 
the
receive buffer), 0 otherwise.
. EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE : equal to one if
a loopback is accomplished by software, 0 otherwise.
diff --git a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c 
b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
index 20a53be02e..801990d955 100644
--- a/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
+++ b/ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.c
@@ -321,7 +321,7 @@ PL011UartSetControl (
. EFI_SERIAL_OUTPUT_BUFFER_EMPTY : equal to one if the
transmit buffer is empty, 0 otherwise.
. EFI_SERIAL_HARDWARE_LOOPBACK_ENABLE : equal to one if
-                           the hardware loopback is enabled (the ouput feeds 
the
+                           the hardware loopback is enabled (the output feeds 
the
receive buffer), 0 otherwise.
. EFI_SERIAL_SOFTWARE_LOOPBACK_ENABLE : equal to one if
a loopback is accomplished by software, 0 otherwise.
diff --git a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c 
b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
index 485dad0ac8..027fa11a89 100644
--- a/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
+++ b/ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.c
@@ -9,7 +9,7 @@
#include 

//
-// The protocols, PPI and GUID defintions for this module
+// The protocols, PPI and GUID definitions for this module
//
#include 
#include 
diff --git a/ArmPlatformPkg/PlatformPei/PlatformPeim.c 
b/ArmPlatformPkg/PlatformPei/PlatformPeim.c
index 27687e9c7e..ca5a31116a 100644
--- a/ArmPlatformPkg/PlatformPei/PlatformPeim.c
+++ b/ArmPlatformPkg/PlatformPei/PlatformPeim.c
@@ -9,7 +9,7 @@
#include 

//
-// The protocols, PPI and GUID defintions for this module
+// The protocols, PPI and GUID definitions for this module
//
#include 
#include 
diff --git a/ArmPlatformPkg/PrePeiCore/PrePeiCore.c 

[edk2-devel] [Patch 1/1] BaseTools: Detect the change of env variable used in tooldef.txt

2019-06-27 Thread Bob Feng
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1921

Add TOOLS_DEF.ARCH file to all workspace meta files list.
TOOLS_DEF.ARCH include the evaluated Tool definition information
which is filtered by current tool_chain.

With this change, when the environment variable which
is used in ToolDef.txt is changed, build tool will
rebuild the platform.

Signed-off-by: Bob Feng 
Cc: Liming Gao 
Cc: Michael D Kinney 
Cc: Steven Shi 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index e8e09dc8a366..24592593c868 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -792,10 +792,13 @@ class WorkspaceAutoGen(AutoGen):
 
 # add PcdToken Number file for Dynamic/DynamicEx Pcd
 #
 AllWorkSpaceMetaFiles.add(os.path.join(self.BuildDir, 
'PcdTokenNumber'))
 
+for Pa in self.AutoGenObjectList:
+AllWorkSpaceMetaFiles.add(Pa.ToolDefinitionFile)
+
 for Arch in self.ArchList:
 #
 # add dec
 #
 for Package in PlatformAutoGen(self, self.MetaFile, Target, 
Toolchain, Arch).PackageList:
@@ -1859,11 +1862,11 @@ class PlatformAutoGen(AutoGen):
 def ToolDefinition(self):
 ToolDefinition = self.Workspace.ToolDef.ToolsDefTxtDictionary
 if TAB_TOD_DEFINES_COMMAND_TYPE not in 
self.Workspace.ToolDef.ToolsDefTxtDatabase:
 EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, "No tools found 
in configuration",
 ExtraData="[%s]" % self.MetaFile)
-RetVal = {}
+RetVal = OrderedDict()
 DllPathList = set()
 for Def in ToolDefinition:
 Target, Tag, Arch, Tool, Attr = Def.split("_")
 if Target != self.BuildTarget or Tag != self.ToolChain or Arch != 
self.Arch:
 continue
@@ -1873,11 +1876,11 @@ class PlatformAutoGen(AutoGen):
 if Attr == "DLL":
 DllPathList.add(Value)
 continue
 
 if Tool not in RetVal:
-RetVal[Tool] = {}
+RetVal[Tool] = OrderedDict()
 RetVal[Tool][Attr] = Value
 
 ToolsDef = ''
 if GlobalData.gOptions.SilentMode and "MAKE" in RetVal:
 if "FLAGS" not in RetVal["MAKE"]:
-- 
2.20.1.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42965): https://edk2.groups.io/g/devel/message/42965
Mute This Topic: https://groups.io/mt/32238757/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] ArmPkg: Fix various typos

2019-06-27 Thread Cœur
Fix various typos in ArmPkg.
Same as https://github.com/tianocore/edk2/pull/143/files

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42964): https://edk2.groups.io/g/devel/message/42964
Mute This Topic: https://groups.io/mt/32238697/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



patch.diff
Description: Binary data


Re: [edk2-devel] [PATCH] SecurityPkg/DxeDeferImageLoadLib: Remove DxeDeferImageLoadLib

2019-06-27 Thread Wang, Jian J
Reviewed-by: Jian J Wang 

> -Original Message-
> From: Zhang, Shenglei
> Sent: Thursday, June 20, 2019 9:31 AM
> To: devel@edk2.groups.io
> Cc: Zhang, Chao B ; Yao, Jiewen
> ; Wang, Jian J 
> Subject: [PATCH] SecurityPkg/DxeDeferImageLoadLib: Remove
> DxeDeferImageLoadLib
> 
> The library DxeDeferImageLoadLib supports UID feature and it is conflicted
> with the driver SecurityStubDxe (Defer3rdPartyImageLoad.c).
> And the UID feature is dropped. So it should be removed from SecurityPkg.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1919
> 
> Cc: Chao Zhang 
> Cc: Jiewen Yao 
> Cc: Jian Wang 
> Signed-off-by: Shenglei Zhang 
> ---
>  .../DxeDeferImageLoadLib.c| 927 --
>  .../DxeDeferImageLoadLib.h|  99 --
>  .../DxeDeferImageLoadLib.inf  |  63 --
>  .../DxeDeferImageLoadLib.uni  |  18 -
>  SecurityPkg/SecurityPkg.dsc   |   1 -
>  5 files changed, 1108 deletions(-)
>  delete mode 100644
> SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.c
>  delete mode 100644
> SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.h
>  delete mode 100644
> SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.inf
>  delete mode 100644
> SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.uni
> 
> diff --git
> a/SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.c
> b/SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.c
> deleted file mode 100644
> index a6a3fe3cfc68..
> --- a/SecurityPkg/Library/DxeDeferImageLoadLib/DxeDeferImageLoadLib.c
> +++ /dev/null
> @@ -1,927 +0,0 @@
> -/** @file
> -  Implement defer image load services for user identification in UEFI2.2.
> -
> -Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
> -SPDX-License-Identifier: BSD-2-Clause-Patent
> -
> -**/
> -
> -#include "DxeDeferImageLoadLib.h"
> -
> -//
> -// Handle for the Deferred Image Load Protocol instance produced by this
> driver.
> -//
> -EFI_HANDLE   mDeferredImageHandle = NULL;
> -BOOLEAN  mIsProtocolInstalled = FALSE;
> -EFI_USER_MANAGER_PROTOCOL*mUserManager= NULL;
> -DEFERRED_IMAGE_TABLE mDeferredImage   = {
> -  0,   // Deferred image count
> -  NULL // The deferred image info
> -};
> -
> -EFI_DEFERRED_IMAGE_LOAD_PROTOCOL gDeferredImageLoad   = {
> -  GetDefferedImageInfo
> -};
> -
> -/**
> -  Get the image type.
> -
> -  @param[in]FileThis is a pointer to the device path of the file
> -that is being dispatched.
> -
> -  @return   UINT32  Image Type
> -
> -**/
> -UINT32
> -GetFileType (
> -  IN  CONST EFI_DEVICE_PATH_PROTOCOL   *File
> -  )
> -{
> -  EFI_STATUSStatus;
> -  EFI_HANDLEDeviceHandle;
> -  EFI_DEVICE_PATH_PROTOCOL  *TempDevicePath;
> -  EFI_BLOCK_IO_PROTOCOL *BlockIo;
> -
> -  //
> -  // First check to see if File is from a Firmware Volume
> -  //
> -  DeviceHandle  = NULL;
> -  TempDevicePath = (EFI_DEVICE_PATH_PROTOCOL *)File;
> -  Status = gBS->LocateDevicePath (
> -  ,
> -  ,
> -  
> -  );
> -  if (!EFI_ERROR (Status)) {
> -Status = gBS->OpenProtocol (
> -DeviceHandle,
> -,
> -NULL,
> -NULL,
> -NULL,
> -EFI_OPEN_PROTOCOL_TEST_PROTOCOL
> -);
> -if (!EFI_ERROR (Status)) {
> -  return IMAGE_FROM_FV;
> -}
> -  }
> -
> -  //
> -  // Next check to see if File is from a Block I/O device
> -  //
> -  DeviceHandle   = NULL;
> -  TempDevicePath = (EFI_DEVICE_PATH_PROTOCOL *)File;
> -  Status = gBS->LocateDevicePath (
> -  ,
> -  ,
> -  
> -  );
> -  if (!EFI_ERROR (Status)) {
> -BlockIo = NULL;
> -Status = gBS->OpenProtocol (
> -DeviceHandle,
> -,
> -(VOID **) ,
> -NULL,
> -NULL,
> -EFI_OPEN_PROTOCOL_GET_PROTOCOL
> -);
> -if (!EFI_ERROR (Status) && BlockIo != NULL) {
> -  if (BlockIo->Media != NULL) {
> -if (BlockIo->Media->RemovableMedia) {
> -  //
> -  // Block I/O is present and specifies the media is removable
> -  //
> -  return IMAGE_FROM_REMOVABLE_MEDIA;
> -} else {
> -  //
> -  // Block I/O is present and specifies the media is not removable
> -  //
> -  return IMAGE_FROM_FIXED_MEDIA;
> -}
> -  }
> -}
> -  }
> -
> -  //
> -  // File is not in a Firmware Volume or on a Block I/O device, so check to
> see if
> -  // the device path supports the Simple File System Protocol.
> -  //
> -  DeviceHandle   = NULL;
> 

Re: [edk2-devel] [PATCH] IntelFsp2Pkg: FSP Python scripts to support 3.x.

2019-06-27 Thread Chiu, Chasel


Yes. It works! I will update patch.

Thanks!
Chasel


> -Original Message-
> From: Zeng, Star
> Sent: Friday, June 28, 2019 10:28 AM
> To: devel@edk2.groups.io; Chiu, Chasel 
> Cc: Ma, Maurice ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: RE: [edk2-devel] [PATCH] IntelFsp2Pkg: FSP Python scripts to support
> 3.x.
> 
> It is ok to directly use below code without python version check?
> 
> +for loop in range(int(unit)):
> +bytearray.append("0x%02X" % (value & 0xFF))
> +value = value >> 8
> 
> 
> Thanks,
> Star
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Chiu,
> Chasel
> Sent: Monday, June 24, 2019 10:35 PM
> To: devel@edk2.groups.io
> Cc: Ma, Maurice ; Desimone, Nathaniel L
> ; Zeng, Star 
> Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: FSP Python scripts to support 3.x.
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1930
> 
> Updated FSP Python scripts to support both 2.x and 3.x.
> 
> Test:
>   . Verified with Python 2.7.12 and 3.6.6.
>   . Verified tool result is the same before the change.
>   . Both py -2 and py -3 built binary can boot.
> 
> Cc: Maurice Ma 
> Cc: Nate DeSimone 
> Cc: Star Zeng 
> Signed-off-by: Chasel Chiu 
> ---
>  IntelFsp2Pkg/Tools/GenCfgOpt.py   | 70
> ++
>  IntelFsp2Pkg/Tools/PatchFv.py | 36 +++-
>  IntelFsp2Pkg/Tools/SplitFspBin.py | 74
> +++--
> -
>  3 files changed, 116 insertions(+), 64 deletions(-)
> 
> diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> b/IntelFsp2Pkg/Tools/GenCfgOpt.py index 450c4e3eb9..e0441966ac 100644
> --- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
> +++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
> @@ -1,6 +1,6 @@
>  ## @ GenCfgOpt.py
>  #
> -# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
> +# Copyright (c) 2014 - 2019, Intel Corporation. All rights
> +reserved.
>  # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -10,6 +10,7 @@
> import re  import sys  import struct
>  from   datetime import date
> +from functools import reduce
> 
>  # Generated file copyright header
> 
> @@ -90,11 +91,11 @@ class CLogicalExpression:
>  self.string   = ''
> 
>  def errExit(self, err = ''):
> -print "ERROR: Express parsing for:"
> -print "   %s" % self.string
> -print "   %s^" % (' ' * self.index)
> +print ("ERROR: Express parsing for:")
> +print ("   %s" % self.string)
> +print ("   %s^" % (' ' * self.index))
>  if err:
> -print "INFO : %s" % err
> +print ("INFO : %s" % err)
>  raise SystemExit
> 
>  def getNonNumber (self, n1, n2):
> @@ -338,15 +339,15 @@ EndList
>  else:
>  Error = 0
>  if self.Debug:
> -print "INFO : Macro dictionary:"
> +print ("INFO : Macro dictionary:")
>  for Each in self._MacroDict:
> -print "   $(%s) = [ %s ]" % (Each , 
> self._MacroDict[Each])
> +print ("   $(%s) = [ %s ]" % (Each , 
> self._MacroDict[Each]))
>  return Error
> 
>  def EvaulateIfdef   (self, Macro):
>  Result = Macro in self._MacroDict
>  if self.Debug:
> -print "INFO : Eval Ifdef [%s] : %s" % (Macro, Result)
> +print ("INFO : Eval Ifdef [%s] : %s" % (Macro, Result))
>  return  Result
> 
>  def ExpandMacros (self, Input):
> @@ -359,7 +360,7 @@ EndList
>Line = Line.replace(Each, self._MacroDict[Variable])
>else:
>if self.Debug:
> -  print "WARN : %s is not defined" % Each
> +  print ("WARN : %s is not defined" % Each)
>Line = Line.replace(Each, Each[2:-1])
>  return Line
> 
> @@ -372,7 +373,7 @@ EndList
>Line = Line.replace(PcdName, self._PcdsDict[PcdName])
>else:
>if self.Debug:
> -  print "WARN : %s is not defined" % PcdName
> +  print ("WARN : %s is not defined" % PcdName)
>  return Line
> 
>  def EvaluateExpress (self, Expr):
> @@ -381,7 +382,7 @@ EndList
>  LogExpr = CLogicalExpression()
>  Result  = LogExpr.evaluateExpress (ExpExpr)
>  if self.Debug:
> -print "INFO : Eval Express [%s] : %s" % (Expr, Result)
> +print ("INFO : Eval Express [%s] : %s" % (Expr, Result))
>  return Result
> 
>  def FormatListValue(self, ConfigDict):
> @@ -406,9 +407,14 @@ EndList
>  bytearray = []
>  for each in dataarray:
>  value = each
> -for loop in xrange(unit):
> -bytearray.append("0x%02X" % (value & 0xFF))
> -value = 

Re: [edk2-devel] [edk2-platofrms] [patch v2] Platform/PurleyOpenBoardPkg: Remove --nt32 flag of edkseup

2019-06-27 Thread Liming Gao
Dandan:
  Don't need to add version info in the commit log. And, please also remove 
pushd %WORKSPACE% & popd. They are not used after nmake is removed. With those 
changes, Reviewed-by: Liming Gao 

Thanks
Liming
>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dandan Bi
>Sent: Friday, June 28, 2019 10:55 AM
>To: devel@edk2.groups.io
>Cc: Lu, Shifei A ; Zhou, Bowen
>; Oram, Isaac W ; Gao,
>Liming 
>Subject: [edk2-devel] [edk2-platofrms] [patch v2]
>Platform/PurleyOpenBoardPkg: Remove --nt32 flag of edkseup
>
>V2: Remove nmake -f %BASE_TOOLS_PATH%\Makefile, since it
>has been covered by edksetup.bat Rebuild option.
>
>Since Nt32Pkg has been removed from edk2 repo, and
>we will also remove the --nt32 flag in edksetup.bat.
>So here update platform to pass build.
>
>Cc: Shifei A Lu 
>Cc: Xiaohu Zhou 
>Cc: Isaac W Oram 
>Cc: Liming Gao 
>Signed-off-by: Dandan Bi 
>---
> .../BoardMtOlympus/GitEdk2MinMtOlympus.bat  | 6 +-
> 1 file changed, 1 insertion(+), 5 deletions(-)
>
>diff --git
>a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>index 02ed458236..6b4e90294b 100644
>---
>a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>+++
>b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>@@ -46,20 +46,16 @@ set EDK_TOOLS_BIN=%WORKSPACE%\edk2-
>BaseTools-win32
>
> set EDK_SETUP_OPTION=
> @rem if python is installed, disable the binary base tools.
> if defined PYTHON_HOME (
>   set EDK_TOOLS_BIN=
>-  set EDK_SETUP_OPTION=--nt32
>+  set EDK_SETUP_OPTION=Rebuild
> )
> pushd %WORKSPACE%\edk2
> call edksetup.bat %EDK_SETUP_OPTION%
> popd
> pushd %WORKSPACE%
>-@rem if python is installed, nmake BaseTools source and enable BaseTools
>source build
>-@if defined PYTHON_HOME (
>-  nmake -f %BASE_TOOLS_PATH%\Makefile
>-)
> popd
>
> set openssl_path=%WORKSPACE%
>
> popd
>--
>2.18.0.windows.1
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42961): https://edk2.groups.io/g/devel/message/42961
Mute This Topic: https://groups.io/mt/32238555/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platofrms] [patch v2] Platform/PurleyOpenBoardPkg: Remove --nt32 flag of edkseup

2019-06-27 Thread Dandan Bi
V2: Remove nmake -f %BASE_TOOLS_PATH%\Makefile, since it
has been covered by edksetup.bat Rebuild option.

Since Nt32Pkg has been removed from edk2 repo, and
we will also remove the --nt32 flag in edksetup.bat.
So here update platform to pass build.

Cc: Shifei A Lu 
Cc: Xiaohu Zhou 
Cc: Isaac W Oram 
Cc: Liming Gao 
Signed-off-by: Dandan Bi 
---
 .../BoardMtOlympus/GitEdk2MinMtOlympus.bat  | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git 
a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat 
b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat
index 02ed458236..6b4e90294b 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat
@@ -46,20 +46,16 @@ set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32
 
 set EDK_SETUP_OPTION=
 @rem if python is installed, disable the binary base tools.
 if defined PYTHON_HOME (
   set EDK_TOOLS_BIN=
-  set EDK_SETUP_OPTION=--nt32
+  set EDK_SETUP_OPTION=Rebuild
 )
 pushd %WORKSPACE%\edk2
 call edksetup.bat %EDK_SETUP_OPTION%
 popd
 pushd %WORKSPACE%
-@rem if python is installed, nmake BaseTools source and enable BaseTools 
source build
-@if defined PYTHON_HOME (
-  nmake -f %BASE_TOOLS_PATH%\Makefile
-)
 popd
 
 set openssl_path=%WORKSPACE%
 
 popd
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42960): https://edk2.groups.io/g/devel/message/42960
Mute This Topic: https://groups.io/mt/32238555/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] IntelFsp2Pkg: FSP Python scripts to support 3.x.

2019-06-27 Thread Zeng, Star
It is ok to directly use below code without python version check?

+for loop in range(int(unit)):
+bytearray.append("0x%02X" % (value & 0xFF))
+value = value >> 8


Thanks,
Star
-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Chiu, 
Chasel
Sent: Monday, June 24, 2019 10:35 PM
To: devel@edk2.groups.io
Cc: Ma, Maurice ; Desimone, Nathaniel L 
; Zeng, Star 
Subject: [edk2-devel] [PATCH] IntelFsp2Pkg: FSP Python scripts to support 3.x.

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

Updated FSP Python scripts to support both 2.x and 3.x.

Test:
  . Verified with Python 2.7.12 and 3.6.6.
  . Verified tool result is the same before the change.
  . Both py -2 and py -3 built binary can boot.

Cc: Maurice Ma 
Cc: Nate DeSimone 
Cc: Star Zeng 
Signed-off-by: Chasel Chiu 
---
 IntelFsp2Pkg/Tools/GenCfgOpt.py   | 70 
++
 IntelFsp2Pkg/Tools/PatchFv.py | 36 +++-
 IntelFsp2Pkg/Tools/SplitFspBin.py | 74 
+++---
 3 files changed, 116 insertions(+), 64 deletions(-)

diff --git a/IntelFsp2Pkg/Tools/GenCfgOpt.py b/IntelFsp2Pkg/Tools/GenCfgOpt.py 
index 450c4e3eb9..e0441966ac 100644
--- a/IntelFsp2Pkg/Tools/GenCfgOpt.py
+++ b/IntelFsp2Pkg/Tools/GenCfgOpt.py
@@ -1,6 +1,6 @@
 ## @ GenCfgOpt.py
 #
-# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2019, Intel Corporation. All rights 
+reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent  #  ## @@ -10,6 +10,7 @@ import 
re  import sys  import struct
 from   datetime import date
+from functools import reduce
 
 # Generated file copyright header
 
@@ -90,11 +91,11 @@ class CLogicalExpression:
 self.string   = ''
 
 def errExit(self, err = ''):
-print "ERROR: Express parsing for:"
-print "   %s" % self.string
-print "   %s^" % (' ' * self.index)
+print ("ERROR: Express parsing for:")
+print ("   %s" % self.string)
+print ("   %s^" % (' ' * self.index))
 if err:
-print "INFO : %s" % err
+print ("INFO : %s" % err)
 raise SystemExit
 
 def getNonNumber (self, n1, n2):
@@ -338,15 +339,15 @@ EndList
 else:
 Error = 0
 if self.Debug:
-print "INFO : Macro dictionary:"
+print ("INFO : Macro dictionary:")
 for Each in self._MacroDict:
-print "   $(%s) = [ %s ]" % (Each , 
self._MacroDict[Each])
+print ("   $(%s) = [ %s ]" % (Each , 
self._MacroDict[Each]))
 return Error
 
 def EvaulateIfdef   (self, Macro):
 Result = Macro in self._MacroDict
 if self.Debug:
-print "INFO : Eval Ifdef [%s] : %s" % (Macro, Result)
+print ("INFO : Eval Ifdef [%s] : %s" % (Macro, Result))
 return  Result
 
 def ExpandMacros (self, Input):
@@ -359,7 +360,7 @@ EndList
   Line = Line.replace(Each, self._MacroDict[Variable])
   else:
   if self.Debug:
-  print "WARN : %s is not defined" % Each
+  print ("WARN : %s is not defined" % Each)
   Line = Line.replace(Each, Each[2:-1])
 return Line
 
@@ -372,7 +373,7 @@ EndList
   Line = Line.replace(PcdName, self._PcdsDict[PcdName])
   else:
   if self.Debug:
-  print "WARN : %s is not defined" % PcdName
+  print ("WARN : %s is not defined" % PcdName)
 return Line
 
 def EvaluateExpress (self, Expr):
@@ -381,7 +382,7 @@ EndList
 LogExpr = CLogicalExpression()
 Result  = LogExpr.evaluateExpress (ExpExpr)
 if self.Debug:
-print "INFO : Eval Express [%s] : %s" % (Expr, Result)
+print ("INFO : Eval Express [%s] : %s" % (Expr, Result))
 return Result
 
 def FormatListValue(self, ConfigDict):
@@ -406,9 +407,14 @@ EndList
 bytearray = []
 for each in dataarray:
 value = each
-for loop in xrange(unit):
-bytearray.append("0x%02X" % (value & 0xFF))
-value = value >> 8
+if sys.version_info < (3,0):
+for loop in xrange(unit):
+bytearray.append("0x%02X" % (value & 0xFF))
+value = value >> 8
+else:
+for loop in range(int(unit)):
+bytearray.append("0x%02X" % (value & 0xFF))
+value = value >> 8
 newvalue  = '{'  + ','.join(bytearray) + '}'
 ConfigDict['value'] = newvalue
 return ""
@@ -548,7 +554,7 @@ EndList
 if Match:
 

Re: [edk2-devel] [edk2-platofrms] [patch] Platform/PurleyOpenBoardPkg: Remove --nt32 flag of edkseup

2019-06-27 Thread Liming Gao
If use Rebuild option, below nmake is not required. 

@if defined PYTHON_HOME (
  nmake -f %BASE_TOOLS_PATH%\Makefile
)

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dandan Bi
>Sent: Friday, June 28, 2019 10:03 AM
>To: devel@edk2.groups.io
>Cc: Lu, Shifei A ; Zhou, Bowen
>; Oram, Isaac W 
>Subject: [edk2-devel] [edk2-platofrms] [patch]
>Platform/PurleyOpenBoardPkg: Remove --nt32 flag of edkseup
>
>Since Nt32Pkg has been removed from edk2 repo, and
>we will also remove the --nt32 flag in edksetup.bat.
>So here update platform to pass build.
>
>Cc: Shifei A Lu 
>Cc: Xiaohu Zhou 
>Cc: Isaac W Oram 
>Signed-off-by: Dandan Bi 
>---
> .../PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat   | 2
>+-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git
>a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>index 02ed458236..6cda954fc9 100644
>---
>a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>+++
>b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOly
>mpus.bat
>@@ -46,11 +46,11 @@ set EDK_TOOLS_BIN=%WORKSPACE%\edk2-
>BaseTools-win32
>
> set EDK_SETUP_OPTION=
> @rem if python is installed, disable the binary base tools.
> if defined PYTHON_HOME (
>   set EDK_TOOLS_BIN=
>-  set EDK_SETUP_OPTION=--nt32
>+  set EDK_SETUP_OPTION=Rebuild
> )
> pushd %WORKSPACE%\edk2
> call edksetup.bat %EDK_SETUP_OPTION%
> popd
> pushd %WORKSPACE%
>--
>2.18.0.windows.1
>
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42958): https://edk2.groups.io/g/devel/message/42958
Mute This Topic: https://groups.io/mt/32238141/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [edk2-platofrms] [patch] Platform/PurleyOpenBoardPkg: Remove --nt32 flag of edkseup

2019-06-27 Thread Dandan Bi
Since Nt32Pkg has been removed from edk2 repo, and
we will also remove the --nt32 flag in edksetup.bat.
So here update platform to pass build.

Cc: Shifei A Lu 
Cc: Xiaohu Zhou 
Cc: Isaac W Oram 
Signed-off-by: Dandan Bi 
---
 .../PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat 
b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat
index 02ed458236..6cda954fc9 100644
--- a/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat
+++ b/Platform/Intel/PurleyOpenBoardPkg/BoardMtOlympus/GitEdk2MinMtOlympus.bat
@@ -46,11 +46,11 @@ set EDK_TOOLS_BIN=%WORKSPACE%\edk2-BaseTools-win32
 
 set EDK_SETUP_OPTION=
 @rem if python is installed, disable the binary base tools.
 if defined PYTHON_HOME (
   set EDK_TOOLS_BIN=
-  set EDK_SETUP_OPTION=--nt32
+  set EDK_SETUP_OPTION=Rebuild
 )
 pushd %WORKSPACE%\edk2
 call edksetup.bat %EDK_SETUP_OPTION%
 popd
 pushd %WORKSPACE%
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42957): https://edk2.groups.io/g/devel/message/42957
Mute This Topic: https://groups.io/mt/32238141/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] Upcoming Event: TianoCore Design Meeting - APAC/NAMO - Thu, 06/27/2019 6:30pm-7:30pm #cal-reminder

2019-06-27 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Design Meeting - APAC/NAMO

*When:* Thursday, 27 June 2019, 6:30pm to 7:30pm, (GMT-07:00) America/Los 
Angeles

*Where:* https://zoom.us/j/969264410

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

*Organizer:* Stephano Cetola stephano.cet...@intel.com ( 
stephano.cet...@intel.com?subject=Re:%20Event:%20TianoCore%20Design%20Meeting%20-%20APAC%2FNAMO
 )

*Description:*

BaseTools: Multiple-thread AutoGen ( 
https://edk2.groups.io/g/devel/files/Designs/2019/0627/Multiple-thread-AutoGen.pdf
 )

Join Zoom Meeting

https://zoom.us/j/969264410 ( https://zoom.us/j/969264410 )

One tap mobile

+16465588656,,969264410# US (New York)

+17207072699,,969264410# US

Dial by your location

+1 646 558 8656 US (New York)

+1 720 707 2699 US

Meeting ID: 969 264 410

Find your local number: https://zoom.us/u/abOtdJckxL

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42956): https://edk2.groups.io/g/devel/message/42956
Mute This Topic: https://groups.io/mt/32237793/21656
Mute #cal-reminder: https://groups.io/mk?hashtag=cal-reminder=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

2019-06-27 Thread Dandan Bi
Hi Liming and Bob,

Thanks for the review. So we reach the agreement that remove the --nt32 flag, 
right? If so, I will address Liming's comments and then push these two patches.


Thanks,
Dandan

> -Original Message-
> From: Gao, Liming
> Sent: Thursday, June 27, 2019 11:17 PM
> To: Feng, Bob C ; Bi, Dandan
> ; devel@edk2.groups.io
> Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> Yes. Those script needs to be updated together.
> 
> > -Original Message-
> > From: Feng, Bob C
> > Sent: Thursday, June 27, 2019 11:14 PM
> > To: Gao, Liming ; Bi, Dandan
> > ; devel@edk2.groups.io
> > Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> >
> > OK.  I think it may break some pre-build script if the pre-build script have
> "edksetup --nt32"...
> >
> > -Original Message-
> > From: Gao, Liming
> > Sent: Thursday, June 27, 2019 10:48 PM
> > To: Feng, Bob C ; Bi, Dandan
> > ; devel@edk2.groups.io
> > Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> >
> > Bob:
> >   --nt32 option is added for Nt32Pkg. Now, Nt32Pkg has been removed. So,
> I think it is fine to remove --nt32 option.
> >
> > > -Original Message-
> > > From: Feng, Bob C
> > > Sent: Thursday, June 27, 2019 7:56 PM
> > > To: Bi, Dandan ; devel@edk2.groups.io
> > > Cc: Gao, Liming 
> > > Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> > >
> > > The patches look good.
> > >
> > > I think removing --nt32 option is incompatible change. What about keep
> the --nt32 ?
> > >
> > > For the Patch 2 setup for different VS tool chains.
> > > Reviewed-by: Bob Feng 
> > >
> > > Thanks,
> > > Bob
> > >
> > > -Original Message-
> > > From: Bi, Dandan
> > > Sent: Sunday, June 23, 2019 9:59 PM
> > > To: devel@edk2.groups.io
> > > Cc: Feng, Bob C ; Gao, Liming
> > > 
> > > Subject: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> > >
> > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693
> > >
> > > Patch 1 remove nt32 related flags in bat files.
> > > Patch 2 setup for different VS tool chains.
> > >
> > > Cc: Bob Feng 
> > > Cc: Liming Gao  Dandan Bi (2):
> > >   Edk2: Remove nt32 related flag in bat files
> > >   Edk2Setup: Support different VS tool chain setup
> > >
> > >  BaseTools/get_vsvars.bat| 42 +
> > >  BaseTools/set_vsprefix_envs.bat | 47 +--
> -
> > >  BaseTools/toolsetup.bat | 68
> ++---
> > >  edksetup.bat| 32 ++-
> > >  4 files changed, 145 insertions(+), 44 deletions(-)
> > >
> > > --
> > > 1.9.5.msysgit.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42954): https://edk2.groups.io/g/devel/message/42954
Mute This Topic: https://groups.io/mt/32177263/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add missing NULL pointer check.

2019-06-27 Thread Zhang, Chao B
HI Hao:
   I think the patch is to complete the security check both in info and code 
logic to ValidateCapsuleNameCapsuleIntegrity .
It is OK to keep it in one patch.


From: Wu, Hao A
Sent: Friday, June 28, 2019 8:54 AM
To: Xu, Wei6 ; devel@edk2.groups.io
Cc: Wang, Jian J ; Zhang, Chao B 
Subject: RE: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add missing 
NULL pointer check.

> -Original Message-
> From: Xu, Wei6
> Sent: Friday, June 28, 2019 12:26 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A; Zhang, Chao B
> Subject: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add
> missing NULL pointer check.
>
> Add missing NULL pointer check for CapsuleNameBufStart.
> Also add comments to notice that capsule name integrity check assumes
> the capsule has been validated by IsValidCapsuleHeader().


The patch is doing 2 things. Please help to split it into 2 commits.

With this handled,
Reviewed-by: Hao A Wu mailto:hao.a...@intel.com>>

Best Regards,
Hao Wu


>
> Cc: Jian J Wang mailto:jian.j.w...@intel.com>>
> Cc: Hao A Wu mailto:hao.a...@intel.com>>
> Cc: Chao B Zhang mailto:chao.b.zh...@intel.com>>
> Signed-off-by: Wei6 Xu mailto:wei6...@intel.com>>
> ---
>  MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 6 ++
>  1 file changed, 6 insertions(+)
>
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> index 66c9be8e1f..3193ca8f4d 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> @@ -23,10 +23,13 @@ IsCapsuleNameCapsule (
>
>  /**
>Check the integrity of the capsule name capsule.
>If the capsule is vaild, return the physical address of each capsule name
> string.
>
> +  This routine assumes the capsule has been validated by
> IsValidCapsuleHeader(), so
> +  capsule memory overflow is not going to happen in this routine.
> +
>@param[in]  CapsuleHeader   Pointer to the capsule header of a capsule
> name capsule.
>@param[out] CapsuleNameNum  Number of capsule name.
>
>@retval NULLCapsule name capsule is not valid.
>@retval CapsuleNameBuf  Array of capsule name physical address.
> @@ -63,10 +66,13 @@ ValidateCapsuleNameCapsuleIntegrity (
>//
>// If strings are not aligned on a 16-bit boundary, reallocate memory for 
> it.
>//
>if (((UINTN) CapsuleNameBufStart & BIT0) != 0) {
>  CapsuleNameBufStart = AllocateCopyPool (CapsuleHeader-
> >CapsuleImageSize - CapsuleHeader->HeaderSize, CapsuleNameBufStart);
> +if (CapsuleNameBufStart == NULL) {
> +  return NULL;
> +}
>}
>
>CapsuleNameBufEnd = CapsuleNameBufStart + CapsuleHeader-
> >CapsuleImageSize - CapsuleHeader->HeaderSize;
>
>CapsuleNamePtr = CapsuleNameBufStart;
> --
> 2.16.2.windows.1

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42952): https://edk2.groups.io/g/devel/message/42952
Mute This Topic: https://groups.io/mt/32232931/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol

2019-06-27 Thread Wu, Hao A
> -Original Message-
> From: Sumit Garg [mailto:sumit.g...@linaro.org]
> Sent: Thursday, June 27, 2019 9:39 PM
> To: Ard Biesheuvel
> Cc: edk2-devel-groups-io; Wu, Hao A; Marcin Wojtas; Albecki, Mateusz
> Subject: Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe:
> Implement revision 3 of SdMmcOverrideProtocol
> 
> On Thu, 27 Jun 2019 at 13:40, Ard Biesheuvel 
> wrote:
> >
> > (+ Sumit)
> >
> > On Thu, 27 Jun 2019 at 08:29, Wu, Hao A  wrote:
> > >
> > > > -Original Message-
> > > > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > > > Sent: Thursday, June 27, 2019 2:25 PM
> > > > To: Albecki, Mateusz
> > > > Cc: edk2-devel-groups-io; Wu, Hao A
> > > > Subject: Re: [edk2-devel] [PATCH v4 0/2]
> MdeModulePkg/SdMmcHcDxe:
> > > > Implement revision 3 of SdMmcOverrideProtocol
> > > >
> > > > Hi Mateusz,
> > > >
> > > > Can you please push those patches somewhere (github?) so that I can
> > > > easily do a quick check for regression?
> > > >
> > > > Thanks,
> > > > Marcin
> > >
> > >
> > > Hello Marcin,
> > >
> > > I have just pushed the series at:
> > > https://github.com/hwu25/edk2/tree/sdmmc_override_extend_v4
> > >
> > > Please help to check.
> > >
> >
> > I have cc'ed my colleague Sumit, who has kindly agreed to regression
> > test this branch on Socionext SynQuacer, which also uses the SD/MMC
> > override infrastructure.
> >
> > Sumit, please reply here with your results. And thanks again!
> 
> I did picked this patch-set and applied on top of edk2 master branch.
> It works well on SynQuacer with eMMC device enumerated properly and
> all three eMMC partitions are visible:
> 
>  BLK4: Alias(s):
>   VenHw(0D51905B-B77E-452A-A2C0-
> ECA0CC8D514A,305200)/eMMC(0x
> 0)/Ctrl(0x0)
>  BLK5: Alias(s):
>   VenHw(0D51905B-B77E-452A-A2C0-
> ECA0CC8D514A,305200)/eMMC(0x
> 0)/Ctrl(0x1)
>  BLK6: Alias(s):
>   VenHw(0D51905B-B77E-452A-A2C0-
> ECA0CC8D514A,305200)/eMMC(0x
> 0)/Ctrl(0x2)
> 
> Shell> devices
> 
>   E9 D - -  1  1   0 VenHw(0D51905B-B77E-452A-A2C0-
> ECA0CC8D514A,3052
> 00)/eMMC(0x0)/Ctrl(0x0)
>   EA D - -  1  1   0 VenHw(0D51905B-B77E-452A-A2C0-
> ECA0CC8D514A,3052
> 00)/eMMC(0x0)/Ctrl(0x1)
>   EB D - -  1  1   0 VenHw(0D51905B-B77E-452A-A2C0-
> ECA0CC8D514A,3052
> 00)/eMMC(0x0)/Ctrl(0x2)
> 
> So you can add following:
> 
> Regression-tested-by: Sumit Garg 


Thanks a lot for the testing.

Best Regards,
Hao Wu


> 
> -Sumit

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42951): https://edk2.groups.io/g/devel/message/42951
Mute This Topic: https://groups.io/mt/32214570/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add missing NULL pointer check.

2019-06-27 Thread Wu, Hao A
> -Original Message-
> From: Xu, Wei6
> Sent: Friday, June 28, 2019 12:26 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A; Zhang, Chao B
> Subject: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add
> missing NULL pointer check.
> 
> Add missing NULL pointer check for CapsuleNameBufStart.
> Also add comments to notice that capsule name integrity check assumes
> the capsule has been validated by IsValidCapsuleHeader().


The patch is doing 2 things. Please help to split it into 2 commits.

With this handled,
Reviewed-by: Hao A Wu 

Best Regards,
Hao Wu


> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Chao B Zhang 
> Signed-off-by: Wei6 Xu 
> ---
>  MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> index 66c9be8e1f..3193ca8f4d 100644
> --- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> +++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
> @@ -23,10 +23,13 @@ IsCapsuleNameCapsule (
> 
>  /**
>Check the integrity of the capsule name capsule.
>If the capsule is vaild, return the physical address of each capsule name
> string.
> 
> +  This routine assumes the capsule has been validated by
> IsValidCapsuleHeader(), so
> +  capsule memory overflow is not going to happen in this routine.
> +
>@param[in]  CapsuleHeader   Pointer to the capsule header of a capsule
> name capsule.
>@param[out] CapsuleNameNum  Number of capsule name.
> 
>@retval NULLCapsule name capsule is not valid.
>@retval CapsuleNameBuf  Array of capsule name physical address.
> @@ -63,10 +66,13 @@ ValidateCapsuleNameCapsuleIntegrity (
>//
>// If strings are not aligned on a 16-bit boundary, reallocate memory for 
> it.
>//
>if (((UINTN) CapsuleNameBufStart & BIT0) != 0) {
>  CapsuleNameBufStart = AllocateCopyPool (CapsuleHeader-
> >CapsuleImageSize - CapsuleHeader->HeaderSize, CapsuleNameBufStart);
> +if (CapsuleNameBufStart == NULL) {
> +  return NULL;
> +}
>}
> 
>CapsuleNameBufEnd = CapsuleNameBufStart + CapsuleHeader-
> >CapsuleImageSize - CapsuleHeader->HeaderSize;
> 
>CapsuleNamePtr = CapsuleNameBufStart;
> --
> 2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42950): https://edk2.groups.io/g/devel/message/42950
Mute This Topic: https://groups.io/mt/32232931/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] Upcoming Event: TianoCore Bug Triage - APAC / NAMO - Thu, 06/27/2019 5:00pm-5:30pm #cal-reminder

2019-06-27 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Bug Triage - APAC / NAMO

*When:* Thursday, 27 June 2019, 5:00pm to 5:30pm, (GMT-07:00) America/Los 
Angeles

*Where:* https://zoom.us/j/251103409

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

*Organizer:* Stephano Cetola stephano.cet...@intel.com ( 
stephano.cet...@intel.com?subject=Re:%20Event:%20TianoCore%20Bug%20Triage%20-%20APAC%20%2F%20NAMO
 )

*Description:*

Join Zoom Meeting

https://zoom.us/j/251103409 ( https://zoom.us/j/251103409 )

One tap mobile

+17207072699,,251103409# US

+16465588656,,251103409# US (New York)

Dial by your location

+1 720 707 2699 US

+1 646 558 8656 US (New York)

Meeting ID: 251 103 409

Find your local number: https://zoom.us/u/acEIbOAUyA ( 
https://zoom.us/u/acEIbOAUyA )

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42949): https://edk2.groups.io/g/devel/message/42949
Mute This Topic: https://groups.io/mt/32237084/21656
Mute #cal-reminder: https://groups.io/mk?hashtag=cal-reminder=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add missing NULL pointer check.

2019-06-27 Thread Zhang, Chao B
Reviewed-by: Chao Zhang 

-Original Message-
From: Xu, Wei6 
Sent: Friday, June 28, 2019 12:26 AM
To: devel@edk2.groups.io
Cc: Wang, Jian J ; Wu, Hao A ; 
Zhang, Chao B 
Subject: [edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add missing NULL 
pointer check.

Add missing NULL pointer check for CapsuleNameBufStart.
Also add comments to notice that capsule name integrity check assumes the 
capsule has been validated by IsValidCapsuleHeader().

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c 
b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
index 66c9be8e1f..3193ca8f4d 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
@@ -23,10 +23,13 @@ IsCapsuleNameCapsule (
 
 /**
   Check the integrity of the capsule name capsule.
   If the capsule is vaild, return the physical address of each capsule name 
string.
 
+  This routine assumes the capsule has been validated by 
+ IsValidCapsuleHeader(), so  capsule memory overflow is not going to happen in 
this routine.
+
   @param[in]  CapsuleHeader   Pointer to the capsule header of a capsule name 
capsule.
   @param[out] CapsuleNameNum  Number of capsule name.
 
   @retval NULLCapsule name capsule is not valid.
   @retval CapsuleNameBuf  Array of capsule name physical address.
@@ -63,10 +66,13 @@ ValidateCapsuleNameCapsuleIntegrity (
   //
   // If strings are not aligned on a 16-bit boundary, reallocate memory for it.
   //
   if (((UINTN) CapsuleNameBufStart & BIT0) != 0) {
 CapsuleNameBufStart = AllocateCopyPool (CapsuleHeader->CapsuleImageSize - 
CapsuleHeader->HeaderSize, CapsuleNameBufStart);
+if (CapsuleNameBufStart == NULL) {
+  return NULL;
+}
   }
 
   CapsuleNameBufEnd = CapsuleNameBufStart + CapsuleHeader->CapsuleImageSize - 
CapsuleHeader->HeaderSize;
 
   CapsuleNamePtr = CapsuleNameBufStart;
--
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42948): https://edk2.groups.io/g/devel/message/42948
Mute This Topic: https://groups.io/mt/32232931/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled

2019-06-27 Thread David Woodhouse
On Thu, 2019-06-27 at 21:01 +0200, Laszlo Ersek wrote:
> 
> To clarify -- this is by no means to say that *SeaBIOS* is a relic. I
> absolutely don't imply that. Users should use the firmware they need,
> especially in the virtual world, where choosing is really easy.

Choosing is easy if you're running qemu on your desktop box.

If the owner of the guest doesn't also own the host, then you're into
"configurability", which means guests either having to *explicitly*
manage which firmware they get which is a pain for the customer, or
some kind of half-arsed guessing about which firmware to use, based on
poking around in the image that's being booted. Which doesn't generally
go well either.

There's a reason Intel went for the one-size-fits-all on real hardware,
and it applies just as well to (some, but not all) virtual hosting too.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42947): https://edk2.groups.io/g/devel/message/42947
Mute This Topic: https://groups.io/mt/32213812/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



smime.p7s
Description: S/MIME cryptographic signature


Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled

2019-06-27 Thread Laszlo Ersek
On 06/27/19 20:43, Laszlo Ersek wrote:
> On 06/27/19 18:36, Alexander Graf wrote:

>> That way we could have CSM enabled OVMF for everyone ;)
> 
> Well, as long as we're discussing "everyone": we should forget about the
> CSM altogether, in the long term. The CSM is a concession towards OSes
> that are stuck in the past; a concession that is hugely complex and
> difficult to debug & maintain. It is also incompatible with Secure Boot.
> Over time, we should spend less and less time & energy on the CSM. Just
> my opinion, of course. :)

To clarify -- this is by no means to say that *SeaBIOS* is a relic. I
absolutely don't imply that. Users should use the firmware they need,
especially in the virtual world, where choosing is really easy.

But the *CSM* is just an elaborate workaround for the user, to
circumvent a decision that a platform vendor made for him/her
unsolicitedly. In the virtual world in particular, I don't think such
workarounds should be necessary; the platform vendor should *please* the
user, and give them SeaBIOS directly, if they want that.

(Again, just my opinion -- I just wanted to clarify that I wasn't taking
a stab at SeaBIOS. That would be *foolish*.)

Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42946): https://edk2.groups.io/g/devel/message/42946
Mute This Topic: https://groups.io/mt/32213812/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [Experiment] GitHub pull requests for some low-priority corrections

2019-06-27 Thread Laszlo Ersek
On 06/27/19 13:31, co...@gmx.fr wrote:
> About a year ago, I changed 8000+ lines of text in edk2 to fix various typos.
> But I didn't split it all and I didn't create a hundred of patches by email 
> to get it all applied (except for a few folders of them).
> 
> As it's still a lot of work to rebase it, split it, patch it and get it 
> reviewed, I wanted to make it easier for me, so I made a few branches and 
> pull requested those on GitHub:
> - https://github.com/tianocore/edk2/pull/143
> - https://github.com/tianocore/edk2/pull/144 ( 
> https://github.com/tianocore/edk2/pull/143 )
> - https://github.com/tianocore/edk2-libc/pull/1
> 
> With branches & pull-requests, I can immediately detect conflicts when the 
> branch is out-of-sync with master, immediately rebase and more.
> With patches... well, they get LOST: try to find my unmerged patches from 
> February 2019 for instance...
> 
> So those pulls are an experiment with low priority. I can change the licence 
> if needed (I don't even need attribution, I just want to help), or I can 
> perform other changes, but I would be much pleased if such experiment becomes 
> conclusive.

I stated my take on this in the following comments:

[1] https://github.com/tianocore/edk2/pull/143#issuecomment-506425815
[2] https://github.com/tianocore/edk2/pull/143#issuecomment-506430151

To capture them here:

[1] Antoine, I'll have to reject this github PR (similarly to other
github pull requests for the edk2 project). While we may have discussed
github pull requests for other projects on the list, such as
"Edk2-Library", to my knowledge we're not even considering an evaluation
of github pull requests for the main edk2 project. Please submit your
patch to the list for review. The point is exactly that patch review
happen on the list. Thanks.

[2] For the record, a few months ago we did evaluate github,
phabricator, and gitlab. Gerrit was added to the "evaluation backlog".
>From the three we checked, at that time, github proved the least
inferior to the mailing list. We identified a number of sticking points
which github.com should address before we could consider adopting it.

http://mid.mail-archive.com/793375cd-f55a-fa22-97c2-d6fd04da7d8b@linux.intel.com
http://mid.mail-archive.com/0b2ce1b0-93ab-aef2-d192-23fd84024b70@redhat.com

(Alternative links:

https://lists.01.org/pipermail/edk2-devel/2019-February/036428.html
https://lists.01.org/pipermail/edk2-devel/2018-December/033509.html
)

Nothing has changed since, to my knowledge, so I don't see a reason to
reopen the investigation.


Thanks
Laszlo

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42945): https://edk2.groups.io/g/devel/message/42945
Mute This Topic: https://groups.io/mt/32232368/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled

2019-06-27 Thread Laszlo Ersek
On 06/27/19 18:36, Alexander Graf wrote:
> Hi David and Laszlo,
> 
> (with broken threading because gmane still mirrors the old ML ...)
> 
>> Mostly, this is only necessary for devices that the CSM might have
>> native support for, such as VirtIO and NVMe; PciBusDxe will already
>> degrade devices to 32-bit if they have an OpROM.
>>
>> However, there doesn't seem to be a generic way of requesting PciBusDxe
>> to downgrade specific devices.
>>
>> There's IncompatiblePciDeviceSupportProtocol but that doesn't provide
>> the PCI class information or a handle to the device itself, so there's
>> no simple way to just match on all NVMe devices, for example.
>>
>> Just leave gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size set to zero for
>> CSM builds, until/unless that can be fixed.
>>
>> Signed-off-by: David Woodhouse 
>> Reviewed-by: Laszlo Ersek 
>> ---
>>  OvmfPkg/OvmfPkgIa32X64.dsc | 4 
>>  OvmfPkg/OvmfPkgX64.dsc | 4 
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
>> index 639e33cb285f..ad20531ceb8b 100644
>> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
>> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
>> @@ -543,7 +543,11 @@ [PcdsDynamicDefault]
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0x0
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x0
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0
>> +!ifdef $(CSM_ENABLE)
>> +  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x0
>> +!else
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x8
>> +!endif
>>  
>>    gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
>>  
>> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
>> index 69a3497c2c9e..0542ac2235b4 100644
>> --- a/OvmfPkg/OvmfPkgX64.dsc
>> +++ b/OvmfPkg/OvmfPkgX64.dsc
>> @@ -542,7 +542,11 @@ [PcdsDynamicDefault]
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0x0
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x0
>>    gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0
>> +!ifdef $(CSM_ENABLE)
>> +  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x0
> 
> IIRC x86 Linux just takes firmware provided BAR maps as they are and
> doesn't map on its own.

That's correct.


> Or does it map if a BAR was previously unmapped?

My understanding is that Linux re-maps the BARs if it dislikes something
(e.g. root bridge apertures described in ACPI _CRS do not cover some
ranges programmed into actual BARs).

IIUC reallocation can be requested on the kernel cmdline as well, with
pci=realloc.

I believe you could test your question with the "pci-testdev" QEMU
device model -- in QEMU commit 417463341e3e ("pci-testdev: add optional
memory bar", 2018-11-05), Gerd added the "membar" property for just that
(IIRC).


> In the former case, wouldn't that mean that we're breaking GPU
> passthrough (*big* BARs) for OVMF if the OVMF version happens to support
> CSM? So if a distro decides to turn on CSM, that would be a very subtle
> regression.

Yes, this is in theory a possible regression. It requires the user to
combine huge BARs with an OVMF build that includes the CSM.

I've been aware of this, but it seems like such a corner case that I
didn't intend to raise it. To begin with, building OVMF with the CSM is
a niche use case in itself.

David described (but I've forgotten the details, by now) some kind of
setup or service where a user cannot choose between pure SeaBIOS and
pure OVMF, for their virtual machine. They are given just one firmware,
and so in order to let users boot both legacy and UEFI OSes, it makes
sense for the service provider to offer OVMF+CSM.

Fine -- but, in that kind of service, where users are prevented from
picking one of two "pure" firmwares, do we really expect users to have
the configuration freedom to shove GPUs with huge BARs into their VMs?


> Would it be possible to change the PCI mapping logic to just simply
> *prefer* low BAR space if there's some available and the BAR is not big
> (<64MB for example)?

PciBusDxe in MdeModulePkg is practically untouchable, at such a
"strategy" level. We can fix bugs in it, but only surgically. (This is
not something that I endorse, I'm just observing it.)

Platforms are expected to influence the behavior of PciBusDxe through
implementing the "incompatible pci device support" protocol. OVMF
already does that (IncompatiblePciDeviceSupportDxe), but the protocol
interface (from the PI spec) is not flexible enough for what David
actually wanted. Otherwise, this restriction would have been expressed
per-controller.

If the problem that you describe above outweighs the issue that David
intends to mitigate with the patch, in a given service, then the vendor
can rebuild OVMF with a suitable "--pcd=..." option. Or else, they can
even use

  -fw_cfg name=opt/ovmf/X-PciMmio64Mb,string=32768

dynamically, on the QEMU command line. (Please see commit 7e5b1b670c38,
"OvmfPkg: PlatformPei: determine the 64-bit PCI host aperture for X64
DXE", 2016-03-23.)


> That way we could have CSM enabled OVMF for 

Re: [edk2-devel] [PATCH v3 4/4] OvmfPkg: don't assign PCI BARs above 4GiB when CSM enabled

2019-06-27 Thread Alexander Graf via Groups.Io

Hi David and Laszlo,

(with broken threading because gmane still mirrors the old ML ...)


Mostly, this is only necessary for devices that the CSM might have
native support for, such as VirtIO and NVMe; PciBusDxe will already
degrade devices to 32-bit if they have an OpROM.

However, there doesn't seem to be a generic way of requesting PciBusDxe
to downgrade specific devices.

There's IncompatiblePciDeviceSupportProtocol but that doesn't provide
the PCI class information or a handle to the device itself, so there's
no simple way to just match on all NVMe devices, for example.

Just leave gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size set to zero for
CSM builds, until/unless that can be fixed.

Signed-off-by: David Woodhouse 
Reviewed-by: Laszlo Ersek 
---
 OvmfPkg/OvmfPkgIa32X64.dsc | 4 
 OvmfPkg/OvmfPkgX64.dsc | 4 
 2 files changed, 8 insertions(+)

diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index 639e33cb285f..ad20531ceb8b 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -543,7 +543,11 @@ [PcdsDynamicDefault]
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0x0
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x0
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0
+!ifdef $(CSM_ENABLE)
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x0
+!else
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x8
+!endif
 
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
 
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc

index 69a3497c2c9e..0542ac2235b4 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -542,7 +542,11 @@ [PcdsDynamicDefault]
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Base|0x0
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio32Size|0x0
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Base|0x0
+!ifdef $(CSM_ENABLE)
+  gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x0


IIRC x86 Linux just takes firmware provided BAR maps as they are and 
doesn't map on its own. Or does it map if a BAR was previously unmapped?


In the former case, wouldn't that mean that we're breaking GPU 
passthrough (*big* BARs) for OVMF if the OVMF version happens to support 
CSM? So if a distro decides to turn on CSM, that would be a very subtle 
regression.


Would it be possible to change the PCI mapping logic to just simply 
*prefer* low BAR space if there's some available and the BAR is not big 
(<64MB for example)?


That way we could have CSM enabled OVMF for everyone ;)


Alex



+!else
   gUefiOvmfPkgTokenSpaceGuid.PcdPciMmio64Size|0x8
+!endif
 
   gEfiMdePkgTokenSpaceGuid.PcdPlatformBootTimeOut|0
 
--

2.21.0


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42943): https://edk2.groups.io/g/devel/message/42943
Mute This Topic: https://groups.io/mt/32213812/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel][Patch] MdeModulePkg/DxeCapsuleLibFmp: Add missing NULL pointer check.

2019-06-27 Thread Xu, Wei6
Add missing NULL pointer check for CapsuleNameBufStart.
Also add comments to notice that capsule name integrity check assumes
the capsule has been validated by IsValidCapsuleHeader().

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c 
b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
index 66c9be8e1f..3193ca8f4d 100644
--- a/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
+++ b/MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
@@ -23,10 +23,13 @@ IsCapsuleNameCapsule (
 
 /**
   Check the integrity of the capsule name capsule.
   If the capsule is vaild, return the physical address of each capsule name 
string.
 
+  This routine assumes the capsule has been validated by 
IsValidCapsuleHeader(), so
+  capsule memory overflow is not going to happen in this routine.
+
   @param[in]  CapsuleHeader   Pointer to the capsule header of a capsule name 
capsule.
   @param[out] CapsuleNameNum  Number of capsule name.
 
   @retval NULLCapsule name capsule is not valid.
   @retval CapsuleNameBuf  Array of capsule name physical address.
@@ -63,10 +66,13 @@ ValidateCapsuleNameCapsuleIntegrity (
   //
   // If strings are not aligned on a 16-bit boundary, reallocate memory for it.
   //
   if (((UINTN) CapsuleNameBufStart & BIT0) != 0) {
 CapsuleNameBufStart = AllocateCopyPool (CapsuleHeader->CapsuleImageSize - 
CapsuleHeader->HeaderSize, CapsuleNameBufStart);
+if (CapsuleNameBufStart == NULL) {
+  return NULL;
+}
   }
 
   CapsuleNameBufEnd = CapsuleNameBufStart + CapsuleHeader->CapsuleImageSize - 
CapsuleHeader->HeaderSize;
 
   CapsuleNamePtr = CapsuleNameBufStart;
-- 
2.16.2.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42942): https://edk2.groups.io/g/devel/message/42942
Mute This Topic: https://groups.io/mt/32232931/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [Experiment] GitHub pull requests for some low-priority corrections

2019-06-27 Thread coeur
About a year ago, I changed 8000+ lines of text in edk2 to fix various typos.
But I didn't split it all and I didn't create a hundred of patches by email to 
get it all applied (except for a few folders of them).

As it's still a lot of work to rebase it, split it, patch it and get it 
reviewed, I wanted to make it easier for me, so I made a few branches and pull 
requested those on GitHub:
- https://github.com/tianocore/edk2/pull/143
- https://github.com/tianocore/edk2/pull/144 ( 
https://github.com/tianocore/edk2/pull/143 )
- https://github.com/tianocore/edk2-libc/pull/1

With branches & pull-requests, I can immediately detect conflicts when the 
branch is out-of-sync with master, immediately rebase and more.
With patches... well, they get LOST: try to find my unmerged patches from 
February 2019 for instance...

So those pulls are an experiment with low priority. I can change the licence if 
needed (I don't even need attribution, I just want to help), or I can perform 
other changes, but I would be much pleased if such experiment becomes 
conclusive.

Thank you
Antoine Cœur,
Currently looking for a job in Shanghai

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42941): https://edk2.groups.io/g/devel/message/42941
Mute This Topic: https://groups.io/mt/32232368/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

2019-06-27 Thread Liming Gao
Yes. Those script needs to be updated together. 

> -Original Message-
> From: Feng, Bob C
> Sent: Thursday, June 27, 2019 11:14 PM
> To: Gao, Liming ; Bi, Dandan ; 
> devel@edk2.groups.io
> Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> OK.  I think it may break some pre-build script if the pre-build script have 
> "edksetup --nt32"...
> 
> -Original Message-
> From: Gao, Liming
> Sent: Thursday, June 27, 2019 10:48 PM
> To: Feng, Bob C ; Bi, Dandan ; 
> devel@edk2.groups.io
> Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> Bob:
>   --nt32 option is added for Nt32Pkg. Now, Nt32Pkg has been removed. So, I 
> think it is fine to remove --nt32 option.
> 
> > -Original Message-
> > From: Feng, Bob C
> > Sent: Thursday, June 27, 2019 7:56 PM
> > To: Bi, Dandan ; devel@edk2.groups.io
> > Cc: Gao, Liming 
> > Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> >
> > The patches look good.
> >
> > I think removing --nt32 option is incompatible change. What about keep the 
> > --nt32 ?
> >
> > For the Patch 2 setup for different VS tool chains.
> > Reviewed-by: Bob Feng 
> >
> > Thanks,
> > Bob
> >
> > -Original Message-
> > From: Bi, Dandan
> > Sent: Sunday, June 23, 2019 9:59 PM
> > To: devel@edk2.groups.io
> > Cc: Feng, Bob C ; Gao, Liming 
> > Subject: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> >
> > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693
> >
> > Patch 1 remove nt32 related flags in bat files.
> > Patch 2 setup for different VS tool chains.
> >
> > Cc: Bob Feng 
> > Cc: Liming Gao 
> > Dandan Bi (2):
> >   Edk2: Remove nt32 related flag in bat files
> >   Edk2Setup: Support different VS tool chain setup
> >
> >  BaseTools/get_vsvars.bat| 42 +
> >  BaseTools/set_vsprefix_envs.bat | 47 +---
> >  BaseTools/toolsetup.bat | 68 
> > ++---
> >  edksetup.bat| 32 ++-
> >  4 files changed, 145 insertions(+), 44 deletions(-)
> >
> > --
> > 1.9.5.msysgit.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42940): https://edk2.groups.io/g/devel/message/42940
Mute This Topic: https://groups.io/mt/32177263/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

2019-06-27 Thread Bob Feng
OK.  I think it may break some pre-build script if the pre-build script have 
"edksetup --nt32"...

-Original Message-
From: Gao, Liming 
Sent: Thursday, June 27, 2019 10:48 PM
To: Feng, Bob C ; Bi, Dandan ; 
devel@edk2.groups.io
Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

Bob:
  --nt32 option is added for Nt32Pkg. Now, Nt32Pkg has been removed. So, I 
think it is fine to remove --nt32 option. 

> -Original Message-
> From: Feng, Bob C
> Sent: Thursday, June 27, 2019 7:56 PM
> To: Bi, Dandan ; devel@edk2.groups.io
> Cc: Gao, Liming 
> Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> The patches look good.
> 
> I think removing --nt32 option is incompatible change. What about keep the 
> --nt32 ?
> 
> For the Patch 2 setup for different VS tool chains.
> Reviewed-by: Bob Feng 
> 
> Thanks,
> Bob
> 
> -Original Message-
> From: Bi, Dandan
> Sent: Sunday, June 23, 2019 9:59 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming 
> Subject: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693
> 
> Patch 1 remove nt32 related flags in bat files.
> Patch 2 setup for different VS tool chains.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Dandan Bi (2):
>   Edk2: Remove nt32 related flag in bat files
>   Edk2Setup: Support different VS tool chain setup
> 
>  BaseTools/get_vsvars.bat| 42 +
>  BaseTools/set_vsprefix_envs.bat | 47 +---
>  BaseTools/toolsetup.bat | 68 
> ++---
>  edksetup.bat| 32 ++-
>  4 files changed, 145 insertions(+), 44 deletions(-)
> 
> --
> 1.9.5.msysgit.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42939): https://edk2.groups.io/g/devel/message/42939
Mute This Topic: https://groups.io/mt/32177263/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

2019-06-27 Thread Liming Gao
Bob:
  --nt32 option is added for Nt32Pkg. Now, Nt32Pkg has been removed. So, I 
think it is fine to remove --nt32 option. 

> -Original Message-
> From: Feng, Bob C
> Sent: Thursday, June 27, 2019 7:56 PM
> To: Bi, Dandan ; devel@edk2.groups.io
> Cc: Gao, Liming 
> Subject: RE: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> The patches look good.
> 
> I think removing --nt32 option is incompatible change. What about keep the 
> --nt32 ?
> 
> For the Patch 2 setup for different VS tool chains.
> Reviewed-by: Bob Feng 
> 
> Thanks,
> Bob
> 
> -Original Message-
> From: Bi, Dandan
> Sent: Sunday, June 23, 2019 9:59 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming 
> Subject: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693
> 
> Patch 1 remove nt32 related flags in bat files.
> Patch 2 setup for different VS tool chains.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Dandan Bi (2):
>   Edk2: Remove nt32 related flag in bat files
>   Edk2Setup: Support different VS tool chain setup
> 
>  BaseTools/get_vsvars.bat| 42 +
>  BaseTools/set_vsprefix_envs.bat | 47 +---
>  BaseTools/toolsetup.bat | 68 
> ++---
>  edksetup.bat| 32 ++-
>  4 files changed, 145 insertions(+), 44 deletions(-)
> 
> --
> 1.9.5.msysgit.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42938): https://edk2.groups.io/g/devel/message/42938
Mute This Topic: https://groups.io/mt/32177263/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol

2019-06-27 Thread Sumit Garg
On Thu, 27 Jun 2019 at 13:40, Ard Biesheuvel  wrote:
>
> (+ Sumit)
>
> On Thu, 27 Jun 2019 at 08:29, Wu, Hao A  wrote:
> >
> > > -Original Message-
> > > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > > Sent: Thursday, June 27, 2019 2:25 PM
> > > To: Albecki, Mateusz
> > > Cc: edk2-devel-groups-io; Wu, Hao A
> > > Subject: Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe:
> > > Implement revision 3 of SdMmcOverrideProtocol
> > >
> > > Hi Mateusz,
> > >
> > > Can you please push those patches somewhere (github?) so that I can
> > > easily do a quick check for regression?
> > >
> > > Thanks,
> > > Marcin
> >
> >
> > Hello Marcin,
> >
> > I have just pushed the series at:
> > https://github.com/hwu25/edk2/tree/sdmmc_override_extend_v4
> >
> > Please help to check.
> >
>
> I have cc'ed my colleague Sumit, who has kindly agreed to regression
> test this branch on Socionext SynQuacer, which also uses the SD/MMC
> override infrastructure.
>
> Sumit, please reply here with your results. And thanks again!

I did picked this patch-set and applied on top of edk2 master branch.
It works well on SynQuacer with eMMC device enumerated properly and
all three eMMC partitions are visible:

 BLK4: Alias(s):
  VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,305200)/eMMC(0x
0)/Ctrl(0x0)
 BLK5: Alias(s):
  VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,305200)/eMMC(0x
0)/Ctrl(0x1)
 BLK6: Alias(s):
  VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,305200)/eMMC(0x
0)/Ctrl(0x2)

Shell> devices

  E9 D - -  1  1   0 VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,3052
00)/eMMC(0x0)/Ctrl(0x0)
  EA D - -  1  1   0 VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,3052
00)/eMMC(0x0)/Ctrl(0x1)
  EB D - -  1  1   0 VenHw(0D51905B-B77E-452A-A2C0-ECA0CC8D514A,3052
00)/eMMC(0x0)/Ctrl(0x2)

So you can add following:

Regression-tested-by: Sumit Garg 

-Sumit

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42937): https://edk2.groups.io/g/devel/message/42937
Mute This Topic: https://groups.io/mt/32214570/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms

2019-06-27 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42936): https://edk2.groups.io/g/devel/message/42936
Mute This Topic: https://groups.io/mt/32230896/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH edk2-platforms 2/2] Platform/ARM: Disable deprecated APIs

2019-06-27 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42934): https://edk2.groups.io/g/devel/message/42934
Mute This Topic: https://groups.io/mt/32230898/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH edk2-platforms 1/2] Platform/ARM: Juno: Fix usage of deprecated macros

2019-06-27 Thread Alexei Fedorov
Reviewed-by: Alexei Fedorov 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42935): https://edk2.groups.io/g/devel/message/42935
Mute This Topic: https://groups.io/mt/32230897/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH edk2-platforms 2/2] Platform/ARM: Disable deprecated APIs

2019-06-27 Thread Sami Mujawar
Add DISABLE_NEW_DEPRECATED_INTERFACES macro to the Arm platform
build flags to disable the use of deprecated APIs.

Signed-off-by: Sami Mujawar 
---

Notes:
v1:
- Disable the use of deprecated APIs for Arm Platforms.   [SAMI]

 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc 
b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
index 
13f5c6c1e7493a72354744ca37721b4a682f6b50..0d543d2a61b15c9c7dcd9212b81a4594c3bd38f0
 100644
--- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
+++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc
@@ -1,5 +1,5 @@
 #
-#  Copyright (c) 2011-2018, ARM Limited. All rights reserved.
+#  Copyright (c) 2011-2019, ARM Limited. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
@@ -17,6 +17,9 @@ [Defines]
   DEFINE NETWORK_TLS_ENABLE = FALSE
   DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
 
+[BuildOptions.common]
+  *_*_*_CC_FLAGS = -DDISABLE_NEW_DEPRECATED_INTERFACES
+
 
[BuildOptions.common.EDKII.DXE_CORE,BuildOptions.common.EDKII.DXE_DRIVER,BuildOptions.common.EDKII.UEFI_DRIVER,BuildOptions.common.EDKII.UEFI_APPLICATION]
   GCC:*_*_*_DLINK_FLAGS = -z common-page-size=0x1000
 
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42933): https://edk2.groups.io/g/devel/message/42933
Mute This Topic: https://groups.io/mt/32230898/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH edk2-platforms 0/2] Platform/ARM: Disable deprecated APIs for Arm Platforms

2019-06-27 Thread Sami Mujawar
edk2 implements the DISABLE_NEW_DEPRECATED_INTERFACES macro that prevents the
usage of unsafe/deprecated APIs/macros by reporting errors at build time.

This patch series:
 - defines DISABLE_NEW_DEPRECATED_INTERFACES macro as part of the build
   options for Arm platforms so that the unsafe/deprecated APIs/macros
   are not used.
 - fixes the usage of unsafe/deprecated APIs/macros in the Juno platform
   code.

The changes can be seen at
https://github.com/samimujawar/edk2-platforms/tree/580_disable_deprecated_interfaces_v1

Sami Mujawar (2):
  Platform/ARM: Juno: Fix usage of deprecated macros
  Platform/ARM: Disable deprecated APIs

 Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 12 +++-
 Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc |  5 -
 2 files changed, 11 insertions(+), 6 deletions(-)

-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42931): https://edk2.groups.io/g/devel/message/42931
Mute This Topic: https://groups.io/mt/32230896/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH edk2-platforms 1/2] Platform/ARM: Juno: Fix usage of deprecated macros

2019-06-27 Thread Sami Mujawar
Replaced the use of unsafe/deprecated macros with alternate safe
options.

Signed-off-by: Sami Mujawar 
---

Notes:
v1:
- Replace unsafe/deprecated macros with alternate safe options.   [SAMI]

 Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c 
b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
index 
c5967f5b7112fbf794573a6040711a9f1cc14c9f..ea7591d704439cd4216f3e3d7155df2b4d2482b3
 100644
--- a/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
+++ b/Platform/ARM/JunoPkg/Drivers/ArmJunoDxe/ArmJunoDxe.c
@@ -1,6 +1,6 @@
 /** @file
 *
-*  Copyright (c) 2013-2017, ARM Limited. All rights reserved.
+*  Copyright (c) 2013-2019, ARM Limited. All rights reserved.
 *
 *  SPDX-License-Identifier: BSD-2-Clause-Patent
 *
@@ -407,7 +407,6 @@ ArmJunoEntryPoint (
   EFI_PHYSICAL_ADDRESS  HypBase;
   CHAR16*TextDevicePath;
   UINTN TextDevicePathSize;
-  VOID  *Buffer;
   UINT32JunoRevision;
   EFI_EVENT EndOfDxeEvent;
 
@@ -495,7 +494,7 @@ ArmJunoEntryPoint (
   //
   if (JunoRevision != JUNO_REVISION_R0) {
 // Enable PCI enumeration
-PcdSetBool (PcdPciDisableBusEnumeration, FALSE);
+PcdSetBoolS (PcdPciDisableBusEnumeration, FALSE);
 
 //
 // Create an event belonging to the "gEfiEndOfDxeEventGroupGuid" group.
@@ -531,8 +530,11 @@ ArmJunoEntryPoint (
   TextDevicePath = (CHAR16*)FixedPcdGetPtr (PcdJunoFdtDevicePath);
   if (TextDevicePath != NULL) {
 TextDevicePathSize = StrSize (TextDevicePath);
-Buffer = PcdSetPtr (PcdFdtDevicePaths, , 
TextDevicePath);
-Status = (Buffer != NULL) ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL;
+Status = PcdSetPtrS (
+   PcdFdtDevicePaths,
+   ,
+   TextDevicePath
+   );
   } else {
 Status = EFI_NOT_FOUND;
   }
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42932): https://edk2.groups.io/g/devel/message/42932
Mute This Topic: https://groups.io/mt/32230897/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [RFC][PATCH 1/1] Maintainers.txt: Drop deprecated SourceForge SVN link

2019-06-27 Thread Laszlo Ersek
+Jordan

On 06/27/19 07:50, Hao A Wu wrote:
> The commit will remove the deprecated edk2 SVN mirror at:
> https://svn.code.sf.net/p/edk2/code/trunk/edk2
> 
> After this commit, the above minnor will not be synced with the changes

(1) s/minnor/mirror/

> made in the GitHub upstream.
> 
> Cc: Liming Gao 
> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> Signed-off-by: Hao A Wu 
> ---
>  Maintainers.txt | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index e52f044bec..e4eb37d641 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -43,7 +43,6 @@ W: http://www.tianocore.org/edk2/
>  L: https://edk2.groups.io/g/devel/
>  T: git - https://github.com/tianocore/edk2.git
>  T: git (mirror) - https://bitbucket.org/tianocore/edk2.git
> -T: svn (read-only, deprecated) - 
> https://svn.code.sf.net/p/edk2/code/trunk/edk2
>  
>  Tianocore Stewards
>  --
> 

Reviewed-by: Laszlo Ersek 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42929): https://edk2.groups.io/g/devel/message/42929
Mute This Topic: https://groups.io/mt/32228630/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

2019-06-27 Thread Bob Feng
The patches look good.

I think removing --nt32 option is incompatible change. What about keep the 
--nt32 ?

For the Patch 2 setup for different VS tool chains.
Reviewed-by: Bob Feng 

Thanks,
Bob

-Original Message-
From: Bi, Dandan 
Sent: Sunday, June 23, 2019 9:59 PM
To: devel@edk2.groups.io
Cc: Feng, Bob C ; Gao, Liming 
Subject: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

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

Patch 1 remove nt32 related flags in bat files.
Patch 2 setup for different VS tool chains.

Cc: Bob Feng 
Cc: Liming Gao 
Dandan Bi (2):
  Edk2: Remove nt32 related flag in bat files
  Edk2Setup: Support different VS tool chain setup

 BaseTools/get_vsvars.bat| 42 +
 BaseTools/set_vsprefix_envs.bat | 47 +---
 BaseTools/toolsetup.bat | 68 ++---
 edksetup.bat| 32 ++-
 4 files changed, 145 insertions(+), 44 deletions(-)

-- 
1.9.5.msysgit.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42928): https://edk2.groups.io/g/devel/message/42928
Mute This Topic: https://groups.io/mt/32177263/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[edk2-devel] [PATCH] MdeModulePkg SmbiosMeasurementDxe: Add Type4 Voltage field to blacklist

2019-06-27 Thread Zeng, Star
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1922

The Type4 Voltage field may be various.
So this patch adds it into the blacklist.

Signed-off-by: Star Zeng 
Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Ray Ni 
Cc: Donald Kuo 
Cc: Chasel Chiu 
---
 .../Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c| 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c 
b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
index 229d4c5f2c5c..7b5d4731466d 100644
--- a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
+++ b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.c
@@ -64,6 +64,7 @@ SMBIOS_FILTER_TABLE  mSmbiosFilterType4BlackList[] = {
   {0x04, OFFSET_OF(SMBIOS_TABLE_TYPE4, CoreCount2),   
FIELD_SIZE_OF(SMBIOS_TABLE_TYPE4, CoreCount2),   0},
   {0x04, OFFSET_OF(SMBIOS_TABLE_TYPE4, EnabledCoreCount2),
FIELD_SIZE_OF(SMBIOS_TABLE_TYPE4, EnabledCoreCount2),0},
   {0x04, OFFSET_OF(SMBIOS_TABLE_TYPE4, ThreadCount2), 
FIELD_SIZE_OF(SMBIOS_TABLE_TYPE4, ThreadCount2), 0},
+  {0x04, OFFSET_OF(SMBIOS_TABLE_TYPE4, Voltage),  
FIELD_SIZE_OF(SMBIOS_TABLE_TYPE4, Voltage),  0},
 };
 SMBIOS_FILTER_TABLE  mSmbiosFilterType17BlackList[] = {
   {0x11, OFFSET_OF(SMBIOS_TABLE_TYPE17, SerialNumber),
FIELD_SIZE_OF(SMBIOS_TABLE_TYPE17, SerialNumber),
SMBIOS_FILTER_TABLE_FLAG_IS_STRING},
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42927): https://edk2.groups.io/g/devel/message/42927
Mute This Topic: https://groups.io/mt/32229980/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [patch 0/2] Edk2Setup: Enahnce edk2setup batch files

2019-06-27 Thread Liming Gao
Dandan:
  One minor comment. Help message shows two ForceRebuild options. Please remove 
one. And, this change retire --nt32 option. Please update wiki page on edksetup 
usage in 
https://github.com/tianocore/tianocore.github.io/wiki/Getting-Started-Writing-Simple-Application.
 With those change, Reviewed-by: Liming Gao 

Reconfig   Reinstall target.txt, tools_def.txt and build_rule.txt.
RebuildPerform incremental rebuild of BaseTools binaries.
ForceRebuild   Force a full rebuild of BaseTools binaries.
ForceRebuild   Force a full rebuild of BaseTools binaries.

Thanks
Liming
> -Original Message-
> From: Bi, Dandan
> Sent: Sunday, June 23, 2019 9:59 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming 
> Subject: [patch 0/2] Edk2Setup: Enahnce edk2setup batch files
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1693
> 
> Patch 1 remove nt32 related flags in bat files.
> Patch 2 setup for different VS tool chains.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Dandan Bi (2):
>   Edk2: Remove nt32 related flag in bat files
>   Edk2Setup: Support different VS tool chain setup
> 
>  BaseTools/get_vsvars.bat| 42 +
>  BaseTools/set_vsprefix_envs.bat | 47 +---
>  BaseTools/toolsetup.bat | 68 
> ++---
>  edksetup.bat| 32 ++-
>  4 files changed, 145 insertions(+), 44 deletions(-)
> 
> --
> 1.9.5.msysgit.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42926): https://edk2.groups.io/g/devel/message/42926
Mute This Topic: https://groups.io/mt/32177263/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [RFC][PATCH 0/1] Drop the SourceForge SVN mirror

2019-06-27 Thread Leif Lindholm
On Thu, Jun 27, 2019 at 01:50:43PM +0800, Hao A Wu wrote:
> The patch proposes to:
> 
> A. Remove the information on the SourceForge SVN mirror repository from
>the Maintainers.txt file.
> B. Stop the sync of the SourceForge SVN mirror from the upstream Github
>Git repository. (At this moment, the SVN mirror is still syncing the
>latest changes)
> 
> Cc: Liming Gao 
> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 

>From my point of view, a strong:
Reviewed-by: Leif Lindholm 

But please wait for additional feedback before pushing.

> Hao A Wu (1):
>   Maintainers.txt: Drop deprecated SourceForge SVN link
> 
>  Maintainers.txt | 1 -
>  1 file changed, 1 deletion(-)
> 
> -- 
> 2.12.0.windows.1
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42925): https://edk2.groups.io/g/devel/message/42925
Mute This Topic: https://groups.io/mt/32228628/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol

2019-06-27 Thread Ard Biesheuvel
(+ Sumit)

On Thu, 27 Jun 2019 at 08:29, Wu, Hao A  wrote:
>
> > -Original Message-
> > From: Marcin Wojtas [mailto:m...@semihalf.com]
> > Sent: Thursday, June 27, 2019 2:25 PM
> > To: Albecki, Mateusz
> > Cc: edk2-devel-groups-io; Wu, Hao A
> > Subject: Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe:
> > Implement revision 3 of SdMmcOverrideProtocol
> >
> > Hi Mateusz,
> >
> > Can you please push those patches somewhere (github?) so that I can
> > easily do a quick check for regression?
> >
> > Thanks,
> > Marcin
>
>
> Hello Marcin,
>
> I have just pushed the series at:
> https://github.com/hwu25/edk2/tree/sdmmc_override_extend_v4
>
> Please help to check.
>

I have cc'ed my colleague Sumit, who has kindly agreed to regression
test this branch on Socionext SynQuacer, which also uses the SD/MMC
override infrastructure.

Sumit, please reply here with your results. And thanks again!

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42924): https://edk2.groups.io/g/devel/message/42924
Mute This Topic: https://groups.io/mt/32214570/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] Fix indentation in edksetup.sh SetupPython3

2019-06-27 Thread Liming Gao
So, this is just indentation update. There is no functionality impact. What 
test have you done?

Thanks
Liming
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of 
> rebe...@bluestop.org
> Sent: Thursday, June 27, 2019 12:55 AM
> To: devel@edk2.groups.io; Feng, Bob C ; Gao, Liming 
> ; Fan, ZhijuX 
> Cc: Rebecca Cran 
> Subject: [edk2-devel] [PATCH] Fix indentation in edksetup.sh SetupPython3
> 
> Signed-off-by: Rebecca Cran 
> ---
>  edksetup.sh | 40 
>  1 file changed, 20 insertions(+), 20 deletions(-)
> 
> diff --git a/edksetup.sh b/edksetup.sh
> index c7b2e1e201..61e988035f 100755
> --- a/edksetup.sh
> +++ b/edksetup.sh
> @@ -108,27 +108,27 @@ function SetupEnv()
>  function SetupPython3()
>  {
>if [ $origin_version ];then
> -  origin_version=
> +origin_version=
> +  fi
> +  for python in $(whereis python3)
> +  do
> +python=$(echo $python | grep "[[:digit:]]$" || true)
> +python_version=${python##*python}
> +if [ -z "${python_version}" ] || (! command -v $python >/dev/null 
> 2>&1);then
> +  continue
>  fi
> -for python in $(whereis python3)
> -do
> -  python=$(echo $python | grep "[[:digit:]]$" || true)
> -  python_version=${python##*python}
> -  if [ -z "${python_version}" ] || (! command -v $python >/dev/null 
> 2>&1);then
> -continue
> -  fi
> -  if [ -z $origin_version ];then
> -origin_version=$python_version
> -export PYTHON_COMMAND=$python
> -continue
> -  fi
> -  ret=`echo "$origin_version < $python_version" |bc`
> -  if [ "$ret" -eq 1 ]; then
> -origin_version=$python_version
> -export PYTHON_COMMAND=$python
> -  fi
> -done
> -return 0
> +if [ -z $origin_version ];then
> +  origin_version=$python_version
> +  export PYTHON_COMMAND=$python
> +  continue
> +fi
> +ret=`echo "$origin_version < $python_version" |bc`
> +if [ "$ret" -eq 1 ]; then
> +  origin_version=$python_version
> +  export PYTHON_COMMAND=$python
> +fi
> +  done
> +  return 0
>  }
> 
>  function SetupPython()
> --
> 2.22.0
> 
> 
> -=-=-=-=-=-=
> Groups.io Links: You receive all messages sent to this group.
> 
> View/Reply Online (#42903): https://edk2.groups.io/g/devel/message/42903
> Mute This Topic: https://groups.io/mt/32217032/1759384
> Group Owner: devel+ow...@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub  [liming@intel.com]
> -=-=-=-=-=-=


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42923): https://edk2.groups.io/g/devel/message/42923
Mute This Topic: https://groups.io/mt/32217032/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol

2019-06-27 Thread Wu, Hao A
> -Original Message-
> From: Marcin Wojtas [mailto:m...@semihalf.com]
> Sent: Thursday, June 27, 2019 2:25 PM
> To: Albecki, Mateusz
> Cc: edk2-devel-groups-io; Wu, Hao A
> Subject: Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe:
> Implement revision 3 of SdMmcOverrideProtocol
> 
> Hi Mateusz,
> 
> Can you please push those patches somewhere (github?) so that I can
> easily do a quick check for regression?
> 
> Thanks,
> Marcin


Hello Marcin,

I have just pushed the series at:
https://github.com/hwu25/edk2/tree/sdmmc_override_extend_v4

Please help to check.

Best Regards,
Hao Wu


> 
> śr., 26 cze 2019 o 15:10 Albecki, Mateusz 
> napisał(a):
> >
> > To allow platform greater control over the bus settings for SD card and
> eMMC card we have added a new notify phase to SdMmcOverrideProtocol
> called GetOperatingParam.
> > This phase is signaled before SD card/eMMC initialization and allows
> platform to tweak the values in new structure called
> EDKII_SD_MMC_OPERATING_PARAMETERS which allows to configure bus
> width, clock frequency and driver strength.
> > Other bus parameters can be configured by overriding host controller
> capabilities.
> >
> > Changes in v2:
> > - Fixed stylistic issues and documentation issues pointed out in v1 review
> > - Changed bus width to be UINT8
> > - Reordered the SD_MMC_BUS_MODE to fix problem with driver never
> choosing the DDR50 speed mode
> > - Fixed the bug with driver not switching the controller into correct driver
> strength for SD card slots
> > - Fixed bug with the driver not considering driver strength support for SD
> card slots
> > - Fixed bug with driver choosing SdMmcMmcHsSdr if card doesn't support
> frequencies above 26MHz
> > - Fixed bug with driver choosing driver strength for legacy speed modes
> >
> > Changes in v3:
> > - Changed BusWidth field of EDKII_SD_MMC_OPERATING_PARAMETERS to
> UINT16
> >
> > Changes in v4
> > - Fixed typos and ordering in SD_MMC_BUS_MODE(this time for real)
> > - Fixed non boolean types usage in if statements
> > - Fixed code that checks if there was an error in switch response for SD 
> > card.
> The code has been updated to check if switch failed due to function being
> busy
> >
> > Tests:
> > - OS boot from eMMC without SdMmcOverride protocol installed
> > - OS boot from eMMC with SdMmcOverride installed and clock frequency
> lowered to 100MHz in HS200
> > - OS boot from eMMC with driver strength changed to Type1
> > - OS boot from eMMC in HS400 without override protocol installed
> > - SD card enumeration in UEFI shell on default speed and high speed(non
> UHS-I) with SdMmcOverride installed and UHS-I disabled in capability
> > - SD card enumeration in UEFI shell on default speed and high speed(non
> UHS-I) with no Override protocol(legacy card used)
> >
> >
> > Cc: Hao A Wu 
> >
> >
> > Albecki, Mateusz (1):
> >   MdeModulePkg/SdMmcHcDxe: Implement revision 3 of
> SdMmcOverrideProtocol
> >
> > Mateusz Albecki (1):
> >   MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase
> >
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c| 512
> +++--
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c  | 410
> ++---
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c |  52 ++-
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  18 +-
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   |  34 ++
> >  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  19 +
> >  MdeModulePkg/Include/Protocol/SdMmcOverride.h  |  60 ++-
> >  7 files changed, 867 insertions(+), 238 deletions(-)
> >
> > --
> > 2.14.1.windows.1
> >
> > 
> >
> > Intel Technology Poland sp. z o.o.
> > ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII
> Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-
> 07-52-316 | Kapital zakladowy 200.000 PLN.
> >
> > Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego
> adresata i moze zawierac informacje poufne. W razie przypadkowego
> otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale
> jej usuniecie; jakiekolwiek
> > przegladanie lub rozpowszechnianie jest zabronione.
> > This e-mail and any attachments may contain confidential material for the
> sole use of the intended recipient(s). If you are not the intended recipient,
> please contact the sender and delete all copies; any review or distribution by
> > others is strictly prohibited.
> >
> >
> > 
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42921): https://edk2.groups.io/g/devel/message/42921
Mute This Topic: https://groups.io/mt/32214570/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH v4 0/2] MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol

2019-06-27 Thread Marcin Wojtas
Hi Mateusz,

Can you please push those patches somewhere (github?) so that I can
easily do a quick check for regression?

Thanks,
Marcin

śr., 26 cze 2019 o 15:10 Albecki, Mateusz 
napisał(a):
>
> To allow platform greater control over the bus settings for SD card and eMMC 
> card we have added a new notify phase to SdMmcOverrideProtocol called 
> GetOperatingParam.
> This phase is signaled before SD card/eMMC initialization and allows platform 
> to tweak the values in new structure called EDKII_SD_MMC_OPERATING_PARAMETERS 
> which allows to configure bus width, clock frequency and driver strength.
> Other bus parameters can be configured by overriding host controller 
> capabilities.
>
> Changes in v2:
> - Fixed stylistic issues and documentation issues pointed out in v1 review
> - Changed bus width to be UINT8
> - Reordered the SD_MMC_BUS_MODE to fix problem with driver never choosing the 
> DDR50 speed mode
> - Fixed the bug with driver not switching the controller into correct driver 
> strength for SD card slots
> - Fixed bug with the driver not considering driver strength support for SD 
> card slots
> - Fixed bug with driver choosing SdMmcMmcHsSdr if card doesn't support 
> frequencies above 26MHz
> - Fixed bug with driver choosing driver strength for legacy speed modes
>
> Changes in v3:
> - Changed BusWidth field of EDKII_SD_MMC_OPERATING_PARAMETERS to UINT16
>
> Changes in v4
> - Fixed typos and ordering in SD_MMC_BUS_MODE(this time for real)
> - Fixed non boolean types usage in if statements
> - Fixed code that checks if there was an error in switch response for SD 
> card. The code has been updated to check if switch failed due to function 
> being busy
>
> Tests:
> - OS boot from eMMC without SdMmcOverride protocol installed
> - OS boot from eMMC with SdMmcOverride installed and clock frequency lowered 
> to 100MHz in HS200
> - OS boot from eMMC with driver strength changed to Type1
> - OS boot from eMMC in HS400 without override protocol installed
> - SD card enumeration in UEFI shell on default speed and high speed(non 
> UHS-I) with SdMmcOverride installed and UHS-I disabled in capability
> - SD card enumeration in UEFI shell on default speed and high speed(non 
> UHS-I) with no Override protocol(legacy card used)
>
>
> Cc: Hao A Wu 
>
>
> Albecki, Mateusz (1):
>   MdeModulePkg/SdMmcHcDxe: Implement revision 3 of SdMmcOverrideProtocol
>
> Mateusz Albecki (1):
>   MdeModulePkg/SdMmcOverride: Add GetOperatingParam notify phase
>
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c| 512 
> +++--
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c  | 410 ++---
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c |  52 ++-
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h |  18 +-
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c   |  34 ++
>  MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h   |  19 +
>  MdeModulePkg/Include/Protocol/SdMmcOverride.h  |  60 ++-
>  7 files changed, 867 insertions(+), 238 deletions(-)
>
> --
> 2.14.1.windows.1
>
> 
>
> Intel Technology Poland sp. z o.o.
> ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII 
> Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 
> 957-07-52-316 | Kapital zakladowy 200.000 PLN.
>
> Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i 
> moze zawierac informacje poufne. W razie przypadkowego otrzymania tej 
> wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; 
> jakiekolwiek
> przegladanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the 
> sole use of the intended recipient(s). If you are not the intended recipient, 
> please contact the sender and delete all copies; any review or distribution by
> others is strictly prohibited.
>
>
> 
>

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42920): https://edk2.groups.io/g/devel/message/42920
Mute This Topic: https://groups.io/mt/32214570/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] [PATCH] Platform/Vlv2TbltDevicePkg: Remove dependency of DxeDeferImageLoadLib

2019-06-27 Thread Sun, Zailiang
Reviewed-By: Zailiang Sun 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#42919): https://edk2.groups.io/g/devel/message/42919
Mute This Topic: https://groups.io/mt/32201140/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-