Chasel Chiu 
							
						 
					 
					
						
						
							
						
						00e3e48014 
					 
					
						
						
							
							IntelFsp2WrapperPkg/FspsWrapperPeim: Fix coding style.  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1730 
Internal code quality check failed after this commit:
68d47eea42nathaniel.l.desimone@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com >
Reviewed-by: Star Zeng <star.zeng@intel.com > 
						
						
					 
					
						2019-04-23 10:39:47 +08:00 
						 
				 
			
				
					
						
							
							
								Christian Rodriguez 
							
						 
					 
					
						
						
							
						
						56008eb7f6 
					 
					
						
						
							
							BaseTools: Hash false success.. minor change in hash invalidation  
						
						... 
						
						
						
						BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1692 
Change part of the hash error handling to invalidate hashes in the
cache destination not the cache source.
Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com > 
						
						
					 
					
						2019-04-22 16:50:26 +08:00 
						 
				 
			
				
					
						
							
							
								Fan, ZhijuX 
							
						 
					 
					
						
						
							
						
						35c2af00d8 
					 
					
						
						
							
							BaseTools:fixed the incorrect autogen makefile which cause build failure.  
						
						... 
						
						
						
						BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1729 
On some build environment, build fails but on the other build machines,
build success. This is the regression issue introduced by commit
 05217d210ebob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com > 
						
						
					 
					
						2019-04-22 16:50:25 +08:00 
						 
				 
			
				
					
						
							
							
								Rodriguez, Christian 
							
						 
					 
					
						
						
							
						
						452b5ad61d 
					 
					
						
						
							
							BaseTools: Enhance Bin Cache database to support save the cache  
						
						... 
						
						
						
						BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1726 
V2: Added the platform name to the path
Add more level sub-directories in the database to support save
the cache for multiple platforms with multiple tool-chains and
targets, just like edk2 Build output.
Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com > 
						
						
					 
					
						2019-04-22 16:50:24 +08:00 
						 
				 
			
				
					
						
							
							
								Yunhua Feng 
							
						 
					 
					
						
						
							
						
						0b836855fb 
					 
					
						
						
							
							BaseTools: Sometime write file not immediate to disk  
						
						... 
						
						
						
						BZ: https://bugzilla.tianocore.org/process_bug.cgi 
On Windows OS, sometime the generated file is not immediate saved to disk.
When run nmake, prompt AutoGen.h not found, and stop build.
Below blog shows Write-Replace to fix it. This patch uses this way to write
temp file, then rename the temp file to the real file.
https://blog.gocept.com/2013/07/15/reliable-file-updates-with-python/ 
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com >
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com > 
						
						
					 
					
						2019-04-22 10:05:52 +08:00 
						 
				 
			
				
					
						
							
							
								Aaron Antone 
							
						 
					 
					
						
						
							
						
						e72920ec61 
					 
					
						
						
							
							MdePkg/UefiDebugLibStdErr: Make it runtime safe  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416 
After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gST. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gST to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-22 09:52:54 +08:00 
						 
				 
			
				
					
						
							
							
								Aaron Antone 
							
						 
					 
					
						
						
							
						
						452702d0bc 
					 
					
						
						
							
							MdePkg/UefidebugLibConOut: Make it runtime safe  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416 
After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gST. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gST to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-22 09:52:54 +08:00 
						 
				 
			
				
					
						
							
							
								Aaron Antone 
							
						 
					 
					
						
						
							
						
						2b5778c68b 
					 
					
						
						
							
							MdePkg/UefiDebugLibDebugPortProtocol: Make it runtime safe  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416 
After ExitBootServices, some pointer would be invalid such as
the Protocol pointer and gBS. The function depend on those should
be prevent. So disable the related function while after
ExitBootServices.
Change the gBS to a internal one, because there will be a cycle
consume between UefiBootServicesTableLib and DebugLib due to the
library constructors.
Also remove the SMM support for this instance.
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-22 09:52:54 +08:00 
						 
				 
			
				
					
						
							
							
								Zhichao Gao 
							
						 
					 
					
						
						
							
						
						c0b2816d69 
					 
					
						
						
							
							SignedCapsulePkg: Change the SMM debug lib instance  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416 
The UefiDebugLibConOut will not support DXE_SMM_DRIVER,
change UefiDebugLibConOut to BaseDebugLibNull.
Cc: Jiewen Yao <jiewen.yao@intel.com >
Cc: Chao Zhang <chao.b.zhang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-22 09:52:54 +08:00 
						 
				 
			
				
					
						
							
							
								Zhichao Gao 
							
						 
					 
					
						
						
							
						
						1dc1da5830 
					 
					
						
						
							
							MdeModulePkg: Change the SMM debug lib instance  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1416 
The UefiDebugLibConOut will not support DXE_SMM_DRIVER,
change UefiDebugLibConOut to BaseDebugLibNull.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Hao Wu <hao.a.wu@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-22 09:52:54 +08:00 
						 
				 
			
				
					
						
							
							
								Xue, ShengfengX 
							
						 
					 
					
						
						
							
						
						b29e6365c3 
					 
					
						
						
							
							NetworkPkg/UefiPxeBcDxe:Add two PCD to control PXE.  
						
						... 
						
						
						
						REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1695 
Setup need provide an item for user to control IPV46 PXE boot.
Origin UefiPxeBcDxe driver doesn't have such interface.
This change added two PCD to control IPV4/6 PXE in PxeBcSupported().
Platform code should override this two PCD according to Setup value.
code change no side effect on current PXE function with default PCD.
Signed-off-by: Xue ShengfengX <shengfengx.xue@intel.com >
Cc: Siyuan Fu <siyuan.fu@intel.com >
Cc: Jiaxin Wu <jiaxin.wu@intel.com >
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com > 
						
						
					 
					
						2019-04-22 09:14:45 +08:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						c2f643479e 
					 
					
						
						
							
							OvmfPkg/BasePciCapLib: suppress invalid "nullptr deref" warning  
						
						... 
						
						
						
						RH covscan reports the following "nullptr deref" warning:
> Error: CLANG_WARNING:
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:312:5:
> warning: Dereference of null pointer
> #    InstanceZero->NumInstancesUnion.NumInstances++;
> #    ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:509:7:
> note: Assuming 'OutCapList' is not equal to NULL
> #  if (OutCapList == NULL) {
> #      ^~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:509:3:
> note: Taking false branch
> #  if (OutCapList == NULL) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:518:7:
> note: Assuming the condition is false
> #  if (OutCapList->Capabilities == NULL) {
> #      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:518:3:
> note: Taking false branch
> #  if (OutCapList->Capabilities == NULL) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:529:7:
> note: Assuming 'CapHdrOffsets' is not equal to NULL
> #  if (CapHdrOffsets == NULL) {
> #      ^~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:529:3:
> note: Taking false branch
> #  if (CapHdrOffsets == NULL) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:546:3:
> note: Taking false branch
> #  if (RETURN_ERROR (Status)) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:549:7:
> note: Assuming the condition is true
> #  if ((PciStatusReg & EFI_PCI_STATUS_CAPABILITY) != 0) {
> #      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:549:3:
> note: Taking true branch
> #  if ((PciStatusReg & EFI_PCI_STATUS_CAPABILITY) != 0) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:557:5:
> note: Taking false branch
> #    if (RETURN_ERROR (Status)) {
> #    ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:565:12:
> note: Assuming 'NormalCapHdrOffset' is > 0
> #    while (NormalCapHdrOffset > 0) {
> #           ^~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:565:5:
> note: Loop condition is true.  Entering loop body
> #    while (NormalCapHdrOffset > 0) {
> #    ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:570:7:
> note: Taking false branch
> #      if (RETURN_ERROR (Status)) {
> #      ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:574:16:
> note: Calling 'InsertPciCap'
> #      Status = InsertPciCap (OutCapList, CapHdrOffsets, PciCapNormal,
> #               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:235:3:
> note: Null pointer value stored to 'InstanceZero'
> #  InstanceZero = NULL;
> #  ^~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:243:7:
> note: Assuming 'PciCap' is not equal to NULL
> #  if (PciCap == NULL) {
> #      ^~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:243:3:
> note: Taking false branch
> #  if (PciCap == NULL) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:259:3:
> note: Taking false branch
> #  if (RETURN_ERROR (Status)) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:297:3:
> note: Taking false branch
> #  if (RETURN_ERROR (Status)) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:311:7:
> note: Assuming the condition is true
> #  if (PciCap->Key.Instance > 0) {
> #      ^~~~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:311:3:
> note: Taking true branch
> #  if (PciCap->Key.Instance > 0) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/Library/BasePciCapLib/BasePciCapLib.c:312:5:
> note: Dereference of null pointer
> #    InstanceZero->NumInstancesUnion.NumInstances++;
> #    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> #  310|     //
> #  311|     if (PciCap->Key.Instance > 0) {
> #  312|->     InstanceZero->NumInstancesUnion.NumInstances++;
> #  313|     }
> #  314|     return RETURN_SUCCESS;
The warning is invalid: the flagged dereferencing of "InstanceZero" is
gated by a condition that is only satisfied if we dereference
"InstanceZero" *first*.
(Perhaps the analyzer assumes that the OrderedCollectionInsert() call,
just before line 259, can change the value of "PciCap->Key.Instance" via
the last argument:
   254    //
   255    // Add PciCap to CapList.
   256    //
   257    Status = OrderedCollectionInsert (CapList->Capabilities, &PciCapEntry,
   258               PciCap);
   259    if (RETURN_ERROR (Status)) {
That assumption is incorrect.)
Add a comment and an ASSERT().
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 
Issue: scan-0994.txt
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org > 
						
						
					 
					
						2019-04-18 16:06:04 +02:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						e30991740d 
					 
					
						
						
							
							OvmfPkg/AcpiPlatformDxe: catch theoretical nullptr deref in Xen code  
						
						... 
						
						
						
						RH covscan justifiedly reports a path through InstallXenTables() where
DsdtTable can technically remain NULL.
If this occurs in practice, then the guest and the VMM are out of sync on
the interface contract. Catch the situation with a code snippet that halts
in RELEASE builds, and in DEBUG builds lets the platform DSC control the
assert disposition first (i.e. CPU exception, deadloop, or nothing).
> Error: CLANG_WARNING:
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:309:14: warning: Access
> to field 'Length' results in a dereference of a null pointer (loaded
> from variable 'DsdtTable')
> #             DsdtTable->Length,
> #             ^~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:154:3: note: Null
> pointer value stored to 'DsdtTable'
> #  DsdtTable   = NULL;
> #  ^~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:162:3: note: Taking
> false branch
> #  if (EFI_ERROR (Status)) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:170:7: note: Assuming
> the condition is false
> #  if (XenAcpiRsdpStructurePtr->XsdtAddress) {
> #      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:170:3: note: Taking
> false branch
> #  if (XenAcpiRsdpStructurePtr->XsdtAddress) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:220:12: note: Assuming
> the condition is false
> #  else if (XenAcpiRsdpStructurePtr->RsdtAddress) {
> #           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:220:8: note: Taking
> false branch
> #  else if (XenAcpiRsdpStructurePtr->RsdtAddress) {
> #       ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:274:3: note: Taking
> false branch
> #  if (Fadt2Table) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:288:8: note: Taking
> false branch
> #  else if (Fadt1Table) {
> #       ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/Xen.c:309:14: note: Access to
> field 'Length' results in a dereference of a null pointer (loaded from
> variable 'DsdtTable')
> #             DsdtTable->Length,
> #             ^~~~~~~~~
> #  307|                AcpiProtocol,
> #  308|                DsdtTable,
> #  309|->              DsdtTable->Length,
> #  310|                &TableHandle
> #  311|                );
Cc: Anthony Perard <anthony.perard@citrix.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Julien Grall <julien.grall@arm.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 
Issue: scan-0993.txt
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org > 
						
						
					 
					
						2019-04-18 16:05:24 +02:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						dc5bbf1074 
					 
					
						
						
							
							OvmfPkg/AcpiPlatformDxe: suppress invalid "deref of undef pointer" warning  
						
						... 
						
						
						
						RH covscan emits the following false positive:
> Error: CLANG_WARNING:
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:182:14:
> warning: Dereference of undefined pointer value
> #    Status = FwVol->ReadSection (
> #             ^~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:164:7: note:
> Assuming the condition is false
> #  if (QemuDetected ()) {
> #      ^~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:164:3: note:
> Taking false branch
> #  if (QemuDetected ()) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:174:3: note:
> Taking false branch
> #  if (EFI_ERROR (Status)) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:180:10: note:
> Assuming 'Status' is equal to EFI_SUCCESS
> #  while (Status == EFI_SUCCESS) {
> #         ^~~~~~~~~~~~~~~~~~~~~
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:180:3: note:
> Loop condition is true.  Entering loop body
> #  while (Status == EFI_SUCCESS) {
> #  ^
> edk2-89910a39dcfd/OvmfPkg/AcpiPlatformDxe/AcpiPlatform.c:182:14: note:
> Dereference of undefined pointer value
> #    Status = FwVol->ReadSection (
> #             ^~~~~~~~~~~~~~~~~~
> #  180|     while (Status == EFI_SUCCESS) {
> #  181|
> #  182|->     Status = FwVol->ReadSection (
> #  183|                         FwVol,
> #  184|                         (EFI_GUID*)PcdGetPtr (PcdAcpiTableStorageFile),
This is invalid because LocateFvInstanceWithTables() sets FwVol on
success.
Suppress the message by:
- assigning FwVol NULL first (this would replace the original report with
  "nullptr deref"),
- asserting that FwVol is no longer NULL, on success.
What's important here is that ASSERT() ends with ANALYZER_UNREACHABLE() on
failure.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 
Issue: scan-0991.txt
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org > 
						
						
					 
					
						2019-04-18 16:04:18 +02:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						52d229238b 
					 
					
						
						
							
							OvmfPkg/QemuVideoDxe: avoid arithmetic on null pointer  
						
						... 
						
						
						
						The real mode interrupt vector table, which we modify for the sake of
Windows 7, starts at address 0, which happens to be the representation of
null pointers on all edk2 architectures. A null pointer may never undergo
pointer arithmetic, and RH covscan justifiedly reports:
> Error: CPPCHECK_WARNING (CWE-682):
> edk2-89910a39dcfd/OvmfPkg/QemuVideoDxe/VbeShim.c:105:
> error[nullPointerArithmetic]: Pointer addition with NULL pointer.
> #  103|     //
> #  104|     Segment0Pages = 1;
> #  105|->   Int0x10       = (IVT_ENTRY *)(UINTN)Segment0 + 0x10;
> #  106|     Segment0AllocationStatus = gBS->AllocatePages (
> #  107|                                       AllocateAddress,
Fix this by calculating the EFI_PHYSICAL_ADDRESS of IVT entry 0x10 first,
and by casting the address to the right type second.
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710 
Issue: scan-1002.txt
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org > 
						
						
					 
					
						2019-04-18 16:03:38 +02:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						933f1990f5 
					 
					
						
						
							
							CryptoPkg/BaseCryptLib: Add PKCS1v2 (RSAES-OAEP) support.  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1403 
Add support for PKCS 1v2 RSAES-OAEP PKI encryption in BaseCryptLib.
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Cc: Gang Wei <gang.wei@intel.com >
Cc: Wang Jian J <jian.j.wang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com > 
						
						
					 
					
						2019-04-18 13:11:22 +08:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						aed90beee5 
					 
					
						
						
							
							CryptoPkg/BaseCryptLib.h: Add PKCS1v2 (RSAES-OAEP) support.  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1403 
Add prototype of new API Pkcs1v2Encrypt in header file to
support PKCS1v2 (RSAES-OAEP) encrypt.
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Cc: Gang Wei <gang.wei@intel.com >
Cc: Wang Jian J <jian.j.wang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com > 
						
						
					 
					
						2019-04-18 13:11:21 +08:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						23c3178c4d 
					 
					
						
						
							
							CryptoPkg/BaseCryptLib: Add new API VerifyEKUsInPkcs7Signature  
						
						... 
						
						
						
						REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1402 
Add the API VerifyEKUsInPkcs7Signature to check if x509 cert
has any or all EKUs.
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Cc: Gang Wei <gang.wei@intel.com >
Cc: Wang Jian J <jian.j.wang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com > 
						
						
					 
					
						2019-04-18 13:11:21 +08:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						1796a39493 
					 
					
						
						
							
							CryptoPkg/BaseCryptLib.h: Add new API VerifyEKUsInPkcs7Signature  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1402 
Add a prototype of new API VerifyEKUsInPkcs7Signature.
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Cc: Gang Wei <gang.wei@intel.com >
Cc: Wang Jian J <jian.j.wang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com > 
						
						
					 
					
						2019-04-18 13:11:20 +08:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						912e1e1ee2 
					 
					
						
						
							
							CryptoPkg/BaseCryptLib: Add new API to get organization name  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1401 
Implement a common function to get the NID name. And use
this function to get common name and organization name.
Add a null function API X509GetOrganizationName of null
function source file.
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Cc: Gang Wei <gang.wei@intel.com >
Cc: Wang Jian J <jian.j.wang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com > 
						
						
					 
					
						2019-04-18 13:11:20 +08:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						e2a673b853 
					 
					
						
						
							
							CryptoPkg/BaseCryptLib.h: Add new API to get organization name  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1401 
Add a prototype declaration of the new API X509GetOrganizationName
in the header file.
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Cc: Ting Ye <ting.ye@intel.com >
Cc: Gang Wei <gang.wei@intel.com >
Cc: Wang Jian J <jian.j.wang@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Reviewed-by: Jian J Wang <jian.j.wang@intel.com > 
						
						
					 
					
						2019-04-18 13:11:19 +08:00 
						 
				 
			
				
					
						
							
							
								Zailiang Sun 
							
						 
					 
					
						
						
							
						
						07accfe398 
					 
					
						
						
							
							Vlv2TbltDevicePkg: Retire 8254 timer and 8259 module  
						
						... 
						
						
						
						Use HpetTimerDxe instead of SmartTimer protocol. Retire 8259 as well.
Tested boot to Win10x64 successfully.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zailiang Sun <zailiang.sun@intel.com >
Cc: David Wei <david.wei@intel.com >
Cc: Yi Qian <yi.qian@intel.com >
Reviewed-by: Yi Qian <yi.qian@intel.com > 
						
						
					 
					
						2019-04-18 12:23:24 +08:00 
						 
				 
			
				
					
						
							
							
								Zailiang Sun 
							
						 
					 
					
						
						
							
						
						2980988575 
					 
					
						
						
							
							Vlv2TbltDevicePkg: Remove ResetSystem declaration  
						
						... 
						
						
						
						Use MdeModulePkg declaration of ResetSystem function, comment the one
in platform source code.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zailiang Sun <zailiang.sun@intel.com >
Cc: David Wei <david.wei@intel.com >
Cc: Yi Qian <yi.qian@intel.com >
Reviewed-by: Yi Qian <yi.qian@intel.com > 
						
						
					 
					
						2019-04-18 12:23:15 +08:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						d430568887 
					 
					
						
						
							
							MdeModulePkg/UefiBootManagerLib: fix crash on uninitialized ExitData  
						
						... 
						
						
						
						As reported by Gary, the recent LoadImage/StartImage changes to
accommodate dispatching PE/COFF images built for foreign architectures
may result in a crash when loading an IA32 option ROM into a X64 VM
running OVMF:
  Loading driver at 0x0007E537000 EntryPoint=0x0007E53C06D 8086100e.efi
  InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF 7F003B98
  ProtectUefiImageCommon - 0x7F002BC0
    - 0x000000007E537000 - 0x000000000009F900
  Image type IA32 can't be started on X64 UEFI system.
  ASSERT MdeModulePkg/Core/Dxe/Mem/Pool.c(698): Head->Signature == ((('p') |
              ('h' << 8)) | ((('d') | ('0' << 8)) << 16)) || Head->Signature
              == ((('p') | ('h' << 8)) | ((('d') | ('1' << 8)) << 16))
This turns out to be caused by the deferred image loading code in BDS,
which ends up trying to free an uninitialized 'ExitData' pointer.
Given that ExitData is never actually used, let's just get rid of it
entirely. While we're at it, drop the pointless assignment of Status
as well.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Tested-by: Gary Lin <glin@suse.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-17 18:02:37 -07:00 
						 
				 
			
				
					
						
							
							
								Fan, ZhijuX 
							
						 
					 
					
						
						
							
						
						cfb29d2bda 
					 
					
						
						
							
							BaseTools:update ConvertFceToStructurePcd.py with the char order PCD name.  
						
						... 
						
						
						
						BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1718 
BaseTools\Scripts\ConvertFceToStructurePcd.py
Update script to sort the PCD order base on PcdName,
then base on Pcd field name.
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-18 08:55:21 +08:00 
						 
				 
			
				
					
						
							
							
								Rodriguez, Christian 
							
						 
					 
					
						
						
							
						
						0eccea3fbe 
					 
					
						
						
							
							BaseTools: Hash false success with back to back builds  
						
						... 
						
						
						
						BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1692 
Add error handling to the --hash feature so that hash files
are invalidated when a build error occurs.
Signed-off-by: Christian Rodriguez <christian.rodriguez@intel.com >
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com > 
						
						
					 
					
						2019-04-16 13:14:15 +08:00 
						 
				 
			
				
					
						
							
							
								Fan, ZhijuX 
							
						 
					 
					
						
						
							
						
						87bfb9bcb7 
					 
					
						
						
							
							BaseTools:Coding problems cause can not encode FMP Auth Header  
						
						... 
						
						
						
						GenerateCapsule: error: can not encode FMP Auth Header
The system cannot find the file specified.
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com > 
						
						
					 
					
						2019-04-16 13:14:14 +08:00 
						 
				 
			
				
					
						
							
							
								Fan, ZhijuX 
							
						 
					 
					
						
						
							
						
						05217d210e 
					 
					
						
						
							
							BaseTools:Enable the /MP option of MSVC compiler  
						
						... 
						
						
						
						BZ:https://bugzilla.tianocore.org/show_bug.cgi?id=1672 
The /MP option of MSVC compiler can reduce the total time to compile the
source files on the command line.
This patch is going to enable this MSVC option in BaseTools.
Cc: Bob Feng <bob.c.feng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Zhiju.Fan <zhijux.fan@intel.com >
Reviewed-by: Bob Feng <bob.c.feng@intel.com > 
						
						
					 
					
						2019-04-16 13:14:13 +08:00 
						 
				 
			
				
					
						
							
							
								Bret Barkelew 
							
						 
					 
					
						
						
							
						
						42d8be0eaa 
					 
					
						
						
							
							MdeModulePkg/CapsulePei: Update the debug code to print 64bit data  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1677 
For some pointer and UINT64 data, the debug code print with '%x'.
Which would loss the upper 32bit data. So update '%x' to '%lx'
for these data. And change the pointer value from '%x' to '%p'.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Hao Wu <hao.a.wu@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-16 13:03:12 +08:00 
						 
				 
			
				
					
						
							
							
								Zhichao Gao 
							
						 
					 
					
						
						
							
						
						85b0193276 
					 
					
						
						
							
							MdeModulePkg/CapsulePei: Change debug MACRO  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1677 
Change debug printlevel from EFI_D_ to DEBUG_.
DEBUG_ version is recommanded to use.
Cc: Jian J Wang <jian.j.wang@intel.com >
Cc: Hao Wu <hao.a.wu@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Cc: Sean Brogan <sean.brogan@microsoft.com >
Cc: Michael Turner <Michael.Turner@microsoft.com >
Cc: Bret Barkelew <Bret.Barkelew@microsoft.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-16 13:03:12 +08:00 
						 
				 
			
				
					
						
							
							
								Chasel, Chiu 
							
						 
					 
					
						
						
							
						
						68d47eea42 
					 
					
						
						
							
							IntelFsp2WrapperPkg: Perform post FSP-S process.  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1716 
In API mode FSP wrapper will perform some post
FSP-S process but such process was skipped in Dispatch
mode which may impact some of the boot loaders.
To align behavior between API and Dispatch, an
End-of-Pei callback is introduced to perform same process
in Dispatch mode.
Note: If boot loader implemented its own
      PostFspsHobProcess (), it has to check
      PcdFspModeSelection and support each mode
      properly.
Test: Verified on internal platform and both
      FSP API and Dispatch modes booted successfully.
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com >
Cc: Star Zeng <star.zeng@intel.com >
Signed-off-by: Chasel Chiu <chasel.chiu@intel.com >
Reviewed-by: Star Zeng <star.zeng@intel.com >
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com > 
						
						
					 
					
						2019-04-16 12:46:58 +08:00 
						 
				 
			
				
					
						
							
							
								Kinney, Michael D 
							
						 
					 
					
						
						
							
						
						eb33b3994d 
					 
					
						
						
							
							EmulatorPkg/Unix: Rename GdbRun to GdbRun.sh  
						
						... 
						
						
						
						https://bugzilla.tianocore.org/show_bug.cgi?id=1657 
Add .sh file extension to the shell script GdbRun so
changes to this file will pass PatchCheck.py.
Also update all scripts that execute GdbRun to
execute GdbRun.sh instead.
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Andrew Fish <afish@apple.com >
Cc: Ray Ni <ray.ni@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com > 
					
						2019-04-15 14:54:08 -07:00 
						 
				 
			
				
					
						
							
							
								Dong, Guo 
							
						 
					 
					
						
						
							
						
						04af8bf262 
					 
					
						
						
							
							UefiPayloadPkg: Enhance UEFI payload for coreboot and Slim Bootloader  
						
						... 
						
						
						
						CorebootModulePkg and CorebootPayloadPkg originally supports coreboot only.
In order to support other bootloaders, such as Slim Bootloader, they need
be updated to be more generic.
UEFI Payload (UefiPayloadPkg) a converged package from CorebootModulePkg
and CorebootPayloadPkg with following updates:
a. Support both coreboot and Slim Bootloader
b. Removed SataControllerDxe and BaseSerialPortLib16550 to use EDK2 modules
c. Support passing bootloader parameter to UEFI payload, e.g. coreboot
   table from coreboot or HOB list from Slim Bootloader
d. Using GraphicsOutputDxe from EDK2 with minor change instead of FbGop
e. Remove the dependency to IntelFrameworkPkg and IntelFrameworkModulePkg
   and QuarkSocPkg
f. Use BaseDebugLibSerialPort library as DebugLib
g. Use HPET timer, drop legacy 8254 timer support
h. Use BaseXApicX2ApicLib instead of BaseXApicLib
i. Remove HOB gUefiFrameBufferInfoGuid to use EDK2 graphics HOBs.
j. Other clean ups
On how UefiPayloadPkg could work with coreboot/Slim Bootloader, please
refer UefiPayloadPkg/BuildAndIntegrationInstructions.txt
Once UefiPayloadPkg is checked-in, CorebootModulePkg and CorebootPayloadPkg
could be retired.
Signed-off-by: Guo Dong <guo.dong@intel.com >
Reviewed-by: Maurice Ma <maurice.ma@intel.com > 
						
						
					 
					
						2019-04-15 12:30:05 -07:00 
						 
				 
			
				
					
						
							
							
								Dandan Bi 
							
						 
					 
					
						
						
							
						
						87fcc6e863 
					 
					
						
						
							
							CorebootPayloadPkg: Remove the dependency of ShellBinPkg  
						
						... 
						
						
						
						REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1675 
In long term we will remove ShellBinPkg, so now we update
platform to use ShellPkg only.
Cc: Maurice Ma <maurice.ma@intel.com >
Cc: Prince Agyeman <prince.agyeman@intel.com >
Cc: Benjamin You <benjamin.you@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Benjamin You <benjamin.you@intel.com > 
						
						
					 
					
						2019-04-15 23:00:59 +08:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						2e21e8c4b8 
					 
					
						
						
							
							MdeModulePkg/DxeCore: remove explicit EBC handling  
						
						... 
						
						
						
						Now that the EBC machine type is no longer classified as a
natively supported machine type on the architectures that can
support it via the EBC interpreter, the EBC specific handling
in DXE core is no longer used and can be removed.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:37:39 -07:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						431390dc1f 
					 
					
						
						
							
							MdePkg/UefiBaseType.h: treat EBC as a non-native machine type  
						
						... 
						
						
						
						Instead of classifying EBC as a supported machine type and have special
handling in DXE core for loading EBC images, make it a foreign type and
rely on the EDK2 PE/COFF image emulator protocol to claim the image when
the DXE core finds that it cannot be supported natively.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:37:36 -07:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						095fcfc606 
					 
					
						
						
							
							MdeModulePkg/EbcDxe: implement the PE/COFF emulator protocol  
						
						... 
						
						
						
						Implement the new EDK2 PE/COFF image emulator protocol so that we can
remove the EBC specific handling in the DXE core and other places in
the core code.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:37:33 -07:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						26d60374b8 
					 
					
						
						
							
							MdeModulePkg/UefiBootManagerLib: allow foreign Driver#### images  
						
						... 
						
						
						
						Allow PE/COFF images that must execute under emulation for Driver####
options, by removing the redundant machine type check from the BDS code.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:37:30 -07:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						615a72400b 
					 
					
						
						
							
							MdeModulePkg/PciBusDxe: dispatch option ROMs for foreign architectures  
						
						... 
						
						
						
						Delete the explicit machine type check for option ROM images, and instead,
rely on the LoadImage() boot service to decide whether an option ROM can
be dispatched or not. This permits platforms to ship with emulators to
execute option ROMs that are not native to the processor architecture.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:37:27 -07:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						57df17fe26 
					 
					
						
						
							
							MdeModulePkg/DxeCore: invoke the emulator protocol for foreign images  
						
						... 
						
						
						
						When encountering PE/COFF images that cannot be supported natively,
attempt to locate an instance of the PE/COFF image emulator protocol,
and if it supports the image, proceed with loading it and register it
with the emulator.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:37:12 -07:00 
						 
				 
			
				
					
						
							
							
								Ard Biesheuvel 
							
						 
					 
					
						
						
							
						
						f72f81777b 
					 
					
						
						
							
							MdeModulePkg: introduce PE/COFF image emulator protocol  
						
						... 
						
						
						
						Introduce a protocol that can be invoked by the image loading services
to execute foreign architecture PE/COFF images via an emulator.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com >
Reviewed-by: Hao Wu <hao.a.wu@intel.com > 
						
						
					 
					
						2019-04-14 18:35:41 -07:00 
						 
				 
			
				
					
						
							
							
								Shenglei Zhang 
							
						 
					 
					
						
						
							
						
						174232fa9a 
					 
					
						
						
							
							MdePkg/BaseLib: Remove LongJump.c and SetJump.c  
						
						... 
						
						
						
						MdePkg BaseLib still uses the inline X86 assembly code
in C code files.For now, inline SetJump/LongJump() can be removed.
https://bugzilla.tianocore.org/show_bug.cgi?id=1163 
Cc: Michael D Kinney <michael.d.kinney@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com > 
						
						
					 
					
						2019-04-15 09:12:44 +08:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						34131e1b5c 
					 
					
						
						
							
							OvmfPkg/XenBusDxe: replace MIT license text with SPDX ID  
						
						... 
						
						
						
						The "XenBus.c", "XenStore.c", "XenStore.h" files under "OvmfPkg/XenBusDxe"
include the MIT License text. Replace those license blocks with
"SPDX-License-Identifier: MIT" (which refers to
<https://spdx.org/licenses/MIT.html >) for easier parsing by machines (and
humans).
This follows the tree-wide adoption of "SPDX-License-Identifier"s, made
for <https://bugzilla.tianocore.org/show_bug.cgi?id=1373 >.
Cc: Anthony Perard <anthony.perard@citrix.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Julien Grall <julien.grall@arm.com >
Cc: Lars Kurth <lars.kurth@citrix.com >
Cc: xen-devel@lists.xenproject.org 
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1654 
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com > 
						
						
					 
					
						2019-04-12 12:04:38 +02:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						6f21d772aa 
					 
					
						
						
							
							OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID  
						
						... 
						
						
						
						The header files under "OvmfPkg/Include/IndustryStandard/Xen" include the
MIT License text. Replace those license blocks with
"SPDX-License-Identifier: MIT" (which refers to
<https://spdx.org/licenses/MIT.html >) for easier parsing by machines (and
humans).
This follows the tree-wide adoption of "SPDX-License-Identifier"s, made
for <https://bugzilla.tianocore.org/show_bug.cgi?id=1373 >.
Cc: Anthony Perard <anthony.perard@citrix.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Julien Grall <julien.grall@arm.com >
Cc: Lars Kurth <lars.kurth@citrix.com >
Cc: xen-devel@lists.xenproject.org 
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1654 
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com > 
						
						
					 
					
						2019-04-12 12:04:36 +02:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						07a0f27b0e 
					 
					
						
						
							
							OvmfPkg/License.txt: refresh the MIT license text and include the SPDX ID  
						
						... 
						
						
						
						Refresh the MIT license text from <https://spdx.org/licenses/MIT.html >,
and add "SPDX-License-Identifier: MIT" for easier parsing by machines.
This follows the tree-wide adoption of "SPDX-License-Identifier"s, made
for <https://bugzilla.tianocore.org/show_bug.cgi?id=1373 >; in particular:
- commit 304bff722375fae505b7anthony.perard@citrix.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Julien Grall <julien.grall@arm.com >
Cc: Lars Kurth <lars.kurth@citrix.com >
Cc: xen-devel@lists.xenproject.org 
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1654 
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Philippe Mathieu-Daude <philmd@redhat.com >
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com > 
						
						
					 
					
						2019-04-12 12:04:33 +02:00 
						 
				 
			
				
					
						
							
							
								Laszlo Ersek 
							
						 
					 
					
						
						
							
						
						cff96d4373 
					 
					
						
						
							
							OvmfPkg/License.txt: remove XenPvBlkDxe from the MIT licensed dir list  
						
						... 
						
						
						
						All files under "OvmfPkg/XenPvBlkDxe" carry
  SPDX-License-Identifier: BSD-2-Clause-Patent
None of them are MIT-licensed.
Update "OvmfPkg/License.txt" accordingly.
Cc: Anthony Perard <anthony.perard@citrix.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Julien Grall <julien.grall@arm.com >
Cc: Lars Kurth <lars.kurth@citrix.com >
Cc: xen-devel@lists.xenproject.org 
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1654 
Signed-off-by: Laszlo Ersek <lersek@redhat.com >
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com > 
						
						
					 
					
						2019-04-12 12:04:30 +02:00 
						 
				 
			
				
					
						
							
							
								Zhichao Gao 
							
						 
					 
					
						
						
							
						
						e0fd9ece26 
					 
					
						
						
							
							ShellPkg: Clarify the description of acpiview option '-s'  
						
						... 
						
						
						
						BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=1153 
The '-s' option of 'acpiview' do not support multiply invcation options.
So clarify it for users.
Modify the help decription for UefiShellAcpiViewCommandLib which the
description is equal or over 80 column. If the line include equal or over
80 characters. The display engine would display a blank line for those
equal 80 characters or a extra line with few words for those over 80
character. So it is better to keep each line less than 80 characters.
Cc: Jaben Carsey <jaben.carsey@intel.com >
Cc: Ray Ni <ray.ni@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com >
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com > 
						
						
					 
					
						2019-04-11 14:45:33 +08:00 
						 
				 
			
				
					
						
							
							
								Hao Wu 
							
						 
					 
					
						
						
							
						
						6d70ade90c 
					 
					
						
						
							
							OvmfPkg: Update DSC/FDF files to consume 8259/8254 drivers in OvmfPkg  
						
						... 
						
						
						
						REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1496 
This commit updates the OVMF DSC/FDF files to consume the copied
8259InterruptControllerDxe and 8254TimerDxe drivers within OvmfPkg.
The unconsumed PCD:
gPcAtChipsetPkgTokenSpaceGuid.Pcd8259LegacyModeEdgeLevel
is removed from DSC files as well.
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Ray Ni <ray.ni@intel.com >
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com > 
						
						
					 
					
						2019-04-11 08:57:30 +08:00 
						 
				 
			
				
					
						
							
							
								Hao Wu 
							
						 
					 
					
						
						
							
						
						e3c787af8c 
					 
					
						
						
							
							OvmfPkg/8254TimerDxe: Update to make it build for OVMF  
						
						... 
						
						
						
						REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1496 
This commit will remove the IntelFrameworkPkg DEC file dependency in the
driver INF file.
A new GUID has been updated for the INF file.
Corresponding changes have been made in OVMF DSC files as well in order to
verify the build.
Please note that a subsequent commit (final patch of the series) will:
A) Add OvmfPkg/8254TimerDxe driver in OVMF FDF files;
B) Remove the consumption of PcAtChipsetPkg/8254TimerDxe driver in OVMF
DSC/FDF files.
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Ray Ni <ray.ni@intel.com >
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com > 
						
						
					 
					
						2019-04-11 08:57:29 +08:00 
						 
				 
			
				
					
						
							
							
								Hao Wu 
							
						 
					 
					
						
						
							
						
						1a3ffdff82 
					 
					
						
						
							
							OvmfPkg: Copy 8254TimerDxe driver from PcAtChipsetPkg  
						
						... 
						
						
						
						REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1496 
This commit copies the exact 8254TimerDxe driver from PcAtChipsetPkg to
OvmfPkg.
Cc: Jordan Justen <jordan.l.justen@intel.com >
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org >
Cc: David Woodhouse <dwmw2@infradead.org >
Cc: Ray Ni <ray.ni@intel.com >
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Laszlo Ersek <lersek@redhat.com > 
						
						
					 
					
						2019-04-11 08:57:29 +08:00