Re: [edk2-devel] [PATCH V2] UefiCpuPkg CpuCommFeaturesLib: Reduce to set MSR_IA32_CLOCK_MODULATION

2019-05-27 Thread Ni, Ray
Reviewed-by: Ray Ni 

> -Original Message-
> From: Zeng, Star 
> Sent: Tuesday, May 21, 2019 6:36 PM
> To: devel@edk2.groups.io
> Cc: Zeng, Star ; Laszlo Ersek ;
> Dong, Eric ; Ni, Ray ; Kumar,
> Chandana C ; Li, Kevin Y
> 
> Subject: [PATCH V2] UefiCpuPkg CpuCommFeaturesLib: Reduce to set
> MSR_IA32_CLOCK_MODULATION
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1810
> 
> This patch covers two problems.
> 
> 1. Current code gets CPUID_THERMAL_POWER_MANAGEMENT in
> ClockModulationInitialize() and uses its ECMD bit for all processors.
> But ClockModulationInitialize() is only executed by BSP, that means the bit is
> just for BSP.
> It may have no functionality issue as all processors may have same bit value
> in a great possibility. But for good practice, the code should get
> CPUID_THERMAL_POWER_MANAGEMENT in ClockModulationSupport
> (executed by all processors), and then use them in
> ClockModulationInitialize() for all processors.
> We can see that Aesni.c (and others) have used this good practice.
> 
> 2. Current code uses 3 CPU_REGISTER_TABLE_WRITE_FIELD for
> MSR_IA32_CLOCK_MODULATION in ClockModulationInitialize(), they can be
> reduced to 1 CPU_REGISTER_TABLE_WRITE64 by getting
> MSR_IA32_CLOCK_MODULATION for all processors in
> ClockModulationSupport() and then update fields for register table write in
> ClockModulationInitialize().
> 
> We may argue that there may be more times of
> MSR_IA32_CLOCK_MODULATION getting. But actually the times of
> MSR_IA32_CLOCK_MODULATION getting could be also reduced.
> 
> The reason is in ProgramProcessorRegister() of CpuFeaturesInitialize.c,
> AsmMsrBitFieldWrite64 (AsmReadMsr64 + AsmWriteMsr64) will be used for
> CPU_REGISTER_TABLE_WRITE_FIELD, and AsmWriteMsr64 will be used for
> CPU_REGISTER_TABLE_WRITE64.
> 
> The times of MSR accessing could be reduced with this patch.
> Without the patch:
> 3 CPU_REGISTER_TABLE_WRITE_FIELD (in ClockModulationInitialize)
>   ==> 3 AsmMsrBitFieldWrite64
> ==> 3 AsmReadMsr64 + 3 AsmWriteMsr64
> 
> With the patch:
> 1 AsmReadMsr64 (in ClockModulationSupport) +
> 1 CPU_REGISTER_TABLE_WRITE64 (in ClockModulationInitialize)
>   ==> 1 AsmWriteMsr64
> 
> Cc: Laszlo Ersek 
> Cc: Eric Dong 
> Cc: Ruiyu Ni 
> Cc: Chandana Kumar 
> Cc: Kevin Li 
> Signed-off-by: Star Zeng 
> ---
>  .../CpuCommonFeaturesLib/ClockModulation.c| 87 +--
>  .../CpuCommonFeaturesLib/CpuCommonFeatures.h  | 15 
>  .../CpuCommonFeaturesLib.c|  2 +-
>  3 files changed, 78 insertions(+), 26 deletions(-)
> 
> diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c
> b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c
> index 614768587501..b1c6bf6148f3 100644
> --- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c
> +++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/ClockModulation.c
> @@ -1,13 +1,40 @@
>  /** @file
>Clock Modulation feature.
> 
> -  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
> +  Copyright (c) 2017 - 2019, Intel Corporation. All rights
> + reserved.
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> 
>  #include "CpuCommonFeatures.h"
> 
> +typedef struct  {
> +  CPUID_THERMAL_POWER_MANAGEMENT_EAX
> ThermalPowerManagementEax;
> +  MSR_IA32_CLOCK_MODULATION_REGISTER  ClockModulation; }
> +CLOCK_MODULATION_CONFIG_DATA;
> +
> +/**
> +  Prepares for the data used by CPU feature detection and initialization.
> +
> +  @param[in]  NumberOfProcessors  The number of CPUs in the platform.
> +
> +  @return  Pointer to a buffer of CPU related configuration data.
> +
> +  @note This service could be called by BSP only.
> +**/
> +VOID *
> +EFIAPI
> +ClockModulationGetConfigData (
> +  IN UINTN  NumberOfProcessors
> +  )
> +{
> +  UINT32*ConfigData;
> +
> +  ConfigData = AllocateZeroPool (sizeof
> (CLOCK_MODULATION_CONFIG_DATA)
> +* NumberOfProcessors);
> +  ASSERT (ConfigData != NULL);
> +  return ConfigData;
> +}
> +
>  /**
>Detects if Clock Modulation feature supported on current processor.
> 
> @@ -32,7 +59,22 @@ ClockModulationSupport (
>IN VOID  *ConfigData  OPTIONAL
>)
>  {
> -  return (CpuInfo->CpuIdVersionInfoEdx.Bits.ACPI == 1);
> +  CLOCK_MODULATION_CONFIG_DATA *CmConfigData;
> +
> +  if (CpuInfo->CpuIdVersionInfoEdx.Bits.ACPI == 1) {
> +CmConfigData = (CLOCK_MODULATION_CONFIG_DATA *) ConfigData;
> +ASSERT (CmConfigData != NULL);
> +AsmCpuid (
> +  CPUID_THERMAL_POWER_MANAGEMENT,
> +
> [ProcessorNumber].ThermalPowerManagementEax.Uint32,
> +  NULL,
> +  NULL,
> +  NULL
> +  );
> +CmConfigData[ProcessorNumber].ClockModulation.Uint64 =
> AsmReadMsr64 (MSR_IA32_CLOCK_MODULATION);
> +return TRUE;
> +  }
> +  return FALSE;
>  }
> 
>  /**
> @@ -61,34 +103,29 @@ ClockModulationInitialize (
>IN BOOLEAN   State
>)
>  {
> -  CPUID_THERMAL_POWER_MANAGEMENT_EAX
> ThermalPowerManagementEax;
> -  AsmCpuid 

Re: [edk2-devel] [PATCH V3] BaseTools:Make BaseTools support new rules to generate RAW FFS FILE

2019-05-27 Thread Bob Feng
Zhiju,

+def GetFileList(FfsInf, FileType, FileExtension, Dict = {}, IsMakefile=False, 
SectionType=None):

For Dict = {}, {} as default value of a parameter is wrong, please update it as 
None.
And inside this function, add
If Dict is None:
Dict = {}


Others looks fine for me.

Thanks,
Bob

-Original Message-
From: Fan, ZhijuX 
Sent: Friday, May 24, 2019 5:22 PM
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C 
Subject: [PATCH V3] BaseTools:Make BaseTools support new rules to generate RAW 
FFS FILE

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

If RAW FFS File Rule has no section for its data.For RAW FFS File, directly 
call GenFfs tool to generate FFS file.

Ffs Rule:
[Rule.Common.USER_DEFINED.MicroCode]
  FILE RAW = $(NAMED_GUID) {
$(INF_OUTPUT)/$(MODULE_NAME).bin
  }
[Rule.Common.USER_DEFINED.LOGO]
  FILE RAW = $(NAMED_GUID) {
   |.bmp
  }

As shown in the rule above,if SectionType and FileType not defined, FFS files 
are generated directly, and no other type of file is generated.

The patch is to make the BaseTools support these two rules

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Zhiju.Fan 
---
 BaseTools/Source/Python/Common/DataType.py   |  1 +
 BaseTools/Source/Python/GenFds/EfiSection.py | 22 +-  
BaseTools/Source/Python/GenFds/FdfParser.py  | 14 --
 BaseTools/Source/Python/GenFds/Section.py|  7 ++-
 4 files changed, 41 insertions(+), 5 deletions(-)

diff --git a/BaseTools/Source/Python/Common/DataType.py 
b/BaseTools/Source/Python/Common/DataType.py
index 7cd67bc01a..19c8fa9e56 100644
--- a/BaseTools/Source/Python/Common/DataType.py
+++ b/BaseTools/Source/Python/Common/DataType.py
@@ -122,6 +122,7 @@ BINARY_FILE_TYPE_VER = 'VER'
 BINARY_FILE_TYPE_UI = 'UI'
 BINARY_FILE_TYPE_BIN = 'BIN'
 BINARY_FILE_TYPE_FV = 'FV'
+BINARY_FILE_TYPE_RAW = 'RAW_BINARY'
 
 PLATFORM_COMPONENT_TYPE_LIBRARY_CLASS = 'LIBRARY_CLASS'
 PLATFORM_COMPONENT_TYPE_MODULE = 'MODULE'
diff --git a/BaseTools/Source/Python/GenFds/EfiSection.py 
b/BaseTools/Source/Python/GenFds/EfiSection.py
index 302f244faf..48b3954f4c 100644
--- a/BaseTools/Source/Python/GenFds/EfiSection.py
+++ b/BaseTools/Source/Python/GenFds/EfiSection.py
@@ -93,7 +93,7 @@ class EfiSection (EfiSectionClassObject):
 if '.depex' in SuffixMap:
 FileList.append(Filename)
 else:
-FileList, IsSect = Section.Section.GetFileList(FfsInf, 
self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile)
+FileList, IsSect = Section.Section.GetFileList(FfsInf, 
+ self.FileType, self.FileExtension, Dict, IsMakefile=IsMakefile, 
+ SectionType=SectionType)
 if IsSect :
 return FileList, self.Alignment
 
@@ -217,6 +217,26 @@ class EfiSection (EfiSectionClassObject):
  Ui=StringData, 
IsMakefile=IsMakefile)
 OutputFileList.append(OutputFile)
 
+#
+# If Section Type is BINARY_FILE_TYPE_RAW
+#
+elif SectionType == BINARY_FILE_TYPE_RAW:
+"""If File List is empty"""
+if FileList == []:
+if self.Optional == True:
+GenFdsGlobalVariable.VerboseLogger("Optional Section don't 
exist!")
+return [], None
+else:
+EdkLogger.error("GenFds", GENFDS_ERROR, "Output 
+ file for %s section could not be found for %s" % (SectionType, 
+ InfFileName))
+
+elif len(FileList) > 1:
+EdkLogger.error("GenFds", GENFDS_ERROR,
+"Files suffixed with %s are not allowed to 
have more than one file in %s[Binaries] section" % (
+self.FileExtension, InfFileName))
+else:
+for File in FileList:
+File = GenFdsGlobalVariable.MacroExtend(File, Dict)
+OutputFileList.append(File)
 
 else:
 """If File List is empty"""
diff --git a/BaseTools/Source/Python/GenFds/FdfParser.py 
b/BaseTools/Source/Python/GenFds/FdfParser.py
index ea1c3eeb30..4595dea733 100644
--- a/BaseTools/Source/Python/GenFds/FdfParser.py
+++ b/BaseTools/Source/Python/GenFds/FdfParser.py
@@ -3749,8 +3749,19 @@ class FdfParser:
 #
 def _GetEfiSection(self, Obj):
 OldPos = self.GetFileBufferPos()
+EfiSectionObj = EfiSection()
 if not self._GetNextWord():
-return False
+CurrentLine = 
self._CurrentLine()[self.CurrentOffsetWithinLine:].split()[0].strip()
+if self._Token == '{' and Obj.FvFileType == "RAW" and TAB_SPLIT in 
CurrentLine:
+if self._IsToken(TAB_VALUE_SPLIT):
+EfiSectionObj.FileExtension = self._GetFileExtension()
+elif self._GetNextToken():
+EfiSectionObj.FileName = self._Token
+EfiSectionObj.SectionType = 

Re: [edk2-devel] [Patch 0/3] Move network related components from MdeModulePkg to NetworkPkg

2019-05-27 Thread Liming Gao
Hi, all

   I just push this patch set 4542f8b8135f1f1ee5654e25139be9769e139ddd.. 
ec56fa27842835e69a2b89b602866c3d652315eb.

   If you find any break issue, please let me know. 

Thanks
Liming
>-Original Message-
>From: Fu, Siyuan
>Sent: Friday, May 17, 2019 8:46 AM
>To: devel@edk2.groups.io; Gao, Liming 
>Subject: RE: [edk2-devel] [Patch 0/3] Move network related components
>from MdeModulePkg to NetworkPkg
>
>Series Reviewed-by: Siyuan Fu 
>
>
>> -Original Message-
>> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Liming
>> Gao
>> Sent: Wednesday, May 15, 2019 8:02 PM
>> To: devel@edk2.groups.io
>> Subject: [edk2-devel] [Patch 0/3] Move network related components from
>> MdeModulePkg to NetworkPkg
>>
>> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1293
>> After all platforms consume Network DSC/FDF include segment files, this
>change
>> can be applied to move network components from MdeModulePkg to
>NetworkPkg.
>> If so, NetworkPkg will become the standalone feature package.
>>
>>
>> Liming Gao (3):
>>   NetworkPkg: Move Network library and drivers from MdeModulePkg to
>> NetworkPkg
>>   NetworkPkg: Move Network library header file from MdeModulePkg to
>> NetworkPkg
>>   MdeModulePkg: Remove network library header file from package DEC file
>>
>>  .../Network => NetworkPkg}/ArpDxe/ArpDriver.c  |  0
>>  .../Network => NetworkPkg}/ArpDxe/ArpImpl.c|  0
>>  .../Network => NetworkPkg}/ArpDxe/ArpMain.c|  0
>>  .../Network => NetworkPkg}/ArpDxe/ComponentName.c  |  0
>>  .../Dhcp4Dxe/ComponentName.c   |  0
>>  .../Network => NetworkPkg}/Dhcp4Dxe/Dhcp4Driver.c  |  0
>>  .../Network => NetworkPkg}/Dhcp4Dxe/Dhcp4Impl.c|  0
>>  .../Network => NetworkPkg}/Dhcp4Dxe/Dhcp4Io.c  |  0
>>  .../Network => NetworkPkg}/Dhcp4Dxe/Dhcp4Option.c  |  0
>>  .../Universal/Network => NetworkPkg}/DpcDxe/Dpc.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/ComponentName.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Common.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Config2Impl.c |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Config2Nv.c   |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Driver.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Icmp.c|  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4If.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Igmp.c|  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Impl.c|  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Input.c   |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Option.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Output.c  |  0
>>  .../Network => NetworkPkg}/Ip4Dxe/Ip4Route.c   |  0
>>  .../Library/DxeDpcLib/DpcLib.c |  0
>>  .../Library/DxeHttpLib/DxeHttpLib.c|  0
>>  .../Library/DxeIpIoLib/DxeIpIoLib.c|  0
>>  .../Library/DxeNetLib/DxeNetLib.c  |  0
>>  .../Library/DxeNetLib/NetBuffer.c  |  0
>>  .../Library/DxeTcpIoLib/DxeTcpIoLib.c  |  0
>>  .../Library/DxeUdpIoLib/DxeUdpIoLib.c  |  0
>>  .../Network => NetworkPkg}/MnpDxe/ComponentName.c  |  0
>>  .../Network => NetworkPkg}/MnpDxe/MnpConfig.c  |  0
>>  .../Network => NetworkPkg}/MnpDxe/MnpDriver.c  |  0
>>  .../Network => NetworkPkg}/MnpDxe/MnpIo.c  |  0
>>  .../Network => NetworkPkg}/MnpDxe/MnpMain.c|  0
>>  .../Network => NetworkPkg}/MnpDxe/MnpVlan.c|  0
>>  .../Mtftp4Dxe/ComponentName.c  |  0
>>  .../Mtftp4Dxe/Mtftp4Driver.c   |  0
>>  .../Network => NetworkPkg}/Mtftp4Dxe/Mtftp4Impl.c  |  0
>>  .../Mtftp4Dxe/Mtftp4Option.c   |  0
>>  .../Network => NetworkPkg}/Mtftp4Dxe/Mtftp4Rrq.c   |  0
>>  .../Mtftp4Dxe/Mtftp4Support.c  |  0
>>  .../Network => NetworkPkg}/Mtftp4Dxe/Mtftp4Wrq.c   |  0
>>  .../Network => NetworkPkg}/SnpDxe/Callback.c   |  0
>>  .../Network => NetworkPkg}/SnpDxe/ComponentName.c  |  0
>>  .../Network => NetworkPkg}/SnpDxe/Get_status.c |  0
>>  .../Network => NetworkPkg}/SnpDxe/Initialize.c |  0
>>  .../SnpDxe/Mcast_ip_to_mac.c   |  0
>>  .../Network => NetworkPkg}/SnpDxe/Nvdata.c |  0
>>  .../Network => NetworkPkg}/SnpDxe/Receive.c|  0
>>  .../SnpDxe/Receive_filters.c   |  0
>>  .../Network => NetworkPkg}/SnpDxe/Reset.c  |  0
>>  .../Network => NetworkPkg}/SnpDxe/Shutdown.c   |  0
>>  .../Universal/Network => NetworkPkg}/SnpDxe/Snp.c  |  0
>>  .../Network => NetworkPkg}/SnpDxe/Start.c  |  0
>>  .../SnpDxe/Station_address.c   |  0
>>  .../Network => NetworkPkg}/SnpDxe/Statistics.c |  0
>>  .../Universal/Network => NetworkPkg}/SnpDxe/Stop.c |  0
>>  .../Network => NetworkPkg}/SnpDxe/Transmit.c   |  0
>>  .../Network => NetworkPkg}/SnpDxe/WaitForPacket.c  |  0
>>  .../Network => NetworkPkg}/Udp4Dxe/ComponentName.c |  0
>>  .../Network => 

Re: [edk2-devel] [PATCH] PciBusDxe: duplicate node insertion for every PPB device in the system

2019-05-27 Thread Ni, Ray
Reviewed-by: Ray Ni 


> -Original Message-
> From: Javeed, Ashraf
> Sent: Monday, May 27, 2019 6:24 PM
> To: devel@edk2.groups.io
> Cc: Javeed, Ashraf ; Wang, Jian J
> ; Ni, Ray 
> Subject: [PATCH] PciBusDxe: duplicate node insertion for every PPB device in
> the system
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1796
> Bug fixed in PciBusDxe\PciLib.c.
> Removed the redundant second call to PciSearchDevice sub-routine when
> the PCD for the Hot-Plug support is disabled.
> 
> Signed-off-by: Ashraf Javeed 
> Cc: Jian J Wang 
> Cc: Ray Ni 
> ---
>  MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 19 +--
>  1 file changed, 1 insertion(+), 18 deletions(-)
> 
> diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
> b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
> index f0d9f45c4a..5b55fb5d3b 100644
> --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
> +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
> @@ -1114,24 +1114,7 @@ PciScanBus (
>  //
>  // For PPB
>  //
> -if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
> -  //
> -  // If Hot Plug is not supported,
> -  // get the bridge information
> -  //
> -  Status = PciSearchDevice (
> -Bridge,
> -,
> -StartBusNumber,
> -Device,
> -Func,
> -
> -);
> -
> -  if (EFI_ERROR (Status)) {
> -return Status;
> -  }
> -} else {
> +if (FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
>//
>// If Hot Plug is supported,
>// Get the bridge information
> --
> 2.21.0.windows.1


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

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



Re: [edk2-devel] [Patch] BaseTools/Capsule: Supports UEFI Capsule with multiple payloads and embedded drivers

2019-05-27 Thread Eric Jin
Liming,

Yes. It is not for Q2 stable tag.

Best Regards
Eric

-Original Message-
From: Gao, Liming 
Sent: Monday, May 27, 2019 9:58 PM
To: devel@edk2.groups.io; Jin, Eric 
Cc: Feng, Bob C ; Kinney, Michael D 
; Kinney, Michael D 
Subject: RE: [edk2-devel] [Patch] BaseTools/Capsule: Supports UEFI Capsule with 
multiple payloads and embedded drivers

Seemly, this is new feature implementation. It will not be for Q2 stable tag. 
Right?

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Eric Jin
> Sent: Monday, May 27, 2019 3:28 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming ; 
> Kinney; Kinney, Michael D 
> Subject: [edk2-devel] [Patch] BaseTools/Capsule: Supports UEFI Capsule with 
> multiple payloads and embedded drivers
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1834
> 
> * Add arguments "--embedded-driver" to support embedded driver in command 
> line.
> * Add arguments "--update-image-index" to identify ImageIndex within the 
> device
>   in command line.
> * Add arguments "-j JSONFILE" to support multiple payloads and embedded 
> drivers
>   with JSON file.
> 
> The update is in a backwards compatible manner, so all command line options to
> support single payload are still supported. But all the options associated 
> with
> multiple payloads should be provided in a JSON file.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Cc: Kinney, Michael D 
> Signed-off-by: Eric Jin 
> ---
>  BaseTools/Source/Python/Capsule/GenerateCapsule.py  | 961
> ++
> ++
> ++
> ++
> ++
> +++--
> -
> 
>  BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py|  14 
> +-
>  BaseTools/Source/Python/Common/Uefi/Capsule/FmpCapsuleHeader.py |  12 
> +++-
>  3 files changed, 730 insertions(+), 257 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/Capsule/GenerateCapsule.py 
> b/BaseTools/Source/Python/Capsule/GenerateCapsule.py
> index 4de3635298..ee95c4cc2e 100644
> --- a/BaseTools/Source/Python/Capsule/GenerateCapsule.py
> +++ b/BaseTools/Source/Python/Capsule/GenerateCapsule.py
> @@ -1,18 +1,16 @@
>  ## @file
> 
>  # Generate a capsule.
> 
>  #
> 
> -# This tool generates a UEFI Capsule around an FMP Capsule.  The capsule 
> payload
> 
> +# This tool generates a UEFI Capsule around an FMP Capsule. The capsule 
> payload
> 
>  # be signed using signtool or OpenSSL and if it is signed the signed content
> 
>  # includes an FMP Payload Header.
> 
>  #
> 
>  # This tool is intended to be used to generate UEFI Capsules to update the
> 
> -# system firmware or device firmware for integrated devices.  In order to
> 
> +# system firmware or device firmware for integrated devices. In order to
> 
>  # keep the tool as simple as possible, it has the following limitations:
> 
> -#   * Do not support multiple payloads in a capsule.
> 
> -#   * Do not support optional drivers in a capsule.
> 
>  #   * Do not support vendor code bytes in a capsule.
> 
>  #
> 
> -# Copyright (c) 2018, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> 
> 
> @@ -29,6 +27,7 @@ import os
>  import tempfile
> 
>  import shutil
> 
>  import platform
> 
> +import json
> 
>  from Common.Uefi.Capsule.UefiCapsuleHeader import UefiCapsuleHeaderClass
> 
>  from Common.Uefi.Capsule.FmpCapsuleHeader  import FmpCapsuleHeaderClass
> 
>  from Common.Uefi.Capsule.FmpAuthHeader import FmpAuthHeaderClass
> 
> @@ -42,7 +41,7 @@ __version__ = '0.9'
>  __copyright__   = 'Copyright (c) 2018, Intel Corporation. All rights 
> reserved.'
> 
>  __description__ = 'Generate a capsule.\n'
> 
> 
> 
> -def SignPayloadSignTool (Payload, ToolPath, PfxFile):
> 
> +def SignPayloadSignTool (Payload, ToolPath, PfxFile, Verbose = False):
> 
>  #
> 
>  # Create a temporary directory
> 
>  #
> 
> @@ -75,6 +74,8 @@ def SignPayloadSignTool (Payload, ToolPath, PfxFile):
>  Command = Command + '/p7 {TempDir} '.format (TempDir = 

[edk2-devel] [PATCH] BaseTools/GenBiosId: Add a new tool GenBiosId

2019-05-27 Thread Zhang, Shenglei
GenBiosId is a tool to generate the BIOS ID binary file which uses
the data from the configuration file.
https://bugzilla.tianocore.org/show_bug.cgi?id=1846

Signed-off-by: Shenglei Zhang 
---
 BaseTools/Source/C/GenBiosId/GenBiosId.c | 627 +++
 BaseTools/Source/C/GNUmakefile   |   3 +-
 BaseTools/Source/C/GenBiosId/BiosId.env  |  27 +
 BaseTools/Source/C/GenBiosId/GNUmakefile |  14 +
 BaseTools/Source/C/GenBiosId/GenBiosId.h | 105 
 BaseTools/Source/C/GenBiosId/Makefile|  14 +
 BaseTools/Source/C/Makefile  |   3 +-
 7 files changed, 791 insertions(+), 2 deletions(-)
 create mode 100644 BaseTools/Source/C/GenBiosId/GenBiosId.c
 create mode 100644 BaseTools/Source/C/GenBiosId/BiosId.env
 create mode 100644 BaseTools/Source/C/GenBiosId/GNUmakefile
 create mode 100644 BaseTools/Source/C/GenBiosId/GenBiosId.h
 create mode 100644 BaseTools/Source/C/GenBiosId/Makefile

diff --git a/BaseTools/Source/C/GenBiosId/GenBiosId.c 
b/BaseTools/Source/C/GenBiosId/GenBiosId.c
new file mode 100644
index ..21d71d4ebd51
--- /dev/null
+++ b/BaseTools/Source/C/GenBiosId/GenBiosId.c
@@ -0,0 +1,627 @@
+/** @file
+This tool generates the BIOS ID binary file using the data from the 
configuration file.
+
+Copyright (c) 2015 - 2019, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#include "GenBiosId.h"
+
+CHAR8  InputFileName[FILE_NAME_SIZE];
+CHAR8  OutputFileName[FILE_NAME_SIZE];
+CHAR8  OutputBatchFileName[FILE_NAME_SIZE];
+
+FILE  *InputFile;
+FILE  *OutputFile;
+FILE  *OutputBatchFile;
+
+BIOS_ID_IMAGE BiosIdImage = {
+  { '$', 'I', 'B', 'I', 'O', 'S', 'I', '$' },
+  {
+{ ATOU (' '), ATOU (' '), ATOU (' '), ATOU (' '), ATOU (' '), ATOU (' '), 
ATOU (' ') },
+ATOU (' '),
+ATOU ('.'),
+{ ATOU (' '), ATOU (' '), ATOU (' ') },
+ATOU ('.'),
+{ ATOU ('0'), ATOU ('0'), ATOU ('0'), ATOU ('0') },
+ATOU ('.'),
+ATOU (' '),
+{ ATOU ('0'), ATOU ('0') },
+ATOU ('.'),
+{ ATOU ('0'), ATOU ('0'), ATOU ('0'), ATOU ('0'), ATOU ('0'),
+  ATOU ('0'), ATOU ('0'), ATOU ('0'), ATOU ('0'), ATOU ('0') },
+ATOU ('\0')
+  }
+};
+
+VOID
+PrintBanner (
+  VOID
+  )
+/*++
+
+Routine Description:
+
+Arguments:
+
+Returns:
+
+--*/
+{
+  printf ("\n");
+  printf ("GenBiosId utility, version: v1.0 05/27/2018   \n");
+  printf ("Copyright (c) 2019, Intel Corporation. All rights reserved.   \n");
+  printf ("\n");
+}
+
+VOID
+PrintUsage (
+  VOID
+  )
+/*++
+
+Routine Description:
+
+Arguments:
+
+Returns:
+
+--*/
+{
+  printf ("Usage:\n");
+  printf ("GenBiosId -i ConfigFile -o OutputFile [-ob OutputBatchFile] \n");
+  printf ("\n");
+}
+
+CHAR8 *
+StripLeadingWhiteSpace (
+  IN CHAR8 *StrInput
+  )
+/*++
+
+Routine Description:
+
+  Strip the leading whitespoace off the given ASCII string.
+
+Arguments:
+
+  StrInput  - the ASCII string that should be processed.
+
+Returns:
+
+  A pointer to the first non-whitespace character in the given string,
+  or NULL if the string was all whitespace.
+
+--*/
+{
+  if (StrInput == NULL) {
+return NULL;
+  }
+
+  while (*StrInput != 0) {
+if ((*StrInput == ' ') || (*StrInput == '\t') || (*StrInput == '\n')) {
+  ++StrInput;
+} else {
+  return StrInput;
+}
+  }
+
+  return NULL;
+}
+
+VOID
+ConvertToUnicode (
+  IN  CHAR8  *StrAscii,
+  OUT CHAR16 *StrUnicode
+  )
+/*++
+
+Routine Description:
+
+  Convert the given ASCII string to Unicode without appending terminating 
0x.
+
+Arguments:
+
+  StrAscii- the source ASCII string, null-terminated.
+
+  StrUnicode  - the resulted Unicode string will be put here, without the 
terminating 0x.
+
+Returns:
+
+--*/
+{
+  if ((StrAscii == NULL) || (StrUnicode == NULL)) {
+return;
+  }
+
+  while (*StrAscii != 0) {
+*StrUnicode = ATOU (*StrAscii);
+++StrAscii;
+++StrUnicode;
+  }
+}
+
+VOID
+FillTimeStamp (
+  OUT CHAR16  *StrTimeStampUnicode
+  )
+/*++
+
+Routine Description:
+  The function generates the current timestamp in "YYMMDDHHMM" format
+  and puts it into the Unicode string supplied, without the null-terminator.
+
+Arguments:
+
+  StrTimeStampUnicode - The Unicode string which is filled on return with the 
current timestamp.
+
+Returns:
+
+--*/
+{
+  struct tm *Time;
+  time_tCurTime;
+  CHAR8 StrTime[11];
+
+  //
+  // Fetch the current time based on UTC timezone
+  //
+  time ();
+  Time = gmtime ();
+
+  if (NULL == Time) {
+return;
+  }
+
+  sprintf (
+StrTime,
+"%02d%02d%02d%02d%02d",
+(Time->tm_year + 1900) % 100, // Year is 1900-based, need only 2 digits.
+Time->tm_mon + 1, // Month is zero based.
+Time->tm_mday,
+Time->tm_hour,
+Time->tm_min
+);
+
+  ConvertToUnicode (StrTime, StrTimeStampUnicode);
+}
+
+VOID
+ConvertToAscii (
+  IN  CHAR16 *StrUnicode,
+  OUT CHAR8  *StrAscii
+  )
+/*++
+
+Routine Description:
+
+  Convert the given Unicode string to 

Re: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk related functions.

2019-05-27 Thread Wu, Hao A
> -Original Message-
> From: Xu, Wei6
> Sent: Friday, May 24, 2019 5:02 PM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J; Wu, Hao A; Zhang, Chao B; Xu, Wei6
> Subject: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Enhance
> Capsule-On-Disk related functions.
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1840
> 
> 1. Add missing '\n' in usage.
> 2. Fix the dead loop of CapsuleApp -L.
> 3. Fix the bug that CapsuleApp -OD cannot perform capsules in sub-
> folder.
> 4. Optimize the handling for option -NR and -OD to support both
> 'CapsuleApp  -OD -NR' and 'CapsuleApp  -NR -OD'.
> 5. Check if Capsule-On-Disk is supported by "OsIndicationsSupported"
> variable firstly before processing capsules. If not supported, prompt
> an error message and quit the process.

I think this one belongs to a bug fix.
Acked-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/Application/CapsuleApp/CapsuleApp.c   | 41 -
> ---
>  MdeModulePkg/Application/CapsuleApp/CapsuleDump.c  |  4 +-
>  .../Application/CapsuleApp/CapsuleOnDisk.c | 56
> +-
>  3 files changed, 77 insertions(+), 24 deletions(-)
> 
> diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
> b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
> index e3c591dbf3..0b5f7c8684 100644
> --- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
> +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
> @@ -847,11 +847,11 @@ PrintUsage (
>Print(L"  CapsuleApp -D \n");
>Print(L"  CapsuleApp -P GET   -O \n");
>Print(L"Parameter:\n");
>Print(L"  -NR: No reset will be triggered for the capsule\n");
>Print(L"   with CAPSULE_FLAGS_PERSIST_ACROSS_RESET and without
> CAPSULE_FLAGS_INITIATE_RESET.\n");
> -  Print(L"  -OD: Delivery of Capsules via file on Mass Storage device.");
> +  Print(L"  -OD: Delivery of Capsules via file on Mass Storage device.\n");
>Print(L"  -S:  Dump capsule report variable
> (EFI_CAPSULE_REPORT_GUID),\n");
>Print(L"   which is defined in UEFI specification.\n");
>Print(L"  -C:  Clear capsule report variable
> (EFI_CAPSULE_REPORT_GUID),\n");
>Print(L"   which is defined in UEFI specification.\n");
>Print(L"  -P:  Dump UEFI FMP protocol info, or get image with 
> specified\n");
> @@ -1018,44 +1018,43 @@ UefiMain (
>ParaNrIndex = Index;
>NoReset = TRUE;
>  }
>}
> 
> -  if (ParaOdIndex != 0) {
> -if (ParaOdIndex == Argc - 1) {
> +  if (ParaOdIndex > ParaNrIndex) {
> +if (ParaNrIndex != 0) {
> +  CapsuleLastIndex = ParaNrIndex - 1;
> +} else {
> +  CapsuleLastIndex = ParaOdIndex - 1;
> +}
> +
> +if (ParaOdIndex == Argc -1) {
>MapFsStr = NULL;
>  } else if (ParaOdIndex == Argc - 2) {
>MapFsStr = Argv[Argc-1];
>  } else {
> -  Print (L"CapsuleApp: Invalid Position for -OD Options\n");
> +  Print (L"CapsuleApp: Cannot specify more than one FS mapping!\n");
>Status = EFI_INVALID_PARAMETER;
>goto Done;
>  }
> -
> -if (ParaNrIndex != 0) {
> -  if (ParaNrIndex + 1 == ParaOdIndex) {
> -CapsuleLastIndex = ParaNrIndex - 1;
> -  } else {
> -Print (L"CapsuleApp: Invalid Position for -NR Options\n");
> -Status = EFI_INVALID_PARAMETER;
> -goto Done;
> -  }
> -} else {
> +  } else if (ParaOdIndex < ParaNrIndex) {
> +if (ParaOdIndex != 0) {
>CapsuleLastIndex = ParaOdIndex - 1;
> -}
> -  } else {
> -if (ParaNrIndex != 0) {
> -  if (ParaNrIndex == Argc -1) {
> -CapsuleLastIndex = ParaNrIndex - 1;
> +  if (ParaOdIndex == ParaNrIndex - 1) {
> +MapFsStr = NULL;
> +  } else if (ParaOdIndex == ParaNrIndex - 2) {
> +MapFsStr = Argv[ParaOdIndex + 1];
>} else {
> -Print (L"CapsuleApp: Invalid Position for -NR Options\n");
> +Print (L"CapsuleApp: Cannot specify more than one FS mapping!\n");
>  Status = EFI_INVALID_PARAMETER;
>  goto Done;
>}
>  } else {
> -  CapsuleLastIndex = Argc - 1;
> +  CapsuleLastIndex = ParaNrIndex - 1;
>  }
> +  } else {
> +CapsuleLastIndex = Argc - 1;
>}
> 
>CapsuleNum = CapsuleLastIndex - CapsuleFirstIndex + 1;
> 
>if (CapsuleFirstIndex > CapsuleLastIndex) {
> diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> index b81c5b7b3a..0e0c566702 100644
> --- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> +++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
> @@ -810,12 +810,12 @@ DumpCapsuleFromDisk (
>}
> 
>//
>// Get file count first
>//
> +  Status = FileHandleFindFirstFile (DirHandle, );
>do {
> -Status = FileHandleFindFirstFile (DirHandle, );
>  if (EFI_ERROR (Status) || FileInfo == NULL) {
>Print (L"Get File Info Fail. Status = %r\n", Status);
>goto Done;

Re: [edk2-devel] [Patch 0/3] Add modules to BoardModulePkg.

2019-05-27 Thread Liming Gao
Besides, please submit BZ for the change. 

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Liming Gao
>Sent: Tuesday, May 28, 2019 8:39 AM
>To: devel@edk2.groups.io; Dong, Eric 
>Subject: Re: [edk2-devel] [Patch 0/3] Add modules to BoardModulePkg.
>
>Eric:
>  I have two comments.
>1. Add BoardModulePkg.dsc to cover the build for new added modules.
>2. Remove BIOS_ID_GUID macro definition in Guid/BiosId.h. There is no code
>to consume it.
>
>Thanks
>Liming
>>-Original Message-
>>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>>Dong, Eric
>>Sent: Monday, May 27, 2019 9:13 AM
>>To: devel@edk2.groups.io
>>Subject: [edk2-devel] [Patch 0/3] Add modules to BoardModulePkg.
>>
>>Add new package BoardModulePkg in Platform/Intel folder. This folder
>>used to keep the board generic modules, such as Cmos, BiosId.
>>
>>Add Cmos and BiosId related modules to BoardModulePkg.
>>
>>
>>Eric Dong (3):
>>  Maintainers.txt: Add BoardModulePkg in Platform/Intel/ folder.
>>  Platform/Intel: Add Cmos related modules to BoardModulePkg
>>  Platform/Intel/BoardModulePkg: Add BiosId Module.
>>
>> Maintainers.txt   |   4 +
>> .../Intel/BoardModulePkg/BoardModulePkg.dec   |  38 ++
>> .../BoardModulePkg/Include/Guid/BiosId.h  |  59 +++
>> .../Include/Library/BiosIdLib.h   |  57 ++
>> .../Include/Library/CmosAccessLib.h   | 106 
>> .../Include/Library/PlatformCmosAccessLib.h   |  68 +++
>> .../Library/BiosIdLib/DxeBiosIdLib.c  | 175 +++
>> .../Library/BiosIdLib/DxeBiosIdLib.inf|  42 ++
>> .../Library/BiosIdLib/PeiBiosIdLib.c  | 191 +++
>> .../Library/BiosIdLib/PeiBiosIdLib.inf|  42 ++
>> .../Library/CmosAccessLib/CmosAccessLib.c | 486 ++
>> .../Library/CmosAccessLib/CmosAccessLib.inf   |  28 +
>> .../CmosAccessLib/CmosAccessLibInternal.h |  35 ++
>> .../PlatformCmosAccessLibNull.c   |  39 ++
>> .../PlatformCmosAccessLibNull.inf |  23 +
>> 15 files changed, 1393 insertions(+)
>> create mode 100644 Platform/Intel/BoardModulePkg/BoardModulePkg.dec
>> create mode 100644
>Platform/Intel/BoardModulePkg/Include/Guid/BiosId.h
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Include/Library/BiosIdLib.h
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Include/Library/CmosAccessLib.h
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Include/Library/PlatformCmosAccessLib.h
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.c
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/BiosIdLib/PeiBiosIdLib.c
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/BiosIdLib/PeiBiosIdLib.inf
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.c
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/CmosAccessLib/CmosAccessLibInte
>r
>>nal.h
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/PlatformCmosAccessLibNull/Platfor
>>mCmosAccessLibNull.c
>> create mode 100644
>>Platform/Intel/BoardModulePkg/Library/PlatformCmosAccessLibNull/Platfor
>>mCmosAccessLibNull.inf
>>
>>--
>>2.21.0.windows.1
>>
>>
>>
>
>
>


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

View/Reply Online (#41436): https://edk2.groups.io/g/devel/message/41436
Mute This Topic: https://groups.io/mt/31804579/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/3] Add modules to BoardModulePkg.

2019-05-27 Thread Liming Gao
Eric: 
  I have two comments. 
1. Add BoardModulePkg.dsc to cover the build for new added modules. 
2. Remove BIOS_ID_GUID macro definition in Guid/BiosId.h. There is no code to 
consume it. 

Thanks
Liming
>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dong, Eric
>Sent: Monday, May 27, 2019 9:13 AM
>To: devel@edk2.groups.io
>Subject: [edk2-devel] [Patch 0/3] Add modules to BoardModulePkg.
>
>Add new package BoardModulePkg in Platform/Intel folder. This folder
>used to keep the board generic modules, such as Cmos, BiosId.
>
>Add Cmos and BiosId related modules to BoardModulePkg.
>
>
>Eric Dong (3):
>  Maintainers.txt: Add BoardModulePkg in Platform/Intel/ folder.
>  Platform/Intel: Add Cmos related modules to BoardModulePkg
>  Platform/Intel/BoardModulePkg: Add BiosId Module.
>
> Maintainers.txt   |   4 +
> .../Intel/BoardModulePkg/BoardModulePkg.dec   |  38 ++
> .../BoardModulePkg/Include/Guid/BiosId.h  |  59 +++
> .../Include/Library/BiosIdLib.h   |  57 ++
> .../Include/Library/CmosAccessLib.h   | 106 
> .../Include/Library/PlatformCmosAccessLib.h   |  68 +++
> .../Library/BiosIdLib/DxeBiosIdLib.c  | 175 +++
> .../Library/BiosIdLib/DxeBiosIdLib.inf|  42 ++
> .../Library/BiosIdLib/PeiBiosIdLib.c  | 191 +++
> .../Library/BiosIdLib/PeiBiosIdLib.inf|  42 ++
> .../Library/CmosAccessLib/CmosAccessLib.c | 486 ++
> .../Library/CmosAccessLib/CmosAccessLib.inf   |  28 +
> .../CmosAccessLib/CmosAccessLibInternal.h |  35 ++
> .../PlatformCmosAccessLibNull.c   |  39 ++
> .../PlatformCmosAccessLibNull.inf |  23 +
> 15 files changed, 1393 insertions(+)
> create mode 100644 Platform/Intel/BoardModulePkg/BoardModulePkg.dec
> create mode 100644 Platform/Intel/BoardModulePkg/Include/Guid/BiosId.h
> create mode 100644
>Platform/Intel/BoardModulePkg/Include/Library/BiosIdLib.h
> create mode 100644
>Platform/Intel/BoardModulePkg/Include/Library/CmosAccessLib.h
> create mode 100644
>Platform/Intel/BoardModulePkg/Include/Library/PlatformCmosAccessLib.h
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.c
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/BiosIdLib/DxeBiosIdLib.inf
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/BiosIdLib/PeiBiosIdLib.c
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/BiosIdLib/PeiBiosIdLib.inf
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.c
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/CmosAccessLib/CmosAccessLib.inf
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/CmosAccessLib/CmosAccessLibInter
>nal.h
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/PlatformCmosAccessLibNull/Platfor
>mCmosAccessLibNull.c
> create mode 100644
>Platform/Intel/BoardModulePkg/Library/PlatformCmosAccessLibNull/Platfor
>mCmosAccessLibNull.inf
>
>--
>2.21.0.windows.1
>
>
>


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

View/Reply Online (#41435): https://edk2.groups.io/g/devel/message/41435
Mute This Topic: https://groups.io/mt/31804579/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/CapsuleApp: Enhance Capsule-On-Disk related functions.

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

-Original Message-
From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Xu, Wei6
Sent: Friday, May 24, 2019 5:02 PM
To: devel@edk2.groups.io
Cc: Wang, Jian J ; Wu, Hao A ; 
Zhang, Chao B ; Xu, Wei6 
Subject: [edk2-devel][Patch] MdeModulePkg/CapsuleApp: Enhance Capsule-On-Disk 
related functions.

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

1. Add missing '\n' in usage.
2. Fix the dead loop of CapsuleApp -L.
3. Fix the bug that CapsuleApp -OD cannot perform capsules in sub- folder.
4. Optimize the handling for option -NR and -OD to support both 'CapsuleApp 
 -OD -NR' and 'CapsuleApp  -NR -OD'.
5. Check if Capsule-On-Disk is supported by "OsIndicationsSupported"
variable firstly before processing capsules. If not supported, prompt an error 
message and quit the process.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Application/CapsuleApp/CapsuleApp.c   | 41 
 MdeModulePkg/Application/CapsuleApp/CapsuleDump.c  |  4 +-
 .../Application/CapsuleApp/CapsuleOnDisk.c | 56 +-
 3 files changed, 77 insertions(+), 24 deletions(-)

diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c 
b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
index e3c591dbf3..0b5f7c8684 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleApp.c
@@ -847,11 +847,11 @@ PrintUsage (
   Print(L"  CapsuleApp -D \n");
   Print(L"  CapsuleApp -P GET   -O \n");
   Print(L"Parameter:\n");
   Print(L"  -NR: No reset will be triggered for the capsule\n");
   Print(L"   with CAPSULE_FLAGS_PERSIST_ACROSS_RESET and without 
CAPSULE_FLAGS_INITIATE_RESET.\n");
-  Print(L"  -OD: Delivery of Capsules via file on Mass Storage device.");
+  Print(L"  -OD: Delivery of Capsules via file on Mass Storage 
+ device.\n");
   Print(L"  -S:  Dump capsule report variable (EFI_CAPSULE_REPORT_GUID),\n");
   Print(L"   which is defined in UEFI specification.\n");
   Print(L"  -C:  Clear capsule report variable (EFI_CAPSULE_REPORT_GUID),\n");
   Print(L"   which is defined in UEFI specification.\n");
   Print(L"  -P:  Dump UEFI FMP protocol info, or get image with specified\n"); 
@@ -1018,44 +1018,43 @@ UefiMain (
   ParaNrIndex = Index;
   NoReset = TRUE;
 }
   }
 
-  if (ParaOdIndex != 0) {
-if (ParaOdIndex == Argc - 1) {
+  if (ParaOdIndex > ParaNrIndex) {
+if (ParaNrIndex != 0) {
+  CapsuleLastIndex = ParaNrIndex - 1;
+} else {
+  CapsuleLastIndex = ParaOdIndex - 1;
+}
+
+if (ParaOdIndex == Argc -1) {
   MapFsStr = NULL;
 } else if (ParaOdIndex == Argc - 2) {
   MapFsStr = Argv[Argc-1];
 } else {
-  Print (L"CapsuleApp: Invalid Position for -OD Options\n");
+  Print (L"CapsuleApp: Cannot specify more than one FS 
+ mapping!\n");
   Status = EFI_INVALID_PARAMETER;
   goto Done;
 }
-
-if (ParaNrIndex != 0) {
-  if (ParaNrIndex + 1 == ParaOdIndex) {
-CapsuleLastIndex = ParaNrIndex - 1;
-  } else {
-Print (L"CapsuleApp: Invalid Position for -NR Options\n");
-Status = EFI_INVALID_PARAMETER;
-goto Done;
-  }
-} else {
+  } else if (ParaOdIndex < ParaNrIndex) {
+if (ParaOdIndex != 0) {
   CapsuleLastIndex = ParaOdIndex - 1;
-}
-  } else {
-if (ParaNrIndex != 0) {
-  if (ParaNrIndex == Argc -1) {
-CapsuleLastIndex = ParaNrIndex - 1;
+  if (ParaOdIndex == ParaNrIndex - 1) {
+MapFsStr = NULL;
+  } else if (ParaOdIndex == ParaNrIndex - 2) {
+MapFsStr = Argv[ParaOdIndex + 1];
   } else {
-Print (L"CapsuleApp: Invalid Position for -NR Options\n");
+Print (L"CapsuleApp: Cannot specify more than one FS 
+ mapping!\n");
 Status = EFI_INVALID_PARAMETER;
 goto Done;
   }
 } else {
-  CapsuleLastIndex = Argc - 1;
+  CapsuleLastIndex = ParaNrIndex - 1;
 }
+  } else {
+CapsuleLastIndex = Argc - 1;
   }
 
   CapsuleNum = CapsuleLastIndex - CapsuleFirstIndex + 1;
 
   if (CapsuleFirstIndex > CapsuleLastIndex) { diff --git 
a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c 
b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
index b81c5b7b3a..0e0c566702 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleDump.c
@@ -810,12 +810,12 @@ DumpCapsuleFromDisk (
   }
 
   //
   // Get file count first
   //
+  Status = FileHandleFindFirstFile (DirHandle, );
   do {
-Status = FileHandleFindFirstFile (DirHandle, );
 if (EFI_ERROR (Status) || FileInfo == NULL) {
   Print (L"Get File Info Fail. Status = %r\n", Status);
   goto Done;
 }
 
@@ -844,12 +844,12 @@ DumpCapsuleFromDisk (
   NoFile = FALSE;
 
   //
   // Get all file info
   //
+  Status = FileHandleFindFirstFile (DirHandle, );
   do {
-Status = FileHandleFindFirstFile (DirHandle, );
 if 

[edk2-devel] [PATCH v2 7/7] ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S

2019-05-27 Thread Ard Biesheuvel
Clang 7 complains about the vmsr instruction in ArmV7Support.S,
which is only available on cores that implement some flavour of
VFP. So set the .fpu to NEON like we do in some other places.

Signed-off-by: Ard Biesheuvel 
---
Note that the !clang alternative does not assembler for Clang-7 either
so this is probably the most straightforward approach.

 ArmPkg/Library/ArmLib/Arm/ArmV7Support.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S 
b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
index 16c56f72e973..b5a6b9ea487d 100644
--- a/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
+++ b/ArmPkg/Library/ArmLib/Arm/ArmV7Support.S
@@ -262,6 +262,7 @@ ASM_FUNC(ArmEnableVFP)
 #ifndef __clang__
   mcr p10,#0x7,r0,c8,c0,#0
 #else
+  .fpuneon
   vmsrfpexc, r0
 #endif
   bx  lr
-- 
2.20.1


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

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



[edk2-devel] [PATCH v2 5/7] ArmPkg/ArmSoftFloatLib: add SPDX identifiers

2019-05-27 Thread Ard Biesheuvel
Add the appropriate SPDX identifiers to all files taken from the
3-clause BSD licensed SoftFloat library.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Acked-by: Jian J Wang 
Signed-off-by: Ard Biesheuvel 
---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
| 1 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/ARM-VFPv2/s_propagateNaNF64UI.c
  | 1 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/ARM-VFPv2/softfloat_raiseFlags.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/ARM-VFPv2/specialize.h  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_add.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_div.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_eq.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_le.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_lt.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_mul.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_sub.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_to_f64.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_to_i32_r_minMag.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_to_i64_r_minMag.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_to_ui32_r_minMag.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f32_to_ui64_r_minMag.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_add.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_div.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_eq.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_le.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_lt.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_mul.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_sub.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_to_f32.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_to_i32_r_minMag.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_to_i64_r_minMag.c   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_to_ui32_r_minMag.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/f64_to_ui64_r_minMag.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/i32_to_f32.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/i32_to_f64.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/i64_to_f32.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/i64_to_f64.c
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/include/internals.h 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/include/opts-GCC.h  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/include/primitiveTypes.h
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/include/primitives.h
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/include/softfloat.h 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/include/softfloat_types.h   
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_addMagsF32.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_addMagsF64.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_countLeadingZeros32.c 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_countLeadingZeros64.c 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_countLeadingZeros8.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_mul64To128.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_normRoundPackToF32.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_normRoundPackToF64.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_normSubnormalF32Sig.c 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_normSubnormalF64Sig.c 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_roundPackToF32.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_roundPackToF64.c  
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_shiftRightJam32.c 
 | 1 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/s_shiftRightJam64.c 
 

[edk2-devel] [PATCH v2 3/7] ArmPkg/ArmSoftFloatLib: remove source files that are no longer used

2019-05-27 Thread Ard Biesheuvel
Now that we have switched to a new version of the SoftFloat code,
remove the source files that make up the old implementation, and
are no longer referenced.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Build-tested-by: Laszlo Ersek 
Acked-by: Jian J Wang 
Tested-by: Xiaoyu Lu 
Signed-off-by: Ard Biesheuvel 
---
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cdcmp.asm   |   41 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cfcmp.asm   |   37 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpeq.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpge.c|   28 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpgt.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmple.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmplt.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpun.c|   35 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpeq.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpge.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpgt.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmple.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmplt.c|   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c|   35 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/softfloat.h |  345 ---
 ArmPkg/Library/ArmSoftFloatLib/arm-gcc.h   |  108 -
 ArmPkg/Library/ArmSoftFloatLib/bits32/softfloat-macros |  648 --
 ArmPkg/Library/ArmSoftFloatLib/bits32/softfloat.c  | 2354 

 ArmPkg/Library/ArmSoftFloatLib/milieu.h|   38 -
 ArmPkg/Library/ArmSoftFloatLib/softfloat-for-gcc.h |  242 --
 ArmPkg/Library/ArmSoftFloatLib/softfloat-specialize|  525 -
 21 files changed, 4706 deletions(-)

Patch content omitted.

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

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



[edk2-devel] [PATCH v2 1/7] ArmPkg: import latest version (3e) of the Berkeley Softfloat library

2019-05-27 Thread Ard Biesheuvel
In preparation of bringing ArmSoftFloatLib up to date in order
to provide some missing routines, import the unmodified SoftFloat-3e
source into the tree.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Build-tested-by: Laszlo Ersek 
Acked-by: Jian J Wang 
Tested-by: Xiaoyu Lu 
Signed-off-by: Ard Biesheuvel 
---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/COPYING.txt
  |   37 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/README.html
  |   49 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/README.txt 
  |   21 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-GCC/Makefile   
  |  325 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-GCC/platform.h 
  |   53 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-SSE2-GCC/Makefile  
  |  325 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-SSE2-GCC/platform.h 
 |   53 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/Makefile 
  |  323 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
 |   53 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-x86_64-GCC/Makefile
  |  390 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-x86_64-GCC/platform.h  
  |   54 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-MinGW/Makefile 
  |  325 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-MinGW/platform.h   
  |   53 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-SSE2-MinGW/Makefile
  |  325 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-SSE2-MinGW/platform.h  
  |   53 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win64-MinGW-w64/Makefile 
  |  390 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win64-MinGW-w64/platform.h   
  |   54 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-FAST_INT64/Makefile 
  |  391 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-FAST_INT64/platform.h
 |   50 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-not-FAST_INT64/Makefile
   |  325 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-not-FAST_INT64/platform.h
 |   50 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/doc/SoftFloat-history.html 
  |  258 
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/doc/SoftFloat-source.html  
  |  686 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/doc/SoftFloat.html 
  | 1527 
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/extF80M_isSignalingNaN.c
 |   57 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/f128M_isSignalingNaN.c
   |   60 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToExtF80M.c
   |   56 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToExtF80UI.c
  |   56 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF128M.c
 |   56 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF128UI.c
|   55 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF16UI.c
 |   51 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF32UI.c
 |   51 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF64UI.c
 |   53 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_extF80MToCommonNaN.c
   |   62 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_extF80UIToCommonNaN.c
  |   62 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f128MToCommonNaN.c
 |   62 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f128UIToCommonNaN.c
|   65 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f16UIToCommonNaN.c
 |   59 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f32UIToCommonNaN.c
 |   59 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f64UIToCommonNaN.c
 |   59 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNExtF80M.c
  |  107 ++
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNExtF80UI.c
 |  106 ++
 

[edk2-devel] [PATCH v2 4/7] ArmPkg/ArmSoftFloatLib: remove new source files that are not used

2019-05-27 Thread Ard Biesheuvel
Now that we have switched to a new version of the SoftFloat code,
remove the source files that are not in fact used to implement the
API that our library exposes.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Acked-by: Jian J Wang 
Signed-off-by: Ard Biesheuvel 
---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-GCC/Makefile   
  | 325 -
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-GCC/platform.h 
  |  53 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-SSE2-GCC/Makefile  
  | 325 -
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-SSE2-GCC/platform.h 
 |  53 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/Makefile 
  | 323 -
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-x86_64-GCC/Makefile
  | 390 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-x86_64-GCC/platform.h  
  |  54 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-MinGW/Makefile 
  | 325 -
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-MinGW/platform.h   
  |  53 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-SSE2-MinGW/Makefile
  | 325 -
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-SSE2-MinGW/platform.h  
  |  53 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win64-MinGW-w64/Makefile 
  | 390 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win64-MinGW-w64/platform.h   
  |  54 ---
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-FAST_INT64/Makefile 
  | 391 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-FAST_INT64/platform.h
 |  50 --
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-not-FAST_INT64/Makefile
   | 325 -
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-not-FAST_INT64/platform.h
 |  50 --
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/extF80M_isSignalingNaN.c
 |  57 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/f128M_isSignalingNaN.c
   |  60 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToExtF80M.c
   |  56 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToExtF80UI.c
  |  56 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF128M.c
 |  56 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF128UI.c
|  55 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF16UI.c
 |  51 --
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF32UI.c
 |  51 --
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_commonNaNToF64UI.c
 |  53 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_extF80MToCommonNaN.c
   |  62 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_extF80UIToCommonNaN.c
  |  62 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f128MToCommonNaN.c
 |  62 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f128UIToCommonNaN.c
|  65 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f16UIToCommonNaN.c
 |  59 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f32UIToCommonNaN.c
 |  59 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_f64UIToCommonNaN.c
 |  59 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNExtF80M.c
  | 107 -
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNExtF80UI.c
 | 106 -
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNF128M.c
|  76 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNF128UI.c
   |  81 
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNF16UI.c
|  63 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNF32UI.c
|  63 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/s_propagateNaNF64UI.c
|  63 ---
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/softfloat_raiseFlags.c
   |  52 --
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/source/8086-SSE/specialize.h   
  | 376 ---
 

[edk2-devel] [PATCH v2 6/7] BaseTools/tools_def CLANG3x ARM AARCH64: force use of C99 standard

2019-05-27 Thread Ard Biesheuvel
When building OpenSSL for ARM or AARCH64 with recent Clang, the following
error may result:

  In file included from 
.../CryptoPkg/Library/BaseCryptLib/Pk/CryptPkcs7VerifyEku.c:18:
  In file included from 
.../CryptoPkg/Library/OpensslLib/openssl/crypto/include/internal/x509_int.h:10:
  In file included from 
.../CryptoPkg/Library/OpensslLib/openssl/include/internal/refcount.h:21:
  In file included from /usr/lib/llvm-7/lib/clang/7.0.1/include/stdatomic.h:35:
  In file included from /usr/lib/llvm-7/lib/clang/7.0.1/include/stdint.h:61:
  /usr/include/stdint.h:26:10: fatal error: 'bits/libc-header-start.h' file not 
found
  #include 
 ^~
  1 error generated.

This is caused by the fact that the refcount.h header includes compiler
headers that in turn rely on system headers, which we don't support.

Since the C native atomics are a C11 feature, let's explicitly use the
C99 standard instead to work around this issue.

Signed-off-by: Ard Biesheuvel 
---
 BaseTools/Conf/tools_def.template | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Conf/tools_def.template 
b/BaseTools/Conf/tools_def.template
index 26a2cf604f74..7fe6f4406a72 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -2280,8 +2280,8 @@ DEFINE CLANG35_ARM_TARGET= -target 
arm-linux-gnueabi
 DEFINE CLANG35_AARCH64_TARGET= -target aarch64-linux-gnu
 
 DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality 
-Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare 
-Wno-empty-body -Wno-unknown-warning-option
-DEFINE CLANG35_ARM_CC_FLAGS  = DEF(GCC_ARM_CC_FLAGS) 
DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES)
-DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS) 
DEF(CLANG35_AARCH64_TARGET) -mcmodel=small DEF(CLANG35_WARNING_OVERRIDES)
+DEFINE CLANG35_ARM_CC_FLAGS  = DEF(GCC_ARM_CC_FLAGS) 
DEF(CLANG35_ARM_TARGET) DEF(CLANG35_WARNING_OVERRIDES) -std=c99
+DEFINE CLANG35_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS) 
DEF(CLANG35_AARCH64_TARGET) -mcmodel=small DEF(CLANG35_WARNING_OVERRIDES) 
-std=c99
 
 ##
 # CLANG35 ARM definitions
@@ -2430,7 +2430,7 @@ NOOPT_CLANG38_X64_DLINK2_FLAGS = 
DEF(GCC5_X64_DLINK2_FLAGS) -O0
 # CLANG38 ARM definitions
 ##
 DEFINE CLANG38_ARM_TARGET= -target arm-linux-gnueabi
-DEFINE CLANG38_ARM_CC_FLAGS  = DEF(GCC_ARM_CC_FLAGS) 
DEF(CLANG38_ARM_TARGET) DEF(CLANG38_WARNING_OVERRIDES) -mno-movt
+DEFINE CLANG38_ARM_CC_FLAGS  = DEF(GCC_ARM_CC_FLAGS) 
DEF(CLANG38_ARM_TARGET) DEF(CLANG38_WARNING_OVERRIDES) -mno-movt -std=c99
 DEFINE CLANG38_ARM_DLINK_FLAGS   = DEF(CLANG38_ARM_TARGET) 
DEF(GCC_ARM_DLINK_FLAGS)
 
 *_CLANG38_ARM_PP_FLAGS   = DEF(GCC_PP_FLAGS)
@@ -2474,7 +2474,7 @@ RELEASE_CLANG38_ARM_DLINK_FLAGS  = 
DEF(CLANG38_ARM_DLINK_FLAGS) -flto -Wl,-O3 -L
 # CLANG38 AARCH64 definitions
 ##
 DEFINE CLANG38_AARCH64_TARGET= -target aarch64-linux-gnu
-DEFINE CLANG38_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS) 
DEF(CLANG38_AARCH64_TARGET) -mcmodel=small DEF(CLANG38_WARNING_OVERRIDES)
+DEFINE CLANG38_AARCH64_CC_FLAGS  = DEF(GCC_AARCH64_CC_FLAGS) 
DEF(CLANG38_AARCH64_TARGET) -mcmodel=small DEF(CLANG38_WARNING_OVERRIDES) 
-std=c99
 DEFINE CLANG38_AARCH64_DLINK_FLAGS  = DEF(CLANG38_AARCH64_TARGET) 
DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
 
 *_CLANG38_AARCH64_PP_FLAGS   = DEF(GCC_PP_FLAGS)
-- 
2.20.1


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

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



[edk2-devel] [PATCH v2 0/7] update ArmSoftFloatLib to latest upstream version

2019-05-27 Thread Ard Biesheuvel
Currently, our move to OpenSSL 1.1.1b is being blocked by an issue in
the ARM software floating point library, which lacks some intrinsics
that the ARM EABI spec defines.

Since the code was in pretty sorry state, let's fix this by upgrading
to the very latest version of the core library this code is based on,
dated January 2018 (whereas the NetBSD fork of the old code dates back
to 2002)

Note that this drops support for RVCT, but this toolchain is untested
and will likely be removed. [0]

Code can be found here:
https://github.com/ardbiesheuvel/edk2/tree/arm-softfloat-upgrade-v2

Changes since v1:
- Update the INLINE macro to pass __attribute__((always_inline)), to work
  around a build issue that occurs when optimization is disabled.
- Add a patch to remove the unused files. As it turns out, 385 of the ~450
  files are unused (which is a lot more than Laszlo reported), and so it
  makes sense to merge patch #4 into patch #1
- Add a patch to add SPDX identifiers to the files that we are keeping (#5).
  This patch can be merged into #1 as well.
- Add patches to work around issues that prevent the new code to build with
  Clang. Patch #6 is actually related to the OpenSSL upgrade, while patch #7
  is related to Clang 7 (and has been posted already 6 months ago)

Note that another issue popped up, which affects the OpenSSL 1.1.1b upgrade:

  .../CryptoPkg/Library/OpensslLib/openssl/crypto/conf/conf_sap.c:71:12:
  error: variable 'ret' is uninitialized when used here 
[-Werror,-Wuninitialized]
return ret;
   ^~~
  .../CryptoPkg/Library/OpensslLib/openssl/crypto/conf/conf_sap.c:44:12:
  note: initialize the variable 'ret' to silence this warning
int ret;
   ^
= 0
  1 error generated.

This appears to be a regression in the OpenSSL upstream code (commit
25eb9299cec), which no longer initializes ret if OPENSSL_SYS_UEFI is #defined.

Cc: Laszlo Ersek 
Cc: "Gao, Liming" 
Cc: "Wang, Jian J" 
Cc: Leif Lindholm 
Cc: Michael D Kinney 

[0] https://bugzilla.tianocore.org/show_bug.cgi?id=1750

Ard Biesheuvel (7):
  ArmPkg: import latest version (3e) of the Berkeley Softfloat library
  ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library
  ArmPkg/ArmSoftFloatLib: remove source files that are no longer used
  ArmPkg/ArmSoftFloatLib: remove new source files that are not used
  ArmPkg/ArmSoftFloatLib: add SPDX identifiers
  BaseTools/tools_def CLANG3x ARM AARCH64: force use of C99 standard
  ArmPkg/ArmLib ARM: set .fpu to let Clang 7 assemble ArmV7Support.S

 ArmPkg/Library/ArmLib/Arm/ArmV7Support.S   
 |1 +
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cdcmp.asm   
 |   41 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cfcmp.asm   
 |   37 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpeq.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpge.c
 |   28 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpgt.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmple.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmplt.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpun.c
 |   35 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpeq.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpge.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpgt.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmple.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmplt.c
 |   30 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c
 |   35 -
 ArmPkg/Library/ArmSoftFloatLib/Arm/softfloat.h 
 |  345 ---
 ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c   
 |  283 +++
 ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf 
 |   84 +-
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/COPYING.txt
 |   37 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/README.html
 |   49 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/README.txt 
 |   21 +
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
|   54 +
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/doc/SoftFloat-history.html 
 |  258 +++
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/doc/SoftFloat-source.html  
 |  686 ++
 ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/doc/SoftFloat.html 
 | 1527 +
 

[edk2-devel] [PATCH v2 2/7] ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library

2019-05-27 Thread Ard Biesheuvel
Update the INF description and the top level .c files in order to
switch to the new version of the SoftFloat library imported in the
previous patch.

Note that we no longer use the code that travelled a long way from
the 2002 version of the softfloat library via NetBsd and the StdLib
package. Instead, we are using the upstream version unmodified, with
the glue .c file adopted from the OP-TEE project. This approach is
much cleaner and much more maintainable.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1845
Build-tested-by: Laszlo Ersek 
Acked-by: Jian J Wang 
Tested-by: Xiaoyu Lu 
Signed-off-by: Ard Biesheuvel 
---
 ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c   
  | 283 
 ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf 
  |  84 --
 
ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
 |   2 +-
 3 files changed, 348 insertions(+), 21 deletions(-)

diff --git a/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c 
b/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c
new file mode 100644
index ..42bed7700c99
--- /dev/null
+++ b/ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c
@@ -0,0 +1,283 @@
+/*
+ * Copyright (c) 2015 - 2019, Linaro Limited
+ *
+ * SPDX-License-Identifier: BSD-2-Clause-Patent
+ */
+
+#include "platform.h"
+#include 
+
+/*
+ * On ARM32 EABI defines both a soft-float ABI and a hard-float ABI,
+ * hard-float is basically a super set of soft-float. Hard-float requires
+ * all the support routines provided for soft-float, but the compiler may
+ * choose to optimize to not use some of them.
+ *
+ * The AEABI functions uses soft-float calling convention even if the
+ * functions are compiled for hard-float. So where float and double would
+ * have been expected we use aeabi_float_t and aeabi_double_t respectively
+ * instead.
+ */
+typedef uint32_t aeabi_float_t;
+typedef uint64_t aeabi_double_t;
+
+/*
+ * Helpers to convert between float32 and aeabi_float_t, and float64 and
+ * aeabi_double_t used by the AEABI functions below.
+ */
+static aeabi_float_t f32_to_f(float32_t val)
+{
+   return val.v;
+}
+
+static float32_t f32_from_f(aeabi_float_t val)
+{
+   float32_t res;
+
+   res.v = val;
+
+   return res;
+}
+
+static aeabi_double_t f64_to_d(float64_t val)
+{
+   return val.v;
+}
+
+static float64_t f64_from_d(aeabi_double_t val)
+{
+   float64_t res;
+
+   res.v = val;
+
+   return res;
+}
+
+/*
+ * From ARM Run-time ABI for ARM Architecture
+ * ARM IHI 0043D, current through ABI release 2.09
+ *
+ * 4.1.2 The floating-point helper functions
+ */
+
+/*
+ * Table 2, Standard aeabi_double_t precision floating-point arithmetic helper
+ * functions
+ */
+
+aeabi_double_t __aeabi_dadd(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_to_d(f64_add(f64_from_d(a), f64_from_d(b)));
+}
+
+aeabi_double_t __aeabi_ddiv(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_to_d(f64_div(f64_from_d(a), f64_from_d(b)));
+}
+
+aeabi_double_t __aeabi_dmul(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_to_d(f64_mul(f64_from_d(a), f64_from_d(b)));
+}
+
+
+aeabi_double_t __aeabi_drsub(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_to_d(f64_sub(f64_from_d(b), f64_from_d(a)));
+}
+
+aeabi_double_t __aeabi_dsub(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_to_d(f64_sub(f64_from_d(a), f64_from_d(b)));
+}
+
+/*
+ * Table 3, double precision floating-point comparison helper functions
+ */
+
+int __aeabi_dcmpeq(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_eq(f64_from_d(a), f64_from_d(b));
+}
+
+int __aeabi_dcmplt(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_lt(f64_from_d(a), f64_from_d(b));
+}
+
+int __aeabi_dcmple(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_le(f64_from_d(a), f64_from_d(b));
+}
+
+int __aeabi_dcmpge(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_le(f64_from_d(b), f64_from_d(a));
+}
+
+int __aeabi_dcmpgt(aeabi_double_t a, aeabi_double_t b)
+{
+   return f64_lt(f64_from_d(b), f64_from_d(a));
+}
+
+/*
+ * Table 4, Standard single precision floating-point arithmetic helper
+ * functions
+ */
+
+aeabi_float_t __aeabi_fadd(aeabi_float_t a, aeabi_float_t b)
+{
+   return f32_to_f(f32_add(f32_from_f(a), f32_from_f(b)));
+}
+
+aeabi_float_t __aeabi_fdiv(aeabi_float_t a, aeabi_float_t b)
+{
+   return f32_to_f(f32_div(f32_from_f(a), f32_from_f(b)));
+}
+
+aeabi_float_t __aeabi_fmul(aeabi_float_t a, aeabi_float_t b)
+{
+   return f32_to_f(f32_mul(f32_from_f(a), f32_from_f(b)));
+}
+
+aeabi_float_t __aeabi_frsub(aeabi_float_t a, aeabi_float_t b)
+{
+   return f32_to_f(f32_sub(f32_from_f(b), f32_from_f(a)));
+}
+
+aeabi_float_t __aeabi_fsub(aeabi_float_t a, aeabi_float_t b)
+{
+   return f32_to_f(f32_sub(f32_from_f(a), f32_from_f(b)));
+}
+
+/*
+ * Table 5, Standard single precision floating-point comparison helper
+ * functions
+ */
+

Re: [edk2-devel] [PATCH v1] OvmfPkg: Drop build flag USE_LEGACY_ISA_STACK and legacy ISA stack

2019-05-27 Thread Laszlo Ersek
On 05/27/19 05:23, Wu, Hao A wrote:
> REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1842
> 
> According to the discussion at:
> https://edk2.groups.io/g/devel/topic/30918343#38093
> 
> For OVMF, we keep both ISA stacks:
> * The legacy one in PcAtChipsetPkg/IntelFrameworkModulePkg
> * The Sio bus based OVMF-specified one introduced by commit a5cc178aeb
> 
> for a period of time (includes 1 stable tag: edk2-stable201905). And we
> also keep the Sio bus based OVMF-specified stack as the default one (via a
> build option 'USE_LEGACY_ISA_STACK') to validate its stability.

Yes, the idea is to release edk2-stable201905 with the toggle still
available to users.

The patch looks good to me (for edk2-stable201908).

Reviewed-by: Laszlo Ersek 

Thanks
Laszlo

> 
> This commit will propose to drop the legacy ISA stack from OVMF and remove
> the usage of the build flag 'USE_LEGACY_ISA_STACK' at the same time. This
> is considered as a preparation for the removal of
> PcAtChipsetPkg/IsaAcpiDxe & IntelFrameworkModulePkg.
> 
> Cc: Ray Ni 
> Cc: Jordan Justen 
> Cc: Laszlo Ersek 
> Cc: Ard Biesheuvel 
> Signed-off-by: Hao A Wu 
> ---
> '''
> Please note that the patch will be hold until edk2-stable201905 is created
> '''
>  OvmfPkg/OvmfPkgIa32.dsc|  8 
>  OvmfPkg/OvmfPkgIa32X64.dsc |  8 
>  OvmfPkg/OvmfPkgX64.dsc |  8 
>  OvmfPkg/OvmfPkgIa32.fdf| 15 +++
>  OvmfPkg/OvmfPkgIa32X64.fdf | 15 +++
>  OvmfPkg/OvmfPkgX64.fdf | 15 +++
>  6 files changed, 9 insertions(+), 60 deletions(-)
> 
> diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
> index b3446ece31..ae43c9dadc 100644
> --- a/OvmfPkg/OvmfPkgIa32.dsc
> +++ b/OvmfPkg/OvmfPkgIa32.dsc
> @@ -32,7 +32,6 @@ [Defines]
>DEFINE SMM_REQUIRE = FALSE
>DEFINE TPM2_ENABLE = FALSE
>DEFINE TPM2_CONFIG_ENABLE  = FALSE
> -  DEFINE USE_LEGACY_ISA_STACK= FALSE
>  
>#
># Network definition
> @@ -745,16 +744,9 @@ [Components]
>#
># ISA Support
>#
> -!if $(USE_LEGACY_ISA_STACK) == FALSE
>OvmfPkg/SioBusDxe/SioBusDxe.inf
>MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
>MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> -!else
> -  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
> -  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
> -  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
> -  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
> -!endif
>  
>#
># SMBIOS Support
> diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
> index 679d4eb8dd..6f802e672a 100644
> --- a/OvmfPkg/OvmfPkgIa32X64.dsc
> +++ b/OvmfPkg/OvmfPkgIa32X64.dsc
> @@ -32,7 +32,6 @@ [Defines]
>DEFINE SMM_REQUIRE = FALSE
>DEFINE TPM2_ENABLE = FALSE
>DEFINE TPM2_CONFIG_ENABLE  = FALSE
> -  DEFINE USE_LEGACY_ISA_STACK= FALSE
>  
>#
># Network definition
> @@ -754,16 +753,9 @@ [Components.X64]
>#
># ISA Support
>#
> -!if $(USE_LEGACY_ISA_STACK) == FALSE
>OvmfPkg/SioBusDxe/SioBusDxe.inf
>MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
>MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> -!else
> -  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
> -  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
> -  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
> -  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
> -!endif
>  
>#
># SMBIOS Support
> diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
> index 56a9560262..1b8d9866db 100644
> --- a/OvmfPkg/OvmfPkgX64.dsc
> +++ b/OvmfPkg/OvmfPkgX64.dsc
> @@ -32,7 +32,6 @@ [Defines]
>DEFINE SMM_REQUIRE = FALSE
>DEFINE TPM2_ENABLE = FALSE
>DEFINE TPM2_CONFIG_ENABLE  = FALSE
> -  DEFINE USE_LEGACY_ISA_STACK= FALSE
>  
>#
># Network definition
> @@ -752,16 +751,9 @@ [Components]
>#
># ISA Support
>#
> -!if $(USE_LEGACY_ISA_STACK) == FALSE
>OvmfPkg/SioBusDxe/SioBusDxe.inf
>MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.inf
>MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KeyboardDxe.inf
> -!else
> -  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
> -  IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
> -  IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf
> -  IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf
> -!endif
>  
>#
># SMBIOS Support
> diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
> index e428334702..12da9f4706 100644
> --- a/OvmfPkg/OvmfPkgIa32.fdf
> +++ b/OvmfPkg/OvmfPkgIa32.fdf
> @@ -259,20 +259,11 @@ [FV.DXEFV]
>  INF  MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
>  INF  
> MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf
>  
> -!if $(USE_LEGACY_ISA_STACK) == FALSE
> -  INF  OvmfPkg/SioBusDxe/SioBusDxe.inf
> +INF  OvmfPkg/SioBusDxe/SioBusDxe.inf
>  !ifndef 

Re: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules

2019-05-27 Thread Laszlo Ersek
On 05/27/19 08:36, Wu, Hao A wrote:
> '''
> Please note that this patch will be hold until all the below requirements
> are met:
> 
> A. edk2-stable201905 is created;
> B. OvmfPkg has drop its usage of the legacy ISA stack (which includes
>the IsaAcpiDxe driver);
> C. UefiPayloadPkg has been updated to drop its consume to the
>8259InterruptControllerDxe driver.
> '''
> 
> This patch itself will not be sent to the mailing list and is only
> available at:
> https://github.com/hwu25/edk2/tree/delete_framework
> (https://github.com/hwu25/edk2/commit/84e58f89f6d03f9cc3399cced9d5d5529e06a416)
> 
> 
> Below modules will be removed from PcAtChipsetPkg:
> * PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
> * PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
> * PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
> 
> They are considered legacy framework components and will no longer be used
> after the removal of IntelFramework[Module]Pkg.
> 
> Also, the unused (after the modules being removed) PCDs will be deleted in
> package level DEC/UNI files.

Please include a reference to
 in the commit message.

(I might comment more later; not sure just yet.)

Thanks
Laszlo

> 
> Cc: Ray Ni 
> Cc: Andrew Fish 
> Cc: Laszlo Ersek 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> 
> 
> Hao A Wu (1):
>   PcAtChipsetPkg: Remove framework modules
> 
>  PcAtChipsetPkg/PcAtChipsetPkg.dec |  58 --
>  PcAtChipsetPkg/PcAtChipsetPkg.dsc |   5 +-
>  PcAtChipsetPkg/8254TimerDxe/8254Timer.inf |  42 --
>  PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf|  46 --
>  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf |  50 --
>  PcAtChipsetPkg/8254TimerDxe/Timer.h   | 185 --
>  PcAtChipsetPkg/8259InterruptControllerDxe/8259.h  | 220 ---
>  PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h   | 269 -
>  PcAtChipsetPkg/8254TimerDxe/Timer.c   | 401 
> -
>  PcAtChipsetPkg/8259InterruptControllerDxe/8259.c  | 622 
> 
>  PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c | 301 
> --
>  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c   | 353 
> ---
>  PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c   | 386 
> 
>  PcAtChipsetPkg/8254TimerDxe/Timer.uni |  16 -
>  PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni|  14 -
>  PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni  |  16 -
>  PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni |  14 -
>  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni |  16 -
>  PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni|  14 -
>  PcAtChipsetPkg/PcAtChipsetPkg.uni |  52 +-
>  20 files changed, 2 insertions(+), 3078 deletions(-)
>  delete mode 100644 PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
>  delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
>  delete mode 100644 PcAtChipsetPkg/8254TimerDxe/Timer.h
>  delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/8259.h
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h
>  delete mode 100644 PcAtChipsetPkg/8254TimerDxe/Timer.c
>  delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/8259.c
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
>  delete mode 100644 PcAtChipsetPkg/8254TimerDxe/Timer.uni
>  delete mode 100644 PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni
>  delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni
>  delete mode 100644 
> PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni
>  delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni
> 


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

View/Reply Online (#41421): https://edk2.groups.io/g/devel/message/41421
Mute This Topic: https://groups.io/mt/31806937/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/3] update ArmSoftFloatLib to latest upstream version

2019-05-27 Thread Laszlo Ersek
On 05/24/19 23:32, Ard Biesheuvel wrote:
> On Fri, 24 May 2019 at 22:57, Laszlo Ersek  wrote:

>> (1) We should file a new TianoCore BZ (Feature Request) for this
>> ArmSoftFloatLib upgrade, and we should block TianoCore#1089 with that
>> new BZ.
>>
>> (2) The new BZ should be referenced in all of the commit messages.
>>
>> (3) The new BZ should be added to the release planning wiki page.
>>
> 
> Fair enough.

Please reference 
in the commit messages.

Thank you!
Laszlo

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

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



[edk2-devel] [PATCH] PciBusDxe: duplicate node insertion for every PPB device in the system

2019-05-27 Thread Javeed, Ashraf
https://bugzilla.tianocore.org/show_bug.cgi?id=1796
Bug fixed in PciBusDxe\PciLib.c.
Removed the redundant second call to PciSearchDevice sub-routine when the
PCD for the Hot-Plug support is disabled.

Signed-off-by: Ashraf Javeed 
Cc: Jian J Wang 
Cc: Ray Ni 
---
 MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 19 +--
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c 
b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
index f0d9f45c4a..5b55fb5d3b 100644
--- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
+++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c
@@ -1114,24 +1114,7 @@ PciScanBus (
 //
 // For PPB
 //
-if (!FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
-  //
-  // If Hot Plug is not supported,
-  // get the bridge information
-  //
-  Status = PciSearchDevice (
-Bridge,
-,
-StartBusNumber,
-Device,
-Func,
-
-);
-
-  if (EFI_ERROR (Status)) {
-return Status;
-  }
-} else {
+if (FeaturePcdGet (PcdPciBusHotplugDeviceSupport)) {
   //
   // If Hot Plug is supported,
   // Get the bridge information
-- 
2.21.0.windows.1


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

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



Re: [edk2-devel] [edk2-platforms][PATCH v1 06/16] Hisilicon/D0x: Use StatusCode Router & Handler in MdeModulePkg

2019-05-27 Thread ming . huang
I have tested this patch simply, it can boot to OS sucessfully.

Thanks.

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

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



Re: [edk2-devel] [Patch] BaseTools/Capsule: Supports UEFI Capsule with multiple payloads and embedded drivers

2019-05-27 Thread Liming Gao
Seemly, this is new feature implementation. It will not be for Q2 stable tag. 
Right?

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of Eric Jin
> Sent: Monday, May 27, 2019 3:28 PM
> To: devel@edk2.groups.io
> Cc: Feng, Bob C ; Gao, Liming ; 
> Kinney; Kinney, Michael D 
> Subject: [edk2-devel] [Patch] BaseTools/Capsule: Supports UEFI Capsule with 
> multiple payloads and embedded drivers
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1834
> 
> * Add arguments "--embedded-driver" to support embedded driver in command 
> line.
> * Add arguments "--update-image-index" to identify ImageIndex within the 
> device
>   in command line.
> * Add arguments "-j JSONFILE" to support multiple payloads and embedded 
> drivers
>   with JSON file.
> 
> The update is in a backwards compatible manner, so all command line options to
> support single payload are still supported. But all the options associated 
> with
> multiple payloads should be provided in a JSON file.
> 
> Cc: Bob Feng 
> Cc: Liming Gao 
> Cc: Kinney, Michael D 
> Signed-off-by: Eric Jin 
> ---
>  BaseTools/Source/Python/Capsule/GenerateCapsule.py  | 961
> ++
> ++
> ++
> ++
> ++
> +++--
> -
> 
>  BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py|  14 
> +-
>  BaseTools/Source/Python/Common/Uefi/Capsule/FmpCapsuleHeader.py |  12 
> +++-
>  3 files changed, 730 insertions(+), 257 deletions(-)
> 
> diff --git a/BaseTools/Source/Python/Capsule/GenerateCapsule.py 
> b/BaseTools/Source/Python/Capsule/GenerateCapsule.py
> index 4de3635298..ee95c4cc2e 100644
> --- a/BaseTools/Source/Python/Capsule/GenerateCapsule.py
> +++ b/BaseTools/Source/Python/Capsule/GenerateCapsule.py
> @@ -1,18 +1,16 @@
>  ## @file
> 
>  # Generate a capsule.
> 
>  #
> 
> -# This tool generates a UEFI Capsule around an FMP Capsule.  The capsule 
> payload
> 
> +# This tool generates a UEFI Capsule around an FMP Capsule. The capsule 
> payload
> 
>  # be signed using signtool or OpenSSL and if it is signed the signed content
> 
>  # includes an FMP Payload Header.
> 
>  #
> 
>  # This tool is intended to be used to generate UEFI Capsules to update the
> 
> -# system firmware or device firmware for integrated devices.  In order to
> 
> +# system firmware or device firmware for integrated devices. In order to
> 
>  # keep the tool as simple as possible, it has the following limitations:
> 
> -#   * Do not support multiple payloads in a capsule.
> 
> -#   * Do not support optional drivers in a capsule.
> 
>  #   * Do not support vendor code bytes in a capsule.
> 
>  #
> 
> -# Copyright (c) 2018, Intel Corporation. All rights reserved.
> 
> +# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
> 
>  # SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  #
> 
> 
> 
> @@ -29,6 +27,7 @@ import os
>  import tempfile
> 
>  import shutil
> 
>  import platform
> 
> +import json
> 
>  from Common.Uefi.Capsule.UefiCapsuleHeader import UefiCapsuleHeaderClass
> 
>  from Common.Uefi.Capsule.FmpCapsuleHeader  import FmpCapsuleHeaderClass
> 
>  from Common.Uefi.Capsule.FmpAuthHeader import FmpAuthHeaderClass
> 
> @@ -42,7 +41,7 @@ __version__ = '0.9'
>  __copyright__   = 'Copyright (c) 2018, Intel Corporation. All rights 
> reserved.'
> 
>  __description__ = 'Generate a capsule.\n'
> 
> 
> 
> -def SignPayloadSignTool (Payload, ToolPath, PfxFile):
> 
> +def SignPayloadSignTool (Payload, ToolPath, PfxFile, Verbose = False):
> 
>  #
> 
>  # Create a temporary directory
> 
>  #
> 
> @@ -75,6 +74,8 @@ def SignPayloadSignTool (Payload, ToolPath, PfxFile):
>  Command = Command + '/p7 {TempDir} '.format (TempDir = TempDirectoryName)
> 
>  Command = Command + '/f {PfxFile} '.format (PfxFile = PfxFile)
> 
>  Command = Command + TempFileName
> 
> +if Verbose:
> 
> +print (Command)
> 
> 
> 
>  #
> 
>  # Sign the input file using the specified private key
> 
> @@ -88,7 +89,7 @@ def SignPayloadSignTool (Payload, ToolPath, PfxFile):
> 
> 
>  if 

Re: [edk2-devel] [PATCH 0/3] update ArmSoftFloatLib to latest upstream version

2019-05-27 Thread Xiaoyu Lu
Hi Ard,

Thanks for these patches.

I did some function tests for it.
Here is the results:
--- Test 1: ---
test uint32_to_f64 4026531839: Mem: 00 00 E0 FF FF FF ED 41
test uint32_to_f64 4294967295: Mem: 00 00 E0 FF FF FF EF 41
 Test 2: ---
Test f64_to_uint32 5294967295.1: 4294967295
Test f64_to_uint32 4294967295.1: 4294967295
Test f64_to_uint32 4294967294.8: 4294967294
Test f64_to_uint32 4294967295.2: 4294967295
Test f64_to_uint32 4294967295.8: 4294967295
Test f64_to_uint32 -40.0: 0
Test f64_to_uint32 0.0: 0
Test f64_to_uint32 0.8: 0
Test f64_to_uint32 -0.1: 0

looks fine for me.

I also did CryptoPkg tests with OpenSSL_1_1_1b, it works too.

Tested-by: Xiaoyu Lu 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Ard Biesheuvel
> Sent: Saturday, May 25, 2019 5:33 AM
> To: Laszlo Ersek 
> Cc: edk2-devel-groups-io ; Gao, Liming
> ; Wang, Jian J ; Leif Lindholm
> ; Kinney, Michael D 
> Subject: Re: [edk2-devel] [PATCH 0/3] update ArmSoftFloatLib to latest
> upstream version
> 
> On Fri, 24 May 2019 at 22:57, Laszlo Ersek  wrote:
> >
> > Hi Ard,
> >
> > On 05/24/19 17:11, Ard Biesheuvel wrote:
> > > Currently, our move to OpenSSL 1.1.1b is being blocked by an issue in
> > > the ARM software floating point library, which lacks some intrinsics
> > > that the ARM EABI spec defines.
> > >
> > > Since the code was in pretty sorry state, let's fix this by upgrading
> > > to the very latest version of the core library this code is based on,
> > > dated January 2018 (whereas the NetBSD fork of the old code dates back
> > > to 2002)
> >
> > Thanks for this series!
> >
> > I've fetched your branch noted below, and build-tested it with
> > ArmVirtQemu, ArmVirtQemuKernel, and ArmVirtXen. They all build fine.
> > And, AIUI, ArmSoftFloatLib is only needed for 32-bit ARM (not AArch64),
> > so I won't do other than build testing now.
> >
> > Build-tested-by: Laszlo Ersek 
> >
> > I'll make a number of comments below. I'm not requesting that *you* do
> > any of those, since you're already doing the community a favor, by
> > putting out this fire. I'll just list what I think should be done. If
> > there's agreement, I might take on a few of those.
> >
> > (1) We should file a new TianoCore BZ (Feature Request) for this
> > ArmSoftFloatLib upgrade, and we should block TianoCore#1089 with that
> > new BZ.
> >
> > (2) The new BZ should be referenced in all of the commit messages.
> >
> > (3) The new BZ should be added to the release planning wiki page.
> >
> 
> Fair enough.
> 
> > (4) In the longer term, we should investigate whether this (large)
> > library can be consumed as a git submodule. (Assuming that makes sense
> > -- if we don't expect another upgrade anytime soon, then this may not be
> > necessary.)
> >
> 
> This version of ArmSoftFloatLib implements all __aeabi routines that
> are listed in the spec. Only a few of those are referenced by OpenSSL,
> and in practice this code never gets exercised. So unless we grow
> another user of this library, I have no intention of doing lots of
> maintenance work on this library and (in response to your point below)
> this is the reason I simply imported the whole library - to make
> future upgrades, in case they do occur, as painless and
> straightforward as possible. So I think a git submodule is overkill,
> especially given the fact that there does not seem to be an
> authoritative git upstream for this library.
> 
> > > A few notable issues that may require some discussion:
> > > - this code is made available under the 3-clause BSD license
> >
> > That should be OK; "Readme.md" white-lists the 3-clause BSD License.
> >
> > > - RVCT support is being dropped, since it is untested and nobody
> > >   appears to still care.
> >
> > (5) I'm OK with that, but we should file a separate TianoCore BZ for
> > BaseTools, about RVCT removal.
> >
> 
> https://bugzilla.tianocore.org/show_bug.cgi?id=1750
> 
> > > - no SPDX headers - this is left as an exercise for the steward.
> >
> > (6) Right, I've noticed that -- separate BZ (dependent on the one from
> > (2)), or else it should be solved as the fourth patch in this series.
> >
> 
> Sure. The only downside to that is that it increases the delta with
> the upstream library, so let's hope that this rebases cleanly if we do
> end up upgrading.
> 
> > >
> > > Code can be found here:
> > >
> https://github.com/ardbiesheuvel/edk2/tree/bz_1089_upgrade_to_openssl
> _1_1_1b_v4
> > >
> > > Cc: Laszlo Ersek 
> > > Cc: "Gao, Liming" 
> > > Cc: "Wang, Jian J" 
> > > Cc: Leif Lindholm 
> > > Cc: Michael D Kinney 
> > >
> > > Ard Biesheuvel (3):
> > >   ArmPkg: import latest version (3e) of the Berkeley Softfloat library
> > >   ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library
> >
> > (7) This patch (patch#2) uses designated initializers (in the
> > initializers of the unions). I believe we never intend to build this
> > library with 

[edk2-devel] [PATCH v2 6/7] EmbeddedPkg: Fix DwEmmc SendCommand polling

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

Change SendCommand polling mode to remove unnecessary delay, and check
for transfer done only when block data is to be read/write. This would
also increase performance slightly.

Signed-off-by: "Tien Hock, Loh" 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 43 +++-
 1 file changed, 33 insertions(+), 10 deletions(-)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index c6c8e04917..b57833458f 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -286,16 +286,13 @@ SendCommand (
 DWEMMC_INT_RCRC | DWEMMC_INT_RE;
   ErrMask |= DWEMMC_INT_DCRC | DWEMMC_INT_DRT | DWEMMC_INT_SBE;
   do {
-MicroSecondDelay(500);
 Data = MmioRead32 (DWEMMC_RINTSTS);
-
-if (Data & ErrMask) {
-  return EFI_DEVICE_ERROR;
-}
-if (Data & DWEMMC_INT_DTO) { // Transfer Done
-  break;
-}
   } while (!(Data & DWEMMC_INT_CMD_DONE));
+
+  if (Data & ErrMask) {
+return EFI_DEVICE_ERROR;
+  }
+
   return EFI_SUCCESS;
 }
 
@@ -550,8 +547,9 @@ DwEmmcReadBlockData (
   )
 {
   EFI_STATUS  Status;
-  UINT32  DescPages, CountPerPage, Count;
+  UINT32  DescPages, CountPerPage, Count, ErrMask;
   EFI_TPL Tpl;
+  UINTN Rintsts = 0;
 
   Tpl = gBS->RaiseTPL (TPL_NOTIFY);
 
@@ -574,6 +572,18 @@ DwEmmcReadBlockData (
 DEBUG ((DEBUG_ERROR, "Failed to read data, mDwEmmcCommand:%x, 
mDwEmmcArgument:%x, Status:%r\n", mDwEmmcCommand, mDwEmmcArgument, Status));
 goto out;
   }
+
+  while(!((MmioRead32(DWEMMC_RINTSTS) & (DWEMMC_INT_DTO {
+Rintsts = MmioRead32 (DWEMMC_RINTSTS);
+  }
+  ErrMask = DWEMMC_INT_EBE | DWEMMC_INT_HLE | DWEMMC_INT_RTO |
+DWEMMC_INT_RCRC | DWEMMC_INT_RE | DWEMMC_INT_DCRC |
+DWEMMC_INT_DRT | DWEMMC_INT_SBE;
+
+  if (Rintsts & ErrMask) {
+Status = EFI_DEVICE_ERROR;
+goto out;
+  }
 out:
   // Restore Tpl
   gBS->RestoreTPL (Tpl);
@@ -589,8 +599,9 @@ DwEmmcWriteBlockData (
   )
 {
   EFI_STATUS  Status;
-  UINT32  DescPages, CountPerPage, Count;
+  UINT32  DescPages, CountPerPage, Count, ErrMask;
   EFI_TPL Tpl;
+  UINTN Rintsts = 0;
 
   Tpl = gBS->RaiseTPL (TPL_NOTIFY);
 
@@ -613,6 +624,18 @@ DwEmmcWriteBlockData (
 DEBUG ((DEBUG_ERROR, "Failed to write data, mDwEmmcCommand:%x, 
mDwEmmcArgument:%x, Status:%r\n", mDwEmmcCommand, mDwEmmcArgument, Status));
 goto out;
   }
+
+  while(!((MmioRead32(DWEMMC_RINTSTS) & (DWEMMC_INT_DTO {
+Rintsts = MmioRead32 (DWEMMC_RINTSTS);
+  }
+  ErrMask = DWEMMC_INT_EBE | DWEMMC_INT_HLE | DWEMMC_INT_RTO |
+DWEMMC_INT_RCRC | DWEMMC_INT_RE | DWEMMC_INT_DCRC |
+DWEMMC_INT_DRT | DWEMMC_INT_SBE;
+
+  if (Rintsts & ErrMask) {
+Status = EFI_DEVICE_ERROR;
+goto out;
+  }
 out:
   // Restore Tpl
   gBS->RestoreTPL (Tpl);
-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 4/7] EmbeddedPkg: Fix response check flag

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

Do not send CRC response check if the MMC command does not support CRC
response

Signed-off-by: Tien Hock, Loh 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index c44e310c04..e0068655ca 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -385,7 +385,7 @@ DwEmmcSendCommand (
BIT_CMD_READ | BIT_CMD_WAIT_PRVDATA_COMPLETE;
 break;
   default:
-Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
+Cmd = BIT_CMD_RESPONSE_EXPECT;
 break;
   }
 
@@ -396,6 +396,10 @@ DwEmmcSendCommand (
   else
 IsACmd = FALSE;
 
+  if (!(MmcCmd & MMC_CMD_NO_CRC_RESPONSE)) {
+Cmd |= BIT_CMD_CHECK_RESPONSE_CRC;
+  }
+
   if (IsPendingReadCommand (Cmd) || IsPendingWriteCommand (Cmd)) {
 mDwEmmcCommand = Cmd;
 mDwEmmcArgument = Argument;
-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 2/7] EmbeddedPkg: Fix DwEmmc CMD8 support for SD

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

On CMD8, for SD, the controller should not expect data as this is a
SEND_IF_COND command to verify SD operating condition, and does not have
data.

Signed-off-by: Tien Hock, Loh 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 

--
v2
- Change IsEmmc to EFI_MMC_HOST_CARD_TYPE
---
 EmbeddedPkg/Include/Protocol/MmcHost.h   | 6 ++
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c| 9 ++---
 EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 2 ++
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/EmbeddedPkg/Include/Protocol/MmcHost.h 
b/EmbeddedPkg/Include/Protocol/MmcHost.h
index 9e07082680..7807744721 100644
--- a/EmbeddedPkg/Include/Protocol/MmcHost.h
+++ b/EmbeddedPkg/Include/Protocol/MmcHost.h
@@ -151,6 +151,11 @@ typedef BOOLEAN (EFIAPI *MMC_ISMULTIBLOCK) (
   IN  EFI_MMC_HOST_PROTOCOL *This
   );
 
+typedef enum {
+  EMMC,
+  SD
+} EFI_MMC_HOST_CARD_TYPE;
+
 struct _EFI_MMC_HOST_PROTOCOL {
 
   UINT32  Revision;
@@ -169,6 +174,7 @@ struct _EFI_MMC_HOST_PROTOCOL {
   MMC_SETIOS  SetIos;
   MMC_ISMULTIBLOCKIsMultiBlock;
 
+  EFI_MMC_HOST_CARD_TYPE  HostCardType;
 };
 
 #define MMC_HOST_PROTOCOL_REVISION0x00010002// 1.2
diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index 420487757d..fd3a5bf685 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -340,9 +340,12 @@ DwEmmcSendCommand (
 Cmd = 0;
 break;
   case MMC_INDX(8):
-Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
-   BIT_CMD_DATA_EXPECTED | BIT_CMD_READ |
-   BIT_CMD_WAIT_PRVDATA_COMPLETE;
+if (This->HostCardType == SD)
+  Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
+ BIT_CMD_WAIT_PRVDATA_COMPLETE;
+else
+  Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
+ BIT_CMD_WAIT_PRVDATA_COMPLETE | BIT_CMD_READ | 
BIT_CMD_DATA_EXPECTED;
 break;
   case MMC_INDX(9):
 Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c 
b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
index 4dc0be125c..c816ae09ee 100755
--- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
+++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
@@ -770,8 +770,10 @@ InitializeMmcDevice (
   }
 
   if (MmcHostInstance->CardInfo.CardType != EMMC_CARD) {
+MmcHostInstance->MmcHost->HostCardType = SD;
 Status = InitializeSdMmcDevice (MmcHostInstance);
   } else {
+MmcHostInstance->MmcHost->HostCardType = EMMC;
 Status = InitializeEmmcDevice (MmcHostInstance);
   }
   if (EFI_ERROR (Status)) {
-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 0/7] Fix some bugs with DwEmmc

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

There are some issues with DwEmmc when being used with SD protocol.
These series of patches fixes the issues.

TIen Hock, Loh (1):
  EmbeddedPkg: Add SD command support for DwEmmc

Tien Hock, Loh (6):
  EmbeddedPkg: Fix DwEmmc CMD8 support for SD
  EmbeddedPkg: Send command when MMC ask for response
  EmbeddedPkg: Fix response check flag
  EmbeddedPkg: Clear CTYPE on initialization
  EmbeddedPkg: Fix DwEmmc SendCommand polling
  EmbeddedPkg: Fix DwEmmc read/write size in preparing DMA size

 EmbeddedPkg/Include/Protocol/MmcHost.h|   6 +
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 103 +++---
 .../Universal/MmcDxe/MmcIdentification.c  |   2 +
 3 files changed, 93 insertions(+), 18 deletions(-)

-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 7/7] EmbeddedPkg: Fix DwEmmc read/write size in preparing DMA size

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

Add support for reading data that is less than DWEMMC_BLOCK_SIZE,
otherwise it would read bigger data than requested and cause errors

Signed-off-by: "Tien Hock, Loh" 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 

--
v2:
- Fix white space issue
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index b57833458f..ec2fa7923b 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -493,7 +493,10 @@ PrepareDmaData (
 
   Cnt = (Length + DWEMMC_DMA_BUF_SIZE - 1) / DWEMMC_DMA_BUF_SIZE;
   Blks = (Length + DWEMMC_BLOCK_SIZE - 1) / DWEMMC_BLOCK_SIZE;
-  Length = DWEMMC_BLOCK_SIZE * Blks;
+
+  if(Length >= DWEMMC_BLOCK_SIZE) {
+Length = DWEMMC_BLOCK_SIZE * Blks;
+  }
 
   for (Idx = 0; Idx < Cnt; Idx++) {
 (IdmacDesc + Idx)->Des0 = DWEMMC_IDMAC_DES0_OWN | DWEMMC_IDMAC_DES0_CH |
@@ -534,8 +537,14 @@ StartDma (
   Data |= DWEMMC_IDMAC_ENABLE | DWEMMC_IDMAC_FB;
   MmioWrite32 (DWEMMC_BMOD, Data);
 
-  MmioWrite32 (DWEMMC_BLKSIZ, DWEMMC_BLOCK_SIZE);
-  MmioWrite32 (DWEMMC_BYTCNT, Length);
+  if(Length < DWEMMC_BLOCK_SIZE) {
+MmioWrite32 (DWEMMC_BLKSIZ, Length);
+MmioWrite32 (DWEMMC_BYTCNT, Length);
+  }
+  else {
+MmioWrite32 (DWEMMC_BLKSIZ, DWEMMC_BLOCK_SIZE);
+MmioWrite32 (DWEMMC_BYTCNT, Length);
+  }
 }
 
 EFI_STATUS
-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 5/7] EmbeddedPkg: Clear CTYPE on initialization

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

Clear CTYPE on initialization. This is important if previous bootloader
changes the CTYPE can cause the controller to not initialize correctly
if CTYPE is not reset to 0

Signed-off-by: "Tien Hock, Loh" 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index e0068655ca..c6c8e04917 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -205,6 +205,7 @@ DwEmmcNotifyState (
 MmioWrite32 (DWEMMC_TMOUT, ~0);
 MmioWrite32 (DWEMMC_IDINTEN, 0);
 MmioWrite32 (DWEMMC_BMOD, DWEMMC_IDMAC_SWRESET);
+MmioWrite32 (DWEMMC_CTYPE, 0);
 
 MmioWrite32 (DWEMMC_BLKSIZ, DWEMMC_BLOCK_SIZE);
 do {
-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 1/7] EmbeddedPkg: Add SD command support for DwEmmc

2019-05-27 Thread Loh, Tien Hock
From: "TIen Hock, Loh" 

Added ACMD6 for SD support. For SD, after CMD55 is sent, the next
command should be an application command, which should not expect
data

Signed-off-by: "Tien Hock, Loh" 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 

--
v2:
- Move IsACmd as a local static variable in function
- Fix some coding standard issue with spacing
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index 68c523a99f..420487757d 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -307,6 +307,7 @@ DwEmmcSendCommand (
 {
   UINT32   Cmd = 0;
   EFI_STATUS   Status = EFI_SUCCESS;
+  STATIC BOOLEAN IsACmd = FALSE;
 
   switch (MMC_GET_INDX(MmcCmd)) {
   case MMC_INDX(0):
@@ -323,6 +324,15 @@ DwEmmcSendCommand (
 Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
BIT_CMD_SEND_INIT;
 break;
+  case MMC_INDX (6):
+if(IsACmd) {
+  Cmd = BIT_CMD_RESPONSE_EXPECT;
+}
+else {
+  Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_DATA_EXPECTED |
+BIT_CMD_READ;
+}
+break;
   case MMC_INDX(7):
 if (Argument)
 Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
@@ -367,12 +377,22 @@ DwEmmcSendCommand (
 Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
BIT_CMD_DATA_EXPECTED;
 break;
+  case MMC_INDX (51):
+Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_DATA_EXPECTED |
+   BIT_CMD_READ | BIT_CMD_WAIT_PRVDATA_COMPLETE;
+break;
   default:
 Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC;
 break;
   }
 
   Cmd |= MMC_GET_INDX(MmcCmd) | BIT_CMD_USE_HOLD_REG | BIT_CMD_START;
+
+  if(MMC_INDX (55) == MMC_GET_INDX (MmcCmd))
+IsACmd = TRUE;
+  else
+IsACmd = FALSE;
+
   if (IsPendingReadCommand (Cmd) || IsPendingWriteCommand (Cmd)) {
 mDwEmmcCommand = Cmd;
 mDwEmmcArgument = Argument;
-- 
2.19.0


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

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



[edk2-devel] [PATCH v2 3/7] EmbeddedPkg: Send command when MMC ask for response

2019-05-27 Thread Loh, Tien Hock
From: "Tien Hock, Loh" 

Send command when MMC ask for response in DwEmmcReceiveResponse, and
command is a pending command (eg. DMA needs to be set up first)

Signed-off-by: "Tien Hock, Loh" 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
---
 EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c 
b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
index fd3a5bf685..c44e310c04 100644
--- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
+++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c
@@ -400,6 +400,8 @@ DwEmmcSendCommand (
 mDwEmmcCommand = Cmd;
 mDwEmmcArgument = Argument;
   } else {
+mDwEmmcCommand = Cmd;
+mDwEmmcArgument = Argument;
 Status = SendCommand (Cmd, Argument);
   }
   return Status;
@@ -412,10 +414,15 @@ DwEmmcReceiveResponse (
   IN UINT32*Buffer
   )
 {
+  EFI_STATUS Status = EFI_SUCCESS;
+
   if (Buffer == NULL) {
 return EFI_INVALID_PARAMETER;
   }
 
+  if(IsPendingReadCommand (mDwEmmcCommand) || 
IsPendingWriteCommand(mDwEmmcCommand))
+Status = SendCommand (mDwEmmcCommand, mDwEmmcArgument);
+
   if (   (Type == MMC_RESPONSE_TYPE_R1)
   || (Type == MMC_RESPONSE_TYPE_R1b)
   || (Type == MMC_RESPONSE_TYPE_R3)
@@ -429,7 +436,7 @@ DwEmmcReceiveResponse (
 Buffer[2] = MmioRead32 (DWEMMC_RESP2);
 Buffer[3] = MmioRead32 (DWEMMC_RESP3);
   }
-  return EFI_SUCCESS;
+  return Status;
 }
 
 VOID
-- 
2.19.0


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

View/Reply Online (#41411): https://edk2.groups.io/g/devel/message/41411
Mute This Topic: https://groups.io/mt/31807962/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/3] update ArmSoftFloatLib to latest upstream version

2019-05-27 Thread Wang, Jian J
Ard,

Thanks for the contribution. The patch series fix the openssl1.1.1
upgrade build break for ARM. From this perspective,

Acked-by: Jian J Wang 

Thanks,
Jian
> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Friday, May 24, 2019 11:12 PM
> To: devel@edk2.groups.io
> Cc: Ard Biesheuvel ; Laszlo Ersek
> ; Gao, Liming ; Wang, Jian J
> ; Leif Lindholm ; Kinney,
> Michael D 
> Subject: [PATCH 0/3] update ArmSoftFloatLib to latest upstream version
> 
> Currently, our move to OpenSSL 1.1.1b is being blocked by an issue in
> the ARM software floating point library, which lacks some intrinsics
> that the ARM EABI spec defines.
> 
> Since the code was in pretty sorry state, let's fix this by upgrading
> to the very latest version of the core library this code is based on,
> dated January 2018 (whereas the NetBSD fork of the old code dates back
> to 2002)
> 
> A few notable issues that may require some discussion:
> - this code is made available under the 3-clause BSD license
> - RVCT support is being dropped, since it is untested and nobody appears
>   to still care.
> - no SPDX headers - this is left as an exercise for the steward.
> 
> Code can be found here:
> https://github.com/ardbiesheuvel/edk2/tree/bz_1089_upgrade_to_openssl_1_1
> _1b_v4
> 
> Cc: Laszlo Ersek 
> Cc: "Gao, Liming" 
> Cc: "Wang, Jian J" 
> Cc: Leif Lindholm 
> Cc: Michael D Kinney 
> 
> Ard Biesheuvel (3):
>   ArmPkg: import latest version (3e) of the Berkeley Softfloat library
>   ArmPkg/ArmSoftFloatLib: switch to new version of softfloat library
>   ArmPkg/ArmSoftFloatLib: remove source files that are no longer used
> 
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cdcmp.asm
> |   41 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_cfcmp.asm
> |   37 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpeq.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpge.c
> |   28 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpgt.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmple.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmplt.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_dcmpun.c
> |   35 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpeq.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpge.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpgt.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmple.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmplt.c
> |   30 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/__aeabi_fcmpun.c
> |   35 -
>  ArmPkg/Library/ArmSoftFloatLib/Arm/softfloat.h   
> |
> 345 ---
>  ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.c 
> |
> 295 +++
>  ArmPkg/Library/ArmSoftFloatLib/ArmSoftFloatLib.inf   
> |
> 79 +-
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/COPYING.txt
> |   37 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/README.html
> |   49 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/README.txt
> |   21 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-GCC/Makefile
> |  325 +++
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-GCC/platform.h
> |   53 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-SSE2-
> GCC/Makefile|  325 +++
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-386-SSE2-
> GCC/platform.h  |   53 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-
> GCC/Makefile   |  323 +++
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-
> GCC/platform.h |   53 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-x86_64-
> GCC/Makefile  |  390 
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-x86_64-
> GCC/platform.h|   54 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-MinGW/Makefile
> |  325 +++
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-MinGW/platform.h
> |   53 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-SSE2-
> MinGW/Makefile  |  325 +++
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win32-SSE2-
> MinGW/platform.h|   53 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win64-MinGW-
> w64/Makefile   |  390 
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Win64-MinGW-
> w64/platform.h |   54 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-
> FAST_INT64/Makefile   |  391 
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-
> FAST_INT64/platform.h |   50 +
>  ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/template-not-
> FAST_INT64/Makefile   |  325 +++
>  

[edk2-devel] [Patch] BaseTools/Capsule: Supports UEFI Capsule with multiple payloads and embedded drivers

2019-05-27 Thread Eric Jin
https://bugzilla.tianocore.org/show_bug.cgi?id=1834

* Add arguments "--embedded-driver" to support embedded driver in command line.
* Add arguments "--update-image-index" to identify ImageIndex within the device
  in command line.
* Add arguments "-j JSONFILE" to support multiple payloads and embedded drivers
  with JSON file.

The update is in a backwards compatible manner, so all command line options to
support single payload are still supported. But all the options associated with
multiple payloads should be provided in a JSON file.

Cc: Bob Feng 
Cc: Liming Gao 
Cc: Kinney, Michael D 
Signed-off-by: Eric Jin 
---
 BaseTools/Source/Python/Capsule/GenerateCapsule.py  | 961 
+---
 BaseTools/Source/Python/Common/Uefi/Capsule/FmpAuthHeader.py|  14 
+-
 BaseTools/Source/Python/Common/Uefi/Capsule/FmpCapsuleHeader.py |  12 
+++-
 3 files changed, 730 insertions(+), 257 deletions(-)

diff --git a/BaseTools/Source/Python/Capsule/GenerateCapsule.py 
b/BaseTools/Source/Python/Capsule/GenerateCapsule.py
index 4de3635298..ee95c4cc2e 100644
--- a/BaseTools/Source/Python/Capsule/GenerateCapsule.py
+++ b/BaseTools/Source/Python/Capsule/GenerateCapsule.py
@@ -1,18 +1,16 @@
 ## @file
 # Generate a capsule.
 #
-# This tool generates a UEFI Capsule around an FMP Capsule.  The capsule 
payload
+# This tool generates a UEFI Capsule around an FMP Capsule. The capsule payload
 # be signed using signtool or OpenSSL and if it is signed the signed content
 # includes an FMP Payload Header.
 #
 # This tool is intended to be used to generate UEFI Capsules to update the
-# system firmware or device firmware for integrated devices.  In order to
+# system firmware or device firmware for integrated devices. In order to
 # keep the tool as simple as possible, it has the following limitations:
-#   * Do not support multiple payloads in a capsule.
-#   * Do not support optional drivers in a capsule.
 #   * Do not support vendor code bytes in a capsule.
 #
-# Copyright (c) 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2018 - 2019, Intel Corporation. All rights reserved.
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 
@@ -29,6 +27,7 @@ import os
 import tempfile
 import shutil
 import platform
+import json
 from Common.Uefi.Capsule.UefiCapsuleHeader import UefiCapsuleHeaderClass
 from Common.Uefi.Capsule.FmpCapsuleHeader  import FmpCapsuleHeaderClass
 from Common.Uefi.Capsule.FmpAuthHeader import FmpAuthHeaderClass
@@ -42,7 +41,7 @@ __version__ = '0.9'
 __copyright__   = 'Copyright (c) 2018, Intel Corporation. All rights reserved.'
 __description__ = 'Generate a capsule.\n'
 
-def SignPayloadSignTool (Payload, ToolPath, PfxFile):
+def SignPayloadSignTool (Payload, ToolPath, PfxFile, Verbose = False):
 #
 # Create a temporary directory
 #
@@ -75,6 +74,8 @@ def SignPayloadSignTool (Payload, ToolPath, PfxFile):
 Command = Command + '/p7 {TempDir} '.format (TempDir = TempDirectoryName)
 Command = Command + '/f {PfxFile} '.format (PfxFile = PfxFile)
 Command = Command + TempFileName
+if Verbose:
+print (Command)
 
 #
 # Sign the input file using the specified private key
@@ -88,7 +89,7 @@ def SignPayloadSignTool (Payload, ToolPath, PfxFile):
 
 if Process.returncode != 0:
 shutil.rmtree (TempDirectoryName)
-print (Result[1].decode(encoding='utf-8', errors='ignore'))
+print (Result[1].decode())
 raise ValueError ('GenerateCapsule: error: signtool failed.')
 
 #
@@ -105,11 +106,11 @@ def SignPayloadSignTool (Payload, ToolPath, PfxFile):
 shutil.rmtree (TempDirectoryName)
 return Signature
 
-def VerifyPayloadSignTool (Payload, CertData, ToolPath, PfxFile):
+def VerifyPayloadSignTool (Payload, CertData, ToolPath, PfxFile, Verbose = 
False):
 print ('signtool verify is not supported.')
 raise ValueError ('GenerateCapsule: error: signtool verify is not 
supported.')
 
-def SignPayloadOpenSsl (Payload, ToolPath, SignerPrivateCertFile, 
OtherPublicCertFile, TrustedPublicCertFile):

[edk2-devel] [RFC][PATCH v1 0/3] Remove IntelFramework[Module]Pkg

2019-05-27 Thread Wu, Hao A


'''
Please note that this series will be hold until all the below requirements
are met:

A. edk2-stable201905 is created;
B. OvmfPkg has been updated to drop its dependency on
   IntelFramework[Module]Pkg; (Patches already been sent)
C. Platforms in the edk2-platforms have been updated to drop their
   dependencies on IntelFramework[Module]Pkg. (Patches already been sent
   for all platforms except Intel Quark and Minnowboard)
'''

The patches themselves will not be sent to the mailing list and are only
available at:
https://github.com/hwu25/edk2/commits/delete_framework

Cc: Liming Gao 
Cc: Ray Ni 
Cc: Andrew Fish 
Cc: Laszlo Ersek 
Cc: Leif Lindholm 
Cc: Michael D Kinney 


Hao A Wu (3):
  Remove IntelFrameworkModulePkg
  Remove IntelFrameworkPkg
  Maintainers.txt: Remove information for IntelFramework[Module]Pkg

 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dec
 |  241 --
 IntelFrameworkPkg/IntelFrameworkPkg.dec
 |  182 -
 IntelFrameworkModulePkg/IntelFrameworkModulePkg.dsc
 |  178 -
 IntelFrameworkPkg/IntelFrameworkPkg.dsc
 |   69 -
 IntelFrameworkModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf
 |   67 -
 IntelFrameworkModulePkg/Bus/Isa/IsaFloppyDxe/IsaFloppyDxe.inf  
 |   72 -
 IntelFrameworkModulePkg/Bus/Isa/IsaFloppyPei/IsaFloppyPei.inf  
 |   66 -
 IntelFrameworkModulePkg/Bus/Isa/IsaIoDxe/IsaIoDxe.inf  
 |   64 -
 IntelFrameworkModulePkg/Bus/Isa/IsaSerialDxe/IsaSerialDxe.inf  
 |   74 -
 IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2keyboardDxe.inf  
 |   79 -
 
IntelFrameworkModulePkg/Bus/Isa/Ps2MouseAbsolutePointerDxe/Ps2MouseAbsolutePointerDxe.inf
   |   70 -
 IntelFrameworkModulePkg/Bus/Isa/Ps2MouseDxe/Ps2MouseDxe.inf
 |   69 -
 IntelFrameworkModulePkg/Bus/Pci/IdeBusDxe/IdeBusDxe.inf
 |   83 -
 IntelFrameworkModulePkg/Bus/Pci/VgaMiniPortDxe/VgaMiniPortDxe.inf  
 |   51 -
 IntelFrameworkModulePkg/Csm/BiosThunk/BlockIoDxe/BlockIoDxe.inf
 |   58 -
 IntelFrameworkModulePkg/Csm/BiosThunk/KeyboardDxe/KeyboardDxe.inf  
 |   72 -
 IntelFrameworkModulePkg/Csm/BiosThunk/Snp16Dxe/Snp16Dxe.inf
 |   66 -
 IntelFrameworkModulePkg/Csm/BiosThunk/VideoDxe/VideoDxe.inf
 |   80 -
 IntelFrameworkModulePkg/Csm/LegacyBiosDxe/LegacyBiosDxe.inf
 |  131 -
 IntelFrameworkModulePkg/Library/DxeCapsuleLib/DxeCapsuleLib.inf
 |   49 -
 
IntelFrameworkModulePkg/Library/DxeReportStatusCodeLibFramework/DxeReportStatusCodeLib.inf
  |   53 -
 IntelFrameworkModulePkg/Library/GenericBdsLib/GenericBdsLib.inf
 |  138 -
 IntelFrameworkModulePkg/Library/LegacyBootMaintUiLib/LegacyBootMaintUiLib.inf  
 |   63 -
 IntelFrameworkModulePkg/Library/LegacyBootManagerLib/LegacyBootManagerLib.inf  
 |   58 -
 
IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaArchCustomDecompressLib.inf
 |   63 -
 
IntelFrameworkModulePkg/Library/LzmaCustomDecompressLib/LzmaCustomDecompressLib.inf
 |   59 -
 
IntelFrameworkModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf
   |   49 -
 IntelFrameworkModulePkg/Library/PeiRecoveryLib/PeiRecoveryLib.inf  
 |   45 -
 IntelFrameworkModulePkg/Library/PeiS3Lib/PeiS3Lib.inf  
 |   44 -
 IntelFrameworkModulePkg/Library/PlatformBdsLibNull/PlatformBdsLibNull.inf  
 |   41 -
 
IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/SmmRuntimeDxeReportStatusCodeLibFramework.inf
 |   68 -
 IntelFrameworkModulePkg/Universal/Acpi/AcpiS3SaveDxe/AcpiS3SaveDxe.inf 

[edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules

2019-05-27 Thread Wu, Hao A
'''
Please note that this patch will be hold until all the below requirements
are met:

A. edk2-stable201905 is created;
B. OvmfPkg has drop its usage of the legacy ISA stack (which includes
   the IsaAcpiDxe driver);
C. UefiPayloadPkg has been updated to drop its consume to the
   8259InterruptControllerDxe driver.
'''

This patch itself will not be sent to the mailing list and is only
available at:
https://github.com/hwu25/edk2/tree/delete_framework
(https://github.com/hwu25/edk2/commit/84e58f89f6d03f9cc3399cced9d5d5529e06a416)


Below modules will be removed from PcAtChipsetPkg:
* PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
* PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
* PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf

They are considered legacy framework components and will no longer be used
after the removal of IntelFramework[Module]Pkg.

Also, the unused (after the modules being removed) PCDs will be deleted in
package level DEC/UNI files.

Cc: Ray Ni 
Cc: Andrew Fish 
Cc: Laszlo Ersek 
Cc: Leif Lindholm 
Cc: Michael D Kinney 


Hao A Wu (1):
  PcAtChipsetPkg: Remove framework modules

 PcAtChipsetPkg/PcAtChipsetPkg.dec |  58 --
 PcAtChipsetPkg/PcAtChipsetPkg.dsc |   5 +-
 PcAtChipsetPkg/8254TimerDxe/8254Timer.inf |  42 --
 PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf|  46 --
 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf |  50 --
 PcAtChipsetPkg/8254TimerDxe/Timer.h   | 185 --
 PcAtChipsetPkg/8259InterruptControllerDxe/8259.h  | 220 ---
 PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h   | 269 -
 PcAtChipsetPkg/8254TimerDxe/Timer.c   | 401 
-
 PcAtChipsetPkg/8259InterruptControllerDxe/8259.c  | 622 

 PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c | 301 --
 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c   | 353 ---
 PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c   | 386 

 PcAtChipsetPkg/8254TimerDxe/Timer.uni |  16 -
 PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni|  14 -
 PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni  |  16 -
 PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni |  14 -
 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni |  16 -
 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni|  14 -
 PcAtChipsetPkg/PcAtChipsetPkg.uni |  52 +-
 20 files changed, 2 insertions(+), 3078 deletions(-)
 delete mode 100644 PcAtChipsetPkg/8254TimerDxe/8254Timer.inf
 delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/8259.inf
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.inf
 delete mode 100644 PcAtChipsetPkg/8254TimerDxe/Timer.h
 delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/8259.h
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h
 delete mode 100644 PcAtChipsetPkg/8254TimerDxe/Timer.c
 delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/8259.c
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/ComponentName.c
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.c
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.c
 delete mode 100644 PcAtChipsetPkg/8254TimerDxe/Timer.uni
 delete mode 100644 PcAtChipsetPkg/8254TimerDxe/TimerExtra.uni
 delete mode 100644 PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259.uni
 delete mode 100644 
PcAtChipsetPkg/8259InterruptControllerDxe/Legacy8259Extra.uni
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpi.uni
 delete mode 100644 PcAtChipsetPkg/IsaAcpiDxe/IsaAcpiExtra.uni

-- 
2.12.0.windows.1


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

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