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

2019-05-28 Thread Fan, ZhijuX
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/FfsInfStatement.py |  9 ++---
 BaseTools/Source/Python/GenFds/Section.py |  7 ++-
 5 files changed, 46 insertions(+), 7 deletions(-)

diff --git a/BaseTools/Source/Python/Common/DataType.py 
b/BaseTools/Source/Python/Common/DataType.py
index 7cd67bc01a..83ec36c235 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..74f176cfef 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..fb5fd85e0a 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 = BINARY_FILE_TYPE_RAW
+Obj.SectionList.append(EfiSectionObj)
+return True
+else:
+return False
 SectionName = self._Token
 
 if SectionName not in {
@@ -3816,7 +3827,6 @@ class FdfParser:
 Obj.SectionList.append(FvImageSectionObj)
 return True
 
-EfiSectionObj = EfiSection()
 EfiSectionObj.SectionType = SectionName
 
 if not 

[edk2-devel] [PATCH] MdeModulePkg: Clarify the lib supported ARCH

2019-05-28 Thread Gao, Zhichao
From: Bret Barkelew 

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

SmmLockBoxPeiLib only support IA32 and X64 ARCH. So put
this lib to a specific
[LibraryClasses.IA32.PEIM, LibraryClasses.X64.PEIM] section.

Cc: Jian J Wang 
Cc: Hao Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 
Signed-off-by: Zhichao Gao 
---
 MdeModulePkg/MdeModulePkg.dsc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index ac7111dea1..d2e88d6b65 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -114,6 +114,8 @@
   HobLib|MdePkg/Library/PeiHobLib/PeiHobLib.inf
   
MemoryAllocationLib|MdePkg/Library/PeiMemoryAllocationLib/PeiMemoryAllocationLib.inf
   
ExtractGuidedSectionLib|MdePkg/Library/PeiExtractGuidedSectionLib/PeiExtractGuidedSectionLib.inf
+
+[LibraryClasses.IA32.PEIM, LibraryClasses.X64.PEIM]
   LockBoxLib|MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf
 
 [LibraryClasses.common.DXE_CORE]
-- 
2.21.0.windows.1


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

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



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

2019-05-28 Thread Dong, Eric
Liming,

Thanks for your comments.  Will update them when I push the changes.

Thanks,
Eric

> -Original Message-
> From: Gao, Liming
> Sent: Wednesday, May 29, 2019 1:23 PM
> To: devel@edk2.groups.io; Dong, Eric 
> Subject: RE: [edk2-devel] [Patch v3 0/3] [edk2-platform] Add modules to
> BoardModulePkg.
> 
> Eric:
>   1. Don't need to include version change message in the commit message.
> Change version is in cover letter only.
>   2. BoardModulePkg DEC/DSC still describe AdvancedFeaturePkg. Please fix
> them.
> 
>   With those changes, Reviewed-by: Liming Gao 
> 
> Thanks
> Liming
> >-Original Message-
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Dong, Eric
> >Sent: Tuesday, May 28, 2019 4:12 PM
> >To: devel@edk2.groups.io
> >Subject: [edk2-devel] [Patch v3 0/3] [edk2-platform] Add modules to
> >BoardModulePkg.
> >
> >V3 change:
> >1. Fix file path typo.
> >
> >V2 change:
> >1. Add platform DSC file to enable build for this package.
> >2. Add BZ link for the related changes.
> >
> >V1 change:
> >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/CmosAccessLibInt
> er
> >nal.h
> > create mode 100644
> >Platform/Intel/BoardModulePkg/Library/PlatformCmosAccessLibNull/Platf
> or
> >mCmosAccessLibNull.c
> > create mode 100644
> >Platform/Intel/BoardModulePkg/Library/PlatformCmosAccessLibNull/Platf
> or
> >mCmosAccessLibNull.inf
> >
> >--
> >2.21.0.windows.1
> >
> >
> >


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

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



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

2019-05-28 Thread Liming Gao
Eric:
  1. Don't need to include version change message in the commit message. Change 
version is in cover letter only. 
  2. BoardModulePkg DEC/DSC still describe AdvancedFeaturePkg. Please fix them. 

  With those changes, Reviewed-by: Liming Gao 

Thanks
Liming
>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Dong, Eric
>Sent: Tuesday, May 28, 2019 4:12 PM
>To: devel@edk2.groups.io
>Subject: [edk2-devel] [Patch v3 0/3] [edk2-platform] Add modules to
>BoardModulePkg.
>
>V3 change:
>1. Fix file path typo.
>
>V2 change:
>1. Add platform DSC file to enable build for this package.
>2. Add BZ link for the related changes.
>
>V1 change:
>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 (#41568): https://edk2.groups.io/g/devel/message/41568
Mute This Topic: https://groups.io/mt/31819524/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin (from the MarvellEmbeddedProcessors edk2-open-platforms repo)

2019-05-28 Thread Liming Gao

TlsLib|CryptoPkg/Library/TlsLib/TlsLib.inf is required to be added into 
[LibraryClasses] of edk2-platforms\Silicon\Marvell\Armada7k8k\Armada7k8k.dsc.inc

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>rebe...@bluestop.org
>Sent: Wednesday, May 29, 2019 10:19 AM
>To: Marcin Wojtas 
>Cc: edk2-devel-groups-io ; Leif Lindholm
>; Ard Biesheuvel ;
>Kinney, Michael D 
>Subject: Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin
>(from the MarvellEmbeddedProcessors edk2-open-platforms repo)
>
>On 2019-05-28 03:47, Marcin Wojtas wrote:
>> Please use the Tianocore repo only. With the latest changes, there is
>> no point to use old MarvellEmbededProcessors branch, I do not maintain
>> it. I also plan to update MacchiatoBin wiki with the reference to the
>> mainline repositories.
>
>
>I can configure HTTP boot entries now if I build with
>-DNETWORK_HTTP_BOOT_ENABLE=TRUE -
>DNETWORK_ALLOW_HTTP_CONNECTIONS .
>
>However, I get an error if I try and enable HTTPS by building with
>-DNETWORK_TLS_ENABLE :
>
>
>build.py...
>/home/bcran/workspace/edk2-
>platforms/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc(...):
>error 4000: Instance of library class [TlsLib] is not found
>    in [/home/bcran/workspace/edk2/NetworkPkg/TlsDxe/TlsDxe.inf]
>[AARCH64]
>    consumed by module
>[/home/bcran/workspace/edk2/NetworkPkg/TlsDxe/TlsDxe.inf]
>
>
>--
>Rebecca Cran
>
>
>


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

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



Re: [edk2-devel] [PATCH] Marvell/Armada80x0McBin: Enable usb keyboard, nvme boot

2019-05-28 Thread Marcin Wojtas
Hi Jeremy,

śr., 29 maj 2019 o 01:43 Jeremy Linton  napisał(a):
>
> Add a USB keyboard flag, which is needed when a graphical console
> is enabled. Also add a nvme boot option for users that choose
> that instead of sata or mmc.
>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Jeremy Linton 
> ---
>  Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 3 +++
>  Silicon/Marvell/Armada7k8k/Armada7k8k.fdf | 2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
> b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> index 27e52f5af5..89d617fde4 100644
> --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
> @@ -90,6 +90,7 @@
>
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
>
> UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
>UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
> +  UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
>
>PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
>
> @@ -505,6 +506,7 @@
>MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
> +  MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
>
># SD/MMC
>MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
> @@ -516,6 +518,7 @@
>ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> +  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
>
># Console packages
>MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
> diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf 
> b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
> index 47e3bc4f82..f59cc1f263 100644
> --- a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
> +++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
> @@ -151,6 +151,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
>INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
>INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
>INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
> +  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
>
># SD/MMC
>INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
> @@ -162,6 +163,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
>INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
>INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
>INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
> +  INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
>
># Multiple Console IO support
>INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
> --

Reviewed-by: Marcin Wojtas 

Thanks!
Marcin

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

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



Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin (from the MarvellEmbeddedProcessors edk2-open-platforms repo)

2019-05-28 Thread rebecca
On 2019-05-28 03:47, Marcin Wojtas wrote:
> Please use the Tianocore repo only. With the latest changes, there is
> no point to use old MarvellEmbededProcessors branch, I do not maintain
> it. I also plan to update MacchiatoBin wiki with the reference to the
> mainline repositories.


I can configure HTTP boot entries now if I build with
-DNETWORK_HTTP_BOOT_ENABLE=TRUE -DNETWORK_ALLOW_HTTP_CONNECTIONS .

However, I get an error if I try and enable HTTPS by building with
-DNETWORK_TLS_ENABLE :


build.py...
/home/bcran/workspace/edk2-platforms/Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc(...):
error 4000: Instance of library class [TlsLib] is not found
    in [/home/bcran/workspace/edk2/NetworkPkg/TlsDxe/TlsDxe.inf]
[AARCH64]
    consumed by module
[/home/bcran/workspace/edk2/NetworkPkg/TlsDxe/TlsDxe.inf]


-- 
Rebecca Cran


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

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



[edk2-devel] [PATCH v2] BaseTools:Extend the binary cache to support library cache

2019-05-28 Thread Steven Shi
V2 change:
Simplify the library cache implementation and remove
CacheRestored flag based filter. Use the current
CanSkipbyHash() filter in AddDependency() instead.

V1 change:

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

Current binary cache doesn't support to save and restore
the library module. If a driver module cache miss happen,
all its dependency library modules need rebuild which
is very time-consuming. This patch is to entend the binary
cache to support library.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Christian Rodriguez 
Signed-off-by: Steven Shi 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index a5bef4f7c6..7b35f837f5 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3906,6 +3906,12 @@ class ModuleAutoGen(AutoGen):
 ModuleFile = path.join(self.OutputDir, self.Name + '.inf')
 if os.path.exists(ModuleFile):
 shutil.copy2(ModuleFile, FileDir)
+else:
+OutputDir = self.OutputDir.replace('\\', '/').strip('/')
+DebugDir = self.DebugDir.replace('\\', '/').strip('/')
+for Item in self.CodaTargetList:
+File = Item.Target.Path.replace('\\', 
'/').strip('/').replace(DebugDir, '').replace(OutputDir, '').strip('/')
+self.OutputFile.add(File)
 if not self.OutputFile:
 Ma = self.BuildDatabase[self.MetaFile, self.Arch, 
self.BuildTarget, self.ToolChain]
 self.OutputFile = Ma.Binaries
-- 
2.17.1.windows.2


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

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



Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin (from the MarvellEmbeddedProcessors edk2-open-platforms repo)

2019-05-28 Thread rebecca
On 2019-05-28 02:39, Leif Lindholm wrote:
>
> This was actually enabled in the upstream edk2-platforms repository as
> part of the "use fragment config files for network config" set:
> 205d5621a35eb6251481526039d24b17374efdf0
>
> Since the PCIe updates just went in, that should now be a valid
> replacement for the MarvellEmbededProcessors repo.
>
> And will let you include HTTP with -D NETWORK_HTTP_BOOT_ENABLE=TRUE.


Thanks. I've also just realized that the devel-OpenPlatformPkg branch
(and probably the others, like devel-MinnowBoardMax-UDK2017) in
edk2-platforms is no longer used. 

Should the Readme.md files be updated to suggest people use master
instead, or perhaps the branches deleted (or closed, if that's something
that can be done in git)? I vaguely remember a discussion here about
switching to using the master branch, but other people coming back to it
might need a bit of a reminder!


-- 
Rebecca Cran


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

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



Re: [edk2-devel] [PATCH 1/2] KabylakeSiliconPkg: Add FSP Dispatch switch.

2019-05-28 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Chiu, Chasel
Sent: Wednesday, May 22, 2019 1:35 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [edk2-devel] [PATCH 1/2] KabylakeSiliconPkg: Add FSP Dispatch switch.

From: "Chasel, Chiu" 

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

PcdFspModeSelection is used as switch for boot loader to consume FSP in API 
mode or Dispatch mode. For backward compatibility, if boot loader running in 
FSP API mode the KabylakeFspBinPkg will be used which does not have FSP 2.1 
changes. For FSP Dispatch mode AmberLakeFspBinPkg will be used with FSP 2.1 
support.
One INF was duplicate to include different DEC file in each build type.

Test: Booted Kabylake RVP3 to Windows successfully.

Cc: Nate DeSimone 
Cc: Michael Kubacki 
Signed-off-by: Chasel Chiu 
---
 
Silicon/Intel/KabylakeSiliconPkg/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFspAml.inf
 | 146 
++
 1 file changed, 146 insertions(+)

diff --git 
a/Silicon/Intel/KabylakeSiliconPkg/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFspAml.inf
 
b/Silicon/Intel/KabylakeSiliconPkg/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFspAml.inf
new file mode 100644
index 00..aebd3583bc
--- /dev/null
+++ b/Silicon/Intel/KabylakeSiliconPkg/Library/PeiSiliconPolicyInitLibFs
+++ p/PeiSiliconPolicyInitLibFspAml.inf
@@ -0,0 +1,146 @@
+### @file
+# Library functions for Fsp Policy Initialization Library.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved. # # 
+SPDX-License-Identifier: BSD-2-Clause-Patent # ##
+
+###
+#
+#
+# Defines Section - statements that will be processed to create a Makefile.
+#
+###
+#
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = PeiSiliconPolicyInitLibFspAml
+  FILE_GUID  = 930816C4-D182-4A23-BF21-9AED635AF06C
+  MODULE_TYPE= BASE
+  VERSION_STRING = 1.0
+  LIBRARY_CLASS  = SiliconPolicyInitLib
+
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+#  VALID_ARCHITECTURES   = IA32
+#
+
+###
+#
+#
+# Sources Section - list of files that are required for the build to succeed.
+#
+###
+#
+
+[Sources]
+  PeiFspPolicyInitLib.c
+  PeiFspSiPolicyInitLib.c
+  PeiFspPchPolicyInitLib.c
+  PeiFspCpuPolicyInitLib.c
+  PeiFspMePolicyInitLib.c
+  PeiFspSaPolicyInitLib.c
+  PeiFspMiscUpdInitLib.c
+
+  PeiPolicyInitPreMem.c
+  PeiPolicyInit.c
+  PeiPolicyInit.h
+
+###
+#
+#
+# Package Dependency Section - list of Package files that are required for
+#  this module.
+#
+###
+#
+
+[Packages]
+  MdePkg/MdePkg.dec
+  MdeModulePkg/MdeModulePkg.dec
+  IntelFsp2Pkg/IntelFsp2Pkg.dec
+  IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec
+  KabylakeSiliconPkg/SiPkg.dec
+  AmberLakeFspBinPkg/AmberLakeFspBinPkg.dec
+
+[LibraryClasses]
+  BaseMemoryLib
+  DebugLib
+  IoLib
+  PeiServicesLib
+  PcdLib
+  SmbusLib
+  MmPciLib
+  ConfigBlockLib
+  MemoryAllocationLib
+  DebugPrintErrorLevelLib
+  FspWrapperApiLib
+
+[Pcd]
+  gSiPkgTokenSpaceGuid.PcdTsegSize## CONSUMES
+  gSiPkgTokenSpaceGuid.PcdSmbusBaseAddress## CONSUMES
+  gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamBase  ## CONSUMES
+  gIntelFsp2PkgTokenSpaceGuid.PcdTemporaryRamSize  ## CONSUMES
+  gIntelFsp2PkgTokenSpaceGuid.PcdFspTemporaryRamSize   ## CONSUMES
+  gIntelFsp2PkgTokenSpaceGuid.PcdFspReservedBufferSize ## CONSUMES
+  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmUpdDataAddress ## CONSUMES
+  gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress## CONSUMES
+  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsUpdDataAddress ## CONSUMES
+  gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress## CONSUMES
+
+[Ppis]
+  gSiPolicyPpiGuid  ## CONSUMES
+  gSiPreMemPolicyPpiGuid## CONSUMES
+
+[Guids]
+  gTraceHubPreMemConfigGuid ## CONSUMES
+  gSmbusPreMemConfigGuid## CONSUMES
+  gDciPreMemConfigGuid  ## CONSUMES
+  gHpetPreMemConfigGuid ## CONSUMES
+  gHsioPciePreMemConfigGuid ## CONSUMES
+  gHsioSataPreMemConfigGuid ## CONSUMES
+  

Re: [edk2-devel] [PATCH 2/2] KabylakeOpenBoardPkg: Add FSP Dispatch switch.

2019-05-28 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Chiu, Chasel 
Sent: Wednesday, May 22, 2019 1:35 AM
To: devel@edk2.groups.io
Cc: Chiu, Chasel ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [PATCH 2/2] KabylakeOpenBoardPkg: Add FSP Dispatch switch.

From: "Chasel, Chiu" 

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

Basing on PcdFspModeSelection setting either KabylakeFspBinPkg or 
AmberLakeFspBinPkg will be used and temporary memory arrangement will be 
different as AmberLakeFspBinPkg will share the same stack with boot loader. 
Also enlarged FSP-T size to support future larger FSP binary.

Test: Booted Kabylake RVP3 to Windows successfully.

Cc: Nate DeSimone 
Cc: Michael Kubacki 
Signed-off-by: Chasel Chiu 
---
 Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf  |  8 

 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc| 33 
+
 Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkgPcd.dsc | 29 
+
 3 files changed, 62 insertions(+), 8 deletions(-)

diff --git 
a/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf 
b/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
index 3a28bd4109..6cb49c941c 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fdf
+++ b/Platform/Intel/KabylakeOpenBoardPkg/Include/Fdf/FlashMapInclude.fd
+++ f
@@ -1,7 +1,7 @@
 ## @file
 #  FDF file of Platform.
 #
-# Copyright (c) 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2019, Intel Corporation. All rights 
+reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent  #
@@ -41,6 +41,6 @@ SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspSSize  
  = 0x0006
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMOffset  = 
0x0060  # Flash addr (0xFFE0)
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspMSize= 
0x000BC000  #
 SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTOffset  = 
0x006BC000  # Flash addr (0xFFEBC000)
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize= 
0x4000  #
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryOffset = 
0x006C  # Flash addr (0xFFEC)
-SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemorySize   = 
0x0014  #
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvFspTSize= 
0x00014000  #
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemoryOffset = 
0x006D  # Flash addr (0xFFED)
+SET gMinPlatformPkgTokenSpaceGuid.PcdFlashFvPreMemorySize   = 
0x0013  #
diff --git a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc 
b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
index 7f19ad1eed..1dfe49a7ad 100644
--- a/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
+++ b/Platform/Intel/KabylakeOpenBoardPkg/KabylakeRvp3/OpenBoardPkg.dsc
@@ -15,7 +15,7 @@
   DEFINE  PLATFORM_PACKAGE= MinPlatformPkg
   DEFINE  PLATFORM_SI_PACKAGE = KabylakeSiliconPkg
   DEFINE  PLATFORM_SI_BIN_PACKAGE = KabylakeSiliconBinPkg
-  DEFINE  PLATFORM_FSP_BIN_PACKAGE= KabylakeFspBinPkg
+  DEFINE  PLATFORM_FSP_BIN_PACKAGE= AmberLakeFspBinPkg
   DEFINE  PLATFORM_BOARD_PACKAGE  = KabylakeOpenBoardPkg
   DEFINE  BOARD   = KabylakeRvp3
   DEFINE  PROJECT = 
$(PLATFORM_BOARD_PACKAGE)/$(BOARD)
@@ -24,6 +24,21 @@
   # Platform On/Off features are defined here
   #
   !include OpenBoardPkgConfig.dsc
+  !include OpenBoardPkgPcd.dsc
+
+[Defines]
+!if gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1
+  #
+  # For backward compatibility API mode will use KabylakeFspBinPkg.
+  # KabylakeFspBinPkg only supports API mode.
+  #
+  DEFINE  PLATFORM_FSP_BIN_PACKAGE= KabylakeFspBinPkg
+!else
+  #
+  # AmberLakeFspBinPkg supports both API and Dispatch modes
+  #
+  DEFINE  PLATFORM_FSP_BIN_PACKAGE= AmberLakeFspBinPkg
+!endif
 
 

 #
@@ -92,8 +107,20 @@
   
FspWrapperApiTestLib|IntelFsp2WrapperPkg/Library/PeiFspWrapperApiTestLib/PeiFspWrapperApiTestLib.inf
 
   
FspWrapperPlatformLib|$(PLATFORM_PACKAGE)/FspWrapper/Library/PeiFspWrapperPlatformLib/PeiFspWrapperPlatformLib.inf
-  
SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyInitLibFsp/PeiSiliconPolicyInitLibFsp.inf
+
+!if gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection == 1
+  #
+  # Below library are used by FSP API mode
+  #
   
SiliconPolicyUpdateLib|$(PLATFORM_BOARD_PACKAGE)/FspWrapper/Library/PeiSiliconPolicyUpdateLibFsp/PeiSiliconPolicyUpdateLibFsp.inf
+
+SiliconPolicyInitLib|$(PLATFORM_SI_PACKAGE)/Library/PeiSiliconPolicyIni
+tLibFsp/PeiSiliconPolicyInitLibFsp.inf
+!else
+  #
+  # Below library are used by FSP 

Re: [edk2-devel] [PATCH v2 00/10] Duplicate required CSM components for OVMF

2019-05-28 Thread Wu, Hao A
> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Laszlo Ersek
> Sent: Tuesday, May 28, 2019 7:48 PM
> To: devel@edk2.groups.io; Wu, Hao A
> Cc: David Woodhouse; Ni, Ray; Justen, Jordan L; Ard Biesheuvel
> Subject: Re: [edk2-devel] [PATCH v2 00/10] Duplicate required CSM
> components for OVMF
> 
> On 05/27/19 05:03, Wu, Hao A wrote:
> > '''
> > Please note that this series will be hold until the edk2-stable201905 is
> > created.
> > '''
> >
> > The series is also available at:
> > https://github.com/hwu25/edk2/tree/ovmf_csm_v2
> >
> > V2 changes:
> >
> > Discussion with David Woodhouse for him to take the reviewer role for the
> > duplicated CSM components under OvmfPkg:
> > https://edk2.groups.io/g/devel/topic/31682287#40996
> >
> > The (new) first patch will update the Maintainers.txt to reflect such
> > role.
> 
> As noted earlier, I plan to review this series once David is happy with
> it (in particular, with the first patch).

Sure. I will confirm with David.

Hello David,

Does the patch (1st one of the series), which adds you as the reviewer for
CSM components in OvmfPkg in file Maintainer.txt, seem good to you?

> 
> And, the following patch sets all depend on this one, directly or
> indirectly:
> 
> [edk2-devel] [PATCH v1 0/6] Ovmf: Drop IntelFramework[Module]Pkg
> dependency
> [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework
> modules
> [edk2-devel] [RFC][PATCH v1 0/3] Remove IntelFramework[Module]Pkg
> 
> Of those, I plan to review at least the OvmfPkg one, once the
> dependencies are all in place. Please ping me, should I forget.
> 
> (Yesterday I made an effort to set up the inter-BZ deps as well.)

Yes. I noticed that.
Thanks a lot for setting up the dependencies among those BZs.
I will ping you for the OVMF patches once their requirements are met.

Also, do you expect such BZ dependencies setup should be done by the
submitters (if they are aware of such dependencies) when they files a BZ
tracker?

Best Regards,
Hao Wu

> 
> Thanks,
> Laszlo
> 
> 


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

View/Reply Online (#41560): https://edk2.groups.io/g/devel/message/41560
Mute This Topic: https://groups.io/mt/31805475/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:Extend the binary cache to support library cache

2019-05-28 Thread Steven Shi
OK, will send the new version patch to simplify it.


Thanks

Steven Shi
Intel\SSG\FID\Firmware Infrastructure


> -Original Message-
> From: Rodriguez, Christian
> Sent: Tuesday, May 28, 2019 11:16 PM
> To: devel@edk2.groups.io; Shi, Steven 
> Cc: Gao, Liming ; Feng, Bob C ;
> Fan, ZhijuX 
> Subject: RE: [edk2-devel] [PATCH] BaseTools:Extend the binary cache to
> support library cache
> 
> Hi Steven,
> 
> After testing the bug reported, it seems that the dependency problem isn't
> the root cause. We don't need to change the way it skips having to rebuild
> libraries. The cache is missing the library build artifacts as you mentioned
> before and this is the root cause of the rebuild failure. This patch should 
> fix
> that, but you can simplify it by not adding a new tracking system and keeping
> the dependency reduction as before. That will save the performance because
> it doesn't have to do extra checking.
> 
> Please see attached patch for minimal change needed.
> 
> Thanks,
> Christian
> 
> >-Original Message-
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Steven Shi
> >Sent: Tuesday, May 28, 2019 1:52 AM
> >To: devel@edk2.groups.io
> >Cc: Gao, Liming ; Feng, Bob C
> >; Rodriguez, Christian
> >; Fan, ZhijuX 
> >Subject: [edk2-devel] [PATCH] BaseTools:Extend the binary cache to support
> >library cache
> >
> >https://bugzilla.tianocore.org/show_bug.cgi?id=1797
> >
> >Current binary cache doesn't support to save and restore
> >the library module. If a driver module cache miss happen,
> >all its dependency library modules need rebuild which
> >is very time-consuming. This patch is to entend the binary
> >cache to support library.
> >
> >Cc: Liming Gao 
> >Cc: Bob Feng 
> >Cc: Christian Rodriguez 
> >Signed-off-by: Steven Shi 
> >---
> > BaseTools/Source/Python/AutoGen/AutoGen.py | 17 ++---
> > BaseTools/Source/Python/build/build.py |  3 ++-
> > 2 files changed, 16 insertions(+), 4 deletions(-)
> >
> >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
> >b/BaseTools/Source/Python/AutoGen/AutoGen.py
> >index a5bef4f7c6..aeb63f52c5 100644
> >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
> >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
> >@@ -2578,7 +2578,7 @@ class ModuleAutoGen(AutoGen):
> > self.AutoGenDepSet = set()
> > self.ReferenceModules = []
> > self.ConstPcd  = {}
> >-
> >+self.CacheRestored = False
> >
> > def __repr__(self):
> > return "%s [%s]" % (self.MetaFile, self.Arch)
> >@@ -3906,6 +3906,12 @@ class ModuleAutoGen(AutoGen):
> > ModuleFile = path.join(self.OutputDir, self.Name + '.inf')
> > if os.path.exists(ModuleFile):
> > shutil.copy2(ModuleFile, FileDir)
> >+else:
> >+OutputDir = self.OutputDir.replace('\\', '/').strip('/')
> >+DebugDir = self.DebugDir.replace('\\', '/').strip('/')
> >+for Item in self.CodaTargetList:
> >+File = Item.Target.Path.replace('\\', 
> >'/').strip('/').replace(DebugDir,
> >'').replace(OutputDir, '').strip('/')
> >+self.OutputFile.add(File)
> > if not self.OutputFile:
> > Ma = self.BuildDatabase[self.MetaFile, self.Arch, 
> > self.BuildTarget,
> >self.ToolChain]
> > self.OutputFile = Ma.Binaries
> >@@ -3949,6 +3955,7 @@ class ModuleAutoGen(AutoGen):
> > destination_dir = 
> > os.path.dirname(destination_file)
> > CreateDirectory(destination_dir)
> > shutil.copy2(File, destination_dir)
> >+self.CacheRestored = True
> > if self.Name == "PcdPeim" or self.Name == "PcdDxe":
> > CreatePcdDatabaseCode(self, TemplateString(),
> >TemplateString())
> > return True
> >@@ -3987,7 +3994,9 @@ class ModuleAutoGen(AutoGen):
> > self.GenFfsList = GenFfsList
> > if not self.IsLibrary and CreateLibraryMakeFile:
> > for LibraryAutoGen in self.LibraryAutoGenList:
> >-LibraryAutoGen.CreateMakeFile()
> >+# Only create makefile for libraries which have not been 
> >restored
> >+if not LibraryAutoGen.CacheRestored:
> >+LibraryAutoGen.CreateMakeFile()
> >
> > if self.CanSkip():
> > return
> >@@ -4030,7 +4039,9 @@ class ModuleAutoGen(AutoGen):
> >
> > if not self.IsLibrary and CreateLibraryCodeFile:
> > for LibraryAutoGen in self.LibraryAutoGenList:
> >-LibraryAutoGen.CreateCodeFile()
> >+# Only create autogen code for libraries which have not been
> >restored
> >+if not LibraryAutoGen.CacheRestored:
> >+LibraryAutoGen.CreateCodeFile()
> >
> > if self.CanSkip():
> > return
> >diff --git 

Re: [edk2-devel] [PATCH] BaseTools:Fix the library dependency missing in Binary Cache

2019-05-28 Thread Steven Shi
OK, will solve this issue through the fix patch of BZ 1797.


Thanks

Steven Shi
Intel\SSG\FID\Firmware Infrastructure


> -Original Message-
> From: Rodriguez, Christian
> Sent: Tuesday, May 28, 2019 11:06 PM
> To: devel@edk2.groups.io; Shi, Steven 
> Cc: Gao, Liming ; Feng, Bob C 
> Subject: RE: [edk2-devel] [PATCH] BaseTools:Fix the library dependency
> missing in Binary Cache
> 
> Hi Steven,
> 
> The problem isn't that the library dependency is missing. We are missing
> library artifacts and therefore cannot build the library. This can be fixed 
> with
> a snippet of your next patch that adds the libraries artifacts, but without 
> the
> extra tracking information.
> 
> Thanks,
> Christian
> 
> >-Original Message-
> >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> >Steven Shi
> >Sent: Tuesday, May 28, 2019 1:14 AM
> >To: devel@edk2.groups.io
> >Cc: Gao, Liming ; Feng, Bob C
> >; Rodriguez, Christian
> >
> >Subject: [edk2-devel] [PATCH] BaseTools:Fix the library dependency missing
> >in Binary Cache
> >
> >BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1788
> >
> >The library dependency of a module is wrongly filtered out by binary cache
> >implementation which cause all dependent libraries will not been built prior
> to
> >the module in the build scheduler and the module build fails if cache miss
> >happen.
> >
> >Cc: Liming Gao 
> >Cc: Bob Feng 
> >Cc: Christian Rodriguez 
> >Signed-off-by: Steven Shi 
> >---
> > BaseTools/Source/Python/build/build.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> >diff --git a/BaseTools/Source/Python/build/build.py
> >b/BaseTools/Source/Python/build/build.py
> >index 80ceb98310..673a9379ba 100644
> >--- a/BaseTools/Source/Python/build/build.py
> >+++ b/BaseTools/Source/Python/build/build.py
> >@@ -593,7 +593,7 @@ class BuildTask:
> > #
> > def AddDependency(self, Dependency):
> > for Dep in Dependency:
> >-if not Dep.BuildObject.IsBinaryModule and not
> >Dep.BuildObject.CanSkipbyHash():
> >+if not Dep.BuildObject.IsBinaryModule:
> > self.DependencyList.append(BuildTask.New(Dep))# 
> > BuildTask list
> >
> > ## The thread wrapper of LaunchCommand function
> >--
> >2.17.1.windows.2
> >
> >
> >


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

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



[edk2-devel] [Patch 3/3] [edk2-platforms] Platform/Intel/DebugFeaturePkg/AcpiDebug: Change AcpiDebug module location.

2019-05-28 Thread Dong, Eric
Move AcpiDebug module from AdvancedFeaturePkg to DebugFeaturePkg.

Signed-off-by: Eric Dong 
Cc: Liming Gao 
---
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dec |  6 --
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |  3 ---
 .../AcpiDebug/AcpiDebug.asl   |  0
 .../AcpiDebug/AcpiDebug.c |  0
 .../AcpiDebug/AcpiDebugDxe.inf|  8 
 .../AcpiDebug/AcpiDebugSmm.inf|  8 
 .../AcpiDebug/Readme.txt  |  0
 .../Intel/DebugFeaturePkg/DebugFeaturePkg.dec | 15 +--
 .../Intel/DebugFeaturePkg/DebugFeaturePkg.dsc | 12 
 9 files changed, 33 insertions(+), 19 deletions(-)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebug.asl (100%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebug.c (100%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebugDxe.inf (79%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebugSmm.inf (80%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/Readme.txt (100%)

diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec 
b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
index b18f81ba39..44e5de64db 100644
--- a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
+++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dec
@@ -140,17 +140,11 @@ gAdvancedFeaturePkgTokenSpaceGuid =  {0xa8514688, 
0x6693, 0x4ab5, {0xaa,
 
 [PcdsFixedAtBuild]
   gAdvancedFeaturePkgTokenSpaceGuid.PcdMaxSOLChannels|0x3|UINT8|0x4009
-  ## This PCD specifies AcpiDebug feature is enable/disable.
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdAcpiDebugEnable|FALSE|BOOLEAN|0x0012
-  ## This PCD specifies AcpiDebug buffer size.
-  
gAdvancedFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize|0x1|UINT32|0x0013
 
 [PcdsDynamic, PcdsDynamicEx]
   
gAdvancedFeaturePkgTokenSpaceGuid.PcdIpmiIoBaseAddress|0xCA2|UINT16|0x9022
   gAdvancedFeaturePkgTokenSpaceGuid.PcdFRB2EnabledFlag|TRUE|BOOLEAN|0x1030
   gAdvancedFeaturePkgTokenSpaceGuid.PcdFRBTimeoutValue|360|UINT16|0x1040
-  ## This PCD specifies AcpiDebug buffer address
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress|0|UINT32|0x0014
 
 [PcdsFeatureFlag]
   gAdvancedFeaturePkgTokenSpaceGuid.PcdNetworkEnable  
|FALSE|BOOLEAN|0xF0A1
diff --git a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc 
b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
index 909e566445..ea1a00725d 100644
--- a/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
+++ b/Platform/Intel/AdvancedFeaturePkg/AdvancedFeaturePkg.dsc
@@ -148,6 +148,3 @@
   AdvancedFeaturePkg/Ipmi/IpmiFru/IpmiFru.inf
   AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.inf
   AdvancedFeaturePkg/Ipmi/BmcAcpi/BmcAcpi.inf
-
-  AdvancedFeaturePkg/AcpiDebug/AcpiDebugDxe.inf
-  AdvancedFeaturePkg/AcpiDebug/AcpiDebugSmm.inf
\ No newline at end of file
diff --git a/Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebug.asl 
b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.asl
similarity index 100%
rename from Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebug.asl
rename to Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.asl
diff --git a/Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebug.c 
b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
similarity index 100%
rename from Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebug.c
rename to Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebug.c
diff --git a/Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebugDxe.inf 
b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebugDxe.inf
similarity index 79%
rename from Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebugDxe.inf
rename to Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebugDxe.inf
index fd701df3af..7473126b11 100644
--- a/Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebugDxe.inf
+++ b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebugDxe.inf
@@ -32,12 +32,12 @@
 [Packages]
   MdePkg/MdePkg.dec
   MdeModulePkg/MdeModulePkg.dec
-  AdvancedFeaturePkg/AdvancedFeaturePkg.dec
+  DebugFeaturePkg/DebugFeaturePkg.dec
 
 [Pcd]
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdAcpiDebugEnable  ## CONSUMES
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize  ## CONSUMES
-  gAdvancedFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress ## PRODUCES
+  gDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugEnable  ## CONSUMES
+  gDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugBufferSize  ## CONSUMES
+  gDebugFeaturePkgTokenSpaceGuid.PcdAcpiDebugAddress ## PRODUCES
 
 [Sources]
   AcpiDebug.c
diff --git a/Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebugSmm.inf 
b/Platform/Intel/DebugFeaturePkg/AcpiDebug/AcpiDebugSmm.inf
similarity index 80%
rename from Platform/Intel/AdvancedFeaturePkg/AcpiDebug/AcpiDebugSmm.inf
rename to 

[edk2-devel] [Patch 1/3] [edk2-platforms] Platform/Intel/DebugFeaturePkg: Add DebugFeaturePkg

2019-05-28 Thread Dong, Eric
Add new package DebugFeaturePkg in Platform/Intel/ folder.
It will keep debug related features in this package.

Signed-off-by: Eric Dong 
---
 Maintainers.txt   |  4 
 .../Intel/DebugFeaturePkg/DebugFeaturePkg.dec | 19 +++
 .../Intel/DebugFeaturePkg/DebugFeaturePkg.dsc | 24 +++
 3 files changed, 47 insertions(+)
 create mode 100644 Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
 create mode 100644 Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc

diff --git a/Maintainers.txt b/Maintainers.txt
index 76feecceb7..66782b4b92 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -60,6 +60,10 @@ M: Michael Kubacki 
 M: Sai Chaganty 
 R: Liming Gao 
 
+Platform/Intel/DebugFeaturePkg
+M: Eric Dong 
+R: Liming Gao 
+
 Platform/Intel/ClevoOpenBoardPkg
 M: Michael Kubacki 
 M: Ankit Sinha 
diff --git a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec 
b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
new file mode 100644
index 00..839684183a
--- /dev/null
+++ b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
@@ -0,0 +1,19 @@
+## @file
+# This package provides the modules that build for debug feature.
+# This DebugAdvancedFeaturePkg should only depend on EDKII Core packages and 
MinPlatformPkg.
+#
+# The DEC files are used by the utilities that parse DSC and
+# INF files to generate AutoGen.c and AutoGen.h files
+# for the build infrastructure.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  DEC_SPECIFICATION  = 0x00010005
+  PACKAGE_NAME   = DebugFeaturePkg
+  PACKAGE_GUID   = 58B6F2BB-A94F-4EB9-89DA-2F06ED59CE39
+  PACKAGE_VERSION= 0.1
\ No newline at end of file
diff --git a/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc 
b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
new file mode 100644
index 00..351d6583d5
--- /dev/null
+++ b/Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
@@ -0,0 +1,24 @@
+## @file
+# This package provides the modules that build for debug feature.
+# This DebugFeaturePkg should only depend on EDKII Core packages and 
MinPlatformPkg.
+#
+# The DEC files are used by the utilities that parse DSC and
+# INF files to generate AutoGen.c and AutoGen.h files
+# for the build infrastructure.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+##
+
+[Defines]
+  PLATFORM_NAME  = DebugFeaturePkg
+  PLATFORM_GUID  = 3A0DBEF4-3C16-4F6B-8B55-BABB260D30B9
+  PLATFORM_VERSION   = 0.1
+  DSC_SPECIFICATION  = 0x00010005
+  OUTPUT_DIRECTORY   = Build/DebugFeaturePkg
+  SUPPORTED_ARCHITECTURES= IA32|X64
+  BUILD_TARGETS  = DEBUG|RELEASE|NOOPT
+  SKUID_IDENTIFIER   = DEFAULT
+
-- 
2.21.0.windows.1


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

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



[edk2-devel] [Patch 0/3] [edk2-platforms] Add DebugFeaturePkg to keep debug related modules.

2019-05-28 Thread Dong, Eric
Add new package in Platform/Intel/ folder to keep debug related
modules.

Eric Dong (3):
  Platform/Intel/DebugFeaturePkg: Add DebugFeaturePkg
  Platform/Intel/DebugFeaturePkg: Add USB3DebugPort related modules.
  Platform/Intel/DebugFeaturePkg/AcpiDebug: Change AcpiDebug module
location.

 Maintainers.txt   |   4 +
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dec |   6 -
 .../AdvancedFeaturePkg/AdvancedFeaturePkg.dsc |   3 -
 .../AcpiDebug/AcpiDebug.asl   |   0
 .../AcpiDebug/AcpiDebug.c |   0
 .../AcpiDebug/AcpiDebugDxe.inf|   8 +-
 .../AcpiDebug/AcpiDebugSmm.inf|   8 +-
 .../AcpiDebug/Readme.txt  |   0
 .../Intel/DebugFeaturePkg/DebugFeaturePkg.dec |  64 ++
 .../Intel/DebugFeaturePkg/DebugFeaturePkg.dsc |  98 ++
 .../Include/Library/Usb3DebugPortLib.h|  76 ++
 .../Library/Usb3DebugPortParameterLib.h   |  56 ++
 .../Library/Usb3DebugPortLib/MiscServices.c   | 385 
 .../Usb3DebugPortDataTransfer.c   | 892 ++
 .../Usb3DebugPortInitialize.c | 726 ++
 .../Usb3DebugPortLib/Usb3DebugPortLibDxe.c| 454 +
 .../Usb3DebugPortLib/Usb3DebugPortLibDxe.inf  |  55 ++
 .../Usb3DebugPortLibDxeIoMmu.c| 828 
 .../Usb3DebugPortLibDxeIoMmu.inf  |  63 ++
 .../Usb3DebugPortLibInternal.h| 887 +
 .../Usb3DebugPortLib/Usb3DebugPortLibNull.c   | 103 ++
 .../Usb3DebugPortLib/Usb3DebugPortLibNull.inf |  28 +
 .../Usb3DebugPortLib/Usb3DebugPortLibPei.c| 236 +
 .../Usb3DebugPortLib/Usb3DebugPortLibPei.inf  |  48 +
 .../Usb3DebugPortLibPeiIoMmu.c| 440 +
 .../Usb3DebugPortLibPeiIoMmu.inf  |  51 +
 .../Usb3DebugPortParameterLibPcd.c|  58 ++
 .../Usb3DebugPortParameterLibPcd.inf  |  31 +
 28 files changed, 5591 insertions(+), 17 deletions(-)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebug.asl (100%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebug.c (100%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebugDxe.inf (79%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/AcpiDebugSmm.inf (80%)
 rename Platform/Intel/{AdvancedFeaturePkg => 
DebugFeaturePkg}/AcpiDebug/Readme.txt (100%)
 create mode 100644 Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dec
 create mode 100644 Platform/Intel/DebugFeaturePkg/DebugFeaturePkg.dsc
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Include/Library/Usb3DebugPortLib.h
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Include/Library/Usb3DebugPortParameterLib.h
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/MiscServices.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortDataTransfer.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortInitialize.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibDxe.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibDxe.inf
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibDxeIoMmu.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibDxeIoMmu.inf
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibInternal.h
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibNull.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibNull.inf
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibPei.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibPei.inf
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibPeiIoMmu.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortLib/Usb3DebugPortLibPeiIoMmu.inf
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortParameterLibPcd/Usb3DebugPortParameterLibPcd.c
 create mode 100644 
Platform/Intel/DebugFeaturePkg/Library/Usb3DebugPortParameterLibPcd/Usb3DebugPortParameterLibPcd.inf

-- 
2.21.0.windows.1


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

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



[edk2-devel] [PATCH] MdeModulePkg/CapsulePei: Optimize the CapsulePei

2019-05-28 Thread Gao, Zhichao
From: Bret Barkelew 

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

Sperate the capsule check function from GetCapsuleDescriptors
and name it to AreCapsulesStaged.
Rename GetCapsuleDescriptors to GetScatterGatherHeadEntries.
And optimize its to remove the duplicated code.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Ray Ni 
Cc: Star Zeng 
Cc: Liming Gao 
Cc: Sean Brogan 
Cc: Michael Turner 
Cc: Bret Barkelew 
Signed-off-by: Zhichao gao 
---
 MdeModulePkg/Universal/CapsulePei/Capsule.h   |   3 +-
 .../Universal/CapsulePei/CapsulePei.inf   |   3 +-
 .../Universal/CapsulePei/UefiCapsule.c| 357 ++
 3 files changed, 194 insertions(+), 169 deletions(-)

diff --git a/MdeModulePkg/Universal/CapsulePei/Capsule.h 
b/MdeModulePkg/Universal/CapsulePei/Capsule.h
index baf40423af..fc20dd8b92 100644
--- a/MdeModulePkg/Universal/CapsulePei/Capsule.h
+++ b/MdeModulePkg/Universal/CapsulePei/Capsule.h
@@ -1,6 +1,6 @@
 /** @file
 
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
@@ -30,6 +30,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "Common/CommonHeader.h"
 
diff --git a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf 
b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf
index 5d43df3075..9c88b3986f 100644
--- a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf
+++ b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf
@@ -6,7 +6,7 @@
 #  This external input must be validated carefully to avoid security issue like
 #  buffer overflow, integer overflow.
 #
-# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 # Copyright (c) 2017, AMD Incorporated. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -43,6 +43,7 @@
   BaseLib
   HobLib
   BaseMemoryLib
+  MemoryAllocationLib
   PeiServicesLib
   PeimEntryPoint
   DebugLib
diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c 
b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
index e967599e96..2d003369ca 100644
--- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
+++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c
@@ -1,7 +1,7 @@
 /** @file
   Capsule update PEIM for UEFI2.0
 
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 Copyright (c) 2017, AMD Incorporated. All rights reserved.
 
 SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -10,6 +10,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 
 #include "Capsule.h"
 
+#define DEFAULT_SG_LIST_HEADS   (20)
+
 #ifdef MDE_CPU_IA32
 //
 // Global Descriptor Table (GDT)
@@ -791,30 +793,89 @@ BuildMemoryResourceDescriptor (
 }
 
 /**
-  Checks for the presence of capsule descriptors.
-  Get capsule descriptors from variable CapsuleUpdateData, CapsuleUpdateData1, 
CapsuleUpdateData2...
-  and save to DescriptorBuffer.
+  Check if the capsules are staged.
 
-  @param DescriptorBufferPointer to the capsule descriptors
+  @retval TRUE  The capsules are staged.
+  @retval FALSE The capsules are not staged.
+
+**/
+BOOLEAN
+EFIAPI
+AreCapsulesStaged (
+  VOID
+  )
+{
+  EFI_STATUSStatus;
+  UINTN Size;
+  EFI_PEI_READ_ONLY_VARIABLE2_PPI   *PPIVariableServices;
+  EFI_PHYSICAL_ADDRESS  CapsuleDataPtr64;
+
+  CapsuleDataPtr64 = 0;
+
+  Status = PeiServicesLocatePpi (
+,
+0,
+NULL,
+(VOID **)
+);
+
+  if (EFI_ERROR (Status)) {
+DEBUG ((DEBUG_ERROR, "Failed to find ReadOnlyVariable2PPI\n"));
+return FALSE;
+  }
+
+  //
+  // Check for Update capsule
+  //
+  Size = sizeof (CapsuleDataPtr64);
+  Status = PPIVariableServices->GetVariable(
+  PPIVariableServices,
+  EFI_CAPSULE_VARIABLE_NAME,
+  ,
+  NULL,
+  ,
+  (VOID *)
+  );
+
+  if (!EFI_ERROR (Status)) {
+return TRUE;
+  }
+
+  return FALSE;
+}
+
+/**
+  Check all the variables for SG list heads and get the count and addresses.
+
+  @param ListLength   A pointer would return the SG list length.
+  @param HeadList A ponter to the capsule SG list.
+
+  @retval EFI_SUCCESS a valid capsule is present
+  @retval EFI_NOT_FOUND   if a valid capsule is not present
+  @retval EFI_INVALID_PARAMETER   the input parameter is invalid
+  @retval EFI_OUT_OF_RESOURCE fail to allocate memory
 
-  @retval EFI_SUCCESS a valid capsule is present
-  @retval EFI_NOT_FOUND   if a valid capsule is not present
 **/
 EFI_STATUS

Re: [edk2-devel] [PATCH] Platform/Intel: Add fspapi build parameter

2019-05-28 Thread Nate DeSimone
Reviewed-by: Nate DeSimone 

-Original Message-
From: Chiu, Chasel 
Sent: Tuesday, May 28, 2019 12:52 AM
To: devel@edk2.groups.io
Cc: Agyeman, Prince ; Desimone, Nathaniel L 
; Kubacki, Michael A 

Subject: [PATCH] Platform/Intel: Add fspapi build parameter

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

Going forward FSP Dispatch mode will be default in KabylakeOpenBoardPkg and 
requires fspapi build parameter to switch back to FSP API mode.
When --fspapi given to build python script it will set 
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection to 1, otherwise the PCD 
will be the default value defined by each *BoardPkg.

Test: verified the PCD PcdFspModeSelection can be
  overridden by new build parameter.

Cc: Agyeman Prince 
Cc: Nate DeSimone 
Cc: Michael Kubacki 
Signed-off-by: Chasel Chiu 
---
 Platform/Intel/build_bios.py | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/build_bios.py b/Platform/Intel/build_bios.py index 
9effefc0c7..9f8d78f6e8 100644
--- a/Platform/Intel/build_bios.py
+++ b/Platform/Intel/build_bios.py
@@ -359,6 +359,11 @@ def build(config):
 command.append("-D")
 command.append("MAX_SOCKET=" + config["MAX_SOCKET"])
 
+if config.get("API_MODE_FSP_WRAPPER_BUILD", "FALSE") == "TRUE":
+#Override PCD to enable API mode FSP wrapper.
+command.append("--pcd")
+
+ command.append("gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection=1"
+ )
+
 shell = True
 if os.name == "posix":
 shell = False
@@ -840,6 +845,9 @@ def get_cmd_config_arguments(arguments):
 if arguments.fsp is True:
 result["FSP_WRAPPER_BUILD"] = "TRUE"
 
+if arguments.fspapi is True:
+result["API_MODE_FSP_WRAPPER_BUILD"] = "TRUE"
+
 return result
 
 
@@ -910,9 +918,12 @@ def get_cmd_arguments(build_config):
 parser.add_argument("--performance", help="performance build enabled",
 action='store_true', dest="performance")
 
-parser.add_argument("--fsp", help="fsp build enabled",
+parser.add_argument("--fsp", help="fsp wrapper build enabled",
 action='store_true', dest="fsp")
 
+parser.add_argument("--fspapi", help="API mode fsp wrapper build enabled",
+action='store_true', dest="fspapi")
+
 return parser.parse_args()
 
 
--
2.13.3.windows.1


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

View/Reply Online (#41552): https://edk2.groups.io/g/devel/message/41552
Mute This Topic: https://groups.io/mt/31819454/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/7] Implement Capsule On Disk.

2019-05-28 Thread Zhang, Chao B
Yes, will check in after Q2 tag

From: Gao, Liming
Sent: Wednesday, May 29, 2019 8:34 AM
To: Xu, Wei6 ; devel@edk2.groups.io
Cc: Wang, Jian J ; Wu, Hao A ; 
Kinney, Michael D ; Zhang, Chao B 

Subject: RE: [edk2-devel][Patch 0/7] Implement Capsule On Disk.

So, this feature is for next Q3 stable tag. Right?

> -Original Message-
> From: Xu, Wei6
> Sent: Wednesday, May 29, 2019 1:06 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J mailto:jian.j.w...@intel.com>>; Wu, 
> Hao A mailto:hao.a...@intel.com>>; Kinney, Michael D 
> mailto:michael.d.kin...@intel.com>>; Gao,
> Liming mailto:liming@intel.com>>; Zhang, Chao B 
> mailto:chao.b.zh...@intel.com>>
> Subject: [edk2-devel][Patch 0/7] Implement Capsule On Disk.
>
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852
>
> This patch set implements Capsule On Disk.
> Depends on whether platform supports Capsule-In-Ram, Capsule On Disk feature 
> is composed of 2 solutions:
> Solution A): Load capsules out of TCB, rely on UpdateCapsule() runtime 
> service to deliver Capsule-On-Disk.
> Solution B): Relocate capsules into a temp file which will be stored in root 
> directory on a platform specific storage device.
> Leverage existing storage stack in PEI to load all capsule on disk images and 
> create capsule hobs for the capsules.
> This solution has bigger TCB, but can work without Capsule-In-RAM support.
>
>
> Cc: Jian J Wang mailto:jian.j.w...@intel.com>>
> Cc: Hao A Wu mailto:hao.a...@intel.com>>
> Cc: Michael D Kinney 
> mailto:michael.d.kin...@intel.com>>
> Cc: Liming Gao mailto:liming@intel.com>>
> Cc: Chao B Zhang mailto:chao.b.zh...@intel.com>>
>
> xuwei6 (7):
>   MdePkg: Add Pei Boot In CapsuleOnDisk Mode Ppi definition.
>   MdeModulePkg: Add Capsule On Disk related definition.
>   MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.
>   MdeModulePkg/BdsDxe: Support Capsule On Disk.
>   MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature.
>   MdeModulePkg/DxeIpl: Support Capsule On Disk.
>   MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
>
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.h  |3 +-
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf|   20 +-
>  MdeModulePkg/Core/DxeIplPeim/DxeLoad.c |   37 +-
>  MdeModulePkg/Include/Library/CapsuleLib.h  |   94 +-
>  MdeModulePkg/Include/Ppi/CapsuleOnDisk.h   |   48 +
>  .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.c   | 1984 
> 
>  .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.h   |   63 +
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c   |   51 +-
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf |   20 +-
>  .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c|  121 +-
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c |   66 +-
>  .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf  |3 +-
>  .../Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c  |   85 +-
>  MdeModulePkg/MdeModulePkg.dec  |   43 +
>  MdeModulePkg/MdeModulePkg.dsc  |4 +
>  MdeModulePkg/MdeModulePkg.uni  |   32 +
>  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf   |3 +-
>  MdeModulePkg/Universal/BdsDxe/BdsEntry.c   |6 +-
>  .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c|  442 +
>  .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf  |   64 +
>  .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni  |   15 +
>  .../CapsuleOnDiskLoadPeiExtra.uni  |   14 +
>  .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf|1 +
>  .../Universal/CapsuleRuntimeDxe/CapsuleService.c   |   10 +-
>  MdePkg/Include/Ppi/BootInRecoveryMode.h|9 +-
>  MdePkg/MdePkg.dec  |3 +
>  26 files changed, 3200 insertions(+), 41 deletions(-)
>  create mode 100644 MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
>  create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
>  create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.h
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPeiExtra.uni
>
> --
> 2.16.2.windows.1

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

View/Reply Online (#41551): https://edk2.groups.io/g/devel/message/41551
Mute This Topic: https://groups.io/mt/31824148/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/7] Implement Capsule On Disk.

2019-05-28 Thread Liming Gao
So, this feature is for next Q3 stable tag. Right?

> -Original Message-
> From: Xu, Wei6
> Sent: Wednesday, May 29, 2019 1:06 AM
> To: devel@edk2.groups.io
> Cc: Wang, Jian J ; Wu, Hao A ; 
> Kinney, Michael D ; Gao,
> Liming ; Zhang, Chao B 
> Subject: [edk2-devel][Patch 0/7] Implement Capsule On Disk.
> 
> BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852
> 
> This patch set implements Capsule On Disk.
> Depends on whether platform supports Capsule-In-Ram, Capsule On Disk feature 
> is composed of 2 solutions:
> Solution A): Load capsules out of TCB, rely on UpdateCapsule() runtime 
> service to deliver Capsule-On-Disk.
> Solution B): Relocate capsules into a temp file which will be stored in root 
> directory on a platform specific storage device.
> Leverage existing storage stack in PEI to load all capsule on disk images and 
> create capsule hobs for the capsules.
> This solution has bigger TCB, but can work without Capsule-In-RAM support.
> 
> 
> Cc: Jian J Wang 
> Cc: Hao A Wu 
> Cc: Michael D Kinney 
> Cc: Liming Gao 
> Cc: Chao B Zhang 
> 
> xuwei6 (7):
>   MdePkg: Add Pei Boot In CapsuleOnDisk Mode Ppi definition.
>   MdeModulePkg: Add Capsule On Disk related definition.
>   MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.
>   MdeModulePkg/BdsDxe: Support Capsule On Disk.
>   MdeModulePkg/CapsuleRuntimeDxe: Introduce PCD to control this feature.
>   MdeModulePkg/DxeIpl: Support Capsule On Disk.
>   MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.
> 
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.h  |3 +-
>  MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf|   20 +-
>  MdeModulePkg/Core/DxeIplPeim/DxeLoad.c |   37 +-
>  MdeModulePkg/Include/Library/CapsuleLib.h  |   94 +-
>  MdeModulePkg/Include/Ppi/CapsuleOnDisk.h   |   48 +
>  .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.c   | 1984 
> 
>  .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.h   |   63 +
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c   |   51 +-
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf |   20 +-
>  .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c|  121 +-
>  .../Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c |   66 +-
>  .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf  |3 +-
>  .../Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c  |   85 +-
>  MdeModulePkg/MdeModulePkg.dec  |   43 +
>  MdeModulePkg/MdeModulePkg.dsc  |4 +
>  MdeModulePkg/MdeModulePkg.uni  |   32 +
>  MdeModulePkg/Universal/BdsDxe/BdsDxe.inf   |3 +-
>  MdeModulePkg/Universal/BdsDxe/BdsEntry.c   |6 +-
>  .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c|  442 +
>  .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf  |   64 +
>  .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni  |   15 +
>  .../CapsuleOnDiskLoadPeiExtra.uni  |   14 +
>  .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf|1 +
>  .../Universal/CapsuleRuntimeDxe/CapsuleService.c   |   10 +-
>  MdePkg/Include/Ppi/BootInRecoveryMode.h|9 +-
>  MdePkg/MdePkg.dec  |3 +
>  26 files changed, 3200 insertions(+), 41 deletions(-)
>  create mode 100644 MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
>  create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
>  create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.h
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni
>  create mode 100644 
> MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPeiExtra.uni
> 
> --
> 2.16.2.windows.1


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

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



Re: [edk2-devel] [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func DisplaySysEventLogData

2019-05-28 Thread Gao, Zhichao
Reviewed-by: Zhichao Gao 

> -Original Message-
> From: Bi, Dandan
> Sent: Tuesday, May 28, 2019 10:25 AM
> To: devel@edk2.groups.io; oleks...@ami.com
> Cc: Carsey, Jaben ; Ni, Ray ;
> Gao, Zhichao 
> Subject: [patch] ShellPkg/Debug1CommandsLib: Fix bugs in func
> DisplaySysEventLogData
> 
> REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1498
> 
> This patch fix following bugs in func DisplaySysEventLogData:
> 1. Log increment (Log = (LOG_RECORD_FORMAT *) (LogData + Offset);)
> should happened in the end of while loop, not in the very beginning.
> 2. DisplaySELTypes function should be used in while loop instead of
> DisplaySELVarDataFormatType.
> 
> Cc: Jaben Carsey 
> Cc: Ray Ni 
> Cc: Zhichao Gao 
> Signed-off-by: Dandan Bi 
> ---
>  .../SmbiosView/EventLogInfo.c | 20 +--
>  1 file changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf
> o.c
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf
> o.c
> index b8adf438d3..984c178890 100644
> ---
> a/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf
> o.c
> +++
> b/ShellPkg/Library/UefiShellDebug1CommandsLib/SmbiosView/EventLogInf
> +++ o.c
> @@ -1,9 +1,9 @@
>  /** @file
>Module for clarifying the content of the smbios structure element info.
> 
> -  Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. 
> +  Copyright (c) 2005 - 2019, Intel Corporation. All rights reserved.
> + 
>SPDX-License-Identifier: BSD-2-Clause-Patent
> 
>  **/
> 
>  #include "UefiShellDebug1CommandsLib.h"
> @@ -345,20 +345,16 @@ DisplaySysEventLogData (
>// Print Log info
>//
>Offset  = 0;
>Log = (LOG_RECORD_FORMAT *) LogData;
>while (Log != NULL && Log->Type != END_OF_LOG && Offset <
> LogAreaLength) {
> -//
> -// Get a Event Log Record
> -//
> -Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
> 
>  if (Log != NULL) {
>//
>// Display Event Log Record Information
>//
> -  DisplaySELVarDataFormatType (Log->Type, SHOW_DETAIL);
> +  DisplaySELTypes (Log->Type, SHOW_DETAIL);
>DisplaySELLogHeaderLen (Log->Length, SHOW_DETAIL);
> 
>Offset += Log->Length;
>//
>// Display Log Header Date/Time Fields @@ -371,10 +367,14 @@
> DisplaySysEventLogData (
>  Print (L"19");
>} else if (Log != NULL && Log->Year <= 79) {
>  Print (L"20");
>} else {
>  ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN
> (STR_SMBIOSVIEW_EVENTLOGINFO_ERROR), gShellDebug1HiiHandle);
> +//
> +// Get a Event Log Record
> +//
> +Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
>  continue;
>}
> 
>ShellPrintHiiEx(-1,-1,NULL,
>  STRING_TOKEN (STR_SMBIOSVIEW_EVENTLOGINFO_TIME_SIX_VARS),
> @@ -389,13 +389,21 @@ DisplaySysEventLogData (
> 
>//
>// Display Variable Data Format
>//
>if (Log->Length <= (sizeof (LOG_RECORD_FORMAT) - 1)) {
> +//
> +// Get a Event Log Record
> +//
> +Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
>  continue;
>}
> 
>ElVdfType = Log->LogVariableData[0];
>DisplayElVdfInfo (ElVdfType, Log->LogVariableData);
> +  //
> +  // Get a Event Log Record
> +  //
> +  Log = (LOG_RECORD_FORMAT *) (LogData + Offset);
>  }
>}
>  }
> --
> 2.18.0.windows.1


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

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



Re: [edk2-devel] [Patch 3/3] SignedCapsulePkg: Update Package DSC to remove unused network libs

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

-Original Message-
From: Gao, Liming 
Sent: Tuesday, May 28, 2019 7:42 PM
To: devel@edk2.groups.io
Cc: Yao, Jiewen ; Zhang, Chao B 
Subject: [Patch 3/3] SignedCapsulePkg: Update Package DSC to remove unused 
network libs

Signed-off-by: Liming Gao 
Cc: Jiewen Yao 
Cc: Chao Zhang 
---
 SignedCapsulePkg/SignedCapsulePkg.dsc | 5 -
 1 file changed, 5 deletions(-)

diff --git a/SignedCapsulePkg/SignedCapsulePkg.dsc 
b/SignedCapsulePkg/SignedCapsulePkg.dsc
index 0da445503b..4d4232d6e0 100644
--- a/SignedCapsulePkg/SignedCapsulePkg.dsc
+++ b/SignedCapsulePkg/SignedCapsulePkg.dsc
@@ -61,11 +61,6 @@
   #
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
-- 
2.13.0.windows.1


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

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



[edk2-devel] [PATCH] Marvell/Armada80x0McBin: Enable usb keyboard, nvme boot

2019-05-28 Thread Jeremy Linton
Add a USB keyboard flag, which is needed when a graphical console
is enabled. Also add a nvme boot option for users that choose
that instead of sata or mmc.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jeremy Linton 
---
 Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc | 3 +++
 Silicon/Marvell/Armada7k8k/Armada7k8k.fdf | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc 
b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
index 27e52f5af5..89d617fde4 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc
@@ -90,6 +90,7 @@
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   UefiRuntimeLib|MdePkg/Library/UefiRuntimeLib/UefiRuntimeLib.inf
+  UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
 
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
 
@@ -505,6 +506,7 @@
   MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
   MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
   MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+  MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
 
   # SD/MMC
   MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
@@ -516,6 +518,7 @@
   ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
   MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
+  MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
 
   # Console packages
   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
diff --git a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf 
b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
index 47e3bc4f82..f59cc1f263 100644
--- a/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
+++ b/Silicon/Marvell/Armada7k8k/Armada7k8k.fdf
@@ -151,6 +151,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
   INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
   INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
   INF MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf
+  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
 
   # SD/MMC
   INF MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.inf
@@ -162,6 +163,7 @@ FvNameGuid = 5eda4200-2c5f-43cb-9da3-0baf74b1b30c
   INF ArmPkg/Drivers/ArmPciCpuIo2Dxe/ArmPciCpuIo2Dxe.inf
   INF MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciHostBridgeDxe.inf
   INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
+  INF MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf
 
   # Multiple Console IO support
   INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-- 
2.13.7


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

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



Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin (from the MarvellEmbeddedProcessors edk2-open-platforms repo)

2019-05-28 Thread rebecca
On 2019-05-28 03:47, Marcin Wojtas wrote:
> Please use the Tianocore repo only. With the latest changes, there is
> no point to use old MarvellEmbededProcessors branch, I do not maintain
> it. I also plan to update MacchiatoBin wiki with the reference to the
> mainline repositories.



Thank you! That makes things a whole lot easier.


-- 

Rebecca Cran


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

View/Reply Online (#41546): https://edk2.groups.io/g/devel/message/41546
Mute This Topic: https://groups.io/mt/31815275/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/5] OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe

2019-05-28 Thread Imran Desai


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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch links SM3 support into Tcg2Pei and Tcg2Dxe.


Signed-off-by: Imran Desai 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Marc-André Lureau 
Cc: Stefan Berger 
---
 OvmfPkg/OvmfPkgIa32.dsc| 2 ++
 OvmfPkg/OvmfPkgIa32X64.dsc | 2 ++
 OvmfPkg/OvmfPkgX64.dsc | 2 ++
 3 files changed, 6 insertions(+)

diff --git a/OvmfPkg/OvmfPkgIa32.dsc b/OvmfPkg/OvmfPkgIa32.dsc
index 578fc6c98ec8..fb5944aa6945 100644
--- a/OvmfPkg/OvmfPkgIa32.dsc
+++ b/OvmfPkg/OvmfPkgIa32.dsc
@@ -628,6 +628,7 @@ [Components]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 !if $(TPM2_CONFIG_ENABLE) == TRUE
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
@@ -914,5 +915,6 @@ [Components]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 !endif
diff --git a/OvmfPkg/OvmfPkgIa32X64.dsc b/OvmfPkg/OvmfPkgIa32X64.dsc
index eade8f62d3de..64c231f735c2 100644
--- a/OvmfPkg/OvmfPkgIa32X64.dsc
+++ b/OvmfPkg/OvmfPkgIa32X64.dsc
@@ -636,6 +636,7 @@ [Components.IA32]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 !if $(TPM2_CONFIG_ENABLE) == TRUE
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
@@ -924,5 +925,6 @@ [Components.X64]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 !endif
diff --git a/OvmfPkg/OvmfPkgX64.dsc b/OvmfPkg/OvmfPkgX64.dsc
index 733a4c9d8a43..7e46d401a36f 100644
--- a/OvmfPkg/OvmfPkgX64.dsc
+++ b/OvmfPkg/OvmfPkgX64.dsc
@@ -635,6 +635,7 @@ [Components]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 !if $(TPM2_CONFIG_ENABLE) == TRUE
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf
@@ -922,5 +923,6 @@ [Components]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 !endif
-- 
2.17.0


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

View/Reply Online (#41545): https://edk2.groups.io/g/devel/message/41545
Mute This Topic: https://groups.io/mt/31826564/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/5] Implement SM3 measured boot

2019-05-28 Thread Imran Desai
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1781

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.


Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
Cc: Jordan Justen 
Cc: Laszlo Ersek 
Cc: Ard Biesheuvel 
Cc: Marc-André Lureau 
Cc: Stefan Berger 


Imran Desai (5):
  MdePkg/Protocol/Hash: introduce GUID for SM3 digest algorithm
  SecurityPkg: introduce the SM3 digest algorithm
  SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest
algorithm
  SecurityPkg: set SM3 bit in TPM 2.0 hash mask by default
  OvmfPkg: link SM3 support into Tcg2Pei and Tcg2Dxe

 SecurityPkg/SecurityPkg.dec   |   5 +-
 OvmfPkg/OvmfPkgIa32.dsc   |   2 +
 OvmfPkg/OvmfPkgIa32X64.dsc|   2 +
 OvmfPkg/OvmfPkgX64.dsc|   2 +
 SecurityPkg/SecurityPkg.dsc   |   3 +
 .../HashInstanceLibSm3/HashInstanceLibSm3.inf |  46 ++
 MdePkg/Include/Protocol/Hash.h|   5 +
 SecurityPkg/Include/Library/HashLib.h |   1 +
 .../HashInstanceLibSm3/HashInstanceLibSm3.c   | 155 ++
 .../HashLibBaseCryptoRouterCommon.c   |   1 +
 .../HashInstanceLibSm3/HashInstanceLibSm3.uni |  21 +++
 11 files changed, 241 insertions(+), 2 deletions(-)
 create mode 100644 
SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
 create mode 100644 SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c
 create mode 100644 
SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.uni

-- 
2.17.0


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

View/Reply Online (#41541): https://edk2.groups.io/g/devel/message/41541
Mute This Topic: https://groups.io/mt/31826560/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/5] SecurityPkg: introduce the SM3 digest algorithm

2019-05-28 Thread Imran Desai


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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch add SM3 algorithm in the hashinstance library.


Signed-off-by: Imran Desai 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
---
 SecurityPkg/SecurityPkg.dsc   |   3 +
 SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf |  46 ++
 SecurityPkg/Include/Library/HashLib.h |   1 +
 SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c   | 155 

 SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.uni |  21 +++
 5 files changed, 226 insertions(+)

diff --git a/SecurityPkg/SecurityPkg.dsc b/SecurityPkg/SecurityPkg.dsc
index a2ee0528f0d2..044319ab5e36 100644
--- a/SecurityPkg/SecurityPkg.dsc
+++ b/SecurityPkg/SecurityPkg.dsc
@@ -222,6 +222,7 @@ [Components.IA32, Components.X64]
   SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
 
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigPei.inf {
 
@@ -236,6 +237,7 @@ [Components.IA32, Components.X64]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   }
 
   SecurityPkg/Tcg/Tcg2Dxe/Tcg2Dxe.inf {
@@ -246,6 +248,7 @@ [Components.IA32, Components.X64]
   NULL|SecurityPkg/Library/HashInstanceLibSha256/HashInstanceLibSha256.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha384/HashInstanceLibSha384.inf
   NULL|SecurityPkg/Library/HashInstanceLibSha512/HashInstanceLibSha512.inf
+  NULL|SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
   PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf
   }
   SecurityPkg/Tcg/Tcg2Config/Tcg2ConfigDxe.inf {
diff --git a/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf 
b/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
new file mode 100644
index ..b2c68b784211
--- /dev/null
+++ b/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.inf
@@ -0,0 +1,46 @@
+## @file
+#  Provides BaseCrypto SM3 hash service
+#
+#  This library can be registered to BaseCrypto router, to serve as hash 
engine.
+#
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+# This program and the accompanying materials
+# are licensed and made available under the terms and conditions of the BSD 
License
+# which accompanies this distribution. The full text of the license may be 
found at
+# http://opensource.org/licenses/bsd-license.php
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+##
+
+[Defines]
+  INF_VERSION= 0x00010005
+  BASE_NAME  = HashInstanceLibSm3
+  MODULE_UNI_FILE= HashInstanceLibSm3.uni
+  FILE_GUID  = C5865D5D-9ACE-39FB-DC7C-0511891D40F9
+  MODULE_TYPE= BASE
+  VERSION_STRING = 1.0
+  LIBRARY_CLASS  = NULL
+  CONSTRUCTOR= HashInstanceLibSm3Constructor
+
+#
+# The following information is for reference only and not required by the 
build tools.
+#
+#  VALID_ARCHITECTURES   = IA32 X64
+#
+
+[Sources]
+  HashInstanceLibSm3.c
+
+[Packages]
+  MdePkg/MdePkg.dec
+  SecurityPkg/SecurityPkg.dec
+  CryptoPkg/CryptoPkg.dec
+
+[LibraryClasses]
+  BaseLib
+  BaseMemoryLib
+  DebugLib
+  Tpm2CommandLib
+  MemoryAllocationLib
+  BaseCryptLib
diff --git a/SecurityPkg/Include/Library/HashLib.h 
b/SecurityPkg/Include/Library/HashLib.h
index 63f08398788b..24b4c425d7b8 100644
--- a/SecurityPkg/Include/Library/HashLib.h
+++ b/SecurityPkg/Include/Library/HashLib.h
@@ -137,6 +137,7 @@ EFI_STATUS
 #define HASH_ALGORITHM_SHA256_GUID  EFI_HASH_ALGORITHM_SHA256_GUID
 #define HASH_ALGORITHM_SHA384_GUID  EFI_HASH_ALGORITHM_SHA384_GUID
 #define HASH_ALGORITHM_SHA512_GUID  EFI_HASH_ALGORITHM_SHA512_GUID
+#define HASH_ALGORITHM_SM3_256_GUID  EFI_HASH_ALGORITHM_SM3_256_GUID
 
 typedef struct {
   EFI_GUID   HashGuid;
diff --git a/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c 
b/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c
new file mode 100644
index ..504475ca193a
--- /dev/null
+++ b/SecurityPkg/Library/HashInstanceLibSm3/HashInstanceLibSm3.c
@@ -0,0 +1,155 @@
+/** @file
+  This library is BaseCrypto SM3 hash 

[edk2-devel] [PATCH v2 3/5] SecurityPkg/HashLibBaseCryptoRouter: recognize the SM3 digest algorithm

2019-05-28 Thread Imran Desai


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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch adds SM3 as an available digest algorithm to crypto router.


Signed-off-by: Imran Desai 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
---
 SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterCommon.c | 
1 +
 1 file changed, 1 insertion(+)

diff --git 
a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterCommon.c 
b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterCommon.c
index 7f3bdab53066..aec874a9e072 100644
--- 
a/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterCommon.c
+++ 
b/SecurityPkg/Library/HashLibBaseCryptoRouter/HashLibBaseCryptoRouterCommon.c
@@ -25,6 +25,7 @@ TPM2_HASH_MASK mTpm2HashMask[] = {
   {HASH_ALGORITHM_SHA256_GUID,   HASH_ALG_SHA256},
   {HASH_ALGORITHM_SHA384_GUID,   HASH_ALG_SHA384},
   {HASH_ALGORITHM_SHA512_GUID,   HASH_ALG_SHA512},
+  {HASH_ALGORITHM_SM3_256_GUID,  HASH_ALG_SM3_256},
 };
 
 /**
-- 
2.17.0


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

View/Reply Online (#41543): https://edk2.groups.io/g/devel/message/41543
Mute This Topic: https://groups.io/mt/31826562/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/5] MdePkg/Protocol/Hash: introduce GUID for SM3

2019-05-28 Thread Imran Desai
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1781

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch adds GUID for SM3 digest algorithm.


Signed-off-by: Imran Desai 
Cc: Michael D Kinney 
Cc: Liming Gao 

---
 MdePkg/Include/Protocol/Hash.h | 5 +
 1 file changed, 5 insertions(+)

diff --git a/MdePkg/Include/Protocol/Hash.h b/MdePkg/Include/Protocol/Hash.h
index 931d7916ef1e..8abf1a4fa305 100644
--- a/MdePkg/Include/Protocol/Hash.h
+++ b/MdePkg/Include/Protocol/Hash.h
@@ -48,6 +48,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 0xcaa4381e, 0x750c, 0x4770, {0xb8, 0x70, 0x7a, 0x23, 0xb4, 0xe4, 0x21, 
0x30 } \
   }
 
+#define EFI_HASH_ALGORITHM_SM3_256_GUID \
+  { \
+0x251C7818, 0x0DBF, 0xE619, { 0x7F, 0xC2, 0xD6, 0xAC, 0x43, 0x42, 0x7D, 
0xA3 } \
+  }
+
 #define EFI_HASH_ALGORTIHM_MD5_GUID \
   { \
 0xaf7c79c, 0x65b5, 0x4319, {0xb0, 0xae, 0x44, 0xec, 0x48, 0x4e, 0x4a, 0xd7 
} \
-- 
2.17.0


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

View/Reply Online (#41540): https://edk2.groups.io/g/devel/message/41540
Mute This Topic: https://groups.io/mt/31826559/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/5] SecurityPkg: set SM3 bit in TPM 2.0 hash mask by default

2019-05-28 Thread Imran Desai


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

EDK2 Support for SM3 digest algorithm is needed to enable TPM with SM3 PCR
banks. This digest algorithm is part of the China Crypto algorithm suite.
This integration has dependency on the openssl_1_1_1b integration into
edk2.
This patch sets SM3 bit in TPM2.0 hash mask by default.

Signed-off-by: Imran Desai 
Cc: Chao Zhang 
Cc: Jiewen Yao 
Cc: Jian Wang 
---
 SecurityPkg/SecurityPkg.dec | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/SecurityPkg/SecurityPkg.dec b/SecurityPkg/SecurityPkg.dec
index 3314f1854be4..fa3a4fcf5869 100644
--- a/SecurityPkg/SecurityPkg.dec
+++ b/SecurityPkg/SecurityPkg.dec
@@ -438,9 +438,10 @@ [PcdsDynamic, PcdsDynamicEx]
   #BIT1  -  SHA256.
   #BIT2  -  SHA384.
   #BIT3  -  SHA512.
+  #BIT4  -  SM3_256.
   # @Prompt Hash mask for TPM 2.0
-  # @ValidRange 0x8001 | 0x - 0x000F
-  gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0x000F|UINT32|0x00010010
+  # @ValidRange 0x8001 | 0x - 0x001F
+  gEfiSecurityPkgTokenSpaceGuid.PcdTpm2HashMask|0x001F|UINT32|0x00010010
 
   ## This PCD indicated final BIOS supported Hash mask.
   #Bios may choose to register a subset of PcdTpm2HashMask.
-- 
2.17.0


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

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



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

2019-05-28 Thread Leif Lindholm
+Haojian,

Haojian - since you are the original author, can you comment on the
delays? Are these silicon bug workarounds (so we need to add a Pcd),
or does these changes work on your platforms too?

Regards,

Leif

On Mon, May 27, 2019 at 05:30:27PM +0800, tien.hock@intel.com wrote:
> 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 (#41539): https://edk2.groups.io/g/devel/message/41539
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]
-=-=-=-=-=-=-=-=-=-=-=-



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

2019-05-28 Thread Leif Lindholm
On Mon, May 27, 2019 at 05:30:26PM +0800, tien.hock@intel.com wrote:
> 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 

Reviewed-by: Leif Lindholm 

> ---
>  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 (#41538): https://edk2.groups.io/g/devel/message/41538
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]
-=-=-=-=-=-=-=-=-=-=-=-



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

2019-05-28 Thread Leif Lindholm
On Mon, May 27, 2019 at 05:30:25PM +0800, tien.hock@intel.com wrote:
> 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 

Reviewed-by: Leif Lindholm 

> ---
>  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 (#41537): https://edk2.groups.io/g/devel/message/41537
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]
-=-=-=-=-=-=-=-=-=-=-=-



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

2019-05-28 Thread Leif Lindholm
On Mon, May 27, 2019 at 05:30:24PM +0800, tien.hock@intel.com wrote:
> 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;

OK, sorry, I didn't spot this last time around - but these two lines
are now present for both sides of the conditional, so should be moved
outside. Which (I think) would turn it into

  mDwEmmcCommand = Cmd;
  mDwEmmcArgument = Argument;
  if (!IsPendingReadCommand (Cmd) && !IsPendingWriteCommand (Cmd)) {
Status = SendCommand (Cmd, 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))

Space after if. Space after IsPendingWriteCommand.

/
Leif

> +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 (#41536): https://edk2.groups.io/g/devel/message/41536
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 v2 7/7] EmbeddedPkg: Fix DwEmmc read/write size in preparing DMA size

2019-05-28 Thread Leif Lindholm
On Mon, May 27, 2019 at 05:30:28PM +0800, tien.hock@intel.com wrote:
> 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

Drop the version blurb from the commit message.
Below --- only.

> ---
>  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);

There is still a duplicated line here

> +  }
> +  else {

} else {

> +MmioWrite32 (DWEMMC_BLKSIZ, DWEMMC_BLOCK_SIZE);
> +MmioWrite32 (DWEMMC_BYTCNT, Length);

and here

> +  }

Which could be outside of the conditional clause, since it is always
executed the same.

/
Leif

>  }
>  
>  EFI_STATUS
> -- 
> 2.19.0
> 

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

View/Reply Online (#41535): https://edk2.groups.io/g/devel/message/41535
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]
-=-=-=-=-=-=-=-=-=-=-=-



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

2019-05-28 Thread Leif Lindholm
On Mon, May 27, 2019 at 05:30:23PM +0800, tien.hock@intel.com wrote:
> 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

Version information goes below ---.
Never type this manually - sooner or later you will leave out a like
above and accidentally have it included in the commit message.

It is also helpful to include this information in a cover letter
[0/7]. For simple changes like this, there is no need to list it
individually in each patch.

> ---
>  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;

I saw no comment on my feedback from previous revision that
---
I think this would be more clear as
  Cmd = BIT_CMD_RESPONSE_EXPECT | BIT_CMD_CHECK_RESPONSE_CRC |
BIT_CMD_WAIT_PRVDATA_COMPLETE;
  if (...) {
Cmd |= BIT_CMD_READ | BIT_CMD_DATA_EXPECTED;
  }
---
and the request was not followed.

Also, always use { and } with if/else.

/
Leif

>  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 (#41534): https://edk2.groups.io/g/devel/message/41534
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]
-=-=-=-=-=-=-=-=-=-=-=-



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

2019-05-28 Thread Leif Lindholm
Hi Tien Hock,

Thanks for resubmitting this.

On Mon, May 27, 2019 at 05:30:22PM +0800, tien.hock@intel.com wrote:
> 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 {

I remarked last time that the else should be on the same line as }.

> +  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))

Space after if.

> +IsACmd = TRUE;
> +  else
> +IsACmd = FALSE;

Even though some code in this file takes liberties with the use of {
and }, please add them for both if and else.

/
Leif

> +
>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 (#41533): https://edk2.groups.io/g/devel/message/41533
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]
-=-=-=-=-=-=-=-=-=-=-=-



Re: Linux Kernel soft hangs if 8259 PIC is not configured by BIOS: was (RE: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules)

2019-05-28 Thread Kirkendall, Garrett
See below
-Original Message-
From: Kinney, Michael D  
Sent: Tuesday, May 28, 2019 12:07 PM
To: Kirkendall, Garrett ; devel@edk2.groups.io; Wu, 
Hao A ; Kinney, Michael D 
Cc: Ni, Ray ; Andrew Fish ; Laszlo Ersek 
; Leif Lindholm 
Subject: RE: Linux Kernel soft hangs if 8259 PIC is not configured by BIOS: was 
(RE: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules)

[CAUTION: External Email]

Hi Garrett,

Two thoughts on this issue:

1) Just because 8259 is not used by UEFI FW does not mean the 8259 HW should
   not be initialized into an OS compatible state.  This init code could be
   part of the chipset/si init code without requiring the 8259 driver/protocol.

[Garrett:] The Linux Kernel only allocates "descriptors"/structures for 
Interrupts 0-15, PIC or IOAPIC mode, if a legacy PIC is available and responds 
the expected way.  The Kernel will initialize the PIC, but not until after this 
initial probe of the PIC.  If the PIC simply did not exist in the hardware, 
these interrupts would not be allowed/allocated even for an IOAPIC.  I was 
hoping to not need to do anything with the legacy PIC since I had no plans to 
use it for this UEFI implementation.

2) The HPET driver in PcAtChipsetPkg can be configured to use IOAPIC or MSI
   delivery for interrupts.  Is there a way for Linux to also use MSI
   delivery instead of IOAPIC delivery?

[Garrett:]  This is a very early timer initialization sequence and the 
PIC/IOAPIC will be fully initialized later.  Since the PIC didn't respond 
correctly, I don't think interrupts 0-15 would be allowed later.  I'm not sure 
if the kernel allows MSI for the HPET when everything is configured, I didn't 
go slogging through to figure out.

Thanks,

Mike

> -Original Message-
> From: Kirkendall, Garrett
> [mailto:garrett.kirkend...@amd.com]
> Sent: Tuesday, May 28, 2019 9:36 AM
> To: devel@edk2.groups.io; Wu, Hao A
> 
> Cc: Ni, Ray ; Andrew Fish ; Laszlo 
> Ersek ; Leif Lindholm ; 
> Kinney, Michael D 
> Subject: Linux Kernel soft hangs if 8259 PIC is not configured by 
> BIOS: was (RE: [edk2-devel] [RFC][PATCH
> v1 0/1] PcAtChipsetPkg: Remove framework modules)
>
> Since this change will be removing the 8259 PIC driver, I'll mention a 
> quirk I ran into in the Linux Kernel up through at least 5.0 (and I am 
> sure later, I just didn't verify):
>
> Does anyone have pull in the Linux Kernel world to get them to take 
> this seriously?  Hopefully someday soon end users will let legacy 
> devices, like the PIC, die a long overdue and graceful death.
>
> I sent the following to the responsible Linux Kernel developers and 
> quickly got back a "working as designed"
> response:
>
> *
> I am trying to boot a UEFI BIOS with minimal legacy hardware support.
> The Linux kernel soft hangs when the PIC is not configured by the BIOS 
> because it is using IOAPIC.  Hopefully, this provides enough 
> information.
>
> Observed under Ubuntu Server Linux 18.04 LTS with kernel 4.15.0, and 
> with kernel compiled from source tag
> v5.0
>
> Where it hangs:
> Soft hang occurs in calibrate_APIC_clock():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/apic.c#L805
> specific location of soft hang waiting for interrupts:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/apic.c#L854
>
>
> How it gets to the hang:
> If 8259A PIC is not configured before kernel is launched, HPET IRQ 0 
> registration fails because probe_8259A returns PIC as not available 
> and therefore interrupt descriptors 0-15 are not allocated.  This 
> happens when BIOS does not configure 8259A PIC because it uses IOAPIC.
>
> This sequence prevents allocating interrupts 0-15 unless PIC is 
> configured before kernel starts.
> legacy_pic.init = init_8259A is not called before
> early_irq_init():
>   early_irq_init():
> https://github.com/torvalds/linux/blob/v5.0/init/main.c
> #L642
> initcnt = arch_probe_nr_irqs():
> https://github.com/torvalds/linux/blob/v5.0/kernel/irq/
> irqdesc.c#L512
>   return legacy_pic->probe():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/vector.c#L656
> default_legacy_pic.probe:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/i8259.c#L418
>   probe_8259A():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/i8259.c#L301
> interrupt 0-15 descriptors not allocated and prevents IOAPIC 
> interrupts 0-15:
> https://github.com/torvalds/linux/blob/v5.0/kernel/irq/
> irqdesc.c#L525
>
> In this call is where init_8259A is called and PIC is initialized.
> However, interrupt descriptors for 0-15 were not allocated in 
> early_irq_init() sequence, so descriptors are not available later.
>   init_IRQ() :
> https://github.com/torvalds/linux/blob/v5.0/init/main.c
> #L643
>
> This sequence tries to register the HPET to irq0, but
> irq0 descriptor is not allocated by early_irq_init()
> sequence:
>   late_time_init():
> 

Re: Linux Kernel soft hangs if 8259 PIC is not configured by BIOS: was (RE: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules)

2019-05-28 Thread Leif Lindholm
Hi Garrett,

Presumably you mean https://lkml.org/lkml/2019/5/9/304?

I'm not familiar enough with the PC platform to stick my oar in, but
Gleixner's counterquestion is an honest one - he does not see an
obvious solution to the problem. And unless someone finds the problem
interesting, this is very much a "patches welcome" sort of scenario.

If Mike's suggestions don't help bring this forward, I would recommend
you loop in all of the X86 maintainers, not just tglx.

It may also be worth asking one of your Linux devs to have a look -
Suravee Suthikulpanit is still at AMD, right?

Best Regards,

Leif

On Tue, May 28, 2019 at 04:36:06PM +, Kirkendall, Garrett wrote:
> Since this change will be removing the 8259 PIC driver, I'll mention
> a quirk I ran into in the Linux Kernel up through at least 5.0 (and
> I am sure later, I just didn't verify):
> 
> Does anyone have pull in the Linux Kernel world to get them to take
> this seriously?  Hopefully someday soon end users will let legacy
> devices, like the PIC, die a long overdue and graceful death.
> 
> I sent the following to the responsible Linux Kernel developers and
> quickly got back a "working as designed" response:
> 
> *
> I am trying to boot a UEFI BIOS with minimal legacy hardware
> support.  The Linux kernel soft hangs when the PIC is not configured
> by the BIOS because it is using IOAPIC.  Hopefully, this provides
> enough information.
> 
> Observed under Ubuntu Server Linux 18.04 LTS with kernel 4.15.0, and with 
> kernel compiled from source tag v5.0
> 
> Where it hangs:
> Soft hang occurs in calibrate_APIC_clock(): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L805
> specific location of soft hang waiting for interrupts: 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L854
> 
> 
> How it gets to the hang:
> If 8259A PIC is not configured before kernel is launched, HPET IRQ 0 
> registration fails because probe_8259A returns PIC as not available and 
> therefore interrupt descriptors 0-15 are not allocated.  This happens when 
> BIOS does not configure 8259A PIC because it uses IOAPIC.
> 
> This sequence prevents allocating interrupts 0-15 unless PIC is configured 
> before kernel starts.  legacy_pic.init = init_8259A is not called before 
> early_irq_init():
>   early_irq_init(): 
> https://github.com/torvalds/linux/blob/v5.0/init/main.c#L642
> initcnt = arch_probe_nr_irqs(): 
> https://github.com/torvalds/linux/blob/v5.0/kernel/irq/irqdesc.c#L512
>   return legacy_pic->probe(): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/vector.c#L656
> default_legacy_pic.probe: 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/i8259.c#L418
>   probe_8259A(): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/i8259.c#L301
> interrupt 0-15 descriptors not allocated and prevents IOAPIC interrupts 
> 0-15:  https://github.com/torvalds/linux/blob/v5.0/kernel/irq/irqdesc.c#L525
> 
> In this call is where init_8259A is called and PIC is initialized.  However, 
> interrupt descriptors for 0-15 were not allocated in early_irq_init() 
> sequence, so descriptors are not available later.
>   init_IRQ() : https://github.com/torvalds/linux/blob/v5.0/init/main.c#L643
> 
> This sequence tries to register the HPET to irq0, but irq0 descriptor is not 
> allocated by early_irq_init() sequence:
>   late_time_init(): 
> https://github.com/torvalds/linux/blob/v5.0/init/main.c#L703
> late_time_init = x86_late_time_init: 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L107
>   x86_init.timers.timer_init(): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L92
> x86_init.timers.timer_init = hpet_time_init: 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/x86_init.c#L75
>   setup_default_timer_irq(): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L83
> if (setup_irq(0, )): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L78
> 
> This gets called at some point after the above sequences, I couldn't track it 
> all the way back to main.c easily:
>   x86_init.timers.setup_percpu_clockev = setup_boot_APIC_clock: 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/x86_init.c#L74
> 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L961
>   *** soft hang in calibrate_APIC_clock(): 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L854
> 
> *
> 
> GARRETT KIRKENDALL
> SMTS Firmware Engineer | CTE
> 7171 Southwest Parkway, Austin, TX 78735 USA 
> AMD   facebook  |  amd.com
> 
> -Original Message-
> From: devel@edk2.groups.io  On Behalf Of Wu, Hao A via 
> Groups.Io
> Sent: Monday, May 27, 2019 1:37 AM
> To: devel@edk2.groups.io
> Cc: Hao A Wu ; Ray Ni ; Andrew Fish 
> ; Laszlo Ersek ; Leif Lindholm 
> ; 

Re: Linux Kernel soft hangs if 8259 PIC is not configured by BIOS: was (RE: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules)

2019-05-28 Thread Michael D Kinney
Hi Garrett,

Two thoughts on this issue:

1) Just because 8259 is not used by UEFI FW does not mean the 8259 HW should
   not be initialized into an OS compatible state.  This init code could be
   part of the chipset/si init code without requiring the 8259 driver/protocol.
2) The HPET driver in PcAtChipsetPkg can be configured to use IOAPIC or MSI
   delivery for interrupts.  Is there a way for Linux to also use MSI 
   delivery instead of IOAPIC delivery?

Thanks,

Mike

> -Original Message-
> From: Kirkendall, Garrett
> [mailto:garrett.kirkend...@amd.com]
> Sent: Tuesday, May 28, 2019 9:36 AM
> To: devel@edk2.groups.io; Wu, Hao A
> 
> Cc: Ni, Ray ; Andrew Fish
> ; Laszlo Ersek ;
> Leif Lindholm ; Kinney,
> Michael D 
> Subject: Linux Kernel soft hangs if 8259 PIC is not
> configured by BIOS: was (RE: [edk2-devel] [RFC][PATCH
> v1 0/1] PcAtChipsetPkg: Remove framework modules)
> 
> Since this change will be removing the 8259 PIC driver,
> I'll mention a quirk I ran into in the Linux Kernel up
> through at least 5.0 (and I am sure later, I just
> didn't verify):
> 
> Does anyone have pull in the Linux Kernel world to get
> them to take this seriously?  Hopefully someday soon
> end users will let legacy devices, like the PIC, die a
> long overdue and graceful death.
> 
> I sent the following to the responsible Linux Kernel
> developers and quickly got back a "working as designed"
> response:
> 
> *
> I am trying to boot a UEFI BIOS with minimal legacy
> hardware support.  The Linux kernel soft hangs when the
> PIC is not configured by the BIOS because it is using
> IOAPIC.  Hopefully, this provides enough information.
> 
> Observed under Ubuntu Server Linux 18.04 LTS with
> kernel 4.15.0, and with kernel compiled from source tag
> v5.0
> 
> Where it hangs:
> Soft hang occurs in calibrate_APIC_clock():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/apic.c#L805
> specific location of soft hang waiting for interrupts:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/apic.c#L854
> 
> 
> How it gets to the hang:
> If 8259A PIC is not configured before kernel is
> launched, HPET IRQ 0 registration fails because
> probe_8259A returns PIC as not available and therefore
> interrupt descriptors 0-15 are not allocated.  This
> happens when BIOS does not configure 8259A PIC because
> it uses IOAPIC.
> 
> This sequence prevents allocating interrupts 0-15
> unless PIC is configured before kernel starts.
> legacy_pic.init = init_8259A is not called before
> early_irq_init():
>   early_irq_init():
> https://github.com/torvalds/linux/blob/v5.0/init/main.c
> #L642
> initcnt = arch_probe_nr_irqs():
> https://github.com/torvalds/linux/blob/v5.0/kernel/irq/
> irqdesc.c#L512
>   return legacy_pic->probe():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/vector.c#L656
> default_legacy_pic.probe:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/i8259.c#L418
>   probe_8259A():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/i8259.c#L301
> interrupt 0-15 descriptors not allocated and
> prevents IOAPIC interrupts 0-15:
> https://github.com/torvalds/linux/blob/v5.0/kernel/irq/
> irqdesc.c#L525
> 
> In this call is where init_8259A is called and PIC is
> initialized.  However, interrupt descriptors for 0-15
> were not allocated in early_irq_init() sequence, so
> descriptors are not available later.
>   init_IRQ() :
> https://github.com/torvalds/linux/blob/v5.0/init/main.c
> #L643
> 
> This sequence tries to register the HPET to irq0, but
> irq0 descriptor is not allocated by early_irq_init()
> sequence:
>   late_time_init():
> https://github.com/torvalds/linux/blob/v5.0/init/main.c
> #L703
> late_time_init = x86_late_time_init:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/time.c#L107
>   x86_init.timers.timer_init():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/time.c#L92
> x86_init.timers.timer_init = hpet_time_init:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/x86_init.c#L75
>   setup_default_timer_irq():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/time.c#L83
> if (setup_irq(0, )):
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/time.c#L78
> 
> This gets called at some point after the above
> sequences, I couldn't track it all the way back to
> main.c easily:
>   x86_init.timers.setup_percpu_clockev =
> setup_boot_APIC_clock:
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/x86_init.c#L74
> 
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/apic.c#L961
>   *** soft hang in calibrate_APIC_clock():
> https://github.com/torvalds/linux/blob/v5.0/arch/x86/ke
> rnel/apic/apic.c#L854
> 
> *
> 
> GARRETT KIRKENDALL
> SMTS Firmware Engineer | CTE
> 7171 Southwest Parkway, Austin, TX 78735 

Re: [edk2-devel] OVMF and SMBIOS

2019-05-28 Thread Laszlo Ersek
On 05/28/19 17:18, Tomas Pilar (tpilar) wrote:
> Hi,
> 
> I am trying to create kvm instance using libvirt and Qemu and OVMF that also 
> has SMBIOS included. My current version of Qemu only supports type 0 and type 
> 1 SMBIOS tables so I specify those. However, when I use smbiosview in the 
> UEFI shell, I get back "SMBIOS not found".
> 
> I attach my current libvirt xml specification for the kvm host.
> 
> Does anyone have any immediate ideas?

The SMBIOS fw_cfg interface between QEMU and guest firmware was reworked
in the QEMU v2.1.0 release (primarily in commit c97294ec1b9e, "SMBIOS:
Build aggregate smbios tables and entry point", 2014-05-05).

If you use an earlier QEMU release, or else you use a machine type
earlier than pc-i440fx-2.1, then the new SMBIOS fw_cfg interface is not
exposed to guest firmware.

And, upstream OVMF never gained patches for the "legacy" SMBIOS fw_cfg
interface. I had posted patches for that in 2013, but they were not
accepted. The thread starts here:

[edk2] [PATCH 0/3] OvmfPkg: basic SMBIOS support on QEMU
https://www.mail-archive.com/edk2-devel@lists.sourceforge.net/msg02917.html

We (RH) carried forward these patches for quite some time in RHEL7 and
(IIRC) Fedora as well, but QEMU v2.1.0 was released in Aug 2014 if I
read the git log right, and so we too dropped the downstream-only
patches at some point, in favor of the new interface.

Based on your libvirt domain xml... It looks likely that you use the
qemu-kvm package that is part of base RHEL7. That package is based on
upstream QEMU 1.5.3, and so it indeed lacks support for the "new" SMBIOS
interface. If you can use CentOS, you could try the qemu-kvm-ev package
instead. (That one is based on upstream 2.12.)

Alternatively, you could check the "OVMF-20160202-2.gitd7c0dfa.el7"
package (or earlier), which should (a) still include the
above-referenced patches, and (b) still run on the 1.5.3-based qemu-kvm
emulator. (Later OVMF packages would only provide the SMM_REQUIRE
firmware binary, which does not boot on the 1.5.3-based qemu-kvm emulator.)

Thanks
Laszlo

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

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



[edk2-devel][Patch 7/7] MdeModulePkg: Add Capsule On Disk APIs into CapsuleLib.

2019-05-28 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852

CoDCheckCapsuleOnDiskFlag() is to check if CapsuleOnDisk flag in
"OsIndications" Variable is enabled. It is used to indicate whether
capsule on disk is provisioned in normal boot path.

CoDClearCapsuleOnDiskFlag() is to to clear CapsuleOnDisk flags,
including "OsIndications" and "BootNext" variable.

CoDRelocateCapsule() is to relocate the capsules from EFI system
partition. Depends on PcdCapsuleInRamSupport, there are two solutions
to relocate the capsule on disk images:
When Capsule In Ram is supported, the Capsule On Disk images are
relocated into memory, and call UpdateCapsule() service to deliver
the capsules.
When Capsule In Ram is not supported, the Capsule On Disk images are
relocated into a temp file which will be stored in root directory on
a platform specific storage device. CapsuleOnDiskLoadPei PEIM will
retrieve the capsules from the relocation temp file and report
capsule hobs for them.

CoDRemoveTempFile() is to remove the relocation temp file in the next
boot after capsules are processed.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Include/Library/CapsuleLib.h  |   94 +-
 .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.c   | 1984 
 .../Library/DxeCapsuleLibFmp/CapsuleOnDisk.h   |   63 +
 .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.c   |   51 +-
 .../Library/DxeCapsuleLibFmp/DxeCapsuleLib.inf |   20 +-
 .../DxeCapsuleLibFmp/DxeCapsuleProcessLib.c|  121 +-
 .../Library/DxeCapsuleLibFmp/DxeCapsuleReportLib.c |   66 +-
 .../DxeCapsuleLibFmp/DxeRuntimeCapsuleLib.inf  |3 +-
 .../Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c  |   85 +-
 9 files changed, 2461 insertions(+), 26 deletions(-)
 create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.c
 create mode 100644 MdeModulePkg/Library/DxeCapsuleLibFmp/CapsuleOnDisk.h

diff --git a/MdeModulePkg/Include/Library/CapsuleLib.h 
b/MdeModulePkg/Include/Library/CapsuleLib.h
index 1fc2fba3a2..f3cb17cbf9 100644
--- a/MdeModulePkg/Include/Library/CapsuleLib.h
+++ b/MdeModulePkg/Include/Library/CapsuleLib.h
@@ -1,17 +1,37 @@
 /** @file
 
   This library class defines a set of interfaces for how to process capsule 
image updates.
 
-Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #ifndef __CAPSULE_LIB_H__
 #define __CAPSULE_LIB_H__
 
+#include 
+
+
+typedef struct {
+  //
+  // image address.
+  //
+  VOID *ImageAddress;
+  //
+  // The file info of the image comes from.
+  //  if FileInfo == NULL. means image does not come from file
+  //
+  EFI_FILE_INFO*FileInfo;
+} IMAGE_INFO;
+
+//
+// BOOLEAN Variable to save the total size of all Capsule On Disk during 
relocation
+//
+#define COD_RELOCATION_INFO_VAR_NAME   L"CodRelocationInfo"
+
 /**
   The firmware checks whether the capsule image is supported
   by the CapsuleGuid in CapsuleHeader or if there is other specific 
information in
   the capsule image.
 
@@ -79,6 +99,78 @@ EFI_STATUS
 EFIAPI
 ProcessCapsules (
   VOID
   );
 
+/**
+  This routine is called to check if CapsuleOnDisk flag in OsIndications 
Variable
+  is enabled.
+
+  @retval TRUE Flag is enabled
+  @retval FALSEFlag is not enabled
+
+**/
+BOOLEAN
+EFIAPI
+CoDCheckCapsuleOnDiskFlag(
+  VOID
+  );
+
+
+/**
+  This routine is called to clear CapsuleOnDisk flags including OsIndications 
and BootNext variable
+
+  @retval EFI_SUCCESS   All Capsule On Disk flags are cleared
+
+**/
+EFI_STATUS
+EFIAPI
+CoDClearCapsuleOnDiskFlag(
+  VOID
+  );
+
+/**
+  Relocate Capsule on Disk from EFI system partition.
+
+  Two solution to deliver Capsule On Disk:
+  Solution A: If PcdCapsuleInRamSupport is enabled, relocate Capsule On Disk 
to memory and call UpdateCapsule().
+  Solution B: If PcdCapsuleInRamSupport is disabled, relocate Capsule On Disk 
to a platform-specific NV storage
+  device with BlockIo protocol.
+
+  Device enumeration like USB costs time, user can input MaxRetry to tell 
function to retry.
+  Function will stall 100ms between each retry.
+
+  Side Effects:
+Capsule Delivery Supported Flag in OsIndication variable and BootNext 
variable will be cleared.
+Solution B: Content corruption. Block IO write directly touches low level 
write. Orignal partitions, file
+  systems of the relocation device will be corrupted.
+
+  @param[in]MaxRetry Max Connection Retry. Stall 100ms between 
each connection try to ensure
+ devices like USB can get enumerated.
+
+  @retval EFI_SUCCESS   Capsule on Disk images are sucessfully relocated.
+
+**/
+EFI_STATUS
+EFIAPI
+CoDRelocateCapsule(
+  UINTN MaxRetry
+  );
+
+/**
+  Remove the temp file from the root of EFI System Partition.
+  Device enumeration like USB costs time, user can input MaxRetry to tell 

[edk2-devel][Patch 6/7] MdeModulePkg/DxeIpl: Support Capsule On Disk.

2019-05-28 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852

If Capsule On Disk mode, call Capsule On Disk Load PPI to load
capsules. When it fails, still goes to Firmware Update boot path.
BDS will clear corresponding indicator and reboot later on.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.h   |  3 ++-
 MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf | 20 ++
 MdeModulePkg/Core/DxeIplPeim/DxeLoad.c  | 37 -
 3 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h 
b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
index 063fefb414..90b5b5b211 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.h
@@ -1,10 +1,10 @@
 /** @file
   Master header file for DxeIpl PEIM. All source files in this module should
   include this file for common definitions.
 
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #ifndef __PEI_DXEIPL_H__
@@ -19,10 +19,11 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
 #include 
 #include 
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf 
b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
index 62bb3f3077..ff036d8688 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
@@ -3,11 +3,11 @@
 #
 #  This module produces a special PPI named the DXE Initial Program Load (IPL)
 #  PPI to discover and dispatch the DXE Foundation and components that are
 #  needed to run the DXE Foundation.
 #
-#  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+#  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 #  Copyright (c) 2017, AMD Incorporated. All rights reserved.
 #
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
@@ -74,21 +74,23 @@
 
 [LibraryClasses.ARM, LibraryClasses.AARCH64]
   ArmMmuLib
 
 [Ppis]
-  gEfiDxeIplPpiGuid ## PRODUCES
-  gEfiPeiDecompressPpiGuid  ## PRODUCES
-  gEfiEndOfPeiSignalPpiGuid ## SOMETIMES_PRODUCES # Not produced on S3 
boot path
-  gEfiPeiReadOnlyVariable2PpiGuid   ## SOMETIMES_CONSUMES
-  gEfiPeiLoadFilePpiGuid## SOMETIMES_CONSUMES
-  gEfiPeiS3Resume2PpiGuid   ## SOMETIMES_CONSUMES # Consumed on S3 
boot path
-  gEfiPeiRecoveryModulePpiGuid  ## SOMETIMES_CONSUMES # Consumed on 
recovery boot path
+  gEfiDxeIplPpiGuid  ## PRODUCES
+  gEfiPeiDecompressPpiGuid   ## PRODUCES
+  gEfiEndOfPeiSignalPpiGuid  ## SOMETIMES_PRODUCES # Not produced 
on S3 boot path
+  gEfiPeiReadOnlyVariable2PpiGuid## SOMETIMES_CONSUMES
+  gEfiPeiLoadFilePpiGuid ## SOMETIMES_CONSUMES
+  gEfiPeiS3Resume2PpiGuid## SOMETIMES_CONSUMES # Consumed on 
S3 boot path
+  gEfiPeiRecoveryModulePpiGuid   ## SOMETIMES_CONSUMES # Consumed on 
recovery boot path
   ## SOMETIMES_CONSUMES
   ## UNDEFINED # HOB
   gEfiVectorHandoffInfoPpiGuid
-  gEfiPeiMemoryDiscoveredPpiGuid## SOMETIMES_CONSUMES
+  gEfiPeiMemoryDiscoveredPpiGuid ## SOMETIMES_CONSUMES
+  gEfiPeiBootInCapsuleOnDiskModePpiGuid  ## SOMETIMES_CONSUMES
+  gEdkiiPeiCapsuleOnDiskPpiGuid  ## SOMETIMES_CONSUMES # Consumed on 
firmware update boot path
 
 [Guids]
   ## SOMETIMES_CONSUMES ## Variable:L"MemoryTypeInformation"
   ## SOMETIMES_PRODUCES ## HOB
   gEfiMemoryTypeInformationGuid
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c 
b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index c6e5b83309..9dc2d4485f 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -1,11 +1,11 @@
 /** @file
   Last PEIM.
   Responsibility of this module is to load the DXE Core from a Firmware Volume.
 
 Copyright (c) 2016 HP Development Company, L.P.
-Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
 
 #include "DxeIpl.h"
@@ -263,17 +263,38 @@ DxeLoadCore (
   UINTN Instance;
   UINT32AuthenticationState;
   UINTN DataSize;
   EFI_PEI_S3_RESUME2_PPI*S3Resume;
   EFI_PEI_RECOVERY_MODULE_PPI   *PeiRecovery;
+  EFI_PEI_CAPSULE_ON_DISK_PPI   *PeiCapsuleOnDisk;
   EFI_MEMORY_TYPE_INFORMATION   MemoryData[EfiMaxMemoryType + 1];
+  VOID  *CapsuleOnDiskModePpi;
+  BOOLEAN   IsCapsuleOnDiskMode;
+
+  IsCapsuleOnDiskMode = FALSE;
 
   //
   // if in S3 Resume, restore configure
   //
   BootMode = GetBootModeHob ();
 
+  //
+  // 

[edk2-devel][Patch 4/7] MdeModulePkg/BdsDxe: Support Capsule On Disk.

2019-05-28 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852

Set EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED bit of
"OsIndicationsSupported" variable to indicate the Capsule On
Disk is supported or not, according to PcdCapsuleOnDiskSupport.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 3 ++-
 MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 6 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf 
b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
index 6913389d34..3d13c725ce 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
@@ -3,11 +3,11 @@
 #
 #  When DxeCore dispatching all DXE driver, this module will produce 
architecture protocol
 #  gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will 
invoke Entry
 #  interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered.
 #
-#  Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+#  Copyright (c) 2008 - 2019, Intel Corporation. All rights reserved.
 #  SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 ##
 
 [Defines]
@@ -93,10 +93,11 @@
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor## 
CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareRevision  ## 
CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdConInConnectOnDemand  ## 
CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdErrorCodeSetVariable  ## 
SOMETIMES_CONSUMES
   gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed   ## 
CONSUMES
+  gEfiMdeModulePkgTokenSpaceGuid.PcdCapsuleOnDiskSupport  ## 
CONSUMES
 
 [Depex]
   TRUE
 
 [UserExtensions.TianoCore."ExtraFiles"]
diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c 
b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
index 9d312bd982..2a4ae9f488 100644
--- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
+++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c
@@ -3,11 +3,11 @@
   When this module was dispatched by DxeCore, gEfiBdsArchProtocolGuid will be 
installed
   which contains interface of BdsEntry.
   After DxeCore finish DXE phase, gEfiBdsArchProtocolGuid->BdsEntry will be 
invoked
   to enter BDS phase.
 
-Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2019, Intel Corporation. All rights reserved.
 (C) Copyright 2016 Hewlett Packard Enterprise Development LP
 (C) Copyright 2015 Hewlett-Packard Development Company, L.P.
 SPDX-License-Identifier: BSD-2-Clause-Patent
 
 **/
@@ -550,10 +550,14 @@ BdsFormalizeOSIndicationVariable (
 EfiBootManagerFreeLoadOption ();
   } else {
 OsIndicationSupport = EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY;
   }
 
+  if (PcdGetBool(PcdCapsuleOnDiskSupport)) {
+OsIndicationSupport |= EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED;
+  }
+
   Status = gRT->SetVariable (
   EFI_OS_INDICATIONS_SUPPORT_VARIABLE_NAME,
   ,
   EFI_VARIABLE_BOOTSERVICE_ACCESS | 
EFI_VARIABLE_RUNTIME_ACCESS,
   sizeof(UINT64),
-- 
2.16.2.windows.1


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

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



[edk2-devel][Patch 2/7] MdeModulePkg: Add Capsule On Disk related definition.

2019-05-28 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852

This patch will add Capsule On Disk related definition, including
GUID, PPI and PCDs:
The Capsule On Disk Name GUID indicates the capsule is to store
Capsule On Disk file names.
The Pei Capsule On Disk PPI provides service to retrieve capsules
from Capsule On Disk temp relocation file on mass storage devices
and create capsule hob for these capsules.
PcdCapsuleOnDiskSupport is used to enable/disable Capsule On Disk.
PcdCapsuleInRamSupport is used to enabble/disable Capsule In Ram.
PcdCoDRelocationFileName specifies the Capsule On Disk temp
relocation file name.
PcdCodRelocationDevPath specifies platform specific device to store
Capsule On Disk tem relocation file.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/Include/Ppi/CapsuleOnDisk.h | 48 
 MdeModulePkg/MdeModulePkg.dec| 43 
 MdeModulePkg/MdeModulePkg.uni| 32 +
 3 files changed, 123 insertions(+)
 create mode 100644 MdeModulePkg/Include/Ppi/CapsuleOnDisk.h

diff --git a/MdeModulePkg/Include/Ppi/CapsuleOnDisk.h 
b/MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
new file mode 100644
index 00..28be6e42be
--- /dev/null
+++ b/MdeModulePkg/Include/Ppi/CapsuleOnDisk.h
@@ -0,0 +1,48 @@
+/** @file
+  This file declares Capsule On Disk PPI.  This PPI is used to find and load 
the
+  capsule on files that are relocated into a temp file under rootdir.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PEI_CAPSULE_ON_DISK_PPI_H__
+#define __PEI_CAPSULE_ON_DISK_PPI_H__
+
+#define EFI_PEI_CAPSULE_ON_DISK_PPI_GUID \
+  { \
+0x71a9ea61, 0x5a35, 0x4a5d, {0xac, 0xef, 0x9c, 0xf8, 0x6d, 0x6d, 0x67, 
0xe0 } \
+  }
+
+typedef struct _EFI_PEI_CAPSULE_ON_DISK_PPI EFI_PEI_CAPSULE_ON_DISK_PPI;
+
+/**
+  Loads a DXE capsule from some media into memory and updates the HOB table
+  with the DXE firmware volume information.
+
+  @param  PeiServices   General-purpose services that are available to every 
PEIM.
+  @param  This  Indicates the EFI_PEI_RECOVERY_MODULE_PPI instance.
+
+  @retval EFI_SUCCESSThe capsule was loaded correctly.
+  @retval EFI_DEVICE_ERROR   A device error occurred.
+  @retval EFI_NOT_FOUND  A recovery DXE capsule cannot be found.
+
+**/
+typedef
+EFI_STATUS
+(EFIAPI *EFI_PEI_LOAD_CAPSULE_ON_DISK)(
+  IN EFI_PEI_SERVICES **PeiServices,
+  IN EFI_PEI_CAPSULE_ON_DISK_PPI  *This
+  );
+
+///
+///  Finds and loads the recovery files.
+///
+struct _EFI_PEI_CAPSULE_ON_DISK_PPI {
+  EFI_PEI_LOAD_CAPSULE_ON_DISK LoadCapsuleOnDisk;  ///< Loads a DXE binary 
capsule into memory.
+};
+
+extern EFI_GUID gEdkiiPeiCapsuleOnDiskPpiGuid;
+
+#endif
diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
index 6cba729982..d80b728313 100644
--- a/MdeModulePkg/MdeModulePkg.dec
+++ b/MdeModulePkg/MdeModulePkg.dec
@@ -394,10 +394,13 @@
   gEdkiiS3SmmInitDoneGuid = { 0x8f9d4825, 0x797d, 0x48fc, { 0x84, 0x71, 0x84, 
0x50, 0x25, 0x79, 0x2e, 0xf6 } }
 
   ## Include/Guid/S3StorageDeviceInitList.h
   gS3StorageDeviceInitListGuid = { 0x310e9b8c, 0xcf90, 0x421e, { 0x8e, 0x9b, 
0x9e, 0xef, 0xb6, 0x17, 0xc8, 0xef } }
 
+  ## GUID indicates the capsule is to store Capsule On Disk file names.
+  gEdkiiCapsuleOnDiskNameGuid = { 0x98c80a4f, 0xe16b, 0x4d11, { 0x93, 0x9a, 
0xab, 0xe5, 0x61, 0x26, 0x3, 0x30 } }
+
 [Ppis]
   ## Include/Ppi/AtaController.h
   gPeiAtaControllerPpiGuid   = { 0xa45e60d1, 0xc719, 0x44aa, { 0xb0, 0x7a, 
0xaa, 0x77, 0x7f, 0x85, 0x90, 0x6d }}
 
   ## Include/Ppi/UsbHostController.h
@@ -464,10 +467,13 @@
   gEdkiiPeiAtaPassThruPpiGuid   = { 0xa16473fd, 0xd474, 0x4c89, { 
0xae, 0xc7, 0x90, 0xb8, 0x3c, 0x73, 0x86, 0x9  } }
 
   ## Include/Ppi/Debug.h
   gEdkiiDebugPpiGuid= { 0x999e699c, 0xb013, 0x475e, { 
0xb1, 0x7b, 0xf3, 0xa8, 0xae, 0x5c, 0x48, 0x75 } }
 
+  ## Include/Ppi/CapsuleOnDisk.h
+  gEdkiiPeiCapsuleOnDiskPpiGuid =  {0x71a9ea61, 0x5a35, 0x4a5d, 
{0xac, 0xef, 0x9c, 0xf8, 0x6d, 0x6d, 0x67, 0xe0}}
+
 [Protocols]
   ## Load File protocol provides capability to load and unload EFI image into 
memory and execute it.
   #  Include/Protocol/LoadPe32Image.h
   #  This protocol is deprecated. Native EDKII module should NOT use this 
protocol to load/unload image.
   #  If developer need implement such functionality, they should use 
BasePeCoffLib.
@@ -1473,10 +1479,26 @@
 
   ## Indicates the allowable maximum number of Reset Filters, Reset 
Notifications or Reset Handlers in PEI phase.
   # @Prompt Maximum Number of PEI Reset Filters, Reset Notifications or Reset 
Handlers.
   
gEfiMdeModulePkgTokenSpaceGuid.PcdMaximumPeiResetNotifies|0x10|UINT32|0x010A
 
+  ## Capsule On Disk is to deliver capsules via files on Mass Storage 
device.
+  #  This PCD indicates if the Capsule On Disk 

[edk2-devel][Patch 1/7] MdePkg: Add Pei Boot In CapsuleOnDisk Mode Ppi definition.

2019-05-28 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852

This PPI indicates current boot mode is capsule on disk mode.

Cc: Michael D Kinney 
Cc: Liming Gao 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdePkg/Include/Ppi/BootInRecoveryMode.h | 9 -
 MdePkg/MdePkg.dec   | 3 +++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/MdePkg/Include/Ppi/BootInRecoveryMode.h 
b/MdePkg/Include/Ppi/BootInRecoveryMode.h
index ae40744d9b..71b0ca8586 100644
--- a/MdePkg/Include/Ppi/BootInRecoveryMode.h
+++ b/MdePkg/Include/Ppi/BootInRecoveryMode.h
@@ -1,10 +1,10 @@
 /** @file
   This PPI is installed by the platform PEIM to designate that a recovery boot
   is in progress.
 
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+  Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
   SPDX-License-Identifier: BSD-2-Clause-Patent
 
   @par Revision Reference:
   This PPI is introduced in PI Version 1.0.
 
@@ -19,6 +19,13 @@
   }
 
 
 extern EFI_GUID gEfiPeiBootInRecoveryModePpiGuid;
 
+#define EFI_PEI_BOOT_IN_CAPSULE_ON_DISK_MODE_PPI \
+  { \
+0xb08a11e4, 0xe2b7, 0x4b75, { 0xb5, 0x15, 0xaf, 0x61, 0x6, 0x68, 0xbf, 
0xd1 } \
+  }
+
+extern EFI_GUID gEfiPeiBootInCapsuleOnDiskModePpiGuid;
+
 #endif
diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
index 6c563375ee..ec02b8c7c7 100644
--- a/MdePkg/MdePkg.dec
+++ b/MdePkg/MdePkg.dec
@@ -790,10 +790,13 @@
   gEfiPeiMemoryDiscoveredPpiGuid = {0xf894643d, 0xc449, 0x42d1, {0x8e, 0xa8, 
0x85, 0xbd, 0xd8, 0xc6, 0x5b, 0xde } }
 
   ## Include/Ppi/BootInRecoveryMode.h
   gEfiPeiBootInRecoveryModePpiGuid = { 0x17ee496a, 0xd8e4, 0x4b9a, {0x94, 
0xd1, 0xce, 0x82, 0x72, 0x30, 0x8, 0x50 } }
 
+  ## Include/Ppi/BootInRecoveryMode.h
+  gEfiPeiBootInCapsuleOnDiskModePpiGuid = { 0xb08a11e4, 0xe2b7, 0x4b75, { 
0xb5, 0x15, 0xaf, 0x61, 0x6, 0x68, 0xbf, 0xd1 } }
+
   ## Include/Ppi/EndOfPeiPhase.h
   gEfiEndOfPeiSignalPpiGuid = {0x605EA650, 0xC65C, 0x42e1, {0xBA, 0x80, 0x91, 
0xA5, 0x2A, 0xB6, 0x18, 0xC6 } }
 
   ## Include/Ppi/Reset.h
   gEfiPeiResetPpiGuid = { 0xef398d58, 0x9dfd, 0x4103, {0xbf, 0x94, 0x78, 0xc6, 
0xf4, 0xfe, 0x71, 0x2f } }
-- 
2.16.2.windows.1


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

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



[edk2-devel][Patch 3/7] MdeModulePkg: Add CapsuleOnDiskLoadPei PEIM.

2019-05-28 Thread Xu, Wei6
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1852

This module provides PPI to load Capsule On Disk temp relocation file
from Root Directory file system, retrieve the capsules from the temp
file and create capsule hobs for these capsules.

Cc: Jian J Wang 
Cc: Hao A Wu 
Cc: Chao B Zhang 
Signed-off-by: Wei6 Xu 
---
 MdeModulePkg/MdeModulePkg.dsc  |   4 +
 .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c| 442 +
 .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf  |  64 +++
 .../CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni  |  15 +
 .../CapsuleOnDiskLoadPeiExtra.uni  |  14 +
 5 files changed, 539 insertions(+)
 create mode 100644 
MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c
 create mode 100644 
MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf
 create mode 100644 
MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.uni
 create mode 100644 
MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPeiExtra.uni

diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc
index 995fd805e1..615edddbcc 100644
--- a/MdeModulePkg/MdeModulePkg.dsc
+++ b/MdeModulePkg/MdeModulePkg.dsc
@@ -197,10 +197,13 @@
   gEfiMdePkgTokenSpaceGuid.PcdReportStatusCodePropertyMask|0x06
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizeNonPopulateCapsule|0x0
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxSizePopulateCapsule|0x0
   gEfiMdeModulePkgTokenSpaceGuid.PcdMaxPeiPerformanceLogEntries|28
 
+[PcdsDynamicExDefault]
+  gEfiMdeModulePkgTokenSpaceGuid.PcdRecoveryFileName|L"FVMAIN.FV"
+
 [Components]
   MdeModulePkg/Application/HelloWorld/HelloWorld.inf
   MdeModulePkg/Application/DumpDynPcd/DumpDynPcd.inf
   MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfo.inf
 
@@ -315,10 +318,11 @@
   
NULL|MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf
   }
   MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
   MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf
   MdeModulePkg/Universal/CapsulePei/CapsulePei.inf
+  MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.inf
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
   MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
   MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
   MdeModulePkg/Universal/Console/GraphicsOutputDxe/GraphicsOutputDxe.inf
diff --git a/MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c 
b/MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c
new file mode 100644
index 00..07233aef28
--- /dev/null
+++ b/MdeModulePkg/Universal/CapsuleOnDiskLoadPei/CapsuleOnDiskLoadPei.c
@@ -0,0 +1,442 @@
+/** @file
+  Recovery module.
+
+  Caution: This module requires additional review when modified.
+  This module will have external input - Capsule-on-Disk Temp Relocation image.
+  This external input must be validated carefully to avoid security issue like
+  buffer overflow, integer overflow.
+
+  RetrieveRelocatedCapsule() will receive untrusted input and do basic 
validation.
+
+  Copyright (c) 2019, Intel Corporation. All rights reserved.
+  SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+//
+// The package level header files this module uses
+//
+#include 
+#include 
+
+//
+// The protocols, PPI and GUID defintions for this module
+//
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+//
+// The Library classes this module consumes
+//
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+/**
+  Loads a DXE capsule from some media into memory and updates the HOB table
+  with the DXE firmware volume information.
+
+  @param[in]  PeiServices   General-purpose services that are available to 
every PEIM.
+  @param[in]  This  Indicates the EFI_PEI_RECOVERY_MODULE_PPI instance.
+
+  @retval EFI_SUCCESSThe capsule was loaded correctly.
+  @retval EFI_DEVICE_ERROR   A device error occurred.
+  @retval EFI_NOT_FOUND  A recovery DXE capsule cannot be found.
+
+**/
+EFI_STATUS
+EFIAPI
+LoadCapsuleOnDisk (
+  IN EFI_PEI_SERVICES  **PeiServices,
+  IN EFI_PEI_CAPSULE_ON_DISK_PPI   *This
+  );
+
+EFI_PEI_CAPSULE_ON_DISK_PPI mCapsuleOnDiskPpi = {
+  LoadCapsuleOnDisk
+};
+
+EFI_PEI_PPI_DESCRIPTOR mCapsuleOnDiskPpiList = {
+  (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST),
+  ,
+  
+};
+
+/**
+  Determine if capsule comes from memory by checking Capsule PPI.
+
+  @param[in]  PeiServices General purpose services available to every PEIM.
+
+  @retval TRUE   Capsule comes from memory.
+  @retval FALSE  No capsule comes from memory.
+
+**/
+STATIC
+BOOLEAN
+CheckCapsuleFromRam (
+  IN CONST EFI_PEI_SERVICES  **PeiServices
+  )
+{
+  EFI_STATUS  Status;
+  

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

2019-05-28 Thread Michael D Kinney
Could this tools be ported to Python using the python
struct module to access C structures?

The implementation may be much simpler if python was
used for command line parsing.  And this capability 
could also be provided as a python module to support
direct access from pre/post build steps implemented in
python.

Thanks,

Mike

> -Original Message-
> From: devel@edk2.groups.io
> [mailto:devel@edk2.groups.io] On Behalf Of Zhang,
> Shenglei
> Sent: Monday, May 27, 2019 6:32 PM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [PATCH] BaseTools/GenBiosId: Add
> a new tool GenBiosId
> 
> 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
> +  )
> +/*++
> 

Linux Kernel soft hangs if 8259 PIC is not configured by BIOS: was (RE: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules)

2019-05-28 Thread Kirkendall, Garrett
Since this change will be removing the 8259 PIC driver, I'll mention a quirk I 
ran into in the Linux Kernel up through at least 5.0 (and I am sure later, I 
just didn't verify):

Does anyone have pull in the Linux Kernel world to get them to take this 
seriously?  Hopefully someday soon end users will let legacy devices, like the 
PIC, die a long overdue and graceful death.

I sent the following to the responsible Linux Kernel developers and quickly got 
back a "working as designed" response:

*
I am trying to boot a UEFI BIOS with minimal legacy hardware support.  The 
Linux kernel soft hangs when the PIC is not configured by the BIOS because it 
is using IOAPIC.  Hopefully, this provides enough information.

Observed under Ubuntu Server Linux 18.04 LTS with kernel 4.15.0, and with 
kernel compiled from source tag v5.0

Where it hangs:
Soft hang occurs in calibrate_APIC_clock(): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L805
specific location of soft hang waiting for interrupts: 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L854


How it gets to the hang:
If 8259A PIC is not configured before kernel is launched, HPET IRQ 0 
registration fails because probe_8259A returns PIC as not available and 
therefore interrupt descriptors 0-15 are not allocated.  This happens when BIOS 
does not configure 8259A PIC because it uses IOAPIC.

This sequence prevents allocating interrupts 0-15 unless PIC is configured 
before kernel starts.  legacy_pic.init = init_8259A is not called before 
early_irq_init():
  early_irq_init(): https://github.com/torvalds/linux/blob/v5.0/init/main.c#L642
initcnt = arch_probe_nr_irqs(): 
https://github.com/torvalds/linux/blob/v5.0/kernel/irq/irqdesc.c#L512
  return legacy_pic->probe(): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/vector.c#L656
default_legacy_pic.probe: 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/i8259.c#L418
  probe_8259A(): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/i8259.c#L301
interrupt 0-15 descriptors not allocated and prevents IOAPIC interrupts 
0-15:  https://github.com/torvalds/linux/blob/v5.0/kernel/irq/irqdesc.c#L525

In this call is where init_8259A is called and PIC is initialized.  However, 
interrupt descriptors for 0-15 were not allocated in early_irq_init() sequence, 
so descriptors are not available later.
  init_IRQ() : https://github.com/torvalds/linux/blob/v5.0/init/main.c#L643

This sequence tries to register the HPET to irq0, but irq0 descriptor is not 
allocated by early_irq_init() sequence:
  late_time_init(): https://github.com/torvalds/linux/blob/v5.0/init/main.c#L703
late_time_init = x86_late_time_init: 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L107
  x86_init.timers.timer_init(): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L92
x86_init.timers.timer_init = hpet_time_init: 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/x86_init.c#L75
  setup_default_timer_irq(): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L83
if (setup_irq(0, )): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/time.c#L78

This gets called at some point after the above sequences, I couldn't track it 
all the way back to main.c easily:
  x86_init.timers.setup_percpu_clockev = setup_boot_APIC_clock: 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/x86_init.c#L74
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L961
  *** soft hang in calibrate_APIC_clock(): 
https://github.com/torvalds/linux/blob/v5.0/arch/x86/kernel/apic/apic.c#L854

*

GARRETT KIRKENDALL
SMTS Firmware Engineer | CTE
7171 Southwest Parkway, Austin, TX 78735 USA 
AMD   facebook  |  amd.com

-Original Message-
From: devel@edk2.groups.io  On Behalf Of Wu, Hao A via 
Groups.Io
Sent: Monday, May 27, 2019 1:37 AM
To: devel@edk2.groups.io
Cc: Hao A Wu ; Ray Ni ; Andrew Fish 
; Laszlo Ersek ; Leif Lindholm 
; Michael D Kinney 
Subject: [edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework 
modules

[CAUTION: External Email]

'''
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


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

2019-05-28 Thread Leif Lindholm
Hi Ard,

Many thanks for this.

Two comments:
- First, just the note I made on the -std=c99 patch - we're diverging
  behaviour between CLANG and modern GCC. I don't think we're really
  promoting use of c11 features anyway, but it could be worth
  considering adding an explicit flag to GCC5 as well, to lock them in
  step. This is in no way a gating issue.
- The patent grant concern I raised in my recent email. This is
  gating, but I'm hoping we can have a conclusion by tomorrow. All I
  want is explicit consensus. The fact that the library is only used
  on ARM mitigates the situation substantially.

For the series (pending patent grant consensus):
Reviewed-by: Leif Lindholm 

/
Leif

On Mon, May 27, 2019 at 10:51:34PM +0200, 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)
> 
> 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   
>

[edk2-devel] contribution of code licensed other than bsd+patent

2019-05-28 Thread Leif Lindholm
Hi stewards, and other interested people.

Readme.md lists a few licenses acceptable but not preferred (this text
used to live in Contributions.txt before the bsd+patent relicensing
effort). However, it does not explicitly state anything about the gap
that was left by the dropping of the TianoCore contribution agreement:
the explicit patent grant given by bsd+patent and TianoCore
contribution agreement.

As we have what I think is the first bit of code about to go in with a
non-bsd+patent license (the new ArmSoftFloat library), is this
something we need to worry about?

If nothing else, I think we should form an official opinion and add it
to Readme.md.

Best Regards,

Leif

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

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



[edk2-devel] [FdfSpecification Patch] FDF spec: Fix the issue in Rule section for RAW Type File

2019-05-28 Thread Liming Gao
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1765

FV File Statement clarifies RAW File type with file name only.
But, FFS Rule section doesn't support this syntax. This is an issue
in FDF spec. Per PI spec, RAW File has no section. It directly includes
file data. So, FFS Rule section should support this usage.

Signed-off-by: Liming Gao 
---
 3_edk_ii_fdf_file_format/39_[rule]_sections.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/3_edk_ii_fdf_file_format/39_[rule]_sections.md 
b/3_edk_ii_fdf_file_format/39_[rule]_sections.md
index 34e767f..d5ec895 100644
--- a/3_edk_ii_fdf_file_format/39_[rule]_sections.md
+++ b/3_edk_ii_fdf_file_format/39_[rule]_sections.md
@@ -125,7 +125,8 @@ Conditional statements may be used anywhere within this 
section.
   ::= ["Fixed" ] ["Checksum" ]
 []
   ::= "Align"   
-  ::= {} {} {}
+  ::= {} {} {} {}
+  ::= "{"  "}"
 ::=  []  
::= {"COMPAT16"} {"PE32"} {"PIC"} {"TE"}
 {"FV_IMAGE"} {"RAW"} {"DXE_DEPEX"} {"UI"}
-- 
2.13.0.windows.1


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

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



[edk2-devel] OVMF and SMBIOS

2019-05-28 Thread Tomas Pilar (tpilar)
Hi,

I am trying to create kvm instance using libvirt and Qemu and OVMF that also 
has SMBIOS included. My current version of Qemu only supports type 0 and type 1 
SMBIOS tables so I specify those. However, when I use smbiosview in the UEFI 
shell, I get back "SMBIOS not found".

I attach my current libvirt xml specification for the kvm host.

Does anyone have any immediate ideas?

Cheers,
Tom

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

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


  Qemu Test
  f6433268-9cc0-4aee-848f-819c27ff3b62
  2097152
  2097152
  2
  
/machine
  
  
hvm

/tmp/ovmf-test/OVMF_CODE.fd
/tmp/ovmf-test/OVMF_VARS2.fd

  
  

  Sfc Qemu


  Qemu
  Virt-Manager
  0.9.4
  f6433268-9cc0-4aee-848f-819c27ff3b62

  
  


  
  



  
  preserve
  restart
  preserve
  


  
  
/usr/libexec/qemu-kvm

  


  
[ADDRESS]
  


  
  
  


  
  
  


  


  


  
  


  
  
  


  /dev/urandom
  
  

  



Re: [edk2-devel] [PATCH] BaseTools:Extend the binary cache to support library cache

2019-05-28 Thread Christian Rodriguez
Hi Steven,

After testing the bug reported, it seems that the dependency problem isn't the 
root cause. We don't need to change the way it skips having to rebuild 
libraries. The cache is missing the library build artifacts as you mentioned 
before and this is the root cause of the rebuild failure. This patch should fix 
that, but you can simplify it by not adding a new tracking system and keeping 
the dependency reduction as before. That will save the performance because it 
doesn't have to do extra checking.

Please see attached patch for minimal change needed.

Thanks,
Christian

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Steven Shi
>Sent: Tuesday, May 28, 2019 1:52 AM
>To: devel@edk2.groups.io
>Cc: Gao, Liming ; Feng, Bob C
>; Rodriguez, Christian
>; Fan, ZhijuX 
>Subject: [edk2-devel] [PATCH] BaseTools:Extend the binary cache to support
>library cache
>
>https://bugzilla.tianocore.org/show_bug.cgi?id=1797
>
>Current binary cache doesn't support to save and restore
>the library module. If a driver module cache miss happen,
>all its dependency library modules need rebuild which
>is very time-consuming. This patch is to entend the binary
>cache to support library.
>
>Cc: Liming Gao 
>Cc: Bob Feng 
>Cc: Christian Rodriguez 
>Signed-off-by: Steven Shi 
>---
> BaseTools/Source/Python/AutoGen/AutoGen.py | 17 ++---
> BaseTools/Source/Python/build/build.py |  3 ++-
> 2 files changed, 16 insertions(+), 4 deletions(-)
>
>diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py
>b/BaseTools/Source/Python/AutoGen/AutoGen.py
>index a5bef4f7c6..aeb63f52c5 100644
>--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
>+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
>@@ -2578,7 +2578,7 @@ class ModuleAutoGen(AutoGen):
> self.AutoGenDepSet = set()
> self.ReferenceModules = []
> self.ConstPcd  = {}
>-
>+self.CacheRestored = False
>
> def __repr__(self):
> return "%s [%s]" % (self.MetaFile, self.Arch)
>@@ -3906,6 +3906,12 @@ class ModuleAutoGen(AutoGen):
> ModuleFile = path.join(self.OutputDir, self.Name + '.inf')
> if os.path.exists(ModuleFile):
> shutil.copy2(ModuleFile, FileDir)
>+else:
>+OutputDir = self.OutputDir.replace('\\', '/').strip('/')
>+DebugDir = self.DebugDir.replace('\\', '/').strip('/')
>+for Item in self.CodaTargetList:
>+File = Item.Target.Path.replace('\\', 
>'/').strip('/').replace(DebugDir,
>'').replace(OutputDir, '').strip('/')
>+self.OutputFile.add(File)
> if not self.OutputFile:
> Ma = self.BuildDatabase[self.MetaFile, self.Arch, 
> self.BuildTarget,
>self.ToolChain]
> self.OutputFile = Ma.Binaries
>@@ -3949,6 +3955,7 @@ class ModuleAutoGen(AutoGen):
> destination_dir = 
> os.path.dirname(destination_file)
> CreateDirectory(destination_dir)
> shutil.copy2(File, destination_dir)
>+self.CacheRestored = True
> if self.Name == "PcdPeim" or self.Name == "PcdDxe":
> CreatePcdDatabaseCode(self, TemplateString(),
>TemplateString())
> return True
>@@ -3987,7 +3994,9 @@ class ModuleAutoGen(AutoGen):
> self.GenFfsList = GenFfsList
> if not self.IsLibrary and CreateLibraryMakeFile:
> for LibraryAutoGen in self.LibraryAutoGenList:
>-LibraryAutoGen.CreateMakeFile()
>+# Only create makefile for libraries which have not been 
>restored
>+if not LibraryAutoGen.CacheRestored:
>+LibraryAutoGen.CreateMakeFile()
>
> if self.CanSkip():
> return
>@@ -4030,7 +4039,9 @@ class ModuleAutoGen(AutoGen):
>
> if not self.IsLibrary and CreateLibraryCodeFile:
> for LibraryAutoGen in self.LibraryAutoGenList:
>-LibraryAutoGen.CreateCodeFile()
>+# Only create autogen code for libraries which have not been
>restored
>+if not LibraryAutoGen.CacheRestored:
>+LibraryAutoGen.CreateCodeFile()
>
> if self.CanSkip():
> return
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 80ceb98310..f1f4c07980 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -341,7 +341,8 @@ class ModuleMakeUnit(BuildUnit):
> #   @param  Target  The build target name, one of gSupportedTarget
> #
> def __init__(self, Obj, Target):
>-Dependency = [ModuleMakeUnit(La, Target) for La in
>Obj.LibraryAutoGenList]
>+# Skip the dependency modules which are already restored from cache
>+Dependency = [ModuleMakeUnit(La, Target) for La in

Re: [edk2-devel] [PATCH] BaseTools:Fix the library dependency missing in Binary Cache

2019-05-28 Thread Christian Rodriguez
Hi Steven,

The problem isn't that the library dependency is missing. We are missing 
library artifacts and therefore cannot build the library. This can be fixed 
with a snippet of your next patch that adds the libraries artifacts, but 
without the extra tracking information.

Thanks,
Christian

>-Original Message-
>From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
>Steven Shi
>Sent: Tuesday, May 28, 2019 1:14 AM
>To: devel@edk2.groups.io
>Cc: Gao, Liming ; Feng, Bob C
>; Rodriguez, Christian
>
>Subject: [edk2-devel] [PATCH] BaseTools:Fix the library dependency missing
>in Binary Cache
>
>BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1788
>
>The library dependency of a module is wrongly filtered out by binary cache
>implementation which cause all dependent libraries will not been built prior to
>the module in the build scheduler and the module build fails if cache miss
>happen.
>
>Cc: Liming Gao 
>Cc: Bob Feng 
>Cc: Christian Rodriguez 
>Signed-off-by: Steven Shi 
>---
> BaseTools/Source/Python/build/build.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/BaseTools/Source/Python/build/build.py
>b/BaseTools/Source/Python/build/build.py
>index 80ceb98310..673a9379ba 100644
>--- a/BaseTools/Source/Python/build/build.py
>+++ b/BaseTools/Source/Python/build/build.py
>@@ -593,7 +593,7 @@ class BuildTask:
> #
> def AddDependency(self, Dependency):
> for Dep in Dependency:
>-if not Dep.BuildObject.IsBinaryModule and not
>Dep.BuildObject.CanSkipbyHash():
>+if not Dep.BuildObject.IsBinaryModule:
> self.DependencyList.append(BuildTask.New(Dep))# BuildTask 
> list
>
> ## The thread wrapper of LaunchCommand function
>--
>2.17.1.windows.2
>
>
>


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

View/Reply Online (#41512): https://edk2.groups.io/g/devel/message/41512
Mute This Topic: https://groups.io/mt/31819545/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 Package DSC for Network module movement

2019-05-28 Thread Guo Dong


Reviewed-by: Guo Dong 


> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Liming Gao
> Sent: Tuesday, May 28, 2019 4:42 AM
> To: devel@edk2.groups.io
> Subject: [edk2-devel] [Patch 0/3] Update Package DSC for Network module
> movement
> 
> Network modules have been moved to NetworkPkg. Some package dsc files
> are required to be updated.
> 
> 1. Remove unused NetLib
> 2. Update Package DSC to refer to NetworkLibs.dsc.inc
> 
> Liming Gao (3):
>   UefiPayloadPkg: Update Package DSC files to refer to
> NetworkLibs.dsc.inc
>   ArmPkg: Update Package DSC to remove unused NetLib
>   SignedCapsulePkg: Update Package DSC to remove unused network libs
> 
>  ArmPkg/ArmPkg.dsc| 1 -
>  SignedCapsulePkg/SignedCapsulePkg.dsc| 5 -
>  UefiPayloadPkg/UefiPayloadPkgIa32.dsc| 2 +-
>  UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 2 +-
>  4 files changed, 2 insertions(+), 8 deletions(-)
> 
> --
> 2.13.0.windows.1
> 
> 
> 


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

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



[edk2-devel] Upcoming Event: TianoCore Design / Bug Triage - EMEA - Wed, 05/29/2019 8:00am-9:00am #cal-reminder

2019-05-28 Thread devel@edk2.groups.io Calendar
*Reminder:* TianoCore Design / Bug Triage - EMEA

*When:* Wednesday, 29 May 2019, 8:00am to 9:00am, (GMT-07:00) America/Los 
Angeles

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

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

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

*Description:*

Join Zoom Meeting

https://zoom.us/j/695893389

One tap mobile

+17207072699,,695893389# US

+16465588656,,695893389# US (New York)

Dial by your location

+1 720 707 2699 US

+1 646 558 8656 US (New York)

Meeting ID: 695 893 389

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

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

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



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

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 13:39, Laszlo Ersek  wrote:
>
> On 05/27/19 22:51, 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)
>
> Before I forget: thank you, Ard, for solving this problem on such short
> notice!
>

Don't mention it - it was about time someone cleaned up that code :-)

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

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



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

2019-05-28 Thread Leif Lindholm
On Tue, May 28, 2019 at 01:28:21PM +0200, Ard Biesheuvel wrote:
> > > diff --git 
> > > a/ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
> > >  
> > > b/ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
> > > index 18ed054d4f4d..2a750e4f540e 100644
> > > --- 
> > > a/ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
> > > +++ 
> > > b/ArmPkg/Library/ArmSoftFloatLib/SoftFloat-3e/build/Linux-ARM-VFPv2-GCC/platform.h
> > > @@ -1,5 +1,6 @@
> > >
> > >  
> > > /*
> > > +SPDX-License-Identifier: BSD-3-Clause
> > >
> > >  This C header file is part of the SoftFloat IEEE Floating-Point 
> > > Arithmetic
> > >  Package, Release 3e, by John R. Hauser.
> >
> > We generally replace the original license text with the SPDX identifier.
> > But, I guess we can do that later here.
> 
> No, we can't. The license does not actuall permit that ...

I agree.

The named entity in the non-endorsement clause of BSD-3 means it
*cannot* be replaced by SPDX identifier.

Only a project that used the text in
https://spdx.org/licenses/BSD-3-Clause.html verbatim could.

/
Leif

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

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



Re: [edk2-devel] [EXT] Re: [[edk2-platforms][PATCH V2] 27/30] Silicon/Marvell: Replace BSD License with BSD+Patent License

2019-05-28 Thread Nadav Haklai
Marvell approves this change.

Thanks,
Nadav

-Original Message-
From: Marcin Wojtas  
Sent: Tuesday, May 28, 2019 1:23 PM
To: Leif Lindholm ; Nadav Haklai 
Cc: Michael D Kinney ; edk2-devel-groups-io 
; Ard Biesheuvel 
Subject: [EXT] Re: [[edk2-platforms][PATCH V2] 27/30] Silicon/Marvell: Replace 
BSD License with BSD+Patent License

External Email

--
Adding Nadav Haklai from Marvell.

wt., 28 maj 2019 o 11:50 Leif Lindholm  napisał(a):
>
> On Fri, May 17, 2019 at 11:50:06AM +0100, Leif Lindholm wrote:
> > On Wed, May 15, 2019 at 04:10:08PM -0700, Michael D Kinney wrote:
> > > https://bugzilla.tianocore.org/show_bug.cgi?id=1373
> > >
> > > Replace BSD 2-Clause License with BSD+Patent License.  This change 
> > > is based on the following emails:
> > >
> > >   https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
> > >   
> > > https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
> > >
> > > RFCs with detailed process for the license change:
> > >
> > >   V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
> > >   V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
> > >   V1: 
> > > https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
> >
> > As far as I can tell, this excludes the source files currently 
> > licensed under 3-clause BSD (2-clause plus non-endorsement clause).
> > This is correct, and as discussed offline, but it would be worth 
> > pointing it out explicitly in the commit message.
> >
> > (Conversations about relicensing the 3-clause files are happening in 
> > the background.)
>
> Marcin, can you confirm the outcome of that discussion (for all 
> Marvell 3-clause BSD source files in the tree, not just the ones 
> affected by this specific patch)?
>

I confirm. Nadav, can you please also let know if you approve?

Best regards,
Marcin

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

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



Re: [edk2-devel] [PATCH] Maintainers.txt: update mailing list information

2019-05-28 Thread Laszlo Ersek
On 05/28/19 12:22, Leif Lindholm wrote:
> The devel mailing list has moved from 01.org to groups.io - update
> the mailing list information to reflect this.
> 
> Signed-off-by: Leif Lindholm 
> ---
>  Maintainers.txt | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Maintainers.txt b/Maintainers.txt
> index aaabe2b52d..f3ce5edd8a 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -40,7 +40,7 @@ Descriptions of section entries:
>  EDK II
>  --
>  W: http://www.tianocore.org/edk2/
> -L: https://lists.01.org/mailman/listinfo/edk2-devel
> +L: https://edk2.groups.io/g/devel/
>  T: git - https://github.com/tianocore/edk2.git
>  T: git (mirror) - https://bitbucket.org/tianocore/edk2.git
>  T: svn (read-only, deprecated) - 
> https://svn.code.sf.net/p/edk2/code/trunk/edk2
> 

Reviewed-by: Laszlo Ersek 

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

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



Re: [edk2-devel] [PATCH v2 00/10] Duplicate required CSM components for OVMF

2019-05-28 Thread Laszlo Ersek
On 05/27/19 05:03, Wu, Hao A wrote:
> '''
> Please note that this series will be hold until the edk2-stable201905 is
> created.
> '''
> 
> The series is also available at:
> https://github.com/hwu25/edk2/tree/ovmf_csm_v2
> 
> V2 changes:
> 
> Discussion with David Woodhouse for him to take the reviewer role for the
> duplicated CSM components under OvmfPkg:
> https://edk2.groups.io/g/devel/topic/31682287#40996
> 
> The (new) first patch will update the Maintainers.txt to reflect such
> role.

As noted earlier, I plan to review this series once David is happy with
it (in particular, with the first patch).

And, the following patch sets all depend on this one, directly or
indirectly:

[edk2-devel] [PATCH v1 0/6] Ovmf: Drop IntelFramework[Module]Pkg dependency
[edk2-devel] [RFC][PATCH v1 0/1] PcAtChipsetPkg: Remove framework modules
[edk2-devel] [RFC][PATCH v1 0/3] Remove IntelFramework[Module]Pkg

Of those, I plan to review at least the OvmfPkg one, once the
dependencies are all in place. Please ping me, should I forget.

(Yesterday I made an effort to set up the inter-BZ deps as well.)

Thanks,
Laszlo

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

View/Reply Online (#41505): https://edk2.groups.io/g/devel/message/41505
Mute This Topic: https://groups.io/mt/31805475/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 Package DSC for Network module movement

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 13:42, Liming Gao  wrote:
>
> Network modules have been moved to NetworkPkg. Some package dsc files
> are required to be updated.
>
> 1. Remove unused NetLib
> 2. Update Package DSC to refer to NetworkLibs.dsc.inc
>
> Liming Gao (3):
>   UefiPayloadPkg: Update Package DSC files to refer to
> NetworkLibs.dsc.inc
>   ArmPkg: Update Package DSC to remove unused NetLib
>   SignedCapsulePkg: Update Package DSC to remove unused network libs
>
>  ArmPkg/ArmPkg.dsc| 1 -
>  SignedCapsulePkg/SignedCapsulePkg.dsc| 5 -
>  UefiPayloadPkg/UefiPayloadPkgIa32.dsc| 2 +-
>  UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 2 +-
>  4 files changed, 2 insertions(+), 8 deletions(-)
>

OK, I see you already spotted the other ones

For the series,

Reviewed-by: Ard Biesheuvel 

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

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



Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF to refer to NetworkPkg

2019-05-28 Thread Liming Gao
Ard:
> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Tuesday, May 28, 2019 7:12 PM
> To: Gao, Liming 
> Cc: edk2-devel-groups-io ; Kinney, Michael D 
> ; Laszlo Ersek ;
> Leif Lindholm 
> Subject: Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF 
> to refer to NetworkPkg
> 
> On Tue, 28 May 2019 at 13:03, Gao, Liming  wrote:
> >
> > > -Original Message-
> > > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > > Sent: Tuesday, May 28, 2019 6:06 PM
> > > To: edk2-devel-groups-io ; Gao, Liming 
> > > ; Kinney, Michael D
> > > ; Laszlo Ersek ; Leif 
> > > Lindholm 
> > > Subject: Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform 
> > > DSC/FDF to refer to NetworkPkg
> > >
> > > On Tue, 28 May 2019 at 12:00, Liming Gao  wrote:
> > > >
> > > > 1. Remove unnecessary Network libs, because NetworkPkg segment DSC/FDF 
> > > > have included them.
> > > > 2. Update Update RPi3 DSC/FDF to refer to Network package segment files
> > > >
> > > > These changes are required, because Network modules have been moved 
> > > > into NetworkPkg.
> > > >
> > >
> > > Am I understanding correctly that all platforms below are now broken
> > > due to the NetworkPkg changes?
> > >
> > Right. Before the change, I send the patch to update platform DSC/FDF to 
> > refer to Network segment files,
> > these platform DSC/FDF should not be impacted by Network module movement.
> >
> > After push Network module movement, I find I miss some cases in platform 
> > DSC/FDF.
> > So, I send this patch set to clean up the remaining issues. Sorry for the 
> > platform break.
> >
> 
> Core edk2 is broken as well:
> 
> https://ci.linaro.org/job/leg-virt-tianocore-edk2-upstream/3562/console

Thanks for your note. I scan DSC/FDF again in edk2, and find three missing 
cases. 
The patches have been sent for review. 


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

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



Re: [edk2-devel] [Patch 2/3] ArmPkg: Update Package DSC to remove unused NetLib

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 13:42, Liming Gao  wrote:
>
> Signed-off-by: Liming Gao 
> Cc: Leif Lindholm 
> Cc: Ard Biesheuvel 

Thanks Liming

Reviewed-by: Ard Biesheuvel 

I spotted these as well, in case you weren't aware:

SignedCapsulePkg/SignedCapsulePkg.dsc:
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
UefiPayloadPkg/UefiPayloadPkgIa32.dsc:
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc:
NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf


> ---
>  ArmPkg/ArmPkg.dsc | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
> index 25c6ccaeb6..5f090d3087 100644
> --- a/ArmPkg/ArmPkg.dsc
> +++ b/ArmPkg/ArmPkg.dsc
> @@ -47,7 +47,6 @@
>PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
>
> PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
>
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
>
> UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
>HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
>
> --
> 2.13.0.windows.1
>

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

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



[edk2-devel] [Patch 0/3] Update Package DSC for Network module movement

2019-05-28 Thread Liming Gao
Network modules have been moved to NetworkPkg. Some package dsc files 
are required to be updated.

1. Remove unused NetLib
2. Update Package DSC to refer to NetworkLibs.dsc.inc

Liming Gao (3):
  UefiPayloadPkg: Update Package DSC files to refer to
NetworkLibs.dsc.inc
  ArmPkg: Update Package DSC to remove unused NetLib
  SignedCapsulePkg: Update Package DSC to remove unused network libs

 ArmPkg/ArmPkg.dsc| 1 -
 SignedCapsulePkg/SignedCapsulePkg.dsc| 5 -
 UefiPayloadPkg/UefiPayloadPkgIa32.dsc| 2 +-
 UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 2 +-
 4 files changed, 2 insertions(+), 8 deletions(-)

-- 
2.13.0.windows.1


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

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



[edk2-devel] [Patch 2/3] ArmPkg: Update Package DSC to remove unused NetLib

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Leif Lindholm 
Cc: Ard Biesheuvel 
---
 ArmPkg/ArmPkg.dsc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/ArmPkg/ArmPkg.dsc b/ArmPkg/ArmPkg.dsc
index 25c6ccaeb6..5f090d3087 100644
--- a/ArmPkg/ArmPkg.dsc
+++ b/ArmPkg/ArmPkg.dsc
@@ -47,7 +47,6 @@
   PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf
   
PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeCoffGetEntryPointLib.inf
 
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
   
UefiHiiServicesLib|MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf
   HiiLib|MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf
 
-- 
2.13.0.windows.1


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

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



[edk2-devel] [Patch 3/3] SignedCapsulePkg: Update Package DSC to remove unused network libs

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Jiewen Yao 
Cc: Chao Zhang 
---
 SignedCapsulePkg/SignedCapsulePkg.dsc | 5 -
 1 file changed, 5 deletions(-)

diff --git a/SignedCapsulePkg/SignedCapsulePkg.dsc 
b/SignedCapsulePkg/SignedCapsulePkg.dsc
index 0da445503b..4d4232d6e0 100644
--- a/SignedCapsulePkg/SignedCapsulePkg.dsc
+++ b/SignedCapsulePkg/SignedCapsulePkg.dsc
@@ -61,11 +61,6 @@
   #
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  TcpIoLib|MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
   TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf
   SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf
-- 
2.13.0.windows.1


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

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



[edk2-devel] [Patch 1/3] UefiPayloadPkg: Update Package DSC files to refer to NetworkLibs.dsc.inc

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Guo Dong 
---
 UefiPayloadPkg/UefiPayloadPkgIa32.dsc| 2 +-
 UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc 
b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
index 13983d0895..5b6ed36e9c 100644
--- a/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkgIa32.dsc
@@ -516,7 +516,7 @@
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
+  !include NetworkPkg/NetworkLibs.dsc.inc
 
 [Components.IA32]
   ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
diff --git a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc 
b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
index dc38d6528e..d57b5241dc 100644
--- a/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
+++ b/UefiPayloadPkg/UefiPayloadPkgIa32X64.dsc
@@ -517,7 +517,7 @@
   DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf
   FileHandleLib|MdePkg/Library/UefiFileHandleLib/UefiFileHandleLib.inf
   ShellLib|ShellPkg/Library/UefiShellLib/UefiShellLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
+  !include NetworkPkg/NetworkLibs.dsc.inc
 
 [Components.X64]
   ShellPkg/DynamicCommand/TftpDynamicCommand/TftpDynamicCommand.inf {
-- 
2.13.0.windows.1


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

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



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

2019-05-28 Thread Laszlo Ersek
On 05/27/19 22:51, 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)

Before I forget: thank you, Ard, for solving this problem on such short
notice!

Laszlo

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

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



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

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 13:27, Laszlo Ersek  wrote:
>
> On 05/27/19 22:51, Ard Biesheuvel wrote:
> > 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 +
> >  

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

2019-05-28 Thread Laszlo Ersek
On 05/27/19 22:51, 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)
> 
> 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.

I've filed  about this
issue now.

Thanks
Laszlo

> 
> 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 +
>  

Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF to refer to NetworkPkg

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 13:03, Gao, Liming  wrote:
>
> > -Original Message-
> > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > Sent: Tuesday, May 28, 2019 6:06 PM
> > To: edk2-devel-groups-io ; Gao, Liming 
> > ; Kinney, Michael D
> > ; Laszlo Ersek ; Leif 
> > Lindholm 
> > Subject: Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform 
> > DSC/FDF to refer to NetworkPkg
> >
> > On Tue, 28 May 2019 at 12:00, Liming Gao  wrote:
> > >
> > > 1. Remove unnecessary Network libs, because NetworkPkg segment DSC/FDF 
> > > have included them.
> > > 2. Update Update RPi3 DSC/FDF to refer to Network package segment files
> > >
> > > These changes are required, because Network modules have been moved into 
> > > NetworkPkg.
> > >
> >
> > Am I understanding correctly that all platforms below are now broken
> > due to the NetworkPkg changes?
> >
> Right. Before the change, I send the patch to update platform DSC/FDF to 
> refer to Network segment files,
> these platform DSC/FDF should not be impacted by Network module movement.
>
> After push Network module movement, I find I miss some cases in platform 
> DSC/FDF.
> So, I send this patch set to clean up the remaining issues. Sorry for the 
> platform break.
>

Core edk2 is broken as well:

https://ci.linaro.org/job/leg-virt-tianocore-edk2-upstream/3562/console

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

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



Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF to refer to NetworkPkg

2019-05-28 Thread Liming Gao
> -Original Message-
> From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> Sent: Tuesday, May 28, 2019 6:06 PM
> To: edk2-devel-groups-io ; Gao, Liming 
> ; Kinney, Michael D
> ; Laszlo Ersek ; Leif Lindholm 
> 
> Subject: Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF 
> to refer to NetworkPkg
> 
> On Tue, 28 May 2019 at 12:00, Liming Gao  wrote:
> >
> > 1. Remove unnecessary Network libs, because NetworkPkg segment DSC/FDF have 
> > included them.
> > 2. Update Update RPi3 DSC/FDF to refer to Network package segment files
> >
> > These changes are required, because Network modules have been moved into 
> > NetworkPkg.
> >
> 
> Am I understanding correctly that all platforms below are now broken
> due to the NetworkPkg changes?
> 
Right. Before the change, I send the patch to update platform DSC/FDF to refer 
to Network segment files, 
these platform DSC/FDF should not be impacted by Network module movement. 

After push Network module movement, I find I miss some cases in platform 
DSC/FDF.
So, I send this patch set to clean up the remaining issues. Sorry for the 
platform break. 

> 
> > Liming Gao (7):
> >   BeagleBoardPkg: Update BeagleBoardPkg.dsc to remove unnecessary
> > Network libs
> >   RDKQemu: Update RDKQemu.dsc to remove unnecessary Network libs
> >   Hisilicon: Update D06.dsc to remove unnecessary Network libs
> >   QuarkPlatform: Update Quark dsc to remove unnecessary Network libs
> >   Vlv2TbltDevicePkg: Update Platform dsc to remove unnecessary Network
> > libs
> >   RaspberryPi: Update RPi3 DSC/FDF to refer to Network package segment
> > files
> >   SoftIron: Update Overdrive1000Board.dsc to refer to new Network module
> > path
> >
> >  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc  |  2 +-
> >  Platform/Comcast/RDKQemu/RDKQemu.dsc|  5 +
> >  Platform/Hisilicon/D06/D06.dsc  |  5 -
> >  Platform/Intel/QuarkPlatformPkg/Quark.dsc   |  4 
> >  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc|  4 
> >  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc  |  2 --
> >  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc|  4 
> >  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc |  2 --
> >  Platform/RaspberryPi/RPi3/RPi3.dsc  | 30 
> > ++
> >  Platform/RaspberryPi/RPi3/RPi3.fdf  | 11 
> > +--
> >  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  2 +-
> >  11 files changed, 18 insertions(+), 53 deletions(-)
> >
> > --
> > 2.13.0.windows.1
> >
> >
> > 
> >

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

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



Re: [edk2-devel] [PATCH edk2-platforms 3/3] Maintainers.txt: add reviewer for Marvell platforms

2019-05-28 Thread Marcin Wojtas
Hi Leif,

wt., 28 maj 2019 o 12:20 Leif Lindholm  napisał(a):
>
> Marcin is the author of the majority of the Marvell platform support in
> the tree, so clarify that he should be cc:d on patches to Marvell Armada
> SoC/Boards and MacchiatoBIN.
>
> Cc: Marcin Wojtas 
> Signed-off-by: Leif Lindholm 
> ---
>  Maintainers.txt | 9 +
>  1 file changed, 9 insertions(+)
>
> diff --git a/Maintainers.txt b/Maintainers.txt
> index 778eec6fed..54c98e3b22 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -86,6 +86,12 @@ M: Shifei A Lu 
>  M: Xiaohu Zhou 
>  M: Isaac W Oram 
>
> +Platform/Marvell
> +R: Marcin Wojtas 
> +
> +Platform/SolidRun/Armada80x0McBin
> +R: Marcin Wojtas 
> +
>  Silicon
>  M: Ard Biesheuvel 
>  M: Leif Lindholm 
> @@ -118,3 +124,6 @@ Silicon/Intel/PurleySktPkg
>  M: Gillispie, Thad 
>  M: Bu, Daocheng 
>  M: Oram, Isaac W 
> +
> +Silicon/Marvell
> +R: Marcin Wojtas 
> --

Thank you for the patch, I will be happy to get it merged.

Best regards,
Marcin

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

View/Reply Online (#41490): https://edk2.groups.io/g/devel/message/41490
Mute This Topic: https://groups.io/mt/31820030/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 V2] 27/30] Silicon/Marvell: Replace BSD License with BSD+Patent License

2019-05-28 Thread Marcin Wojtas
Adding Nadav Haklai from Marvell.

wt., 28 maj 2019 o 11:50 Leif Lindholm  napisał(a):
>
> On Fri, May 17, 2019 at 11:50:06AM +0100, Leif Lindholm wrote:
> > On Wed, May 15, 2019 at 04:10:08PM -0700, Michael D Kinney wrote:
> > > https://bugzilla.tianocore.org/show_bug.cgi?id=1373
> > >
> > > Replace BSD 2-Clause License with BSD+Patent License.  This change is
> > > based on the following emails:
> > >
> > >   https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
> > >   https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
> > >
> > > RFCs with detailed process for the license change:
> > >
> > >   V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
> > >   V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
> > >   V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
> >
> > As far as I can tell, this excludes the source files currently
> > licensed under 3-clause BSD (2-clause plus non-endorsement clause).
> > This is correct, and as discussed offline, but it would be worth
> > pointing it out explicitly in the commit message.
> >
> > (Conversations about relicensing the 3-clause files are happening in
> > the background.)
>
> Marcin, can you confirm the outcome of that discussion (for all
> Marvell 3-clause BSD source files in the tree, not just the ones
> affected by this specific patch)?
>

I confirm. Nadav, can you please also let know if you approve?

Best regards,
Marcin

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

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



Re: [edk2-devel] [PATCH edk2-platforms 1/3] Maintainers.txt: add Reviewer role to description of section entries

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 12:20, Leif Lindholm  wrote:
>
> This file was based on an old version of the edk2 Maintainers.txt,
> predating both d75b8ac278b and c9e1e28b619. Bring this up to date.
>
> Signed-off-by: Leif Lindholm 
> ---
>  Maintainers.txt | 5 +
>  1 file changed, 5 insertions(+)
>

(for the series)

Reviewed-by: Ard Biesheuvel 

> diff --git a/Maintainers.txt b/Maintainers.txt
> index 76feecceb7..85e8dc7fd4 100644
> --- a/Maintainers.txt
> +++ b/Maintainers.txt
> @@ -12,6 +12,11 @@ Descriptions of section entries:
>L: Mailing list that is relevant to this area (default is edk2-devel)
>   Patches and questions should be sent to the email list.
>M: Cc address for patches and questions (ie, the package maintainer)
> +  R: Package Reviewer: Cc address for patches and questions. Reviewers help
> + maintainers review code, but don't have push access. A designated 
> Package
> + Reviewer is reasonably familiar with the Package (or some modules
> + thereof), and/or provides testing or regression testing for the Package
> + (or some modules thereof), in certain platforms and environments.
>W: Web-page with status/info
>T: SCM tree type and location.  Type is one of: git, svn.
>S: Status, one of the following:
> --
> 2.11.0
>

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

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



[edk2-devel] [PATCH] Maintainers.txt: update mailing list information

2019-05-28 Thread Leif Lindholm
The devel mailing list has moved from 01.org to groups.io - update
the mailing list information to reflect this.

Signed-off-by: Leif Lindholm 
---
 Maintainers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index aaabe2b52d..f3ce5edd8a 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -40,7 +40,7 @@ Descriptions of section entries:
 EDK II
 --
 W: http://www.tianocore.org/edk2/
-L: https://lists.01.org/mailman/listinfo/edk2-devel
+L: https://edk2.groups.io/g/devel/
 T: git - https://github.com/tianocore/edk2.git
 T: git (mirror) - https://bitbucket.org/tianocore/edk2.git
 T: svn (read-only, deprecated) - https://svn.code.sf.net/p/edk2/code/trunk/edk2
-- 
2.11.0


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

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



[edk2-devel] [PATCH edk2-platforms 2/3] Maintainers.txt: update mailing list information

2019-05-28 Thread Leif Lindholm
The devel mailing list has moved from 01.org to groups.io - update
the mailing list information to reflect this.

Signed-off-by: Leif Lindholm 
---
 Maintainers.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Maintainers.txt b/Maintainers.txt
index 85e8dc7fd4..778eec6fed 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -33,7 +33,7 @@ Descriptions of section entries:
 EDK II
 --
 W: https://github.com/tianocore/tianocore.github.io/wiki/EDK-II
-L: https://lists.01.org/mailman/listinfo/edk2-devel
+L: https://edk2.groups.io/g/devel/
 T: git - https://github.com/tianocore/edk2-platforms.git
 
 Responsible Disclosure, Reporting Security Issues
-- 
2.11.0


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

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



[edk2-devel] [PATCH edk2-platforms 3/3] Maintainers.txt: add reviewer for Marvell platforms

2019-05-28 Thread Leif Lindholm
Marcin is the author of the majority of the Marvell platform support in
the tree, so clarify that he should be cc:d on patches to Marvell Armada
SoC/Boards and MacchiatoBIN.

Cc: Marcin Wojtas 
Signed-off-by: Leif Lindholm 
---
 Maintainers.txt | 9 +
 1 file changed, 9 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 778eec6fed..54c98e3b22 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -86,6 +86,12 @@ M: Shifei A Lu 
 M: Xiaohu Zhou 
 M: Isaac W Oram 
 
+Platform/Marvell
+R: Marcin Wojtas 
+
+Platform/SolidRun/Armada80x0McBin
+R: Marcin Wojtas 
+
 Silicon
 M: Ard Biesheuvel 
 M: Leif Lindholm 
@@ -118,3 +124,6 @@ Silicon/Intel/PurleySktPkg
 M: Gillispie, Thad 
 M: Bu, Daocheng 
 M: Oram, Isaac W 
+
+Silicon/Marvell
+R: Marcin Wojtas 
-- 
2.11.0


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

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



[edk2-devel] [PATCH edk2-platforms 1/3] Maintainers.txt: add Reviewer role to description of section entries

2019-05-28 Thread Leif Lindholm
This file was based on an old version of the edk2 Maintainers.txt,
predating both d75b8ac278b and c9e1e28b619. Bring this up to date.

Signed-off-by: Leif Lindholm 
---
 Maintainers.txt | 5 +
 1 file changed, 5 insertions(+)

diff --git a/Maintainers.txt b/Maintainers.txt
index 76feecceb7..85e8dc7fd4 100644
--- a/Maintainers.txt
+++ b/Maintainers.txt
@@ -12,6 +12,11 @@ Descriptions of section entries:
   L: Mailing list that is relevant to this area (default is edk2-devel)
  Patches and questions should be sent to the email list.
   M: Cc address for patches and questions (ie, the package maintainer)
+  R: Package Reviewer: Cc address for patches and questions. Reviewers help
+ maintainers review code, but don't have push access. A designated Package
+ Reviewer is reasonably familiar with the Package (or some modules
+ thereof), and/or provides testing or regression testing for the Package
+ (or some modules thereof), in certain platforms and environments.
   W: Web-page with status/info
   T: SCM tree type and location.  Type is one of: git, svn.
   S: Status, one of the following:
-- 
2.11.0


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

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



Re: [edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF to refer to NetworkPkg

2019-05-28 Thread Ard Biesheuvel
On Tue, 28 May 2019 at 12:00, Liming Gao  wrote:
>
> 1. Remove unnecessary Network libs, because NetworkPkg segment DSC/FDF have 
> included them.
> 2. Update Update RPi3 DSC/FDF to refer to Network package segment files
>
> These changes are required, because Network modules have been moved into 
> NetworkPkg.
>

Am I understanding correctly that all platforms below are now broken
due to the NetworkPkg changes?


> Liming Gao (7):
>   BeagleBoardPkg: Update BeagleBoardPkg.dsc to remove unnecessary
> Network libs
>   RDKQemu: Update RDKQemu.dsc to remove unnecessary Network libs
>   Hisilicon: Update D06.dsc to remove unnecessary Network libs
>   QuarkPlatform: Update Quark dsc to remove unnecessary Network libs
>   Vlv2TbltDevicePkg: Update Platform dsc to remove unnecessary Network
> libs
>   RaspberryPi: Update RPi3 DSC/FDF to refer to Network package segment
> files
>   SoftIron: Update Overdrive1000Board.dsc to refer to new Network module
> path
>
>  Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc  |  2 +-
>  Platform/Comcast/RDKQemu/RDKQemu.dsc|  5 +
>  Platform/Hisilicon/D06/D06.dsc  |  5 -
>  Platform/Intel/QuarkPlatformPkg/Quark.dsc   |  4 
>  Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc|  4 
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc  |  2 --
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc|  4 
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc |  2 --
>  Platform/RaspberryPi/RPi3/RPi3.dsc  | 30 
> ++
>  Platform/RaspberryPi/RPi3/RPi3.fdf  | 11 +--
>  Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  2 +-
>  11 files changed, 18 insertions(+), 53 deletions(-)
>
> --
> 2.13.0.windows.1
>
>
> 
>

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

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



Re: [edk2-devel] [edk2-platform patch 5/7] Vlv2TbltDevicePkg: Update Platform dsc to remove unnecessary Network libs

2019-05-28 Thread Sun, Zailiang
Reviewed-by: Zailiang Sun 

> -Original Message-
> From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of
> Liming Gao
> Sent: Tuesday, May 28, 2019 5:59 PM
> To: devel@edk2.groups.io
> Cc: Sun, Zailiang ; Qian, Yi 
> Subject: [edk2-devel] [edk2-platform patch 5/7] Vlv2TbltDevicePkg: Update
> Platform dsc to remove unnecessary Network libs
> 
> Signed-off-by: Liming Gao 
> Cc: Zailiang Sun 
> Cc: Yi Qian 
> ---
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 --
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 4 
>  Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 2 --
>  3 files changed, 8 deletions(-)
> 
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> index b9c4739e09..9df74c6620 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
> @@ -145,8 +145,6 @@
> 
> BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupp
> ortLib.inf
>SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> 
> PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformB
> dsLib.inf
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> 
> FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDevice
> Lib.inf
> 
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
> tManagerLib.inf
>#
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> index c0ae9c02af..f07b6293fd 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
> @@ -143,8 +143,6 @@
> 
> BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupp
> ortLib.inf
>SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> 
> PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformB
> dsLib.inf
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> 
> FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDevice
> Lib.inf
> 
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
> tManagerLib.inf
>#
> @@ -1443,8 +1441,6 @@
> $(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fT
> PMInitPeim.inf
>!endif
>  !endif
> 
> -!endif
> -
>  !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
>MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
>MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
> diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> index 0cb1bb9a9c..cddd580a96 100644
> --- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> +++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
> @@ -145,8 +145,6 @@
> 
> BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupp
> ortLib.inf
>SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
> 
> PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformB
> dsLib.inf
> -  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
> -  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
> 
> FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDevice
> Lib.inf
> 
> UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBoo
> tManagerLib.inf
>#
> --
> 2.13.0.windows.1
> 
> 
> 


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

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



[edk2-devel] [edk2-platform patch 7/7] SoftIron: Update Overdrive1000Board.dsc to refer to new Network module path

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc 
b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
index f9b73edeb3..e1e63477ff 100644
--- a/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
+++ b/Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc
@@ -570,7 +570,7 @@ DEFINE NUM_CORES= 4
   # Networking stack
   #
 !include NetworkPkg/Network.dsc.inc
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf {
+  NetworkPkg/MnpDxe/MnpDxe.inf {
 
   gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0x21
   }
-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 3/7] Hisilicon: Update D06.dsc to remove unnecessary Network libs

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/Hisilicon/D06/D06.dsc | 5 -
 1 file changed, 5 deletions(-)

diff --git a/Platform/Hisilicon/D06/D06.dsc b/Platform/Hisilicon/D06/D06.dsc
index 269515c7a5..26b79adba0 100644
--- a/Platform/Hisilicon/D06/D06.dsc
+++ b/Platform/Hisilicon/D06/D06.dsc
@@ -51,11 +51,6 @@
   BootLogoLib|MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf
   SortLib|MdeModulePkg/Library/UefiSortLib/UefiSortLib.inf
 
-
-!if $(NETWORK_HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
-
   CpldIoLib|Silicon/Hisilicon/Library/CpldIoLib/CpldIoLib.inf
 
   TimeBaseLib|EmbeddedPkg/Library/TimeBaseLib/TimeBaseLib.inf
-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 5/7] Vlv2TbltDevicePkg: Update Platform dsc to remove unnecessary Network libs

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Zailiang Sun 
Cc: Yi Qian 
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc | 2 --
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc   | 4 
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc| 2 --
 3 files changed, 8 deletions(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
index b9c4739e09..9df74c6620 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc
@@ -145,8 +145,6 @@
   BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
   PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBdsLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   #
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
index c0ae9c02af..f07b6293fd 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc
@@ -143,8 +143,6 @@
   BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
   PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBdsLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   #
@@ -1443,8 +1441,6 @@ 
$(PLATFORM_BINARY_PACKAGE)/$(DXE_ARCHITECTURE)$(TARGET)/IA32/fTPMInitPeim.inf
   !endif
 !endif
 
-!endif
-
 !if $(CAPSULE_ENABLE) || $(MICOCODE_CAPSULE_ENABLE)
   MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf
   MdeModulePkg/Application/CapsuleApp/CapsuleApp.inf
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
index 0cb1bb9a9c..cddd580a96 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc
@@ -145,8 +145,6 @@
   BmpSupportLib|MdeModulePkg/Library/BaseBmpSupportLib/BaseBmpSupportLib.inf
   SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf
   PlatformBdsLib|$(PLATFORM_PACKAGE)/Library/PlatformBdsLib/PlatformBdsLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   FlashDeviceLib|$(PLATFORM_PACKAGE)/Library/FlashDeviceLib/FlashDeviceLib.inf
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
   #
-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 1/7] BeagleBoardPkg: Update BeagleBoardPkg.dsc to remove unnecessary Network libs

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc 
b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
index 2d5d6f9977..7c7762e3ec 100644
--- a/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
+++ b/Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc
@@ -116,7 +116,7 @@
   DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf
   DmaLib|EmbeddedPkg/Library/NonCoherentDmaLib/NonCoherentDmaLib.inf
 
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
+  !include NetworkPkg/NetworkLibs.dsc.inc
   FdtLib|EmbeddedPkg/Library/FdtLib/FdtLib.inf
 
   
UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf
-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 4/7] QuarkPlatform: Update Quark dsc to remove unnecessary Network libs

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Michael D Kinney 
Cc: Kelly Steele 
---
 Platform/Intel/QuarkPlatformPkg/Quark.dsc| 4 
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc | 4 
 2 files changed, 8 deletions(-)

diff --git a/Platform/Intel/QuarkPlatformPkg/Quark.dsc 
b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
index a76d3f9356..f251ff4a7f 100644
--- a/Platform/Intel/QuarkPlatformPkg/Quark.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/Quark.dsc
@@ -130,10 +130,6 @@
   S3PciLib|MdePkg/Library/BaseS3PciLib/BaseS3PciLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
diff --git a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc 
b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
index 520c006c9e..b0a2b841d7 100644
--- a/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
+++ b/Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc
@@ -118,10 +118,6 @@
   S3PciLib|MdePkg/Library/BaseS3PciLib/BaseS3PciLib.inf
   UefiUsbLib|MdePkg/Library/UefiUsbLib/UefiUsbLib.inf
   UefiScsiLib|MdePkg/Library/UefiScsiLib/UefiScsiLib.inf
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
   
OemHookStatusCodeLib|MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf
   
SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLib.inf
   
SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf
-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 0/7] Clean up Platform DSC/FDF to refer to NetworkPkg

2019-05-28 Thread Liming Gao
1. Remove unnecessary Network libs, because NetworkPkg segment DSC/FDF have 
included them.
2. Update Update RPi3 DSC/FDF to refer to Network package segment files

These changes are required, because Network modules have been moved into 
NetworkPkg.

Liming Gao (7):
  BeagleBoardPkg: Update BeagleBoardPkg.dsc to remove unnecessary
Network libs
  RDKQemu: Update RDKQemu.dsc to remove unnecessary Network libs
  Hisilicon: Update D06.dsc to remove unnecessary Network libs
  QuarkPlatform: Update Quark dsc to remove unnecessary Network libs
  Vlv2TbltDevicePkg: Update Platform dsc to remove unnecessary Network
libs
  RaspberryPi: Update RPi3 DSC/FDF to refer to Network package segment
files
  SoftIron: Update Overdrive1000Board.dsc to refer to new Network module
path

 Platform/BeagleBoard/BeagleBoardPkg/BeagleBoardPkg.dsc  |  2 +-
 Platform/Comcast/RDKQemu/RDKQemu.dsc|  5 +
 Platform/Hisilicon/D06/D06.dsc  |  5 -
 Platform/Intel/QuarkPlatformPkg/Quark.dsc   |  4 
 Platform/Intel/QuarkPlatformPkg/QuarkMin.dsc|  4 
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgGccX64.dsc  |  2 --
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgIA32.dsc|  4 
 Platform/Intel/Vlv2TbltDevicePkg/PlatformPkgX64.dsc |  2 --
 Platform/RaspberryPi/RPi3/RPi3.dsc  | 30 
++
 Platform/RaspberryPi/RPi3/RPi3.fdf  | 11 +--
 Platform/SoftIron/Overdrive1000Board/Overdrive1000Board.dsc |  2 +-
 11 files changed, 18 insertions(+), 53 deletions(-)

-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 2/7] RDKQemu: Update RDKQemu.dsc to remove unnecessary Network libs

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/Comcast/RDKQemu/RDKQemu.dsc | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/Platform/Comcast/RDKQemu/RDKQemu.dsc 
b/Platform/Comcast/RDKQemu/RDKQemu.dsc
index 64b6699ae7..e73a907891 100644
--- a/Platform/Comcast/RDKQemu/RDKQemu.dsc
+++ b/Platform/Comcast/RDKQemu/RDKQemu.dsc
@@ -33,7 +33,7 @@
   # Network definition
   #
   DEFINE NETWORK_SNP_ENABLE = FALSE
-  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_TLS_ENABLE = TRUE
   DEFINE NETWORK_IP6_ENABLE = FALSE
   DEFINE NETWORK_HTTP_BOOT_ENABLE   = TRUE
 
@@ -65,9 +65,6 @@
   PciSegmentLib|MdePkg/Library/BasePciSegmentLibPci/BasePciSegmentLibPci.inf
   
PciHostBridgeLib|ArmVirtPkg/Library/FdtPciHostBridgeLib/FdtPciHostBridgeLib.inf
   
RdkBootManagerLib|Platform/Comcast/Library/RdkBootManagerLib/RdkBootManagerLib.inf
-!if $(HTTP_BOOT_ENABLE) == TRUE
-  HttpLib|MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf
-!endif
 
 [LibraryClasses.common.PEIM]
   
ArmVirtMemInfoLib|ArmVirtPkg/Library/QemuVirtMemInfoLib/QemuVirtMemInfoPeiLib.inf
-- 
2.13.0.windows.1


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

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



[edk2-devel] [edk2-platform patch 6/7] RaspberryPi: Update RPi3 DSC/FDF to refer to Network package segment files

2019-05-28 Thread Liming Gao
Signed-off-by: Liming Gao 
Cc: Ard Biesheuvel 
Cc: Leif Lindholm 
---
 Platform/RaspberryPi/RPi3/RPi3.dsc | 30 ++
 Platform/RaspberryPi/RPi3/RPi3.fdf | 11 +--
 2 files changed, 15 insertions(+), 26 deletions(-)

diff --git a/Platform/RaspberryPi/RPi3/RPi3.dsc 
b/Platform/RaspberryPi/RPi3/RPi3.dsc
index 53b87ba4e5..53995c2e37 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.dsc
+++ b/Platform/RaspberryPi/RPi3/RPi3.dsc
@@ -32,6 +32,19 @@
   DEFINE SECURE_BOOT_ENABLE  = FALSE
   DEFINE DEBUG_PRINT_ERROR_LEVEL = 0x804F
 
+  #
+  # Network setting
+  #
+  DEFINE NETWORK_ENABLE = TRUE
+  DEFINE NETWORK_SNP_ENABLE = FALSE
+  DEFINE NETWORK_IP4_ENABLE = TRUE
+  DEFINE NETWORK_IP6_ENABLE = FALSE
+  DEFINE NETWORK_TLS_ENABLE = FALSE
+  DEFINE NETWORK_HTTP_BOOT_ENABLE   = FALSE
+  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = FALSE
+  DEFINE NETWORK_ISCSI_ENABLE   = FALSE
+  DEFINE NETWORK_VLAN_ENABLE= FALSE
+
 

 #
 # Library Class section - list of all Library Classes needed by this Platform.
@@ -85,12 +98,6 @@
   # use the accelerated BaseMemoryLibOptDxe by default, overrides for SEC/PEI 
below
   BaseMemoryLib|MdePkg/Library/BaseMemoryLibOptDxe/BaseMemoryLibOptDxe.inf
 
-  # Networking Requirements
-  NetLib|MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf
-  DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf
-  UdpIoLib|MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf
-  IpIoLib|MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.inf
-
   #
   # It is not possible to prevent the ARM compiler from inserting calls to 
intrinsic functions.
   # This library provides the instrinsic functions such a compiler may 
generate calls to.
@@ -583,16 +590,7 @@
   #
   # Networking stack
   #
-  MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  NetworkPkg/TcpDxe/TcpDxe.inf
+  !include NetworkPkg/Network.dsc.inc
 
   #
   # RNG
diff --git a/Platform/RaspberryPi/RPi3/RPi3.fdf 
b/Platform/RaspberryPi/RPi3/RPi3.fdf
index cf4b99a5e9..c3df00198c 100644
--- a/Platform/RaspberryPi/RPi3/RPi3.fdf
+++ b/Platform/RaspberryPi/RPi3/RPi3.fdf
@@ -260,16 +260,7 @@ READ_LOCK_STATUS   = TRUE
   #
   # Networking stack
   #
-  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF NetworkPkg/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF NetworkPkg/TcpDxe/TcpDxe.inf
+  !include NetworkPkg/Network.fdf.inc
 
   #
   # RNG
-- 
2.13.0.windows.1


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

View/Reply Online (#41480): https://edk2.groups.io/g/devel/message/41480
Mute This Topic: https://groups.io/mt/31819937/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 V2] 27/30] Silicon/Marvell: Replace BSD License with BSD+Patent License

2019-05-28 Thread Leif Lindholm
On Fri, May 17, 2019 at 11:50:06AM +0100, Leif Lindholm wrote:
> On Wed, May 15, 2019 at 04:10:08PM -0700, Michael D Kinney wrote:
> > https://bugzilla.tianocore.org/show_bug.cgi?id=1373
> > 
> > Replace BSD 2-Clause License with BSD+Patent License.  This change is
> > based on the following emails:
> > 
> >   https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
> >   https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html
> > 
> > RFCs with detailed process for the license change:
> > 
> >   V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
> >   V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
> >   V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html
> 
> As far as I can tell, this excludes the source files currently
> licensed under 3-clause BSD (2-clause plus non-endorsement clause).
> This is correct, and as discussed offline, but it would be worth
> pointing it out explicitly in the commit message.
> 
> (Conversations about relicensing the 3-clause files are happening in
> the background.)

Marcin, can you confirm the outcome of that discussion (for all
Marvell 3-clause BSD source files in the tree, not just the ones
affected by this specific patch)?

/
Leif


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

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



Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin (from the MarvellEmbeddedProcessors edk2-open-platforms repo)

2019-05-28 Thread Marcin Wojtas
Hi Rebecca,

wt., 28 maj 2019 o 10:39 Leif Lindholm  napisał(a):
>
> Hi Rebecca,
>
> On Mon, May 27, 2019 at 05:34:08PM -0600, rebe...@bluestop.org wrote:
> > I've been working with the MACCHIATObin board, and noticed settings for
> > HTTP and TLS in Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc in
> > the repo
> > https://github.com/MarvellEmbeddedProcessors/edk2-open-platform.git .
> > I'd like to enable them if possible to help with debugging a problem
> > with a boot loader. I added TlsLib to the build and things appeared to
> > work, but enrolling a server certificate, and entering an HTTP boot URL
> > fails ("HTTP is disabled"), presumably because I didn't build in the
> > underlying support.
>
> This was actually enabled in the upstream edk2-platforms repository as
> part of the "use fragment config files for network config" set:
> 205d5621a35eb6251481526039d24b17374efdf0
>
> Since the PCIe updates just went in, that should now be a valid
> replacement for the MarvellEmbededProcessors repo.

Please use the Tianocore repo only. With the latest changes, there is
no point to use old MarvellEmbededProcessors branch, I do not maintain
it. I also plan to update MacchiatoBin wiki with the reference to the
mainline repositories.

Best regards,
Marcin

>
> And will let you include HTTP with -D NETWORK_HTTP_BOOT_ENABLE=TRUE.
>
> /
> Leif
>
> >
> > I'm not sure if this is the right place to ask about it since it's in
> > the MarvellEmbeddedProcessors project and not TianoCore, but - I was
> > wondering where the place would be to add support libraries needed to
> > enable HTTP and TLS support? Would it be in
> > Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc, or in
> > NetworkPkg/Network.dsc.inc in the main edk2 repo?
> >
> >
> > --
> > Rebecca Cran
> >
> >
> > 
> >

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

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



[edk2-devel] [PATCH] BaseTools:Add DetectNotUsedItem.py to Edk2\BaseTools\Scripts

2019-05-28 Thread Fan, ZhijuX
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1850

This script is used to Detect unreferenced PCD and GUID/Protocols/PPIs.
The input parameters are Dec file and package directory.

This script can be run in both Py2 and Py3.

Cc: Bob Feng 
Cc: Liming Gao 
Signed-off-by: Zhiju.Fan 
---
 BaseTools/Scripts/DetectNotUsedItem.py | 185 +
 1 file changed, 185 insertions(+)
 create mode 100644 BaseTools/Scripts/DetectNotUsedItem.py

diff --git a/BaseTools/Scripts/DetectNotUsedItem.py 
b/BaseTools/Scripts/DetectNotUsedItem.py
new file mode 100644
index 00..655fb65a96
--- /dev/null
+++ b/BaseTools/Scripts/DetectNotUsedItem.py
@@ -0,0 +1,185 @@
+## @file
+# Detect unreferenced PCD and GUID/Protocols/PPIs.
+#
+# Copyright (c) 2019, Intel Corporation. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-2-Clause-Patent
+#
+
+'''
+DetectNotUsedItem
+'''
+import re
+import os
+import sys
+import argparse
+
+#
+# Globals for help information
+#
+__prog__= 'DetectNotUsedItem'
+__version__ = '%s Version %s' % (__prog__, '0.1')
+__copyright__   = 'Copyright (c) 2019, Intel Corporation. All rights reserved.'
+__description__ = "Detect unreferenced PCD and GUID/Protocols/PPIs.\n"
+
+SectionList = ["LibraryClasses", "Guids", "Ppis", "Protocols", "Pcd"]
+
+class PROCESS(object):
+
+  def __init__(self, DecPath, InfDirs):
+self.Dec = DecPath
+self.InfPath = InfDirs
+self.Log = []
+
+  def ParserDscFdfInfFile(self):
+AllContentList = []
+for File in (self.SearchbyExt(".dsc") + self.SearchbyExt(".fdf") + 
self.SearchbyExt(".inf")):
+  AllContentList += self.ParseDscFdfInfContent(File)
+return AllContentList
+
+  #Search File by extension name
+  def SearchbyExt(self, Ext):
+FileList = []
+for path in self.InfPath:
+  for root, _, files in os.walk(path, topdown=True, followlinks=False):
+for filename in files:
+  if filename.endswith(Ext):
+FileList.append(os.path.join(root, filename))
+return FileList
+
+  # Parse DEC file to get Line number and Name
+  # return section name, the Item Name and comments line number
+  def ParseDecContent(self):
+SectionRE = re.compile(r'\[(.*)\]')
+Flag = False
+Comments ={}
+Comment_Line = []
+ItemName = {}
+with open(self.Dec, 'r') as F:
+  for Index, content in enumerate(F):
+NotComment = not content.strip().startswith("#")
+Section = SectionRE.findall(content)
+if Section and NotComment:
+  Flag = self.IsNeedParseSection(Section[0])
+if Flag:
+  Comment_Line.append(Index)
+  if NotComment:
+if content != "\n" and content != "\r\n":
+  ItemName[Index] = 
content.split('=')[0].split('|')[0].split('#')[0].strip()
+  Comments[Index] = Comment_Line
+  Comment_Line = []
+return ItemName, Comments
+
+  def IsNeedParseSection(self, SectionName):
+for item in SectionList:
+  if item in SectionName:
+return True
+return False
+
+  #Parse DSC, FDF, INF File, remove comments, return Lines list
+  def ParseDscFdfInfContent(self, File):
+with open(File,'r') as F:
+  lines = F.readlines()
+for Index in range(len(lines)-1, -1, -1):
+  if lines[Index].strip().startswith("#") or lines[Index] == "\n" or 
lines[Index] == "\r\n":
+lines.remove(lines[Index])
+  elif "#" in lines[Index]:
+lines[Index] = lines[Index].split("#")[0].strip()
+  else:
+lines[Index] = lines[Index].strip()
+return lines
+
+  def DetectNotUsedItem(self):
+NotUsedItem = {}
+DecItem, DecComments = self.ParseDecContent()
+InfDscFdfContent = self.ParserDscFdfInfFile()
+for LineNum in list(DecItem.keys()):
+  DecItemName = DecItem[LineNum]
+  Match_reg = re.compile("(?

Re: [edk2-devel] Adding HTTP and TLS support to Armada80x0McBin (from the MarvellEmbeddedProcessors edk2-open-platforms repo)

2019-05-28 Thread Leif Lindholm
Hi Rebecca,

On Mon, May 27, 2019 at 05:34:08PM -0600, rebe...@bluestop.org wrote:
> I've been working with the MACCHIATObin board, and noticed settings for
> HTTP and TLS in Platform/SolidRun/Armada80x0McBin/Armada80x0McBin.dsc in
> the repo
> https://github.com/MarvellEmbeddedProcessors/edk2-open-platform.git .
> I'd like to enable them if possible to help with debugging a problem
> with a boot loader. I added TlsLib to the build and things appeared to
> work, but enrolling a server certificate, and entering an HTTP boot URL
> fails ("HTTP is disabled"), presumably because I didn't build in the
> underlying support.

This was actually enabled in the upstream edk2-platforms repository as
part of the "use fragment config files for network config" set:
205d5621a35eb6251481526039d24b17374efdf0

Since the PCIe updates just went in, that should now be a valid
replacement for the MarvellEmbededProcessors repo.

And will let you include HTTP with -D NETWORK_HTTP_BOOT_ENABLE=TRUE.

/
Leif

> 
> I'm not sure if this is the right place to ask about it since it's in
> the MarvellEmbeddedProcessors project and not TianoCore, but - I was
> wondering where the place would be to add support libraries needed to
> enable HTTP and TLS support? Would it be in
> Silicon/Marvell/Armada7k8k/Armada7k8k.dsc.inc, or in
> NetworkPkg/Network.dsc.inc in the main edk2 repo?
> 
> 
> -- 
> Rebecca Cran
> 
> 
> 
> 

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

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



[edk2-devel] [PATCH] BaseTools:Update binary cache restore time to current time

2019-05-28 Thread Steven Shi
https://bugzilla.tianocore.org/show_bug.cgi?id=1742

Current Binary Cache doesn't update the restored file
creation and modification times to the current time.
Preserve the new restored file creation time as old
cached time might has potential issue to block the make
to build updated files based on the time stamp.
Enhance to update the restored file creation time to
current time.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Zhiju Fan 
Signed-off-by: Steven Shi 
---
 BaseTools/Source/Python/AutoGen/AutoGen.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py 
b/BaseTools/Source/Python/AutoGen/AutoGen.py
index a5bef4f7c6..57ca67f692 100644
--- a/BaseTools/Source/Python/AutoGen/AutoGen.py
+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py
@@ -3941,14 +3941,14 @@ class ModuleAutoGen(AutoGen):
 for root, dir, files in os.walk(FileDir):
 for f in files:
 if self.Name + '.hash' in f:
-shutil.copy2(HashFile, self.BuildDir)
+shutil.copy(HashFile, self.BuildDir)
 else:
 File = path.join(root, f)
 sub_dir = os.path.relpath(File, FileDir)
 destination_file = 
os.path.join(self.OutputDir, sub_dir)
 destination_dir = 
os.path.dirname(destination_file)
 CreateDirectory(destination_dir)
-shutil.copy2(File, destination_dir)
+shutil.copy(File, destination_dir)
 if self.Name == "PcdPeim" or self.Name == "PcdDxe":
 CreatePcdDatabaseCode(self, TemplateString(), 
TemplateString())
 return True
-- 
2.17.1.windows.2


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

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



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

2019-05-28 Thread Bob Feng
Reviewed-by: Bob Feng 

-Original Message-
From: Fan, ZhijuX 
Sent: Tuesday, May 28, 2019 2:29 PM
To: devel@edk2.groups.io
Cc: Gao, Liming ; Feng, Bob C 
Subject: [PATCH V4] 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|  9 -
 4 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/BaseTools/Source/Python/Common/DataType.py 
b/BaseTools/Source/Python/Common/DataType.py
index 7cd67bc01a..83ec36c235 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..74f176cfef 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..fb5fd85e0a 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 = BINARY_FILE_TYPE_RAW
+Obj.SectionList.append(EfiSectionObj)
+return True
+else:
+return False
 SectionName = self._Token
 
 if SectionName not in {
@@ -3816,7 +3827,6 @@ class FdfParser:
 

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

2019-05-28 Thread Leif Lindholm
On Tue, May 28, 2019 at 08:10:44AM +0200, Ard Biesheuvel wrote:
> On Tue, 28 May 2019 at 02:17, Liming Gao  wrote:
> >
> > Ard:
> >   Is there any impact with new option? If no behavior change, I am OK for 
> > this patch. Reviewed-by: Liming Gao 
> >
> 
> We don't rely on anything provided by the C11 standard, so it should
> not result in a behavior change. I do wonder whether x86 may be
> affected as well, though.

A minor concern would be that GCC defaults to "gnu11" since (after a
cursory search) 5.1, so we could be setting ourselves up for future
clashes. Which is possibly fine, as long as we're aware.

/
Leif

> Jian, did you try building OpenSSL 1.1.1b for x86 with the CLANG38
> toolchain with a recent version of Clang?
> 
> 
> 
> > >-Original Message-
> > >From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org]
> > >Sent: Tuesday, May 28, 2019 4:52 AM
> > >To: devel@edk2.groups.io
> > >Cc: Ard Biesheuvel ; Laszlo Ersek
> > >; Gao, Liming ; Wang, Jian J
> > >; Leif Lindholm ; Kinney,
> > >Michael D 
> > >Subject: [PATCH v2 6/7] BaseTools/tools_def CLANG3x ARM AARCH64: force
> > >use of C99 standard
> > >
> > >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:2
> > >1:
> > >  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
> > >
> 

[edk2-devel] [PATCH] BaseTools:Fix the library dependency missing in Binary Cache

2019-05-28 Thread Steven Shi
BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1788

The library dependency of a module is wrongly filtered out
by binary cache implementation which cause all dependent
libraries will not been built prior to the module in the
build scheduler and the module build fails if cache miss
happen.

Cc: Liming Gao 
Cc: Bob Feng 
Cc: Christian Rodriguez 
Signed-off-by: Steven Shi 
---
 BaseTools/Source/Python/build/build.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/BaseTools/Source/Python/build/build.py 
b/BaseTools/Source/Python/build/build.py
index 80ceb98310..673a9379ba 100644
--- a/BaseTools/Source/Python/build/build.py
+++ b/BaseTools/Source/Python/build/build.py
@@ -593,7 +593,7 @@ class BuildTask:
 #
 def AddDependency(self, Dependency):
 for Dep in Dependency:
-if not Dep.BuildObject.IsBinaryModule and not 
Dep.BuildObject.CanSkipbyHash():
+if not Dep.BuildObject.IsBinaryModule:
 self.DependencyList.append(BuildTask.New(Dep))# BuildTask 
list
 
 ## The thread wrapper of LaunchCommand function
-- 
2.17.1.windows.2


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

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



  1   2   >