]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
6 years agoBaseTools: Update GenFw to clear unused debug entry generated by VS tool chain
Liming Gao [Mon, 19 Jun 2017 09:49:44 +0000 (17:49 +0800)]
BaseTools: Update GenFw to clear unused debug entry generated by VS tool chain

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

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoBaseTools: Update tools_def.template to remove old XCLANG and XCODE32
Liming Gao [Fri, 23 Jun 2017 12:33:54 +0000 (20:33 +0800)]
BaseTools: Update tools_def.template to remove old XCLANG and XCODE32

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

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Andrew Fish <afish@apple.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
6 years agoMdeModulePkg/XhciDxe: Check timeout URB again after stopping endpoint
Ruiyu Ni [Mon, 3 Jul 2017 09:53:49 +0000 (17:53 +0800)]
MdeModulePkg/XhciDxe: Check timeout URB again after stopping endpoint

This fixes BULK data loss when transfer is detected as timeout but
finished just before stopping endpoint.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
6 years agoMdeModulePkg/XhciDxe: Separate common logic to XhcTransfer
Ruiyu Ni [Wed, 28 Jun 2017 09:11:34 +0000 (17:11 +0800)]
MdeModulePkg/XhciDxe: Separate common logic to XhcTransfer

The patch separates the common logic in XhcControlTransfer,
XhcBulkTransfer and XhcSyncIntTransfer to a sub-routine
XhcTransfer. It doesn't have functionality impact.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
6 years agoMdeModulePkg/XhciDxe: Dump the CMD/EVENT/INT/BULK ring information
Ruiyu Ni [Wed, 28 Jun 2017 08:56:09 +0000 (16:56 +0800)]
MdeModulePkg/XhciDxe: Dump the CMD/EVENT/INT/BULK ring information

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
6 years agoMdeModulePkg/XhciDxe: Refine IsTransferRingTrb and IsAsyncIntTrb
Ruiyu Ni [Wed, 28 Jun 2017 08:55:12 +0000 (16:55 +0800)]
MdeModulePkg/XhciDxe: Refine IsTransferRingTrb and IsAsyncIntTrb

Current implementation of IsTransferRingTrb only checks whether
the TRB is in the RING of the URB.
The patch enhanced the logic to check that whether the TRB belongs
to the transaction of URB.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
6 years agoBaseTools: suppress usage instructions with rebuild options
Chris Ruffin [Thu, 22 Jun 2017 18:59:49 +0000 (14:59 -0400)]
BaseTools: suppress usage instructions with rebuild options

When using edksetup.bat Rebuild, the script outputs usage instructions
to the console, when no usage error is encountered.  Update the usage
instructions and suppress these usage instructions when using the
Rebuild, ForceRebuild options.

Change-Id: Ica98e19f3d5198df2519106e4c55314c255e04ac
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chris Ruffin <chris.ruffin@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
6 years agoBeagleBoardPkg: switch to use MdeModulePkg ResetSystemLib
Leif Lindholm [Mon, 3 Jul 2017 15:05:04 +0000 (16:05 +0100)]
BeagleBoardPkg: switch to use MdeModulePkg ResetSystemLib

The BeagleBoard port used EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
for its reset handling. With the arrival
MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf

As part of this, change BeagleBoardPkg/Library/ResetSystemLib to be an
implementation of ResetSystemLib instead of the previous
EfiResetSystemLib.

Wire all reset variants to ResetCold, except for ResetShutdown and
EnterS3WithImmediateWake, which return immediately.

Note: this ResetSystemLib never supported being called after
ExitBootservices, and this shortcoming is not addressed here.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
6 years agoArmVirtPkg: switch to generic ResetSystemRuntimeDxe
Ard Biesheuvel [Mon, 3 Jul 2017 13:46:18 +0000 (14:46 +0100)]
ArmVirtPkg: switch to generic ResetSystemRuntimeDxe

For obscure reasons, ARM platforms use a different implementation of
the ResetSystem() runtime service call than other platforms. So let's
switch all ArmVirtPkg platforms to the generic version instead.

Given that all platforms use an implementation of EfiResetSystemLib [as
consumed by the ResetRuntimeDxe in EmbeddedPkg that we are replacing]
which is unlikely to be depended upon by out of tree platforms, let's
simply modify this library into an implementation of ResetSystemLib
instead [which is what the generic driver in MdeModulePkg consumes]

This does mean we need to update all clients at the same time, which
is why all changes are part of the same patch.

As before, warm reset and platform specific reset are mapped onto
cold reset (which is the only thing PSCI implements, at least the
version we depend on). The new library function EnterS3WithImmediateWake()
is left unimplemented, as permitted by the ResetSystemLib library class.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
6 years agoArmPkg: implement ResetSystemLib using PSCI 0.2 calls
Ard Biesheuvel [Mon, 3 Jul 2017 15:00:12 +0000 (16:00 +0100)]
ArmPkg: implement ResetSystemLib using PSCI 0.2 calls

This adds an implementation of the ResetSystemLib library class as
defined in MdeModulePkg. It is used as the platform glue by the generic
ResetSystemRuntimeDxe which lives in the same package.

This implementation is intended to replace the EfiResetSystemLib based
implementation that is deprecated now that we have decided that there is
no longer a reason to keep a different ResetSystem() implementation
under EmbeddedPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoMdeModulePkg CapsuleApp: Fix print info in BuildGatherList()
Star Zeng [Fri, 30 Jun 2017 12:38:55 +0000 (20:38 +0800)]
MdeModulePkg CapsuleApp: Fix print info in BuildGatherList()

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

Print (L"CapsuleApp: capsule data starts          at 0x%X with
 size 0x%X\n", (UINTN) CapsuleBuffer, FileSize);

It should use (UINTN) CapsuleBuffer[Index] and FileSize[Index]
as parameter.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Cloud Wang <winggundum82@163.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdeModulePkg ResetSystem: Update the comments of ResetSystem()
Star Zeng [Thu, 29 Jun 2017 14:39:40 +0000 (22:39 +0800)]
MdeModulePkg ResetSystem: Update the comments of ResetSystem()

Update the comments of ResetSystem() that was missed by
37078045d717 and 28426918f0ea.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Dandan Bi <dandan.bi@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
6 years agoMdeModulePkg/ResetSystem: Implement ResetNotification protocol
Ruiyu Ni [Thu, 15 Jun 2017 08:31:56 +0000 (16:31 +0800)]
MdeModulePkg/ResetSystem: Implement ResetNotification protocol

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdeModulePkg/ResetSystem: Remove unnecessary global variable
Ruiyu Ni [Thu, 15 Jun 2017 07:34:11 +0000 (15:34 +0800)]
MdeModulePkg/ResetSystem: Remove unnecessary global variable

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdePkg: Add ResetNotification protocol definition
Ruiyu Ni [Thu, 15 Jun 2017 07:25:50 +0000 (15:25 +0800)]
MdePkg: Add ResetNotification protocol definition

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdeModulePkg PeiCore: Correct the comments of PeiResetSystem2
Star Zeng [Thu, 29 Jun 2017 14:48:43 +0000 (22:48 +0800)]
MdeModulePkg PeiCore: Correct the comments of PeiResetSystem2

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg: Correct the comments of EFI_PEI_RESET2_SYSTEM
Star Zeng [Thu, 29 Jun 2017 14:47:56 +0000 (22:47 +0800)]
MdePkg: Correct the comments of EFI_PEI_RESET2_SYSTEM

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoEmbeddedPkg/MmcDxe: Correct argument of ECSD read
Jun Nie [Thu, 29 Jun 2017 09:02:05 +0000 (17:02 +0800)]
EmbeddedPkg/MmcDxe: Correct argument of ECSD read

The argument of CMD8 should be stuff bits according to standard
JESD84-A44.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoEmbeddedPkg/MmcDxe: Add non-DDR timing mode support
Jun Nie [Mon, 12 Jun 2017 02:18:05 +0000 (10:18 +0800)]
EmbeddedPkg/MmcDxe: Add non-DDR timing mode support

Only DDR mode is support for 8bit mode currently. Add
non-DDR case when configuring ECSD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoShellPkg: Update dh command to reflect correct driver field information
Tapan Shah [Tue, 27 Jun 2017 18:17:24 +0000 (02:17 +0800)]
ShellPkg: Update dh command to reflect correct driver field information

dh command gets driver name and wrongly prints it as 'Child [handle]'.
It should print it as 'Driver Name [handle]'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoUefiCpuPkg: Fix coding style issues
Dandan Bi [Wed, 28 Jun 2017 02:33:32 +0000 (10:33 +0800)]
UefiCpuPkg: Fix coding style issues

Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
6 years agoMdeModulePkg/AtaAtapiPassThru: relax PHY detect timeout
Ard Biesheuvel [Fri, 23 Jun 2017 14:50:53 +0000 (14:50 +0000)]
MdeModulePkg/AtaAtapiPassThru: relax PHY detect timeout

The SATA spec mandates that link detection by the PHY completes within
10 ms after receiving a reset signal. However, there is no obligation
to uphold this requirement at the driver end as strictly as we do, and
as it turns out, some combinations of host and device (e.g., Samsung
850 EVO connected to a LeMaker Cello) are only borderline compliant,
which means the device is not detected reliably.

So let's allow for a bit of margin, and increase the PHY detect timeout
value to 15 ms.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdePkg/IndustryStandard: update ACPI/IORT definitions to revision C
Ard Biesheuvel [Thu, 22 Jun 2017 11:00:06 +0000 (11:00 +0000)]
MdePkg/IndustryStandard: update ACPI/IORT definitions to revision C

This updates the IORT header to include the definitions that were added
in revision C of the IORT spec that was made public recently.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoDuetPkg FsVariable: Update GetNextVariableName to follow UEFI 2.7
Star Zeng [Fri, 23 Jun 2017 07:42:07 +0000 (15:42 +0800)]
DuetPkg FsVariable: Update GetNextVariableName to follow UEFI 2.7

"The size must be large enough to fit input string supplied in
VariableName buffer" is added in the description for VariableNameSize.
And two cases of EFI_INVALID_PARAMETER are added.
1. The input values of VariableName and VendorGuid are not a name and
   GUID of an existing variable.
2. Null-terminator is not found in the first VariableNameSize bytes of
   the input VariableName buffer.

This patch is to update code to follow them.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdeModulePkg Variable: Update GetNextVariableName to follow UEFI 2.7
Star Zeng [Thu, 22 Jun 2017 09:30:39 +0000 (17:30 +0800)]
MdeModulePkg Variable: Update GetNextVariableName to follow UEFI 2.7

"The size must be large enough to fit input string supplied in
VariableName buffer" is added in the description for VariableNameSize.
And two cases of EFI_INVALID_PARAMETER are added.
1. The input values of VariableName and VendorGuid are not a name and
   GUID of an existing variable.
2. Null-terminator is not found in the first VariableNameSize bytes of
   the input VariableName buffer.

This patch is to update code to follow them.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg: Update comments for GetNextVariableName to follow UEFI 2.7
Star Zeng [Thu, 22 Jun 2017 06:17:19 +0000 (14:17 +0800)]
MdePkg: Update comments for GetNextVariableName to follow UEFI 2.7

"The size must be large enough to fit input string supplied in
VariableName buffer" is added in the description for VariableNameSize.
And two cases of EFI_INVALID_PARAMETER are added.
1. The input values of VariableName and VendorGuid are not a name and
   GUID of an existing variable.
2. Null-terminator is not found in the first VariableNameSize bytes of
   the input VariableName buffer.

This patch is to update comments for GetNextVariableName to follow them.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoShellPkg DmpStore: Make NameSize to be consistent with name buffer
Star Zeng [Thu, 22 Jun 2017 07:22:33 +0000 (15:22 +0800)]
ShellPkg DmpStore: Make NameSize to be consistent with name buffer

Current code will allocate pool to hold the null char for name buffer
when PrevName==NULL, but the NameSize is still 0.

For this case, GetNextVariableName will return EFI_INVALID_PARAMETER
to follow UEFI 2.7 spec.

UEFI 2.7 spec:
  The VariableNameSize must not be smaller the size of the variable
  name string passed to GetNextVariableName() on input in the
  VariableName buffer.

  EFI_INVALID_PARAMETER
  Null-terminator is not found in the first VariableNameSize bytes of
  the input VariableName buffer.

This patch is to make NameSize to be consistent with name buffer.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdeModulePkg/BdsDxe: Report Status Code when booting from BootOrder list
Dandan Bi [Mon, 26 Jun 2017 05:18:20 +0000 (13:18 +0800)]
MdeModulePkg/BdsDxe: Report Status Code when booting from BootOrder list

Report Status Code to indicate BDS starts attempting booting
from the UEFI BootOrder list.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
6 years agoMdePkg/PiStatusCode: Add new Status Code for BDS when attempting BootOrder
Dandan Bi [Mon, 26 Jun 2017 03:57:00 +0000 (11:57 +0800)]
MdePkg/PiStatusCode: Add new Status Code for BDS when attempting BootOrder

According to new PI spec, add new Status Code to indicate BDS starts
attempting booting from the UEFI BootOrder list.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
6 years agoRevert "MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol"
Star Zeng [Tue, 27 Jun 2017 01:34:13 +0000 (09:34 +0800)]
Revert "MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol"

This reverts commit 45cfcd8dccf84b8abbc1d6f587fedb5d2037ec79 since it is
breaking OVMF platform and also real platforms.

REF:
https://www.mail-archive.com/edk2-devel@lists.01.org/msg26882.html
https://www.mail-archive.com/edk2-devel@lists.01.org/msg26820.html

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
6 years agoUefiCpuPkg: Modify GetProcessorLocationByApicId() to support AMD.
Leo Duran [Sat, 17 Jun 2017 00:41:49 +0000 (08:41 +0800)]
UefiCpuPkg: Modify GetProcessorLocationByApicId() to support AMD.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
6 years agoUefiCpuPkg: Add CPUID definitions for AMD.
Leo Duran [Sat, 17 Jun 2017 00:41:48 +0000 (08:41 +0800)]
UefiCpuPkg: Add CPUID definitions for AMD.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leo Duran <leo.duran@amd.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
6 years agoUefiCpuPkg: Define AMD Memory Encryption specific CPUID and MSR
Brijesh Singh [Thu, 22 Jun 2017 20:37:32 +0000 (04:37 +0800)]
UefiCpuPkg: Define AMD Memory Encryption specific CPUID and MSR

The patch defines AMD's Memory Encryption Information CPUID leaf and SEV
status MSR. The complete description for CPUID leaf is available in APM
volume 2, Section 15.34.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Leo Duran <leo.duran@amd.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
6 years agoMdeModulePkg DxeCore: Only free ScratchBuffer when it is not NULL
Star Zeng [Fri, 23 Jun 2017 09:44:12 +0000 (17:44 +0800)]
MdeModulePkg DxeCore: Only free ScratchBuffer when it is not NULL

There is a case that ExtractGuidedSectionGetInfo return 0 for
ScratchBufferSize and ScratchBuffer will be NULL, after AllocatePool
fails to allocate buffer for AllocatedOutputBuffer, the code will
call FreePool (ScratchBuffer), but ScratchBuffer == NULL.

This patch is to only free ScratchBuffer when it is not NULL.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol
Amit Kumar [Fri, 23 Jun 2017 10:09:47 +0000 (18:09 +0800)]
MdeModulePkg/DxeCore: Fixed Interface returned by CoreOpenProtocol

Change since v3:
1) Fixed issue when Attributes = EFI_OPEN_PROTOCOL_TEST_PROTOCOL
and Inteface = NULL case. [Reported by:star.zeng at intel.com]

Change Since v2:
1) Modified to use EFI_ERROR to get status code

Change since v1:
1) Fixed typo protocal to protocol
2) Fixed coding style

Modified source code to update Interface as per spec.
1) In case of Protocol is un-supported, interface should be returned NULL.
2) In case of any error, interface should not be modified.
3) In case of Test Protocol, interface is optional.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Amit Kumar <amit.ak@samsung.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoIntelSiliconPkg: Add package DSC file
Hao Wu [Thu, 22 Jun 2017 02:38:59 +0000 (10:38 +0800)]
IntelSiliconPkg: Add package DSC file

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

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoBaseTools/PatchCheck.py: Add warning info for new binary files
Hao Wu [Thu, 8 Jun 2017 06:57:48 +0000 (14:57 +0800)]
BaseTools/PatchCheck.py: Add warning info for new binary files

The commit adds the detection of adding new binary files in a patch file
or in a commit.

The following warning messages will be appended at the end of the script
output:

WARNING - The following binary files will be added into the repository:
  <BinaryFile1>
  <BinaryFile2>
  ...

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools/PatchCheck.py: Fix misreport for binary changes in patch
Hao Wu [Thu, 8 Jun 2017 02:58:22 +0000 (10:58 +0800)]
BaseTools/PatchCheck.py: Fix misreport for binary changes in patch

For a patch file that:
1. Contains a binary change
2. Contains any other changes after the binary change

PatchCheck.py will complains with the following error:
* Patch format error: diff found after end of patch
   Line: literal XXXX

This commit resolves this misreport.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: support building the same INF more than once with -m option
Yonghong Zhu [Thu, 8 Jun 2017 13:54:23 +0000 (21:54 +0800)]
BaseTools: support building the same INF more than once with -m option

Currently DSC file [Components] Section can support building the same
INF more than once for the same arch, this patch support build with -m
option to generate multiple instances.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: report error HiiString in HII format PCD must not be empty
Yonghong Zhu [Fri, 23 Jun 2017 06:34:32 +0000 (14:34 +0800)]
BaseTools: report error HiiString in HII format PCD must not be empty

Add a check that HiiString field in the HII format PCD entry must not
be an empty string.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: Fix the bug that use '|' or '||' in DSC file's Pcd value
Yunhua Feng [Tue, 20 Jun 2017 05:55:53 +0000 (13:55 +0800)]
BaseTools: Fix the bug that use '|' or '||' in DSC file's Pcd value

Fix the bug to support use '|' or '||' in DSC file's Pcd value.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: Enhance the report to not show the empty section
Yonghong Zhu [Thu, 8 Jun 2017 02:14:02 +0000 (10:14 +0800)]
BaseTools: Enhance the report to not show the empty section

Enhance the report to not show the empty section, eg: Module Library
Sub-section, if there is nothing in this section, we will not show it
in the report.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: Enhance DEC Defines section format check
Yunhua Feng [Thu, 22 Jun 2017 03:19:47 +0000 (11:19 +0800)]
BaseTools: Enhance DEC Defines section format check

1. break if Dec Defines Section is missing
2. break if Dec have more than one Defines Section
3. break if Dec Defines Section have arch attribute
4. break if no section head, like as:
#[Defines]
 DEC_SPECIFICATION              = 0x00010005
 PACKAGE_NAME                   = Nt32Pkg

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: Copy "TianoCore" userextensions into As Built Inf
Yonghong Zhu [Thu, 13 Apr 2017 06:33:05 +0000 (14:33 +0800)]
BaseTools: Copy "TianoCore" userextensions into As Built Inf

Per build spec to update the tool to copy "TianoCore" userextensions to
As Built INF file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: Copy "MODULE_UNI_FILE" file into OUTPUT directory
Yonghong Zhu [Thu, 13 Apr 2017 06:37:40 +0000 (14:37 +0800)]
BaseTools: Copy "MODULE_UNI_FILE" file into OUTPUT directory

Current the "MODULE_UNI_FILE" item defined in the [Defines] section will
be copied into As Built INF file, but tool doesn't copy the real file into
same directory with the As Built INF file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg/Cper.h: Update Firmware Error Record per UEFI 2.7
Hao Wu [Thu, 15 Jun 2017 00:59:40 +0000 (08:59 +0800)]
MdePkg/Cper.h: Update Firmware Error Record per UEFI 2.7

This commit updates the Firmware Error Record related definitions
according to UEFI 2.7 spec Section N.2.10 Table 281:

a. Adds definitions for 2 Firmware Error Record types
b. Update the structure EFI_FIRMWARE_ERROR_DATA

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdeModulePkg: Enhance the debug message for InstallProtocolInterface
Star Zeng [Wed, 21 Jun 2017 05:28:26 +0000 (13:28 +0800)]
MdeModulePkg: Enhance the debug message for InstallProtocolInterface

Current code is using debug message like below for
InstallProtocolInterface.
InstallProtocolInterface: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX XXX

User could not know whether the installation is failed or not by the
debug message, for example, the code below does not initialize Handle
before calling InstallProtocolInterface, EFI_INVALID_PARAMETER will be
returned.
  EFI_HANDLE Handle;
  Status = gBS->InstallProtocolInterface (
                  &Handle,
                  &XXX,
                  EFI_NATIVE_INTERFACE,
                  XXX
                  );

This patch is to add additional debug message if the installation
is failed and specific debug message for the case that the input
handle is invalid.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg: update Base.h in MdePkg to check the _MSC_VER
Yonghong Zhu [Wed, 14 Jun 2017 03:50:56 +0000 (11:50 +0800)]
MdePkg: update Base.h in MdePkg to check the _MSC_VER

update Base.h in MdePkg to check the _MSC_VER and define
GLOBAL_REMOVE_IF_UNREFERENCED to nothing for VS2013 and higher tool
chain tags.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
6 years agoBaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags
Yonghong Zhu [Wed, 14 Jun 2017 07:35:03 +0000 (15:35 +0800)]
BaseTools: add /Gw to CC_FLAGS for VS2013 and higher tool chain tags

The /Gw flag does a better job at size optimization than use of the
GLOBAL_REMOVE_IF_UNREFERENCED macro that is currently used for VS20xx
tool chains to remove unreferenced global variables.
This patch add /Gw to CC_FLAGS for VS2013 and higher tool chain tags.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
6 years agoNetworkPkg: Fix GCC build issue.
Fu Siyuan [Fri, 23 Jun 2017 01:08:47 +0000 (09:08 +0800)]
NetworkPkg: Fix GCC build issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
6 years agoBaseTools/tools_def: AARCH64: disable LTO type mismatch warnings
Ard Biesheuvel [Tue, 20 Jun 2017 18:43:54 +0000 (20:43 +0200)]
BaseTools/tools_def: AARCH64: disable LTO type mismatch warnings

On AARCH64, any code that may execute with the MMU off needs to be built
with -mstrict-align, given that unaligned accesses are not allowed unless
the MMU is enabled. This does not only affect SEC and PEI modules, but
also static libraries of the BASE type, which may be linked into such
modules, as well as into modules of other types. As it turns out, the
presence of -mstrict-align is reflected in the internal representations
of the types defined in those libraries.

When -fstrict-aliasing is passed to GCC, it assumes that pointers to
objects of different types cannot refer to the same memory location, and
attempts to exploit this fact when optimizing the code. Since such
assumptions are only valid under very strict conditions which are not
guaranteed to be met in EDK2, we disable this optimization by passing
-fno-strict-aliasing by default. [*]

When LTO is in effect, this applies equally to the code generation that
may occur at link time, which is why the linker warns about unexpected
differences in type definitions between the intermediate representations
that are present in the object files being linked. This may result in
warnings such as the one below, even if -fno-strict-aliasing is used:

  MdePkg/Include/Library/BaseLib.h:1712:1:
  warning: type of 'StrToGuid' does not match original declaration
  [-Wlto-type-mismatch]
   StrToGuid (
   ^
  MdePkg/Library/BaseLib/SafeString.c:1506:1:
  note: 'StrToGuid' was previously declared here
   StrToGuid (
   ^
  MdePkg/Library/BaseLib/SafeString.c:1506:1:
  note: code may be misoptimized unless -fno-strict-aliasing is used

This warning is inadvertently triggered when linking BASE libraries built
with -mstrict-align into modules of types other than SEC or PEI, since the
types are subtly different, even though the use of code that maintains
strict alignment in a module that does not care about this is unlikely to
cause problems. And even if it did, it would still only affect code built
with -fstrict-aliasing enabled, which we disable unconditionally. So let's
just silence the warning by passing -Wno-lto-type-mismatch.

[*] Leif adds: "-fstrict-aliasing is GCC default, because it is a
    restriction in the C language. Because it's a bit non-obvious, things
    can go hilariously wrong in very non-obvious ways, and the potential
    optimization gains are unlikely to be generally relevant,
    -fno-strict-aliasing is a sensible thing to always have set (like we
    do)."

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
6 years agoBaseTools/tools_def GCC: ARM/AARCH64: drop -save-temps from command line
Ard Biesheuvel [Tue, 20 Jun 2017 18:43:53 +0000 (20:43 +0200)]
BaseTools/tools_def GCC: ARM/AARCH64: drop -save-temps from command line

For historical reasons, GCC builds for ARM and AARCH64 pass the
-save-temps command line option to GCC, which instructs the compiler
to preserve intermediate files, i.e., preprocessor output and generated
assembler. Given that this clutters up the Build directory, and slows
down the build, let's remove it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoDuetPkg FSVariable: Add missing change in e286e118bafa
Star Zeng [Wed, 21 Jun 2017 13:27:01 +0000 (21:27 +0800)]
DuetPkg FSVariable: Add missing change in e286e118bafa

e286e118bafa updated *.c file, but forgot to update *.h file.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdeModulePkg Variable: Add missing change in dd59d95e1994
Star Zeng [Wed, 21 Jun 2017 13:24:55 +0000 (21:24 +0800)]
MdeModulePkg Variable: Add missing change in dd59d95e1994

dd59d95e1994 updated *.c file, but forgot to update *.h file.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdeModulePkg: Minor update to the Data parameter for PEI GetVariable()
Star Zeng [Wed, 21 Jun 2017 09:31:35 +0000 (17:31 +0800)]
MdeModulePkg: Minor update to the Data parameter for PEI GetVariable()

PI 1.5 spec has minor update to the Data parameter for PEI
GetVariable(), and no real functional behavior change.

The modifier of Data parameter:
OUT VOID *Data
->
OUT VOID *Data OPTIONAL

The comments of Data parameter:
Data    Points to the buffer which will hold the returned variable value.
->
Data    Points to the buffer which will hold the returned variable value.
        May be NULL with a zero DataSize in order to determine the size of the buffer needed.

The patch is to follow the spec to update the implementation.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg: Minor update to the Data parameter for PEI GetVariable()
Star Zeng [Wed, 21 Jun 2017 09:26:41 +0000 (17:26 +0800)]
MdePkg: Minor update to the Data parameter for PEI GetVariable()

PI 1.5 spec has minor update to the Data parameter for PEI
GetVariable(), and no real functional behavior change.

The modifier of Data parameter:
OUT VOID *Data
->
OUT VOID *Data OPTIONAL

The comments of Data parameter:
Data    Points to the buffer which will hold the returned variable value.
->
Data    Points to the buffer which will hold the returned variable value.
        May be NULL with a zero DataSize in order to determine the size of the buffer needed.

The patch is to follow the spec to update the definition.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoNetworkPkg/HttpBootDxe: Add HTTP Boot Callback protocol support.
Fu Siyuan [Wed, 14 Jun 2017 09:28:48 +0000 (17:28 +0800)]
NetworkPkg/HttpBootDxe: Add HTTP Boot Callback protocol support.

This patch updates the HTTP Boot driver to install a default HTTP Callback protocol
if the platform doesn't provide one. This callback implementation will print the
boot file download progress in percentage format.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
6 years agoMdePkg: Add header file for HTTP Boot Callback protocol in UEFI 2.7.
Fu Siyuan [Wed, 14 Jun 2017 09:25:39 +0000 (17:25 +0800)]
MdePkg: Add header file for HTTP Boot Callback protocol in UEFI 2.7.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
6 years agoMdeModulePkg: Return invalid param in LocateProtocol for Protocol==NULL
Star Zeng [Tue, 20 Jun 2017 10:25:29 +0000 (18:25 +0800)]
MdeModulePkg: Return invalid param in LocateProtocol for Protocol==NULL

Return EFI_INVALID_PARAMETER in LocateProtocol for Protocol==NULL to
follow UEFI 2.7 spec

PiSmmCore is also updated as the EFI_SMM_SYSTEM_TABLE2.SmmLocateProtocol
is reusing the definition of EFI_LOCATE_PROTOCOL.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg: Update comments for LocateProtocol to follow UEFI 2.7 spec
Star Zeng [Tue, 20 Jun 2017 10:18:07 +0000 (18:18 +0800)]
MdePkg: Update comments for LocateProtocol to follow UEFI 2.7 spec

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoMdePkg: Add EFI UFS Device Config Protocol definitions
Hao Wu [Thu, 15 Jun 2017 03:08:34 +0000 (11:08 +0800)]
MdePkg: Add EFI UFS Device Config Protocol definitions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdePkg/BluetoothConfig: Update comments for GetData/GetRemoteData
Hao Wu [Mon, 19 Jun 2017 05:06:22 +0000 (13:06 +0800)]
MdePkg/BluetoothConfig: Update comments for GetData/GetRemoteData

Updates the GetData and GetRemoteData services description comments
according to latest UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoArmPlatformPkg: eliminate Juno gcc build warning
Leif Lindholm [Tue, 20 Jun 2017 10:51:34 +0000 (11:51 +0100)]
ArmPlatformPkg: eliminate Juno gcc build warning

When building without LTO, gcc incorrectly resolves the hazards for
'PciRegBase’ when inlining, leading to "may be used uninitialized"
warnings (and hence build failure with -Werror).
Eliminate this warning by explicitly initializing the variable to 0.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
6 years agoMdeModulePkg: Fix use-after-free error in InstallConfigurationTable()
Shi, Steven [Sat, 20 May 2017 09:05:17 +0000 (17:05 +0800)]
MdeModulePkg: Fix use-after-free error in InstallConfigurationTable()

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

When installing configuration table and the original
gDxeCoreST->ConfigurationTable[] buffer happen to be not big enough to
add a new table, the CoreInstallConfigurationTable() enter the branch
of line 113 in InstallConfigurationTable.c to free the old
gDxeCoreST->ConfigurationTable[] buffer and allocate a new bigger one.
The problem happens at line 139 CoreFreePool(), which is to free the
old gDxeCoreST->ConfigurationTable[] buffer. The CoreFreePool()'s
behavior is to free the buffer firstly, then call the
InstallMemoryAttributesTableOnMemoryAllocation (PoolType) to update
the EfiRuntimeServices type memory info, the
CoreInstallConfigurationTable() will be re-entered by CoreFreePool()
in its calling stack, then use-after-free read error will happen at
line 59 of InstallConfigurationTable.c and use-after-free write error
will happen at line 151 and 152 of InstallConfigurationTable.c.

The patch is to update System table to the new table pointer before
calling CoreFreePool() to free the old table.

The case above is in DxeCore, but not in PiSmmCore.
The change in PiSmmCore is to be consistent with DxeCore.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Steven Shi <steven.shi@intel.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Steven Shi <steven.shi@intel.com>
6 years agoMdeModulePkg: Clean ACPI 2.0 characters in UEFI spec
Dandan Bi [Fri, 16 Jun 2017 05:24:02 +0000 (13:24 +0800)]
MdeModulePkg: Clean ACPI 2.0 characters in UEFI spec

v2: Add some missing changes.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdePkg: Clean ACPI 2.0 characters in UEFI spec
Dandan Bi [Fri, 16 Jun 2017 05:23:20 +0000 (13:23 +0800)]
MdePkg: Clean ACPI 2.0 characters in UEFI spec

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdePkg: update comments in ResetSystem() according to UEFI2.7
Dandan Bi [Fri, 16 Jun 2017 04:57:34 +0000 (12:57 +0800)]
MdePkg: update comments in ResetSystem() according to UEFI2.7

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdePkg: Update comments in EFI_MEMORY_DESCRIPTOR according to UEFI2.7
Dandan Bi [Fri, 16 Jun 2017 03:36:15 +0000 (11:36 +0800)]
MdePkg: Update comments in EFI_MEMORY_DESCRIPTOR according to UEFI2.7

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
6 years agoMdePkg/HiiImageDecoder.h: Remove the unnecessary comments
Dandan Bi [Fri, 16 Jun 2017 03:13:01 +0000 (11:13 +0800)]
MdePkg/HiiImageDecoder.h: Remove the unnecessary comments

Cc: Liming Gao <liming.gao@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7
Dandan Bi [Fri, 16 Jun 2017 03:04:43 +0000 (11:04 +0800)]
MdeModulePkg: Update comments in SimpleTextInEx according to UEFI 2.7

v2: Add some missing changes Ps2KeyboardDxe.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoIntelFrameworkModulePkg: Update comments in SimpleTextInEx
Dandan Bi [Fri, 16 Jun 2017 02:53:36 +0000 (10:53 +0800)]
IntelFrameworkModulePkg: Update comments in SimpleTextInEx

Update comments in SimpleTextInEx according to UEFI 2.7.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdePkg/SimpleTextInEx: Update comments according to UEFI 2.7 spec
Dandan Bi [Thu, 15 Jun 2017 05:43:00 +0000 (13:43 +0800)]
MdePkg/SimpleTextInEx: Update comments according to UEFI 2.7 spec

Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoUefiCpuPkg/SmmCpuFeatureLib: Add more CPU ID for SmmFeatureControl.
Jiewen Yao [Mon, 12 Jun 2017 02:12:50 +0000 (10:12 +0800)]
UefiCpuPkg/SmmCpuFeatureLib: Add more CPU ID for SmmFeatureControl.

Add more CPU ID which can support SmmFeatureControl,
according to IA32 SDM.

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
6 years agoNetworkPkg: Typo fix and comments correction
Jiaxin Wu [Thu, 16 Mar 2017 01:59:05 +0000 (09:59 +0800)]
NetworkPkg: Typo fix and comments correction

warter -> water
Maunual -> Manual
TCP and UDP --> TCP4 and TCP6
TCP or UDP --> TCP4 or TCP6

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
6 years agoMdeModulePkg/Network: Typo fix
Jiaxin Wu [Thu, 16 Mar 2017 01:58:27 +0000 (09:58 +0800)]
MdeModulePkg/Network: Typo fix

warter -> water
Maunual -> Manual

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
6 years agoShellBinPkg: Ia32/X64 Shell binary update.
Ruiyu Ni [Tue, 13 Jun 2017 08:23:18 +0000 (16:23 +0800)]
ShellBinPkg: Ia32/X64 Shell binary update.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoMdeModulePkg/BMMUiLib: Fix incorrect variable name
Dandan Bi [Mon, 12 Jun 2017 01:16:32 +0000 (09:16 +0800)]
MdeModulePkg/BMMUiLib: Fix incorrect variable name

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

In function UpdateConsoleContent, we compare console name
with "ErrOut" string to check whether the content in console
Error device page has been changed. But when call function
UpdateConsoleContent, we pass console name as "ConErr" by mistake.
This patch is to fix the inconsistent issue.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
6 years agoSecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"
Star Zeng [Thu, 8 Jun 2017 02:16:40 +0000 (10:16 +0800)]
SecurityPkg TcgDxe: Simplify debug msg when "TPM not working properly"

Current code for case "TPM not working properly" uses the predefined
macro __FILE__ in debug format string, but uses predefined macro
__LINE__ as parameter, and it also uses multiple pairs of "" in debug
format string.

To be simple and clear, this patch is to update the code to just use
"DriverEntry: TPM not working properly\n" as the debug message.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Amy Chan <amy.chan@intel.com>
Cc: Chasel Chiu <chasel.chiu@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chasel Chiu <chasel.chiu@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
6 years agoShellPkg: Fix typo errors in ifconfig help output
Tapan Shah [Fri, 9 Jun 2017 17:11:21 +0000 (01:11 +0800)]
ShellPkg: Fix typo errors in ifconfig help output

Found few instances where IPv4 and DHCPv4 spelled incorrectly
as IP4 and DHCP4 respectively.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
6 years agoShell/alias: Print detailed error when deleting alias
Ruiyu Ni [Fri, 9 Jun 2017 03:10:32 +0000 (11:10 +0800)]
Shell/alias: Print detailed error when deleting alias

STR_GEN_ERR_NOT_FOUND is added and currently is only
used by alias command. This string template can be used
by other commands as well.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
6 years agoOvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning
Ard Biesheuvel [Thu, 8 Jun 2017 19:03:04 +0000 (19:03 +0000)]
OvmfPkg/AcpiPlatformDxe: fix spurious uninitialized var warning

Commit 4275f38507a4 ("OvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit
space unless restricted") introduced a variable which is [incorrectly]
identified by GCC as being potentially uninitialized. So let's just set
it to NULL before use.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
6 years agoNetworkPkg/HttpBootDxe: Handle new #define in HttpBootDxe
hegdenag [Thu, 8 Jun 2017 06:40:33 +0000 (14:40 +0800)]
NetworkPkg/HttpBootDxe: Handle new #define in HttpBootDxe

Add a error message in HttpBootPrintErrorMessage for HTTP 308
Redirect.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
6 years agoMdeModulePkg/DxeHttpLib: Handle new #define in HttpMappingToStatusCode
hegdenag [Thu, 8 Jun 2017 06:40:09 +0000 (14:40 +0800)]
MdeModulePkg/DxeHttpLib: Handle new #define in HttpMappingToStatusCode

Related to the ECR for support of HTTP Redirect (308)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
6 years agoMdePkg/Http.h: Add #define for 308 redirect
hegdenag [Thu, 8 Jun 2017 06:39:03 +0000 (14:39 +0800)]
MdePkg/Http.h: Add #define for 308 redirect

Adding Support for the ECR for HTTP 308 redirect.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
6 years agoShellPkg/ifconfig: Update help message
hegdenag [Thu, 8 Jun 2017 06:40:53 +0000 (14:40 +0800)]
ShellPkg/ifconfig: Update help message

Couple of instances had IP4 mentioned, instead of IPv4.
Changing all to IPv4 to maintain consistency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
6 years agoShellPkg: Remove unnecessary Readme.txt
Ruiyu Ni [Wed, 7 Jun 2017 05:51:26 +0000 (13:51 +0800)]
ShellPkg: Remove unnecessary Readme.txt

The Readme.txt contains instructions about how to integrate Shell
into Nt32. Actually Nt32 already contains a macro USE_OLD_SHELL to
choose OLD or NEW Shell.

So remove this txt file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
6 years agoMdeModulePkg/PciHostBridgeDxe: Make bitwise operands of the same size
Hao Wu [Thu, 8 Jun 2017 08:07:31 +0000 (16:07 +0800)]
MdeModulePkg/PciHostBridgeDxe: Make bitwise operands of the same size

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
6 years agoOvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit space unless restricted
Laszlo Ersek [Sat, 3 Jun 2017 14:11:08 +0000 (16:11 +0200)]
OvmfPkg/AcpiPlatformDxe: alloc blobs from 64-bit space unless restricted

... by narrower than 8-byte ADD_POINTER references.

Introduce the CollectAllocationsRestrictedTo32Bit() function, which
iterates over the linker/loader script, and collects the names of the
fw_cfg blobs that are referenced by QEMU_LOADER_ADD_POINTER.PointeeFile
fields, such that QEMU_LOADER_ADD_POINTER.PointerSize is less than 8. This
means that the pointee blob's address will have to be patched into a
narrower-than-8 byte pointer field, hence the pointee blob must not be
allocated from 64-bit address space.

In ProcessCmdAllocate(), consult these restrictions when setting the
maximum address for gBS->AllocatePages(). The default is now MAX_UINT64,
unless restricted like described above to the pre-patch MAX_UINT32 limit.

In combination with Ard's QEMU commit cb51ac2ffe36 ("hw/arm/virt: generate
64-bit addressable ACPI objects", 2017-04-10), this patch enables
OvmfPkg/AcpiPlatformDxe to work entirely above the 4GB mark.

(An upcoming / planned aarch64 QEMU machine type will have no RAM under
4GB at all. Plus, moving the allocations higher is beneficial to the
current "virt" machine type as well; in Ard's words: "having all firmware
allocations inside the same 1 GB (or 512 MB for 64k pages) frame reduces
the TLB footprint".)

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Suggested-by: Gerd Hoffmann <kraxel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
6 years agoMdePkg: update Wi-Fi/Supplicant header files to meet UEFI 2.7.
Wang, Fan [Tue, 6 Jun 2017 10:51:35 +0000 (18:51 +0800)]
MdePkg: update Wi-Fi/Supplicant header files to meet UEFI 2.7.

This patch is used to update supplicant.h and wifi2.h
to meet UEFI 2.7 definition. Add EfiSupplicant80211PMK
field in EFI_SUPPLICANT_DATA_TYPE and change **NetworkDesc
to NetworkDesc[1] in EFI_80211_GET_NETWORKS_RESULT.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
6 years agoBaseTools: Fix the bug use same FMP_PAYLOAD in different capsule file
Yonghong Zhu [Tue, 6 Jun 2017 05:28:07 +0000 (13:28 +0800)]
BaseTools: Fix the bug use same FMP_PAYLOAD in different capsule file

Fix the bug that use same FMP_PAYLOAD in different capsule file. Because
in previous FMP generation, the FMP already be generated, so we don't
need to regenerate again.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoBaseTools: Fix incremental build failure that override file be removed
Yonghong Zhu [Tue, 6 Jun 2017 08:35:44 +0000 (16:35 +0800)]
BaseTools: Fix incremental build failure that override file be removed

Fix a Incremental build failure. The case is: Both A and B package will
include a same .h file, and in the driver's packages section, A
package is listed before B package, so we will use the .h file in the A
package and build success, then we directly delete the .h file in package
A, it cause increment build failure since in the AutoGenTimeStamp file
the .h file in A can't be found.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
6 years agoShellBinPkg: Ia32/X64 Shell binary update.
Ruiyu Ni [Wed, 7 Jun 2017 01:48:38 +0000 (09:48 +0800)]
ShellBinPkg: Ia32/X64 Shell binary update.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
6 years agoShellPkg/parse: Handle Unicode stream from pipe correctly
Ruiyu Ni [Tue, 6 Jun 2017 08:23:33 +0000 (16:23 +0800)]
ShellPkg/parse: Handle Unicode stream from pipe correctly

The original code expects the Unicode stream from pipe doesn't
contains the Unicode BOM.
But that's not true.
Commit [9ed21946c76e430097e9c4e59b419af928e0cb8c] changes
CreateFileInterfaceMem() to add the BOM for Unicode stream.

When parse pipe support was firstly added, a private implementation
ParseReturnStdInLine() was created to specially handle
the Unicode stream without BOM. Since now the Unicode steam contains
BOM, the private implementation can be removed and
ShellFileHandleReturnLine() can be used directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
6 years agoShellPkg/alias: Return status for alias deletion
Ruiyu Ni [Tue, 6 Jun 2017 05:26:12 +0000 (13:26 +0800)]
ShellPkg/alias: Return status for alias deletion

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
6 years agoMdePkg: Add BluetoothAttribute.h and BluetoothLeConfig.h
Ruiyu Ni [Tue, 6 Jun 2017 03:14:16 +0000 (11:14 +0800)]
MdePkg: Add BluetoothAttribute.h and BluetoothLeConfig.h

UEFI Spec 2.7 introduces BluetoothAttribute and BluetoothLeConfig
protocols. The patch adds the definitions for them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdePkg/BluetoothIo: Formalize function header comments.
Ruiyu Ni [Tue, 6 Jun 2017 03:07:12 +0000 (11:07 +0800)]
MdePkg/BluetoothIo: Formalize function header comments.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdePkg/BluetoothHc: Add detailed function header comments
Ruiyu Ni [Tue, 6 Jun 2017 03:01:15 +0000 (11:01 +0800)]
MdePkg/BluetoothHc: Add detailed function header comments

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdePkg/BluetoothConfig: Add new EFI_BLUETOOTH_CONFIG_DATA_TYPE types
Ruiyu Ni [Tue, 6 Jun 2017 02:54:34 +0000 (10:54 +0800)]
MdePkg/BluetoothConfig: Add new EFI_BLUETOOTH_CONFIG_DATA_TYPE types

UEFI spec 2.7 adds new EFI_BLUETOOTH_CONFIG_DATA_TYPE types.
The patch adds them to the header file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
6 years agoMdePkg/DevicePath: Add BluetoothLe device path node support
Ruiyu Ni [Tue, 6 Jun 2017 02:03:09 +0000 (10:03 +0800)]
MdePkg/DevicePath: Add BluetoothLe device path node support

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
6 years agoMdePkg SmmIoLib: Use NULL pointer check instead of useless Status check
Star Zeng [Mon, 5 Jun 2017 06:31:19 +0000 (14:31 +0800)]
MdePkg SmmIoLib: Use NULL pointer check instead of useless Status check

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

The Status check in "if (!EFI_ERROR (Status))" condition is useless,
it should be NULL pointer check. And this patch also fixes a typo
"continous" to "continuous".

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>