]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoOvmfPkg: Virtio10Dxe: non-transitional driver for virtio-1.0 PCI devices
Laszlo Ersek [Fri, 11 Mar 2016 23:11:55 +0000 (00:11 +0100)]
OvmfPkg: Virtio10Dxe: non-transitional driver for virtio-1.0 PCI devices

This driver implements the VIRTIO_DEVICE_PROTOCOL for non-transitional PCI
devices, based on the virtio-1.0 specification (csprd05). Non-transitional
means that it only binds QEMU's virtio-xxx-pci devices that receive the
",disable-legacy=on,disable-modern=off" properties on the QEMU command
line. These devices have distinct PCI Device IDs from those that are bound
by VirtioPciDeviceDxe.

The central abstraction of this driver is the VIRTIO_1_0_CONFIG type. It
is practically a "fat pointer" to a register block. The pointed-to
register block
- may or may not exist (the latter being mostly useful for virtio-1.0
  devices that have no device-specific registers),
- lives in one of the device's BARs,
- lives in an IO or MMIO BAR,
- lives at an offset relative to the BAR start,
- has its size also maintained.

Such VIRTIO_1_0_CONFIG "fat pointers" (i.e., the locations of the register
blocks) are parsed from vendor capabilities that reside in the device's
standard PCI capabilities list (in PCI config space).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: VirtioNetDxe: adapt virtio-net packet header size to virtio-1.0
Laszlo Ersek [Sun, 13 Mar 2016 00:51:29 +0000 (01:51 +0100)]
OvmfPkg: VirtioNetDxe: adapt virtio-net packet header size to virtio-1.0

In virtio-0.9.5, the size of the virtio-net packet header depends on
whether the VIRTIO_NET_F_MRG_RXBUF feature is negotiated -- the
"num_buffers" field is only appended to the header if the feature is
negotiated.

Since we never negotiate this feature, VirtioNetDxe never allocates room
for the "num_buffers" field.

With virtio-1.0, the "num_buffers" field is always there (although it
doesn't carry useful information without VIRTIO_NET_F_MRG_RXBUF). Adapt
the buffers that depend on the virtio-net header size (otherwise we have
skewed / truncated packets).

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VirtioScsiDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioScsiDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VirtioRngDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioRngDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VirtioNetDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioNetDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VirtioBlkDxe: adapt feature negotiation to virtio-1.0
Laszlo Ersek [Sat, 12 Mar 2016 13:41:26 +0000 (14:41 +0100)]
OvmfPkg: VirtioBlkDxe: adapt feature negotiation to virtio-1.0

Relative to virtio-0.9.5, virtio-1.0 reverses the order of queue discovery
and feature negotiation. In virtio-1.0, feature negotiation has to
complete first, and the device can also reject a self-inconsistent feature
request through the new VSTAT_FEATURES_OK status bit. (For example if the
driver requests a higher level feature but clears a prerequisite feature.)

Furthermore, we retain the VIRTIO_F_VERSION_1 feature bit if the
VIRTIO_DEVICE_PROTOCOL provider has high enough revision.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VirtioLib: add Virtio10WriteFeatures() function
Laszlo Ersek [Sat, 12 Mar 2016 19:37:42 +0000 (20:37 +0100)]
OvmfPkg: VirtioLib: add Virtio10WriteFeatures() function

In VirtIo 1.0, a device can reject a self-inconsistent feature bitmap
through the new VSTAT_FEATURES_OK status bit. (For example if the driver
requests a higher level feature but clears a prerequisite feature.) This
function is a small wrapper around
VIRTIO_DEVICE_PROTOCOL.SetGuestFeatures() that also verifies if the VirtIo
1.0 device accepts the feature bitmap.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec
Laszlo Ersek [Fri, 11 Mar 2016 19:51:12 +0000 (20:51 +0100)]
OvmfPkg: IndustryStandard: add definitions from the VirtIo 1.0 spec

These header files are intentionally minimal, and intentionally kept apart
from the VirtIo 0.9.5 headers.

The header inclusion chains end up like this (the Virtio10*.h header files
in the middle are new):

  Virtio.h    -> Virtio10.h    -> Virtio095.h

                     ^                 ^
                     |                 |

  VirtioNet.h -> Virtio10Net.h -> Virtio095Net.h

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoOvmfPkg: IndustryStandard: factor out Virtio095Net.h
Laszlo Ersek [Wed, 6 Apr 2016 08:29:00 +0000 (10:29 +0200)]
OvmfPkg: IndustryStandard: factor out Virtio095Net.h

In the upcoming virtio-1.0 series, we'll introduce "Virtio10Net.h".
However, the "VirtioNet.h" header file should continue to expose the
Virtio Network Device specific type and macro definitions for all virtio
versions that OvmfPkg supports. Therefore extract "Virtio095Net.h" like
this:

  VirtioNet.h -> Virtio095Net.h

so that in the upcoming patches, we can insert "Virtio10Net.h" in the
middle of the inclusion chain.

This follows the example of "Acpi.h" and "Pci.h" under
"MdePkg/Include/IndustryStandard".

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Jordan Justen <jordan.l.justen@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>
8 years agoOvmfPkg: IndustryStandard: factor out Virtio095.h
Laszlo Ersek [Wed, 6 Apr 2016 08:29:00 +0000 (10:29 +0200)]
OvmfPkg: IndustryStandard: factor out Virtio095.h

In the upcoming virtio-1.0 series, we'll introduce "Virtio10.h". However,
the "Virtio.h" header file should continue to expose the generic type and
macro definitions for all virtio versions that OvmfPkg supports. Therefore
extract "Virtio095.h" like this:

  Virtio.h -> Virtio095.h

so that in the upcoming patches, we can insert "Virtio10.h" in the middle
of the inclusion chain.

This follows the example of "Acpi.h" and "Pci.h" under
"MdePkg/Include/IndustryStandard".

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Jordan Justen <jordan.l.justen@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>
8 years agoOvmfPkg: VirtioRngDxe: clear all feature bits more explicitly
Laszlo Ersek [Sat, 12 Mar 2016 00:54:57 +0000 (01:54 +0100)]
OvmfPkg: VirtioRngDxe: clear all feature bits more explicitly

This too is in preparation for the following patches.

After this patch, all four drivers manage their feature bits with explicit
masking.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VirtioBlkDxe: don't clear non-negotiable feature bits
Laszlo Ersek [Sat, 12 Mar 2016 00:47:04 +0000 (01:47 +0100)]
OvmfPkg: VirtioBlkDxe: don't clear non-negotiable feature bits

VirtioBlkDxe only recognizes virtio-block feature bits that the device
offers non-negotiably. Nonetheless, in preparation for the following
patches, don't try to clear them even for simplicity.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VIRTIO_DEVICE_PROTOCOL: pass VRING object to SetQueueAddress()
Laszlo Ersek [Sat, 12 Mar 2016 02:39:00 +0000 (03:39 +0100)]
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: pass VRING object to SetQueueAddress()

In virtio-1.0, it is not enough to pass the base address of the virtio
queue to the hypervisor (as a frame number); instead it will want the
addresses of the descriptor table, the available ring, and the used ring
separately. Pass the VRING object to the SetQueueAddress() member
function; this will enable a virtio-1.0 implementation. Convert the
current producers and consumers to this prototype.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() member
Laszlo Ersek [Sat, 12 Mar 2016 02:00:30 +0000 (03:00 +0100)]
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: remove GetQueueAddress() member

This function was never consumed by drivers, and the current prototype is
unsupportable with virtio-1.0. Remove the function from the protocol
definition, and drop the current (unused) implementations.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoOvmfPkg: VIRTIO_DEVICE_PROTOCOL: widen the Features bitmap to 64 bits
Laszlo Ersek [Fri, 11 Mar 2016 23:58:12 +0000 (00:58 +0100)]
OvmfPkg: VIRTIO_DEVICE_PROTOCOL: widen the Features bitmap to 64 bits

The virtio-1.0 spec widens the Features bitmap to 64 bits. Modify the
declarations of the GetDeviceFeatures() and SetGuestFeatures() protocol
member functions accordingly.

Normally, a protocol cannot be changed in incompatible ways if the GUID
stays the same; however, we've always been extremely clear that
VIRTIO_DEVICE_PROTOCOL is internal to edk2. See for example the top of
"OvmfPkg/Include/Protocol/VirtioDevice.h".

In this patch, all producers and consumers of the GetDeviceFeatures() and
SetGuestFeatures() protocol members are updated.

The drivers that currently produce these members are "legacy" drivers (in
virtio-1.0 terminology), and they cannot (and will not) handle feature
bits above BIT31. Therefore their conversion is only for compatibility
with the modified protocol interface. The consumers will be responsible
for checking the VIRTIO_DEVICE_PROTOCOL.Revision field, and for not
passing feature bits that these backends cannot handle.

The VirtioMmioGetDeviceFeatures() implementation stores the result of an
MmioRead32() call with normal assignment, so it needs no change beyond
adapting its prototype.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.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>
8 years agoMdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot support
Ruiyu Ni [Wed, 6 Apr 2016 06:36:58 +0000 (14:36 +0800)]
MdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot support

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
8 years agoBaseTools: cache the defined Guid tool to improve the performance
Yonghong Zhu [Tue, 29 Mar 2016 04:59:43 +0000 (12:59 +0800)]
BaseTools: cache the defined Guid tool to improve the performance

Current GenFds Tool class GuidSection() is parsing the tools_def.txt for
every GUID'ed section that has a GUID defined tool, it cause a bad
performance. so this patch cache the defined Guid tool to improve the
performance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg/Bds: Memory Bins don't count the memory used by RAM Disk
Ni, Ruiyu [Tue, 29 Mar 2016 10:32:13 +0000 (18:32 +0800)]
MdeModulePkg/Bds: Memory Bins don't count the memory used by RAM Disk

MemoryTypeInformation don't count the reserved memory used by RAM Disk,
but it still check all types of memory and do reset when any type
of memory size changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
8 years agoMdeModulePkg/Bds: Free resources after ram disk boot finishes
Ni, Ruiyu [Wed, 30 Mar 2016 00:29:10 +0000 (08:29 +0800)]
MdeModulePkg/Bds: Free resources after ram disk boot finishes

The resource free includes to un-register the ram disk device and
free the memory occupied by the ram disk.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
8 years agoMdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot media
Ni, Ruiyu [Thu, 31 Mar 2016 02:37:18 +0000 (10:37 +0800)]
MdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot media

Use reserved memory to hold the buffer for the RAM disk to
follow the ACPI spec requirement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
8 years agoSecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in inf file.
Eric Dong [Wed, 6 Apr 2016 04:57:55 +0000 (12:57 +0800)]
SecurityPkg OpalPasswordSupportLib: Add comments for the used protocol in inf file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.
Eric Dong [Wed, 6 Apr 2016 04:56:02 +0000 (12:56 +0800)]
SecurityPkg OpalPasswordSupportLib: Remove the hard code debug build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordSupportLib: Fixed gcc build failure.
Eric Dong [Wed, 6 Apr 2016 04:54:46 +0000 (12:54 +0800)]
SecurityPkg OpalPasswordSupportLib: Fixed gcc build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg TcgStorageOpalLib: Fixed gcc build failure.
Eric Dong [Wed, 6 Apr 2016 04:54:11 +0000 (12:54 +0800)]
SecurityPkg TcgStorageOpalLib: Fixed gcc build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordDxe: Check the pointer before use it.
Eric Dong [Wed, 6 Apr 2016 04:52:44 +0000 (12:52 +0800)]
SecurityPkg OpalPasswordDxe: Check the pointer before use it.

Check the pointer before use it to make the code more safely.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg TcgStorageOpalLib: Remove the hard code debug build option.
Eric Dong [Wed, 6 Apr 2016 04:51:26 +0000 (12:51 +0800)]
SecurityPkg TcgStorageOpalLib: Remove the hard code debug build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordDxe: Remove the hard code debug build option.
Eric Dong [Wed, 6 Apr 2016 04:50:19 +0000 (12:50 +0800)]
SecurityPkg OpalPasswordDxe: Remove the hard code debug build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg OpalPasswordSmm: Remove the hard code build option.
Eric Dong [Wed, 6 Apr 2016 04:49:46 +0000 (12:49 +0800)]
SecurityPkg OpalPasswordSmm: Remove the hard code build option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoMdePkg Cper.h: Add missing structure for 'Processor Error Record'
Hao Wu [Tue, 15 Mar 2016 02:00:40 +0000 (10:00 +0800)]
MdePkg Cper.h: Add missing structure for 'Processor Error Record'

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-off-by: Jeff Fan <jeff.fan@intel.com>
8 years agoSourceLevelDebugPkg/SmmDebugAgent: mMailboxPointer is used before set
Jeff Fan [Fri, 1 Apr 2016 04:53:06 +0000 (12:53 +0800)]
SourceLevelDebugPkg/SmmDebugAgent: mMailboxPointer is used before set

mMailboxPointer is used before it is initialization. This issue only happens
when SmmDebugAgent is initialized without PeiDebugAgent or DxeDebugAgent
initialization. The fix is to use Mailbox instead.

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoMdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepth
Ruiyu Ni [Fri, 1 Apr 2016 03:22:17 +0000 (11:22 +0800)]
MdePkg/MdePkg.uni: Add description for PcdUartDefaultReceiveFifoDepth

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
8 years agoMdePkg/BaseSynchronizationLib: Add spin lock alignment for IA32/x64
Jeff Fan [Mon, 21 Mar 2016 05:36:50 +0000 (13:36 +0800)]
MdePkg/BaseSynchronizationLib: Add spin lock alignment for IA32/x64

From Intel(R) 64 and IA-32 Architectures Software Developer's Manual, one lock
or semaphore is suggested to be present within a cache line. If the processors
are based on Intel NetBurst microarchitecture, two cache lines are suggested.
This could minimize the bus traffic required to service locks.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoMdePkg/BaseSynchronizationLib: Do not check timeout if lock released
Jeff Fan [Mon, 21 Mar 2016 05:26:46 +0000 (13:26 +0800)]
MdePkg/BaseSynchronizationLib: Do not check timeout if lock released

Current AcquireSpinLock() will check if timeout happens when PcdSpinLockTimeout
is not zero, even though the spin lock is already released. It may do
unnecessary operation to read timer's counter. This update is trying to acquire
spin lock firstly. If it could be acquired successfully, needn't to check
timeout at all.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools/GenFds: Fix the bug for wrong alignment generate for RAW file
Yonghong Zhu [Fri, 1 Apr 2016 07:20:51 +0000 (15:20 +0800)]
BaseTools/GenFds: Fix the bug for wrong alignment generate for RAW file

When do the multiple raw file support feature, it cause the regression
that the raw file section alignment value was wrongly overridden by the
single raw file. this patch: 1) fix the wrong overridden bug. 2) remove
the duplicate code for combine multiple raw file into one.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg/UiApp: Correct the total RAM calculation
Jeremy Linton [Fri, 1 Apr 2016 21:54:00 +0000 (16:54 -0500)]
MdeModulePkg/UiApp: Correct the total RAM calculation

This change mirrors the change in InteFrameworkModulePkg.
We now account for all TYPE19 memory regions found in the
smbios data, as well as handling records with Extended Addresses.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoIntelFrameworkModulePkg/Bds: Correct the total RAM calculation
Jeremy Linton [Fri, 1 Apr 2016 21:53:59 +0000 (16:53 -0500)]
IntelFrameworkModulePkg/Bds: Correct the total RAM calculation

Update the BDS frontpage to pull the RAM ranges from the
smbios extended size fields when applicable. The RAM calculation
also needs to take into account all the RAM ranges being provided
as many machines have multiple physical address ranges.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoMdeModulePkg: DxeUdpIoLib: fix non-empty payload path in UDP reception
Laszlo Ersek [Sun, 3 Apr 2016 09:48:43 +0000 (11:48 +0200)]
MdeModulePkg: DxeUdpIoLib: fix non-empty payload path in UDP reception

Commit 1b31acb66c02 ("MdeModulePkg: Check received packet size before use
it.") introduced a chunk of code under the new "Resume" label, in function
UdpIoOnDgramRcvdDpc(). The new code is supposed to run only when the
received packet has zero-length payload, but a "return" statement was
forgotten, and the code is reached on the normal (nonzero-length payload)
path as well, after the packet has been processed (and possibly freed) by
RxToken->CallBack(). This is a logic bug, with the direct symptom being
use-after-free / General Protection Fault.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Cc: "Subramanian, Sriram (EG Servers Platform SW)" <sriram-s@hpe.com>
Fixes: 1b31acb66c026f2791c959a4ec9b55c04d583c22
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
8 years agoOvmfPkg: Add RAM disk support
Alcantara, Paulo [Wed, 30 Mar 2016 21:49:37 +0000 (21:49 +0000)]
OvmfPkg: Add RAM disk support

Currently booting off of a RAM disk is not supported by
IntelFrameWorkModulePkg BDS, however on systems without writable
disks, the RAM disk can be made useful when loading raw HDD images
into it -- specially the ones with a FAT32 partition on which files
can be natively accessed by system firmware.

This patch adds RamDiskDxe driver by default in OVMF platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paulo Alcantara <paulo.alc.cavalcanti@hp.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoArmPkg/ArmArchTimerLib: correct typos
Evan Lloyd [Thu, 3 Mar 2016 11:55:21 +0000 (11:55 +0000)]
ArmPkg/ArmArchTimerLib: correct typos

Some minor typographical problems were noticed during previous commits.
This change corrects those, and contains no functional modifications.
The changes are in comments, and one diagnostic message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPkg/ArmArchTimerLib: fix unused variable in RELEASE builds
Sami Mujawar [Thu, 3 Mar 2016 11:55:20 +0000 (11:55 +0000)]
ArmPkg/ArmArchTimerLib: fix unused variable in RELEASE builds

The TimerFreq variable in the TimerConstructor() is unused in RELEASE
builds since ASSERTs are then disabled.
The only use of the variable (in the ASSERT) is replaced by a direct
invocation of the function previously used to set it.

NOTE: The build tools suppress warnings of this using compiler options
eg. -Wno-unused-but-set-variable for GCC toolchain or
    --diag_suppress=550 for RVCT toolchain.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoEmbeddedPkg/AcpiLib: fix SBSA Generic Watchdog helper definition
Sami Mujawar [Fri, 4 Mar 2016 13:46:01 +0000 (13:46 +0000)]
EmbeddedPkg/AcpiLib: fix SBSA Generic Watchdog helper definition

The Reserved field in the SBSA Generic Watchdog Structure is 1 byte in
length. Refer Table 5-123 in the ACPI 5.1 Specification Errata A.

The EFI_ACPI_5_1_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT() helper
macro was initializing this field as EFI_ACPI_RESERVED_WORD instead of
EFI_ACPI_RESERVED_BYTE.

Although this does not cause any functional issue; it does not comply
with the specification.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPlatformPkg: Add PCD for Pl011 UART Interrupt
Sami Mujawar [Fri, 4 Mar 2016 18:26:35 +0000 (18:26 +0000)]
ArmPlatformPkg: Add PCD for Pl011 UART Interrupt

This patch adds a PCD for the PL011 UART Interrupt as this is needed by
the Serial Port Console Redirection Table.

Code at: https://github.com/EvanLloyd/tianocore/commit/68f26f23a236501d9e4294077da0d5070bbdab80

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoMdePkg: Add ARM Serial Port Subtypes to DBG2
Sami Mujawar [Fri, 4 Mar 2016 17:24:41 +0000 (17:24 +0000)]
MdePkg: Add ARM Serial Port Subtypes to DBG2

The Microsoft Debug Port Table 2 (DBG2) specification revision
October 6, 2015 adds support for Serial Port Subtypes for ARM.

This patch adds these definitions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdePkg: Add ARM Serial Port Subtype definitions
Sami Mujawar [Fri, 4 Mar 2016 14:58:33 +0000 (14:58 +0000)]
MdePkg: Add ARM Serial Port Subtype definitions

The Serial Port Console Redirection Table specification Version 1.03 -
August 10, 2015 adds support for Serial Port Subtypes for ARM. These
Subtypes are described in the Table 3 of the Microsoft Debug Port Table
2 (DBG2) Specification - December 10, 2015.

This patch adds macro definitions for these.

Code at: https://github.com/EvanLloyd/tianocore/commit/79678a0f399e97883cfba09275e750861e24cd70

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoArmVirtPkg: disable PcdHiiOsRuntimeSupport
Laszlo Ersek [Tue, 29 Mar 2016 17:51:30 +0000 (19:51 +0200)]
ArmVirtPkg: disable PcdHiiOsRuntimeSupport

Edk2 commit 8a45f80edad4 ("MdeModulePkg: Make HII configuration settings
available to OS runtime") implements the optional UEFI feature described
in "31.2.11.1 OS Runtime Utilization" in UEFI v2.6.

While this feature might show benefits down the road even in QEMU virtual
machines, at the moment it only presents drawbacks:
- it increases the EfiRuntimeServicesData footprint,
- it triggers HII compatibility problems between edk2 and external drivers
  unconditionally, even if the end-user is not interested in HII and/or in
  configuring said drivers (see
  <https://www.redhat.com/archives/vfio-users/2016-March/msg00153.html>
  and <http://thread.gmane.org/gmane.comp.bios.edk2.devel/9894> for an
  example).

While the feature was being introduced, popular demand for a controlling
Feature PCD rose (see
<http://thread.gmane.org/gmane.comp.bios.edk2.devel/7626>), which is why
we can set it now to FALSE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPkg/ArmArchTimerLib: add GetTimeInNanoSecond() to ArmArchTimerLib
Sami Mujawar [Thu, 3 Mar 2016 15:28:16 +0000 (15:28 +0000)]
ArmPkg/ArmArchTimerLib: add GetTimeInNanoSecond() to ArmArchTimerLib

FirmwarePerformanceDxe.c utilizes the Timer Library function
GetTimeInNanoSecond() which was not implemented by the ArmArchTimerLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmPkg/ArchArmTimerLib: refactor MultU64xN and TimerFreq definitions
Sami Mujawar [Thu, 3 Mar 2016 15:28:16 +0000 (15:28 +0000)]
ArmPkg/ArchArmTimerLib: refactor MultU64xN and TimerFreq definitions

This refactors some timer code to define MultU64xN as a preprocessor
symbol rather than a function pointer, and to factor out the code that
obtains the timer frequency into GetPlatformTimerFreq ().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
[ard.biesheuvel: split off from 'add GetTimeInNanoSecond() to ArmArchTimerLib']
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoNetworkPkg: Check received packet size before use it.
Fu Siyuan [Mon, 28 Mar 2016 03:01:03 +0000 (11:01 +0800)]
NetworkPkg: Check received packet size before use it.

Arbitrary length of packet may be received from network, including the
packets with zero payload data or malformed protocol header. So the code
much check the actually received data size before using it. For example, in
current edk2 network stack, an zero payload UDP packet may cause the
platform ASSERT in NetbufFromExt() because of the zero fragment number.
This patch update the IpIoLib and UdpIoLib to check and discard the zero
payload data packet to avoid above assert. Some other network drivers are
also updated to check the packet size to guarantee the minimum length of
protocol header is received from upper layer driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
8 years agoMdeModulePkg: Check received packet size before use it.
Fu Siyuan [Mon, 28 Mar 2016 03:00:31 +0000 (11:00 +0800)]
MdeModulePkg: Check received packet size before use it.

Arbitrary length of packet may be received from network, including the
packets with zero payload data or malformed protocol header. So the code
much check the actually received data size before using it. For example, in
current edk2 network stack, an zero payload UDP packet may cause the
platform ASSERT in NetbufFromExt() because of the zero fragment number.
This patch update the IpIoLib and UdpIoLib to check and discard the zero
payload data packet to avoid above assert. Some other network drivers are
also updated to check the packet size to guarantee the minimum length of
protocol header is received from upper layer driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
8 years agoNetworkPkg: Check pointer for NULL before use.
Fu Siyuan [Fri, 1 Apr 2016 05:14:49 +0000 (13:14 +0800)]
NetworkPkg: Check pointer for NULL before use.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
8 years agoRevert "TerminalDxe: select the UART's default receive FIFO depth"
Ruiyu Ni [Tue, 29 Mar 2016 07:30:37 +0000 (15:30 +0800)]
Revert "TerminalDxe: select the UART's default receive FIFO depth"

This reverts commit 31ae446b1a039a55d0336f2201d77d1032533413.
Changing the receive FIFO depth in Terminal driver Start() is not
recommended.
A new PCD PcdUartDefaultReceiveFifoDepth was added and
MdeModulePkg/SerialDxe driver uses the PCD as the default receive
FIFO depth.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoArmVirtPkg/ArmVirtQemu: gate FDT config table install with build option
Ard Biesheuvel [Thu, 31 Mar 2016 11:15:05 +0000 (13:15 +0200)]
ArmVirtPkg/ArmVirtQemu: gate FDT config table install with build option

This introduces the .DSC define 'PURE_ACPI_BOOT_ENABLE', defaulting to
FALSE, which controls the value of the feature PCD 'PcdPureAcpiBoot'.

This allows an ArmVirtQemu image to be built that restricts the OS to
booting in ACPI mode.

This feature is only added to ArmVirtQemu, and not to ArmVirtQemuKernel,
the reason being that the latter is mostly intended for development work,
where the burden of adding 'acpi=force' if you need it is much more
tolerable than when trying to boot an installer on a production KVM guest
instance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoArmVirtPkg/VirtFdtDxe: make installation of FDT as config table optional
Ard Biesheuvel [Thu, 31 Mar 2016 11:00:07 +0000 (13:00 +0200)]
ArmVirtPkg/VirtFdtDxe: make installation of FDT as config table optional

The arm64 kernel is hardwired to prefer DT over ACPI, unless 'acpi=force'
is passed on the kernel command line. The only other way to force the
kernel to use ACPI is not to pass an FDT to it in the first place. So
introduce a PCD that inhibits the installation of the QEMU supplied FDT
as a configuration table.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculation
Samer El-Haj-Mahmoud [Tue, 29 Mar 2016 23:12:51 +0000 (07:12 +0800)]
MdeModulePkg RamDiskDxe: Fix incorrect RAM disk memory address calculation

EndingAddress is calculated incorrectly. Original code calculates it as
(StartingAddress + Size). Correct value should be (StartingAddress +
Size - 1.

Note:
Besides the changes made by Samer, Hao also fixed a similar issue in
RamDiskImpl.c

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hpe.com>
8 years agoMdeModulePkg EmmcDxe: Fix GCC build failure with set but unused variables
Zeng, Star [Wed, 30 Mar 2016 09:24:35 +0000 (17:24 +0800)]
MdeModulePkg EmmcDxe: Fix GCC build failure with set but unused variables

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: Tcg2Dxe: Fix undersized TempBuf
Zhang, Chao B [Thu, 31 Mar 2016 01:40:28 +0000 (09:40 +0800)]
SecurityPkg: Tcg2Dxe: Fix undersized TempBuf

TempBuf in SetupEventLog needs to include sizeof(UINT32) to hold NumberOfAlgorithms.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Yao Jiewen <jiewen.yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
8 years agoMdeModulePkg/UefiBootManagerLib: BmGetActiveConsoleIn code cleanup
Thomas Palmer [Wed, 30 Mar 2016 17:16:48 +0000 (01:16 +0800)]
MdeModulePkg/UefiBootManagerLib: BmGetActiveConsoleIn code cleanup

Check for NULL from AllocateCopyPool before setting Count to 1. Also
change sizeof (EFI_HANDLE*) to sizeof (EFI_HANDLE).  Handles is a
EFI_HANDLE pointer, so the allocated memory must be the size of
EFI_HANDLE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoOptionRomPkg: Ax88772b: Fixing register access issue in Apple Eth Adapter
Shivamurthy Shastri [Wed, 30 Mar 2016 09:14:14 +0000 (17:14 +0800)]
OptionRomPkg: Ax88772b: Fixing register access issue in Apple Eth Adapter

The USB command CMD_RXQTC ("RX Queue Cascade Threshold Control") tries
to access the register and is always failing when using the Apple
Ethernet adapter.

It is fixed by checking flag before sending command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoOptionRomPkg: Ax88772b: Fixing compilation
Shivamurthy Shastri [Wed, 30 Mar 2016 05:24:58 +0000 (13:24 +0800)]
OptionRomPkg: Ax88772b: Fixing compilation

error: pNicDevice variable set but not used

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
8 years agoOptionRomPkg: Ax88772b: support for multiple dongles and chips
Shivamurthy Shastri [Wed, 23 Mar 2016 15:09:27 +0000 (23:09 +0800)]
OptionRomPkg: Ax88772b: support for multiple dongles and chips

Driver code is modified to support multiple ethernet dongles, which uses
similar ASIX chips. Also, it can be used for multiple ASIX chips with
similar register map.

Enabled support for Apple Ethernet Adapter

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shivamurthy Shastri <shivamurthy.shastri@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoMdeModulePkg/SdMmc: Add EDKII SD/MMC stack
Feng Tian [Wed, 23 Mar 2016 02:47:05 +0000 (10:47 +0800)]
MdeModulePkg/SdMmc: Add EDKII SD/MMC stack

This stack includes:
1. Dxe phase support by:
   1) SdMmcPciHcDxe driver to consume PciIo and produce
      SdMmcPassThru.
   2) SdDxe driver to consume SdMmcPassThru to produce
      BlkIo1/BlkIo2.
   3) EmmcDxe driver to consume SdMmcPassThru to produce
      BlkIo1/BlkIo2/SSP.

2. Pei phase support
   1) SdBlockIoPei driver to consume SdMmcHostController
      Ppi and produce VirutalBlkIo1&2.
   2) EmmcBlockIoPei driver to consume SdMmcHostController
      Ppi and produce VirutalBlkIo1&2.
   3) SdMmcPciHcPei driver to produce SdMmcHostController
      Ppi.

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>
8 years agoMdePkg/IndustryStandard: Add SD/EMMC common definitions
Feng Tian [Wed, 30 Mar 2016 03:23:57 +0000 (11:23 +0800)]
MdePkg/IndustryStandard: Add SD/EMMC common definitions

These definitions are defined in SD physical layer simplified spec
and eMMC electrical standard spec.

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>
8 years agoMdePkg/DevicePath: Add EMMC device path definition
Feng Tian [Tue, 22 Mar 2016 15:15:53 +0000 (23:15 +0800)]
MdePkg/DevicePath: Add EMMC device path definition

This device path node is introduced in UEFI2.6 spec.

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>
8 years agoMdePkg: Add EFI_SD_MMC_PASS_THRU_PROTOCOL definition
Feng Tian [Tue, 22 Mar 2016 15:08:30 +0000 (23:08 +0800)]
MdePkg: Add EFI_SD_MMC_PASS_THRU_PROTOCOL definition

This protocol is introduced in UEFI2.6 spec.

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>
8 years agoUefiCpuPkg/Cpuid.h: Display Intel SGX Resource Enumeration Leaves
Jeff Fan [Mon, 28 Mar 2016 01:53:03 +0000 (09:53 +0800)]
UefiCpuPkg/Cpuid.h: Display Intel SGX Resource Enumeration Leaves

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
8 years agoUefiCpuPkg/Cpuid.h: Add CPUID defines and structures for Intel SGX
Jeff Fan [Mon, 28 Mar 2016 01:51:06 +0000 (09:51 +0800)]
UefiCpuPkg/Cpuid.h: Add CPUID defines and structures for Intel SGX

Add Intel SGX Resource Enumeration Leaves as described by Section 37.7 in
Intel(R) 64 and IA-32 Architectures Software Developer's Manual, Volume 3D,
December 2015.

Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
8 years agoShellPkg: Refine the comparisons code in ShellPkg.
Qiu Shumin [Mon, 28 Mar 2016 06:05:57 +0000 (14:05 +0800)]
ShellPkg: Refine the comparisons code in ShellPkg.

For Boolean values not use explicit comparisons to TRUE or FALSE. For non-Boolean
comparisons we should use a compare operator.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
8 years agoMdeModulePkg PartitionDxe: Add Re-entry handling logic for BindingStop
Hao Wu [Fri, 11 Mar 2016 07:33:54 +0000 (15:33 +0800)]
MdeModulePkg PartitionDxe: Add Re-entry handling logic for BindingStop

There are scenario when the BindingStop service of PartitionDxe driver be
re-entered.

An example will be ejecting a DVD from a SATA DVDROM and then run
"reconnect -r" under shell. In this specific case, part of the calling
stack will be:

PartitionDriverBindingStop() (PartitionDxe) ->
Stop first child handle (PartitionDxe) ->
ScsiDiskFlushBlocksEx() (ScsiDiskDxe) ->
A media change is detected (ScsiDiskDxe) ->
Reinstall of BlockIO(2) protocols (ScsiDiskDxe) ->
Entering PartitionDriverBindingStop() again (PartitionDxe) ->
Potential risk of referencing already stopped child handle (PartitionDxe)
...

The current code has potential issue of referencing of already stopped
child handle. This commit adds re-entry handling logic to resolve such
issue.

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>
8 years agoSecurityPkg: Enable Opal password solution build.
Eric Dong [Tue, 29 Mar 2016 06:50:37 +0000 (14:50 +0800)]
SecurityPkg: Enable Opal password solution build.

This patch used to enable opal password solution build
in Security package level build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: OpalPasswordSmm: Add Opal password Smm driver.
Eric Dong [Tue, 29 Mar 2016 06:49:25 +0000 (14:49 +0800)]
SecurityPkg: OpalPasswordSmm: Add Opal password Smm driver.

This driver used to unlock device in S3 resume phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: OpalPasswordDxe: Add Opal password dxe driver.
Eric Dong [Tue, 29 Mar 2016 06:48:20 +0000 (14:48 +0800)]
SecurityPkg: OpalPasswordDxe: Add Opal password dxe driver.

This driver used to enables opal feature in bios.
It adds setup menu and unlock device process in boot phase.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: OpalPasswordSupportLib: Add Opal password support library.
Eric Dong [Tue, 29 Mar 2016 06:45:36 +0000 (14:45 +0800)]
SecurityPkg: OpalPasswordSupportLib: Add Opal password support library.

APIs used to support opal password solution to trig opal command.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: TcgStorageOpalLib: Add TCG storage opal library.
Eric Dong [Tue, 29 Mar 2016 06:42:13 +0000 (14:42 +0800)]
SecurityPkg: TcgStorageOpalLib: Add TCG storage opal library.

Library APIs used to create commands defined by TCG storage opal spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoSecurityPkg: TcgStorageCoreLib: Add TCG storage core library.
Eric Dong [Tue, 29 Mar 2016 06:41:20 +0000 (14:41 +0800)]
SecurityPkg: TcgStorageCoreLib: Add TCG storage core library.

APIs used to create commands defined by TCG storage core spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoMdePkg: Add definition for TCG Storage Core and Opal specs.
Eric Dong [Tue, 29 Mar 2016 06:39:52 +0000 (14:39 +0800)]
MdePkg: Add definition for TCG Storage Core and Opal specs.

The definitions are defined in TCG storage core and opal spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoBaseTools: Add two new sections for PCD in the build report
Yonghong Zhu [Wed, 23 Mar 2016 09:34:13 +0000 (17:34 +0800)]
BaseTools: Add two new sections for PCD in the build report

Build Spec updated to add two new sections for PCD in the build report.
1.Conditional directives section:If the DSC or FDF file contains
conditional directive statements.
2.Unused PCDs section: If the DSC or FDF file define values for PCDs that
are not used by any module and are not used in conditional directive
statements.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg/SerialDxe: Set FIFO depth with PCD
Heyi Guo [Thu, 17 Mar 2016 14:36:53 +0000 (22:36 +0800)]
MdeModulePkg/SerialDxe: Set FIFO depth with PCD

Set UART receive FIFO depth with PCD instead of fixed number "1".
The default value of PCD is also 1, so it makes no difference for
platforms which do not explicitly set this PCD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoMdePkg: Add PCD for UART default receive FIFO depth
Heyi Guo [Thu, 17 Mar 2016 14:36:52 +0000 (22:36 +0800)]
MdePkg: Add PCD for UART default receive FIFO depth

PcdUartDefaultReceiveFifoDepth is added to indicate UART default
receive FIFO depth.
Type of UINT16 is enough for FIFO depth.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoMdeModulePkg DiskIoDxe: Media status check not be done at DiskIo level
Hao Wu [Thu, 17 Mar 2016 02:03:44 +0000 (10:03 +0800)]
MdeModulePkg DiskIoDxe: Media status check not be done at DiskIo level

Found an issue that file system cannot be started on a DVD when doing the
following process:

Boot to shell with a DVD inside a SATA DVDROM. Eject the DVD and run
"reconnect -r". Put the DVD inside again and run "reconnect -r".

The cause is that after executing the second reconnect action, DiskIo
immediately returns EFI_NO_MEDIA in function DiskIo2ReadWriteDisk() when
checking the media information. However, at this time, the media
information does not get updated by the ScsiDisk driver. Therefore, DiskIo
driver should left the no media check to ScsiDisk driver.

Generally, the media changed and media write protect check should also be
left to lower-level device driver. Thus, these two checks in function
DiskIo2ReadWriteDisk() are also removed.

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>
8 years agoMdeModulePkg PartitionDxe: Some ISO images cannot be recognized properly
Hao Wu [Fri, 11 Mar 2016 07:55:36 +0000 (15:55 +0800)]
MdeModulePkg PartitionDxe: Some ISO images cannot be recognized properly

Some ISO images cannot be recognized properly when they are on media whose
block size is not 2048 bytes.

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>
8 years agoMdeModulePkg ScsiDiskDxe: Fix hang issue when reconnecting an ISCSI device
Hao Wu [Mon, 7 Mar 2016 05:59:18 +0000 (13:59 +0800)]
MdeModulePkg ScsiDiskDxe: Fix hang issue when reconnecting an ISCSI device

The 'Reset' function for BlockIO(2) in ScsiDiskDxe should return
EFI_SUCCESS instead of EFI_DEVICE_ERROR when a device does not support
reset feature.

Otherwise, a 'reconnect -r' action when an ISCSI device is attached will
cause system hang.

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>
8 years agoPcAtChipsetPkg/PciHostBridge: Remove PciHostBridge driver
Ruiyu Ni [Fri, 18 Mar 2016 06:29:42 +0000 (14:29 +0800)]
PcAtChipsetPkg/PciHostBridge: Remove PciHostBridge driver

MdeModulePkg contains a new PciHostBridgeDxe driver which is a
super set of PcAtChipsetPkg/PciHostBridgeDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoShellPkg/UefiDpLib: Fix a memory leak issue in Dp.
Cinnamon Shia [Mon, 28 Mar 2016 03:03:23 +0000 (11:03 +0800)]
ShellPkg/UefiDpLib: Fix a memory leak issue in Dp.

The allocated memory of ParamPackage is not freed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoPerformancePkg/Dp_App: Fix a memory leak issue in Dp.
Cinnamon Shia [Mon, 28 Mar 2016 03:03:22 +0000 (11:03 +0800)]
PerformancePkg/Dp_App: Fix a memory leak issue in Dp.

The allocated memory of ParamPackage is not freed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoBaseTools: Remove the unnecessary check for RAW File
Yonghong Zhu [Mon, 28 Mar 2016 04:27:50 +0000 (12:27 +0800)]
BaseTools: Remove the unnecessary check for RAW File

Because the __VerifyFile function already checked whether the file is
valid.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools: generate alignment when the FV content come from the filesystem
Yonghong Zhu [Wed, 23 Mar 2016 09:55:50 +0000 (17:55 +0800)]
BaseTools: generate alignment when the FV content come from the filesystem

when the FV contents come from the filesystem instead of from a named FDF
section, the build tool missed to generate alignment for this FV. The fix
is get the alignment value from FV header and use this value to generate
alignment.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools: Extend the RAW format to support multiple binary files
Yonghong Zhu [Mon, 21 Mar 2016 11:27:35 +0000 (19:27 +0800)]
BaseTools: Extend the RAW format to support multiple binary files

Current FDF spec updated to support multiple binary files for RAW File
in the [FV] and [Capsule] section. For the multiple normal files, it may
have the optional FfsAlignment.
Example:
FILE RAW = 197DB236-F856-4924-91F8-C1F12FB875F3 {
 Align=16 $(PLATFORM_PACKAGE)/Binaries/File1.pdb
 Align=16 $(PLATFORM_PACKAGE)/Binaries/File2.pdb
 Align=16 $(PLATFORM_PACKAGE)/Binaries/File3.pdb
}

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoShellPkg AARCH64: remove DEBUG BuildOptions override
Ard Biesheuvel [Thu, 31 Dec 2015 12:57:27 +0000 (13:57 +0100)]
ShellPkg AARCH64: remove DEBUG BuildOptions override

The BuildOptions for AARCH64 in Application/Shell/Shell.inf only affect
the core Shell binary, and not the Shell component libraries which are
merged into the final Shell binary via NULL library class resolution.

This means we need to override the UEFI_APPLICATION build options in
the platform .DSC anyway, there is no point in setting these options
here as well. So remove them.

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>
8 years agoBaseTools AARCH64: move DEBUG GCC49 to the small code model
Ard Biesheuvel [Fri, 25 Mar 2016 11:33:28 +0000 (12:33 +0100)]
BaseTools AARCH64: move DEBUG GCC49 to the small code model

When building AARCH64 platforms that include a Shell binary built from
source, we run into trouble when using the tiny code model for DEBUG
builds. The reason is that the Shell binary built in DEBUG mode exceeds
the 1 MB range of the ADR instruction, so anything that gets pulled into
the final link of the Shell binary either needs to be built with the small
or large model, or needs to be sorted in some way to put the ADR references
close to their targets.

Since code size is not a big concern for DEBUG builds anyway, let's move
to the small code model for all modules when using DEBUG GCC49. This way,
there is no need for workarounds that are specific to UEFI_APPLICATION
modules in general, or the Shell application in particular.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
8 years agoOvmfPkg: Increase the maximum size for Authenticated variables
James Bottomley [Fri, 25 Mar 2016 01:38:41 +0000 (21:38 -0400)]
OvmfPkg: Increase the maximum size for Authenticated variables

During real world testing I was getting an error with too many entries
in db: On my Secure boot laptop, I currently have seven certificates:
two Microsoft ones, Three Kernel ones from various distributions, my
own Secure Key and a temporary test key.  That gives a total EFI
Signature List size of 8317 which is over the 0x2000 maximum.

Fix this by setting the PcdMaxAuthVariableSize to 0x2800 (10K) which
isn't much of an increase but allows for 9-10 certificates.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Regression-tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoBaseTools/GCC: set -Wno-unused-but-set-variables only on RELEASE builds
Ard Biesheuvel [Thu, 24 Mar 2016 06:28:20 +0000 (07:28 +0100)]
BaseTools/GCC: set -Wno-unused-but-set-variables only on RELEASE builds

This aligns the GCC definitions for 4.6 and up to align with the ARM and
AARCH64 definitions, which is to ignore unused but set variables only on
RELEASE builds. This allows us to find instances of unused variables that
are left behind after refactoring. It also allows us to find bad new code,
which, due to the EDK2 coding style which disallows initialized automatic
variables, may contain such variables without having been noticed by other
toolchains.

(Slightly edited) observation from Jordan Justen
<jordan.l.justen@intel.com>: RELEASE builds must keep the flag because
debug code (such as assertions) may collapse to nothing -- e.g. if a
platform defines MDEPKG_NDEBUG for RELEASE -- and therefore trigger the
warning.

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: Laszlo Ersek <lersek@redhat.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
[lersek@redhat.com: incorporate commit message update from Jordan]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
8 years agoUefiCpuPkg: CpuMpPei: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 20:03:16 +0000 (21:03 +0100)]
UefiCpuPkg: CpuMpPei: remove set but unused variables

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: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
8 years agoUefiCpuPkg: PiSmmCpuDxeSmm: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 19:56:04 +0000 (20:56 +0100)]
UefiCpuPkg: PiSmmCpuDxeSmm: remove set but unused variables

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: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
8 years agoUefiCpuPkg/MtrrLib: remove unused but set variable
Ard Biesheuvel [Thu, 24 Mar 2016 06:28:19 +0000 (07:28 +0100)]
UefiCpuPkg/MtrrLib: remove unused but set variable

Remove variable TempQWord that is declared, assigned but never referenced.
This fixes a warning emitted by GCC when -Wunused-but-set-variable is in
effect.

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: Laszlo Ersek <lersek@redhat.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
8 years agoSourceLevelDebugPkg: DebugCommunicationLibUsb: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 21:05:34 +0000 (22:05 +0100)]
SourceLevelDebugPkg: DebugCommunicationLibUsb: remove set but unused variables

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
8 years agoSourceLevelDebugPkg: DebugAgentCommon: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 21:02:42 +0000 (22:02 +0100)]
SourceLevelDebugPkg: DebugAgentCommon: remove set but unused variables

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
8 years agoQuarkSocPkg: Ohci/Pei: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 20:46:11 +0000 (21:46 +0100)]
QuarkSocPkg: Ohci/Pei: remove set but unused variables

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@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: Jeff Fan <jeff.fan@intel.com>
8 years agoQuarkSocPkg: Ohci/Dxe: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 20:44:16 +0000 (21:44 +0100)]
QuarkSocPkg: Ohci/Dxe: remove set but unused variables

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@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: Jeff Fan <jeff.fan@intel.com>
8 years agoQuarkSocPkg: SDMediaDeviceDxe: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 20:41:51 +0000 (21:41 +0100)]
QuarkSocPkg: SDMediaDeviceDxe: remove set but unused variables

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@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: Jeff Fan <jeff.fan@intel.com>
8 years agoQuarkSocPkg: Spi/Common: remove set but unused variables
Laszlo Ersek [Fri, 18 Mar 2016 20:39:59 +0000 (21:39 +0100)]
QuarkSocPkg: Spi/Common: remove set but unused variables

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Kelly Steele <kelly.steele@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: Jeff Fan <jeff.fan@intel.com>