]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoSecurityPkg: Clear AuthSession content after use.
Yao, Jiewen [Mon, 11 Jan 2016 05:18:32 +0000 (05:18 +0000)]
SecurityPkg: Clear AuthSession content after use.

Some commands in Tpm2CommandLib accept AuthSession
as input parameter and copy to local command buffer.
After use, this AuthSession content should be zeroed,
because there might be some secrete there.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19635 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: Add Tpm2Startup return code check.
Yao, Jiewen [Mon, 11 Jan 2016 05:15:18 +0000 (05:15 +0000)]
SecurityPkg: Add Tpm2Startup return code check.

Tpm2Startup does not check TPM device return code.
It might cause problem, that error is not detected
in Tcg2Peim, for example, S3 resume case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19634 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: MOR drivers use Tcg2Protocol instead of TrEE.
Yao, Jiewen [Mon, 11 Jan 2016 05:12:31 +0000 (05:12 +0000)]
SecurityPkg: MOR drivers use Tcg2Protocol instead of TrEE.

The official TCG standard uses Tcg2Protocol, instead of TrEE.
We should update TCG driver to use Tcg2Protocol, too.
TrEE should be used only for old TrEE implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19633 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/NvmExpressDxe: Fix MS toolchain /Od 32bit build failure
Feng Tian [Mon, 11 Jan 2016 02:47:21 +0000 (02:47 +0000)]
MdeModulePkg/NvmExpressDxe: Fix MS toolchain /Od 32bit build failure

Note NVME_ACQ & NVME_ASQ internal data structure are changed to make
build pass.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19632 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/UfsBlockIoPei: Fix MS toolchain /Od 32bit build failure
Feng Tian [Mon, 11 Jan 2016 02:46:36 +0000 (02:46 +0000)]
MdeModulePkg/UfsBlockIoPei: Fix MS toolchain /Od 32bit build failure

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19631 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Fix GraphicsConsole driver resolution out of sync issue
Ruiyu Ni [Mon, 11 Jan 2016 02:29:09 +0000 (02:29 +0000)]
MdeModulePkg: Fix GraphicsConsole driver resolution out of sync issue

When the GOP doesn't support the resolution specified by
PcdVideoHorizontalResolution and PcdVideoVerticalResolution,
the code tries to set the resolution to 800x600 but uses the resolution
equals to the PCD when calculating the text print position.
The patch fixes the bug by updating the resolution to 800x600 for
this case.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19630 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoPcAtChipsetPkg SerialIoLib: Fix VS2010 build error
Hao Wu [Mon, 11 Jan 2016 00:34:36 +0000 (00:34 +0000)]
PcAtChipsetPkg SerialIoLib: Fix VS2010 build error

When overriding compiler options '/GL' with '/GL-', VS2010 will report
warning C4701 potentially uninitialized local variable for 'LcrParity'
and 'LcrStop' in function SerialPortSetAttributes().

This commit fixes this build issue.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19629 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg BaseSerialPortLib: Fix VS2010 build error
Hao Wu [Mon, 11 Jan 2016 00:34:15 +0000 (00:34 +0000)]
MdeModulePkg BaseSerialPortLib: Fix VS2010 build error

When overriding compiler options '/GL' with '/GL-', VS2010 will report
warning C4701 potentially uninitialized local variable for 'LcrParity'
and 'LcrStop' in function SerialPortSetAttributes().

This commit fixes this build issue.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19628 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Fix compilation errors caused by previous commit of daConsole.c
Daryl McDaniel [Sun, 10 Jan 2016 21:23:51 +0000 (21:23 +0000)]
StdLib: Fix compilation errors caused by previous commit of daConsole.c

Move functions da_ConFlush and da_ConClose to just before da_ConPoll so that
they are defined after any calls to them.

Replace da_ConFlush with the actual final implementation instead of the
initial version which was committed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Michael Zimmermann <sigmaepsilon92@gmail.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19627 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: DeleteLoadOptionVariable() removes Boot####
Ruiyu Ni [Fri, 8 Jan 2016 07:16:22 +0000 (07:16 +0000)]
MdeModulePkg: DeleteLoadOptionVariable() removes Boot####

Change EfiBootManagerDeleteLoadOptionVariable() to not just
remove #### from BootOrder but also remove Boot#### variable.

The old behavior tries to do less for performance but it leaves
unreferenced Boot#### which cannot be reclaimed in variable
reclaim operation though the Boot#### will be eventually be overwritten
by EfiBootManagerAddLoadOptionVariable().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19626 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRefine error handle code, avoid assert when load this module twice.
Eric Dong [Fri, 8 Jan 2016 05:21:55 +0000 (05:21 +0000)]
Refine error handle code, avoid assert when load this module twice.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19625 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.
Fu Siyuan [Fri, 8 Jan 2016 02:38:34 +0000 (02:38 +0000)]
MdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.

This patch updates the MNP driver to recycle TX buffer asynchronously, instead
of using a while loop wait after each transmit command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19624 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: update SNP.GetStatus to handle multiple recycled TX buffer.
Fu Siyuan [Fri, 8 Jan 2016 02:21:25 +0000 (02:21 +0000)]
MdeModulePkg: update SNP.GetStatus to handle multiple recycled TX buffer.

This patch fixes a bug in SNP.GetStatus() interface. The UNDI driver may return
multiple transmitted buffers in a single GetStatus command, while SNP.GetStatus
could only return one pointer each time, the rest of them are lost. This patch
fixes this issue by store these recycled pointer in a temporary buffer in SNP
driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19623 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg : Tpm2DeviceLibDTpm : Rename TisTpmCommand to avoid name collision
Samer El-Haj-Mahmoud [Fri, 8 Jan 2016 01:36:45 +0000 (01:36 +0000)]
SecurityPkg : Tpm2DeviceLibDTpm :  Rename TisTpmCommand to avoid name collision

Change TisTpmCommand to Tpm2TisTpmCommand. Makes function name more clear.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19622 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformSecureLib: Remove redundant GPIO expander config
Michael Kinney [Thu, 7 Jan 2016 22:43:31 +0000 (22:43 +0000)]
QuarkPlatformPkg/PlatformSecureLib: Remove redundant GPIO expander config

Remove GPIO expander configuration actions that are now performed in
PEI Phase in PlatformInit module.  In order to detect physical presence
only the state of the Reset Button needs to be read.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19621 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformEarlyInit: Configure GPIO expander
Michael Kinney [Thu, 7 Jan 2016 22:43:22 +0000 (22:43 +0000)]
QuarkPlatformPkg/PlatformEarlyInit: Configure GPIO expander

Configure GPIO expander in PEI phase
1) Configure all GPIO expander pins connected to Reset Button as inputs
2) Configure multiplexer for I2C to route I2C bus to Arduino Header

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19620 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformHelperLib: Move PCAL functions for PEI use
Michael Kinney [Thu, 7 Jan 2016 22:43:11 +0000 (22:43 +0000)]
QuarkPlatformPkg/PlatformHelperLib: Move PCAL functions for PEI use

The functions used to manage the PCAL GPIO I2C expander are located
in a DXE specific source file.  Move these functions to a source
file that is common to both the PEI and DXE versions of this library
so these GPIO pins can be managed from PEIMs.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19619 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot
Michael Kinney [Thu, 7 Jan 2016 22:31:13 +0000 (22:31 +0000)]
QuarkPlatformPkg/PlatformInit: Adjust memory bin size to avoid reboot

Update memory bin sizes in Memory Type Information on first boot after
FLASH update to avoid reboot when memory bins are too small when all
features are enabled.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19618 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg/Tcg: Fix debug messages
Michael Kinney [Thu, 7 Jan 2016 22:24:22 +0000 (22:24 +0000)]
SecurityPkg/Tcg: Fix debug messages

Debug messages are using a format strings with %s for
a Unicode string, but the strings being printed are
ASCII strings and this results in corrupted debug
messages.  Change the the format string to use %a
instead of %s.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19617 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Clean-up 'map' command error message handling
Tapan Shah [Thu, 7 Jan 2016 22:01:28 +0000 (22:01 +0000)]
ShellPkg: Clean-up 'map' command error message handling

Refactor 'map' command error handling code and add standard error message

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19616 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkSocPkg: Remove X64 from SUPPORTED_ARCHITECTURES
Michael Kinney [Thu, 7 Jan 2016 21:52:53 +0000 (21:52 +0000)]
QuarkSocPkg: Remove X64 from SUPPORTED_ARCHITECTURES

QuarkSocPkg is only for IA32.  Remove X64 from SUPPORTED_ARCCHITECTURES in
DSC file.

Cc: Kelly Steele <kelly.steele@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Kelly Steele <kelly.steele@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19615 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: execute option ROM images regardless of Secure Boot
Laszlo Ersek [Thu, 7 Jan 2016 18:48:17 +0000 (18:48 +0000)]
OvmfPkg: execute option ROM images regardless of Secure Boot

Change the image verification policy for option ROM images to 0x00
(ALWAYS_EXECUTE).

While this may not be a good idea for physical platforms (see e.g.
<https://trmm.net/Thunderstrike>), on the QEMU platform the benefits seem
to outweigh the drawbacks:

- For QEMU's virtual PCI devices, and for some assigned PCI devices, the
  option ROMs come from host-side files, which can never be rewritten from
  within the guest. Since the host admin has full control over a guest
  anyway, executing option ROMs that originate from host-side files
  presents no additional threat to the guest.

- For assigned physical PCI devices with option ROMs, the argument is not
  so clear-cut. In theory a setup could exist where:

  - the host-side UEFI firmware (with DENY_EXECUTE_ON_SECURITY_VIOLATION)
    rejects the option ROM of a malicious physical PCI device, but

  - when the device is assigned to the guest, OVMF executes the option ROM
    in the guest,

  - the option ROM breaks out of the guest (using an assumed QEMU
    vulnerability) and gains QEMU user privileges on the host.

  However, in order to escalate as far as it would happen on the bare
  metal with ALWAYS_EXECUTE (i.e., in order to gain firmware-level access
  on the host), the malicious option ROM would have to break through (1)
  QEMU, (2) traditional UID and GID based privilege separation on the
  host, (3) sVirt (SELinux) on the host, (4) the host OS - host firmware
  boundary. This is not impossible, but not likely enough to discourage
  the use cases below.

- This patch makes it possible to use unsigned iPXE network drivers that
  QEMU presents in the option ROMs of virtual NICs and assigned SR-IOV
  VFs, even if Secure Boot is in User Mode or Deployed Mode.

- The change also makes it possible to execute unsigned, outdated
  (revoked), or downright malicious option ROMs of assigned physical
  devices in guests, for corporate, entertainment, academia, or security
  research purposes.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19614 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: inherit Image Verification Policy defaults from SecurityPkg
Laszlo Ersek [Thu, 7 Jan 2016 18:48:13 +0000 (18:48 +0000)]
OvmfPkg: inherit Image Verification Policy defaults from SecurityPkg

Secure Boot support was originally addded to OvmfPkg on 2012-Mar-09, in
SVN r13093 (git 8cee3de7e9f4), titled

  OvmfPkg: Enable secure-boot support when SECURE_BOOT_ENABLE==TRUE

At that time the image verification policies in
SecurityPkg/SecurityPkg.dec were:

- option ROM image:      0x00 (ALWAYS_EXECUTE)
- removable media image: 0x05 (QUERY_USER_ON_SECURITY_VIOLATION)
- fixed media image:     0x05 (QUERY_USER_ON_SECURITY_VIOLATION)

The author of SVN r13093 apparently didn't want to depend on the
SecurityPkg defaults for the latter two image origins, plus the
ALWAYS_EXECUTE policy for option ROM images must have been deemed too lax.
For this reason SVN r13093 immediately spelled out 0x05
(QUERY_USER_ON_SECURITY_VIOLATION) within OvmfPkg for all three image
origins.

Fast forward to 2013-Aug-28: policy 0x05
(QUERY_USER_ON_SECURITY_VIOLATION) had been forbidden in the UEFI spec,
and SVN r14607 (git db44ea6c4e09) reflected this in the source code:

- The policies for the latter two image origins were switched from 0x05 to
  0x04 (DENY_EXECUTE_ON_SECURITY_VIOLATION) in SecurityPkg,

- the patch changed the default policy for option ROM images too, from
  0x00 (ALWAYS_EXECUTE) to 0x04 (DENY_EXECUTE_ON_SECURITY_VIOLATION),

- any other client DSC files, including OvmfPkg's, underwent a whole-sale
  0x05 (QUERY_USER_ON_SECURITY_VIOLATION) -> 0x04
  (DENY_EXECUTE_ON_SECURITY_VIOLATION) replacement too.

The practical result of that patch for OvmfPkg was that the explicit 0x04
settings would equal the strict SecurityPkg defaults exactly.

And that's what we have today: the "override the default values from
SecurityPkg" comments in OvmfPkg's DSC files are stale, in practice.

It is extremely unlikely that SecurityPkg would change the defaults from
0x04 (DENY_EXECUTE_ON_SECURITY_VIOLATION) any time in the future, so let's
just inherit those in OvmfPkg.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19613 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/ScsiDisk: Increase the value of SCSI_DISK_TIMEOUT to 30s
Feng Tian [Thu, 7 Jan 2016 07:03:54 +0000 (07:03 +0000)]
MdeModulePkg/ScsiDisk: Increase the value of SCSI_DISK_TIMEOUT to 30s

As ScsiDisk and ScsiBus driver are used to manage SCSI or ATAPI devices,
the timeout value is updated to 30s to follow ATA/ATAPI spec in which
the device may take up to 30s to respond command.

The change is used to solve device compatibility issue found with a TEAC
DV-W28S-WZ3 slim DVD plus a SONY AccuCORE DVD-R media in which the DVD
spends 8s to response READ_CAPACITY cmd after resetting the host machine.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19612 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/Ide: return correct status when DRQ is not ready for ATAPI
Feng Tian [Thu, 7 Jan 2016 07:03:32 +0000 (07:03 +0000)]
MdeModulePkg/Ide: return correct status when DRQ is not ready for ATAPI

When executing ATAPI cmd at IDE mode, EFI_SUCCESS may be returned wrongly
with old logic but in fact DRQ is not ready and the transaction doesn't
get executed correctly at this time.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19611 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRevert "ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib...
Laszlo Ersek [Wed, 6 Jan 2016 16:23:20 +0000 (16:23 +0000)]
Revert "ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf"

SVN r19585 broke the OVMF build:

> ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf(20):
> error 3001: MODULE_TYPE UEFI_DRIVER UEFI_APPLICATION is not supported
> for EDK II, valid values are:
>  BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER
>  DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLICATION USER_DEFINED
>  SMM_CORE

Revert the patch.

Reported-by: Laszlo Ersek <lersek@redhat.com>
Suggested-by: "El-Haj-Mahmoud, Samer" <samer.el-haj-mahmoud@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19610 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: DnsDxe: fix return type of DnsFillinQNameForQueryIp()
Laszlo Ersek [Wed, 6 Jan 2016 12:34:46 +0000 (12:34 +0000)]
NetworkPkg: DnsDxe: fix return type of DnsFillinQNameForQueryIp()

Change the return type of DnsFillinQNameForQueryIp() from (UINT8*) to
(CHAR*). This brings the function in sync with both its internal variables
and all of its call sites, fixing the following gcc build breakage:

> NetworkPkg/DnsDxe/DnsImpl.c: In function 'DnsFillinQNameForQueryIp':
> NetworkPkg/DnsDxe/DnsImpl.c:1068:3: error: pointer targets in return
>                                     differ in signedness
>                                     [-Werror=pointer-sign]
>    return QueryName;
>    ^

The code was added in git commit fcae1a99 (SVN r19579).

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19609 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Make 'alias' can display a single alias name.
Qiu Shumin [Wed, 6 Jan 2016 07:43:58 +0000 (07:43 +0000)]
ShellPkg: Make 'alias' can display a single alias name.

When we run command "alias cat" Shell print out "alias: Too few arguments". This patch makes value of single alias name can be displayed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19608 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix Shell assert when mv a file to a NULL target.
Qiu Shumin [Wed, 6 Jan 2016 07:40:56 +0000 (07:40 +0000)]
ShellPkg: Fix Shell assert when mv a file to a NULL target.

When run command 'mv file ' the Shell assert. The patch refined the length of the buffer to fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19607 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRollback the commit because it has potential issue.
Dandan Bi [Wed, 6 Jan 2016 03:25:50 +0000 (03:25 +0000)]
Rollback the commit because it has potential issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19606 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add error DEBUG statements in ATA passthru driver
Samer El-Haj-Mahmoud [Wed, 6 Jan 2016 02:49:47 +0000 (02:49 +0000)]
MdeModulePkg: Add error DEBUG statements in ATA passthru driver

DEBUG errors for COMRESET and Port phy not ready.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19605 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: Fix 'caculate' typos
Hao Wu [Wed, 6 Jan 2016 01:13:35 +0000 (01:13 +0000)]
BaseTools: Fix 'caculate' typos

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19604 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Fix 'accroding' typos in MdeModulePkg.dec/.uni
Hao Wu [Wed, 6 Jan 2016 01:13:07 +0000 (01:13 +0000)]
MdeModulePkg: Fix 'accroding' typos in MdeModulePkg.dec/.uni

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19603 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg Tcg2Pei: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:12:48 +0000 (01:12 +0000)]
SecurityPkg Tcg2Pei: Fix a typo in function description

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19602 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg IScsiDxe: Fix typos in function descriptions
Hao Wu [Wed, 6 Jan 2016 01:12:27 +0000 (01:12 +0000)]
NetworkPkg IScsiDxe: Fix typos in function descriptions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19601 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg IpSecDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:12:07 +0000 (01:12 +0000)]
NetworkPkg IpSecDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19600 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg IScsiDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:11:49 +0000 (01:11 +0000)]
MdeModulePkg IScsiDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19599 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg AcpiTableDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:11:25 +0000 (01:11 +0000)]
MdeModulePkg AcpiTableDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19598 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg DxeHttpLib: Fix typos in function descriptions
Hao Wu [Wed, 6 Jan 2016 01:11:00 +0000 (01:11 +0000)]
MdeModulePkg DxeHttpLib: Fix typos in function descriptions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19597 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Core/Dxe/Misc: Fix typos in function descriptions
Hao Wu [Wed, 6 Jan 2016 01:10:40 +0000 (01:10 +0000)]
MdeModulePkg Core/Dxe/Misc: Fix typos in function descriptions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19596 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg UhciDxe: Fix a typo in function description
Hao Wu [Wed, 6 Jan 2016 01:09:56 +0000 (01:09 +0000)]
MdeModulePkg UhciDxe: Fix a typo in function description

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19595 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAppPkg/.../Python: Clean up and document how to escape the -# option.
Daryl McDaniel [Wed, 6 Jan 2016 01:00:19 +0000 (01:00 +0000)]
AppPkg/.../Python: Clean up and document how to escape the -# option.

Depending upon the version of Shell you are using, it may be necessary
to escape the '#' character, when using the "-#" command-line option, so that
the Shell doesn't interpret it as the start of a comment.
The escape character is '^'.
Example:
    python -^# -V

* General updating.
* Re-format so that no line is longer than 80 char.
* Add note about escaping the "-#" command-line option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19594 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Fix the potential memory leak issue in Display Engine
Dandan Bi [Wed, 6 Jan 2016 00:57:23 +0000 (00:57 +0000)]
MdeModulePkg:Fix the potential memory leak issue in Display Engine

The MenuOption insert to gMenuOption allocate memory everytime,but not free.
Now add the code to free it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19593 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Removing or adding some ASSERT statement
Jiaxin Wu [Wed, 6 Jan 2016 00:55:38 +0000 (00:55 +0000)]
NetworkPkg: Removing or adding some ASSERT statement

Refine the code by removing or adding some ASSERT statement
to make the code more readable.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19592 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Change the type of BootNext
Dandan Bi [Wed, 6 Jan 2016 00:55:12 +0000 (00:55 +0000)]
MdeModulePkg:Change the type of BootNext

Currently the invalid boot next set to the number of boot option,
when add a new boot option,also need update the boot next value,
otherwise it will be incorrect.Now set the type of BootNext value
to UINT32,the number out of the range of UINT16 means it is an
invalid BootNext Value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19591 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg:Avoid ASSERT in HiiConfigRoutingRouteConfig
Dandan Bi [Wed, 6 Jan 2016 00:52:53 +0000 (00:52 +0000)]
MdeModulePkg:Avoid ASSERT in HiiConfigRoutingRouteConfig

Add error handling code to enhance the code,the driver may not install
the ConfigAccess protocol,so should not just ASSERT here.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19590 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Fix IIO_Write() to return the number of bytes consumed, not characters output.
Daryl McDaniel [Wed, 6 Jan 2016 00:44:24 +0000 (00:44 +0000)]
StdLib: Fix IIO_Write() to return the number of bytes consumed, not characters output.

Depending upon termios settings, writing to a terminal device may result in
many more characters being output than were in the buffer provided to the
IIO_Write() function.

IIO_Write() is supposed to return the number of BYTES written, not characters.
Since the provided buffer contains MBCS characters, there can be up to three
bytes per character.  Due to the expansion that may occur, "BYTES written"
is interpreted to mean the number of BYTES consumed from the MBCS buffer
provided as a parameter to IIO_Write.

These changes ensure that the correct number of characters are consumed from
the internal Output buffer and the correct number of BYTES consumed from the
buffer parameter are counted and returned.

Update copyright.
Fix some indentation and white space issues.
Improve comments for IIO_Write().
Add debugging instrumentation to count unconsumed data in the Input and Output buffers.
Modify IIO_Write() to:
  Accurately count input bytes CONSUMED.
  Consume only as many expanded (cooked) characters from the output buffer
  as were actually sent to the device.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19589 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Clarify and improve comments.
Daryl McDaniel [Wed, 6 Jan 2016 00:31:42 +0000 (00:31 +0000)]
StdLib: Clarify and improve comments.

Indentation has been corrected in all of the files.

LibC/Locale/multibyte_Utf8.c
LibC/Uefi/SysCalls.c
  Clarify and improve comments.

Include/sys/termios.h
  Add parameter names to function prototypes as referenced in the comments.

StdLibPrivateInternalFiles\Include\kfile.h
  Add comment for the fo_close fileop.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19588 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Implement da_ConFlush() and flush I/O buffers when closing a console device.
Daryl McDaniel [Wed, 6 Jan 2016 00:05:02 +0000 (00:05 +0000)]
StdLib: Implement da_ConFlush() and flush I/O buffers when closing a console device.

Add header file Efi/SysEfi.h
Clean up some indent issues.
Implement function da_ConFlush()
Modify da_ConClose() to flush its buffers and clean up better upon close.
Construct the console instance using the new da_ConFlush() instead of the nullop function.
Remove da_ConFlush() from the "Not implemented (yet?)" place holder.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19587 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoStdLib: Temporarily restrict compiler warnings so that sockets can be built using...
Daryl McDaniel [Tue, 5 Jan 2016 23:46:22 +0000 (23:46 +0000)]
StdLib: Temporarily restrict compiler warnings so that sockets can be built using VS2015.

Update Copyright notice.
Add Build Options so that builds using VS2015 have the /Wv:11 options added to the CC_FLAGS.
This restricts the warnings generated by VS2015 (VC++) to just those that are produced by
version 11 of the C compiler, VS2010.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19586 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf
Samer El-Haj-Mahmoud [Tue, 5 Jan 2016 23:17:18 +0000 (23:17 +0000)]
ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.inf

Using UEFI_APPLICATION for all Shell app and libraries allows the use of
different compiler flags for the Shell application itself and for other
applications that are built separately that use Shell libraries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19585 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools CLANG35: use -target in PP flags as well
Ard Biesheuvel [Mon, 4 Jan 2016 09:31:42 +0000 (09:31 +0000)]
BaseTools CLANG35: use -target in PP flags as well

The Clang preprocessor may rely on builtin defines that are target
dependent, so we should add the -target argument also when invoking
the preprocessor directly.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19584 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools CLANG35: use linux-gnu target triplets explicitly
Ard Biesheuvel [Mon, 4 Jan 2016 09:31:33 +0000 (09:31 +0000)]
BaseTools CLANG35: use linux-gnu target triplets explicitly

Since we are combining Clang with the GNU linker, make that explicit in
the target triplet. This affects certain builtin defines and other compiler
behavior that may be unspecified otherwise.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19583 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: For RegularExpressionDxe use 'sprintf_s' to replace 'sprintf'.
Qiu Shumin [Mon, 4 Jan 2016 05:14:53 +0000 (05:14 +0000)]
MdeModulePkg: For RegularExpressionDxe use 'sprintf_s' to replace 'sprintf'.

Function 'sprintf' has potential buffer overflow risk. This patch use 'sprintf_s' to improve the code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19582 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python...
Daryl McDaniel [Mon, 4 Jan 2016 02:48:18 +0000 (02:48 +0000)]
AppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python 2.7.10 compliance.

Add new constants required for Python 2.7.10.
Update package and help values.
Define networking constants so that the getaddrinfo, gethostbyname, and
getnameinfo functions are used from the sockets package.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19581 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg/BaseLib: do not rely on undefined behavior in arithmetic shift
Ard Biesheuvel [Thu, 31 Dec 2015 10:47:22 +0000 (10:47 +0000)]
MdePkg/BaseLib: do not rely on undefined behavior in arithmetic shift

The runtime test whether the compiler supports arithmetic shift of
negative signed numbers currently relies on undefined behavior in C,
which means that all bets are off regarding whether the condition
that follows passes or fails, regardless of whether the compiler in
fact supports arithmetic shift or not.

Relevant quote from ISO C99 (6.5.7/4)

  The result of E1 << E2 is E1 left-shifted E2 bit positions; vacated bits
  are filled with zeros. If E1 has an unsigned type, the value of the result
  is E1 × 2^E2, reduced modulo one more than the maximum value representable
  in the result type. If E1 has a signed type and nonnegative value, and
  E1 × 2^E2 is representable in the result type, then that is the resulting
  value; otherwise, the behavior is undefined.

For historic purposes, let's keep the test in place (although it is doubtful
we actually need it) but rewrite it in a way that prevents compilers from
this century from doing whacky things with it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19580 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Support DNS4/6 GeneralLookUp feature
Jiaxin Wu [Wed, 30 Dec 2015 08:10:55 +0000 (08:10 +0000)]
NetworkPkg: Support DNS4/6 GeneralLookUp feature

This patch is used to support DNS4/6 GeneralLookUp feature.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19579 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: Add a missing variable info record
Star Zeng [Wed, 30 Dec 2015 05:09:50 +0000 (05:09 +0000)]
MdeModulePkg Variable: Add a missing variable info record

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19578 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: Handle ftw driver executes prior to variable driver
Star Zeng [Wed, 30 Dec 2015 05:09:16 +0000 (05:09 +0000)]
MdeModulePkg Variable:  Handle ftw driver executes prior to variable driver

Variable driver uses gEdkiiFaultTolerantWriteGuid hob and copies  data to NvStorageData if hob exists.
But if ftw driver executes prior to variable driver then spare block is erased.

So the patch is to enhance the code to do not check FTW last write data hob if FTW protocol has been installed.

Cc: Liming Gao <liming.gao@intel.com>
Reported-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19577 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTool/UPT: Fix a typo issue
Hess Chen [Wed, 30 Dec 2015 02:22:30 +0000 (02:22 +0000)]
BaseTool/UPT: Fix a typo issue

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19576 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTool/ECC: Add UTF-8 support on ECC tool
Hess Chen [Wed, 30 Dec 2015 02:22:02 +0000 (02:22 +0000)]
BaseTool/ECC: Add UTF-8 support on ECC tool

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19575 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg AuthVariableLib: Correct comment/error log about CleanCertsFromDb
Star Zeng [Tue, 29 Dec 2015 09:07:32 +0000 (09:07 +0000)]
SecurityPkg AuthVariableLib: Correct comment/error log about CleanCertsFromDb

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: Chao Zhang <chao.b.zhang@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19574 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: VarErrFlag need to be consistent in NV flash and cache
Star Zeng [Tue, 29 Dec 2015 09:04:55 +0000 (09:04 +0000)]
MdeModulePkg Variable: VarErrFlag need to be consistent in NV flash and cache

The code wrongly has TempFlag wrote to NV flash, but has Flag assigned to NV cache.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19573 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg Variable: ###VariableTotalSize need to be initialized to 0 first
Star Zeng [Tue, 29 Dec 2015 09:00:58 +0000 (09:00 +0000)]
MdeModulePkg Variable: ###VariableTotalSize need to be initialized to 0 first

HwErrVariableTotalSize/CommonVariableTotalSize/CommonUserVariableTotalSize
need to be initialized to 0 first after reclaim failed, then to be assigned by += operation.

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>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19572 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoAppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python...
Daryl McDaniel [Tue, 29 Dec 2015 02:53:10 +0000 (02:53 +0000)]
AppPkg/Applications/Python/Python-2.7.10/*/pyconfig.h: Update pyconfig for Python 2.7.10 compliance.

Add new constants required for Python 2.7.10.
Update package and help values.
Define networking constants so that the getaddrinfo, gethostbyname, and
getnameinfo functions are used from the sockets package.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daryl McDaniel <edk2-lists@mc2research.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19553 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Fix suspicious dereference of pointer before NULL check
Jiaxin Wu [Fri, 25 Dec 2015 08:10:37 +0000 (08:10 +0000)]
NetworkPkg: Fix suspicious dereference of pointer before NULL check

This patch is used to fix suspicious dereference of pointer before
NULL check in IScsiDxe driver.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19552 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Remove empty BasePeCoffLib/AArch64 directory.
Ruiyu Ni [Fri, 25 Dec 2015 06:50:55 +0000 (06:50 +0000)]
MdePkg: Remove empty BasePeCoffLib/AArch64 directory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19551 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoDuetPkg: Remove CpuDxe empty directory.
Ruiyu Ni [Fri, 25 Dec 2015 06:49:29 +0000 (06:49 +0000)]
DuetPkg: Remove CpuDxe empty directory.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19550 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellBinPkg: Ia32/X64 Shell binary update.
Qiu Shumin [Fri, 25 Dec 2015 04:20:28 +0000 (04:20 +0000)]
ShellBinPkg: Ia32/X64 Shell binary update.

The binaries of ShellBinPkg are generated with ShellPkg project 19529. The binaries are built with no debug information by building with "RELEASE" target.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19548 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRemove the empty folder.
Eric Dong [Fri, 25 Dec 2015 04:09:49 +0000 (04:09 +0000)]
Remove the empty folder.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eirc.dong@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19546 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/BootManagerMenu: Fix bug that boots to undesired option
Ruiyu Ni [Fri, 25 Dec 2015 02:45:57 +0000 (02:45 +0000)]
MdeModulePkg/BootManagerMenu: Fix bug that boots to undesired option

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19542 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function 'EfiShellSetCurDir' and 'EfiShellSetMap'.
Yao Jiewen [Fri, 25 Dec 2015 01:52:56 +0000 (01:52 +0000)]
ShellPkg: Fix memory leak in function 'EfiShellSetCurDir' and 'EfiShellSetMap'.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19529 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'.
Yao Jiewen [Fri, 25 Dec 2015 01:46:02 +0000 (01:46 +0000)]
ShellPkg: Fix memory leak in function'ShellCommandConsistMappingInitialize'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19528 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function 'ShellCommandCreateInitialMappingsAndPaths'.
Yao Jiewen [Fri, 25 Dec 2015 01:41:38 +0000 (01:41 +0000)]
ShellPkg: Fix memory leak in function 'ShellCommandCreateInitialMappingsAndPaths'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19527 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in function'ShellCommandRunHelp'.
Yao Jiewen [Fri, 25 Dec 2015 01:33:53 +0000 (01:33 +0000)]
ShellPkg: Fix memory leak in function'ShellCommandRunHelp'.

When run help command Shell may have memory leak. This patch fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19526 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSubject: [PATCH 5/9] ShellPkg: Fix memory leak in function'ManBufferFindSections'.
Qiu Shumin [Fri, 25 Dec 2015 01:29:38 +0000 (01:29 +0000)]
Subject: [PATCH 5/9] ShellPkg: Fix memory leak in function'ManBufferFindSections'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19525 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in 'ShellOpenFileByName'.
Yao Jiewen [Fri, 25 Dec 2015 01:24:16 +0000 (01:24 +0000)]
ShellPkg: Fix memory leak in 'ShellOpenFileByName'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19524 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'.
Yao Jiewen [Thu, 24 Dec 2015 08:36:45 +0000 (08:36 +0000)]
ShellPkg: Fix memory leak in 'InternalShellExecuteDevicePath'.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19523 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix the TAB-auto-completion memory leak.
Qiu Shumin [Thu, 24 Dec 2015 08:25:52 +0000 (08:25 +0000)]
ShellPkg: Fix the TAB-auto-completion memory leak.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19522 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Fix memory leak when running Shell script.
Qiu Shumin [Thu, 24 Dec 2015 08:14:51 +0000 (08:14 +0000)]
ShellPkg: Fix memory leak when running Shell script.

When we run following script in Shell:
"
for %a run (1 200)
  echo %a
  memmap
endfor
"
We may find memory leak in system. This patch free buffer in 'BufferToFreeList' to avoid this issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19521 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoShellPkg: Refine the code logic of 'command history'.
Qiu Shumin [Thu, 24 Dec 2015 08:06:28 +0000 (08:06 +0000)]
ShellPkg: Refine the code logic of 'command history'.

Add the PCD to PcdShellMaxHistoryCommandCount indicate the max count of history commands.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19520 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoRemove some empty directories.
Jeff Fan [Thu, 24 Dec 2015 06:59:27 +0000 (06:59 +0000)]
Remove some empty directories.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19518 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoPcAtChipsetPkg/PcRtc: Modify INF file content to follow INF spec
Ruiyu Ni [Thu, 24 Dec 2015 06:36:57 +0000 (06:36 +0000)]
PcAtChipsetPkg/PcRtc: Modify INF file content to follow INF spec

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <Shumin.Qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19515 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoPcAtChipsetPkg/PcRtc: Add assertion to pass static code checker
Ruiyu Ni [Thu, 24 Dec 2015 06:36:43 +0000 (06:36 +0000)]
PcAtChipsetPkg/PcRtc: Add assertion to pass static code checker

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <Shumin.Qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19514 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNt32Pkg/WinNtSimpleFileSystemDxe: Fix memory leak
Ruiyu Ni [Thu, 24 Dec 2015 06:30:55 +0000 (06:30 +0000)]
Nt32Pkg/WinNtSimpleFileSystemDxe: Fix memory leak

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19513 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoIntelFrameworkModulePkg: Remove the undefined PCD help and prompt strings
Liming Gao [Thu, 24 Dec 2015 02:31:25 +0000 (02:31 +0000)]
IntelFrameworkModulePkg: Remove the undefined PCD help and prompt strings

IntelFrameworkModulePkg.uni includes some undefined PCD help and
prompt strings, which will be removed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19512 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Update module inf to include the missing uni file
Liming Gao [Thu, 24 Dec 2015 02:31:06 +0000 (02:31 +0000)]
NetworkPkg: Update module inf to include the missing uni file

Update DnsDxe and HttpUtilitiesDxe inf files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19511 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg: Add the missing module uni for CpuS3DataDxe
Liming Gao [Thu, 24 Dec 2015 02:30:43 +0000 (02:30 +0000)]
UefiCpuPkg: Add the missing module uni for CpuS3DataDxe

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19510 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Update SerialDxe inf to include the module uni
Liming Gao [Thu, 24 Dec 2015 02:30:22 +0000 (02:30 +0000)]
MdeModulePkg: Update SerialDxe inf to include the module uni

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19509 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add the missing library uni files of UI instances
Liming Gao [Thu, 24 Dec 2015 02:29:58 +0000 (02:29 +0000)]
MdeModulePkg: Add the missing library uni files of UI instances

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19508 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add the missing Library uni files of ImageDecode instances
Liming Gao [Thu, 24 Dec 2015 02:29:23 +0000 (02:29 +0000)]
MdeModulePkg: Add the missing Library uni files of ImageDecode instances

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19507 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add the missing Library uni files of Ipmi instances
Liming Gao [Thu, 24 Dec 2015 02:28:45 +0000 (02:28 +0000)]
MdeModulePkg: Add the missing Library uni files of Ipmi instances

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19506 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Initialize gSmst fields on S3 resume
Michael Kinney [Thu, 24 Dec 2015 00:14:00 +0000 (00:14 +0000)]
UefiCpuPkg/PiSmmCpuDxeSmm: Initialize gSmst fields on S3 resume

Update S3 resume path to initialize the fields of gSmst before
the gSmst fields are used to complete initialization in S3 resume.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19504 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Correct CPUID leaf used to detect SMM mode
Michael Kinney [Thu, 24 Dec 2015 00:13:54 +0000 (00:13 +0000)]
UefiCpuPkg/PiSmmCpuDxeSmm: Correct CPUID leaf used to detect SMM mode

Use Bit 29 of CPUID leaf CPUID_EXTENDED_CPU_SIG (0x80000001) to
determine the SMM save state mode.  The previous version of this
code used CPUID leaf CPUID_VERSION_INFO (0x00000001).

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19503 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoUefiCpuPkg/PiSmmCpuDxeSmm: Fix failure when PcdCpuSmmDebug is TRUE
Michael Kinney [Thu, 24 Dec 2015 00:13:47 +0000 (00:13 +0000)]
UefiCpuPkg/PiSmmCpuDxeSmm: Fix failure when PcdCpuSmmDebug is TRUE

If PcdCpuSmmDebug is set to TRUE, then the first time the function
CpuSmmDebugEntry () is called during the first normal SMI, the
registers DR6 or DR7 may be set to invalid values due to gSmst
not being fully initialized yet.  Instead, use gSmmCpuPrivate that
is fully initialized for the first SMI to look up CpuSaveState
for the currently executing CPU.

Cc: Jeff Fan <jeff.fan@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19502 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: Fix Makefile to correctly break during a build failure
Larry Hauch [Wed, 23 Dec 2015 18:30:20 +0000 (18:30 +0000)]
BaseTools: Fix Makefile to correctly break during a build failure

Updated the Makefile so that nmake will correctly fail if the cxfreeze command fails to complete successfully.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Larry Hauch <larry.hauch@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19501 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Update MdeModulePkg.dsc file for IpmiLib.
Daocheng Bu [Wed, 23 Dec 2015 08:18:36 +0000 (08:18 +0000)]
MdeModulePkg: Update MdeModulePkg.dsc file for IpmiLib.

Update MdeModulePkg.dsc file to include Ipmi Libraries.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19491 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add SmmIpmiLibSmmIpmiProtocol Library Instance.
Daocheng Bu [Wed, 23 Dec 2015 08:18:14 +0000 (08:18 +0000)]
MdeModulePkg: Add SmmIpmiLibSmmIpmiProtocol Library Instance.

Add SmmIpmiLibSmmIpmiProtocol Library Instance based on
Ipmi smm protocol in SMM mode.

In V5, change for code style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19490 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add DxeIpmiLibIpmiProtocol Library Instance.
Daocheng Bu [Wed, 23 Dec 2015 08:17:50 +0000 (08:17 +0000)]
MdeModulePkg: Add DxeIpmiLibIpmiProtocol Library Instance.

Add DxeIpmiLibIpmiProtocol Library Instance based on
Ipmi Protocol in DXE phase.

In V5,change for coding style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19489 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add PeiIpmiLibIpmiPpi Library Instance.
Daocheng Bu [Wed, 23 Dec 2015 08:17:26 +0000 (08:17 +0000)]
MdeModulePkg: Add PeiIpmiLibIpmiPpi Library Instance.

Add PeiIpmiLibIpmiPpi Library Instance based on Ipmi Ppi.

In V5, change for code style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19488 6f19259b-4bc3-4df7-8a09-765794883524