]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoMdeModulePkg S3SaveStateDxe: Add protocol usage for gEfiLockBoxProtocolGuid
Star Zeng [Wed, 13 Apr 2016 06:28:48 +0000 (14:28 +0800)]
MdeModulePkg S3SaveStateDxe: Add protocol usage for gEfiLockBoxProtocolGuid

Cc: Shumin Qiu <shumin.qiu@intel.com>
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: Shumin Qiu <shumin.qiu@intel.com>
8 years agoArmVirtPkg/VirtFdtDxe: remove Xenio handling and rename to VirtioFdtDxe
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:11 +0000 (11:45 +0200)]
ArmVirtPkg/VirtFdtDxe: remove Xenio handling and rename to VirtioFdtDxe

Now that we have moved the handling of the xen,xen DT node to XenioFdtDxe,
remove its handling from VirtFdtDxe. Since the only functionality that
remains is handling the virtio,mmio DT node, rename VirtFdtDxe to
VirtioFdtDxe to reflect that. Also update the platforms that use this
driver.

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/ArmVirtXen: move from VirtFdtDxe to new XenioFdtDxe driver
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:10 +0000 (11:45 +0200)]
ArmVirtPkg/ArmVirtXen: move from VirtFdtDxe to new XenioFdtDxe driver

Now that the only functionality that remains in VirtFdtDxe is enumerating
the respective virtual I/O buses, it no longer makes sense to have a driver
that is shared between Xen domU and QEMU. So move the Xen I/O DT node
handling to a new driver, and update ArmVirtXen to switch to it.

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 agoOvmfPkg/XenIoMmioLib: add missing MemoryAllocationLib dependency to INF
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:09 +0000 (11:45 +0200)]
OvmfPkg/XenIoMmioLib: add missing MemoryAllocationLib dependency to INF

XenIoMmioLib depends on MemoryAllocationLib, and uses its header, but
failed to declare the dependency in its INF.

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: move FDT config table installation to FdtClientDxe
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:08 +0000 (11:45 +0200)]
ArmVirtPkg/VirtFdtDxe: move FDT config table installation to FdtClientDxe

Now that FdtClientDxe is the core driver that takes ownership of the host
supplied FDT, it makes sense to put it in charge of installing the FDT
configuration table as well.

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: remove unused PL011 DT node type
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:07 +0000 (11:45 +0200)]
ArmVirtPkg/VirtFdtDxe: remove unused PL011 DT node type

This type is not used in the code, so drop the definitions.

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: get rid of A PRIORI DXE declarations for VirtFdtDxe
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:06 +0000 (11:45 +0200)]
ArmVirtPkg: get rid of A PRIORI DXE declarations for VirtFdtDxe

We no longer care when VirtFdtDxe executes, since
- the driver sets no dynamic PCDs any longer, and
- the only remaining functionality centers on VirtioMmioInstallDevice()
  and XenIoMmioInstall() function calls and FDT configuration table
  installation.

So drop the A PRIORI declaration.

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: drop RTC handling
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:05 +0000 (11:45 +0200)]
ArmVirtPkg/VirtFdtDxe: drop RTC handling

The RTC driver no longer relies on VirtFdtDxe to set the pl031 RTC base
address in a dynamic PCD, so drop the handling altogether.

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: move QEMU based platforms to ArmVirtPL031FdtClientLib
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:04 +0000 (11:45 +0200)]
ArmVirtPkg: move QEMU based platforms to ArmVirtPL031FdtClientLib

This moves QEMU based platforms to ArmVirtPL031FdtClientLib, so that we no
longer have to rely on VirtFdtDxe to execute first and set the PL031 base
address in a dynamic PCD.

The only driver which [transitively] depends on this PcdPL031RtcBase PCD is
EmbeddedPkg/RealTimeClockRuntimeDxe, so this conversion cannot affect any
other users and is thus safe.

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: implement ArmVirtPL031FdtClientLib
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:03 +0000 (11:45 +0200)]
ArmVirtPkg: implement ArmVirtPL031FdtClientLib

This implements a library ArmVirtPL031FdtClientLib which is intended to
be incorporated into RealTimeClockRuntimeDxe via NULL library class
resolution. This allows us to make RealTimeClockRuntimeDxe depend on the
FDT client protocol, and discover the PL031 base address from the device tree
directly rather than relying on VirtFdtDxe to set the dynamic PCDs.

The NULL library class resolution approach to strictly order production and
consumption of dynamic PCDs is not generally safe in cases such as this one,
where the producer and the consumer of the PCD are both libraries. However,
since the PCD is produced in this library's constructor, and the consumer
library's constructor 'LibRtcInitialize' is not a 'true' constructor (it is
invoked explicitly by RealTimeClockRuntimeDxe), this case is guaranteed to
be safe after all.

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/RelocatableVirtHelper: use correct FindMemNode argument order
Ard Biesheuvel [Wed, 13 Apr 2016 11:47:46 +0000 (13:47 +0200)]
ArmVirtPkg/RelocatableVirtHelper: use correct FindMemNode argument order

Commit 03b6bed17ea6 ArmVirtPkg/XenRelocatablePlatformLib: rewrite DTB
memory node retrieval in C") introduced a FindMemNode () C function
that takes pointers to system memory base and size as arguments, but the
calling code passes them in the wrong order.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoIntelFrameworkModulePkg: Remove unused PCD/Protocol
Ruiyu Ni [Mon, 11 Apr 2016 07:38:18 +0000 (15:38 +0800)]
IntelFrameworkModulePkg: Remove unused PCD/Protocol

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoVlv2TbltDevicePkg: Reference the PCD defined in MdeModulePkg
Ruiyu Ni [Mon, 11 Apr 2016 07:43:13 +0000 (15:43 +0800)]
Vlv2TbltDevicePkg: Reference the PCD defined in MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>
8 years agoIntelFrameworkModulePkg/KeyboardDxe: Use PCD defined in MdeModulePkg
Ruiyu Ni [Mon, 11 Apr 2016 07:37:31 +0000 (15:37 +0800)]
IntelFrameworkModulePkg/KeyboardDxe: Use PCD defined in MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoIntelFrameworkModulePkg/Ps2Mouse: Use PCD defined in MdeModulePkg
Ruiyu Ni [Mon, 11 Apr 2016 07:36:52 +0000 (15:36 +0800)]
IntelFrameworkModulePkg/Ps2Mouse: Use PCD defined in MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoIntelFrameworkModulePkg/Ps2AbsPointer: Use PCD defined in MdeModulePkg
Ruiyu Ni [Mon, 11 Apr 2016 07:34:58 +0000 (15:34 +0800)]
IntelFrameworkModulePkg/Ps2AbsPointer: Use PCD defined in MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoIntelFrameworkModulePkg/Ps2Kbd: use PCD/Protocol in MdeModulePkg
Ruiyu Ni [Mon, 11 Apr 2016 07:34:20 +0000 (15:34 +0800)]
IntelFrameworkModulePkg/Ps2Kbd: use PCD/Protocol in MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoMdeModulePkg/MdeModulePkg.uni: Add PS2 related PCD description
Ruiyu Ni [Wed, 13 Apr 2016 06:33:31 +0000 (14:33 +0800)]
MdeModulePkg/MdeModulePkg.uni: Add PS2 related PCD description

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 agoMdeModulePkg/Ps2MouseDxe: Use a different FILE_GUID
Ruiyu Ni [Wed, 13 Apr 2016 06:31:47 +0000 (14:31 +0800)]
MdeModulePkg/Ps2MouseDxe: Use a different FILE_GUID

Change to use a different FILE_GUID to avoid using the
same GUID as the module in IntelFrameworkModulePkg.

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 agoMdeModulePkg/Ps2KeyboardDxe: Use a different FILE_GUID
Ruiyu Ni [Wed, 13 Apr 2016 06:31:30 +0000 (14:31 +0800)]
MdeModulePkg/Ps2KeyboardDxe: Use a different FILE_GUID

Change to use a different FILE_GUID to avoid using the
same GUID as the module in IntelFrameworkModulePkg.

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 agoMdeModulePkg/Ps2Mouse: Fix potential buffer overflow issue.
Ruiyu Ni [Wed, 13 Apr 2016 06:11:38 +0000 (14:11 +0800)]
MdeModulePkg/Ps2Mouse: Fix potential buffer overflow issue.

Count is initially 1 but is assigned to 2 in case PS2_READ_DATA_BYTE.
Though the state machine doesn't go back from PS2_READ_DATA_BYTE to
PS2_READ_BYTE_ONE (not a true bug), force assign Count to 1 to avoid
potential buffer overflow issue.

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 agoMdeModulePkg: Update Guid/Protocol usages in INF files.
Liming Gao [Fri, 25 Mar 2016 09:24:37 +0000 (17:24 +0800)]
MdeModulePkg: Update Guid/Protocol usages in INF files.

V2: Update VariableSmm inf to align the change in VariableRuntimeDxe.inf.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoShellPkg: Update Guid/Protocol usages in INF files.
Liming Gao [Fri, 25 Mar 2016 09:21:35 +0000 (17:21 +0800)]
ShellPkg: Update Guid/Protocol usages in INF files.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
8 years agoSecurityPkg: Update protocol usage in module INF files.
Liming Gao [Fri, 25 Mar 2016 09:14:13 +0000 (17:14 +0800)]
SecurityPkg: Update protocol usage in module INF files.

Update TCG and Library module uses gEdkiiVariableLockProtocolGuid
as SOMETIMES_CONSUMES instead of CONSUMES to follow the code logic.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
8 years agoMdePkg: Add EFI Erase Block Protocol definitions
Hao Wu [Tue, 2 Feb 2016 05:09:42 +0000 (13:09 +0800)]
MdePkg: Add EFI Erase Block Protocol definitions

This protocol is newly introduced in UEFI 2.6 spec.

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 agoQuarkSocPkg: Add /Oi option to let MemoryInit pass build.
Liming Gao [Mon, 11 Apr 2016 03:52:25 +0000 (11:52 +0800)]
QuarkSocPkg: Add /Oi option to let MemoryInit pass build.

MemoryInit uses the intrinsic memset function. To keep it pass build in VS
tool chain without source code change, /Oi option will be added.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
8 years agoMdeModulePkg/Ps2MouseDxe: Fix build failure of GCC tool chain
Qiu, Shumin [Sun, 10 Apr 2016 12:55:27 +0000 (20:55 +0800)]
MdeModulePkg/Ps2MouseDxe: Fix build failure of GCC tool chain

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoArmVirtPkg/VirtFdtDxe: drop PCI host bridge handling
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:02 +0000 (11:45 +0200)]
ArmVirtPkg/VirtFdtDxe: drop PCI host bridge handling

Now that the PCI host bridge driver parses the DT node that describes
the PCI host bridge directly via the FDT client protocol, we can drop the
handling from VirtFdtDxe completely.

This means some PCI related PCDs are no longer set, such as PcdPciBusMin,
PcdPciBusMax, PcdPciIoBase, PcdPciIoSize, PcdPciIoTranslation,
PcdPciMmio32Base and PcdPciMmio32Size. Since these PCDs are specific to
ARM (and declared in ArmPlatformPkg), and not used anywhere else by the
ArmVirtPkg platforms, we can simply stop populating them, and drop all
references to them.

It also means that we can no longer rely on PcdPciDisableBusEnumeration
to be set before it is consumed by PciBusDxe and QemuFwCfgAcpiPlatformDxe,
so make those depend on FdtPciPcdProducerLib explicitly via NULL library
class resolution.

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/PciHostBridgeDxe: move to FDT client protocol
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:01 +0000 (11:45 +0200)]
ArmVirtPkg/PciHostBridgeDxe: move to FDT client protocol

Instead of relying on VirtFdtDxe to populate various dynamic PCDs with
information retrieved from the host-provided device tree, perform the
PCI ECAM related DT node parsing directly in PciHostBridgeDxe.

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/BaseCachingPciExpressLib: depend on PciPcdProducerLib
Ard Biesheuvel [Fri, 8 Apr 2016 09:45:00 +0000 (11:45 +0200)]
ArmVirtPkg/BaseCachingPciExpressLib: depend on PciPcdProducerLib

Make BaseCachingPciExpressLib depend on PciPcdProducerLib, so that we
have a chance to populate PcdPciExpressBaseAddress based on the contents
of the device tree.

Also update the platforms under ArmVirtPkg that support PCI to use the
special MAX_UINT64 value as the build time default for
PcdPciExpressBaseAddress.

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: implement FdtPciPcdProducerLib
Ard Biesheuvel [Tue, 12 Apr 2016 12:21:03 +0000 (14:21 +0200)]
ArmVirtPkg: implement FdtPciPcdProducerLib

This implements a library FdtPciPcdProducerLib which is intended to
be incorporated into modules that consume the PCI related dynamic PCDs
PcdPciExpressBaseAddress and PcdPciDisableBusEnumeration, either via NULL
library class resolution or via a direct dependency (for other libraries
or modules in ArmVirtPkg). This allows us to make them depend on the FDT
client protocol, and populate these PCDs based on the presence and the
contents of a 'pci-host-ecam-generic' DT node.

This also overloads the meaning of PcdPciExpressBaseAddress, which we will
set to MAX_UINT64 to signify that the actual values of these two PCDs have
not been assigned yet.

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: remove handling of fw_cfg DT node
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:59 +0000 (11:44 +0200)]
ArmVirtPkg/VirtFdtDxe: remove handling of fw_cfg DT node

Remove the handling of the fw_cfg DT node from VirtFdtDxe now that the
fw_cfg client library has been moved to the FDT client protocol, and no
longer relies on VirtFdtDxe to pass this information via dynamic PCDs.
Since the PCDs in question are now no longer used, remove them from the
various DEC and DSC files as well.

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/QemuFwCfgLib: move to FDT client protocol
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:58 +0000 (11:44 +0200)]
ArmVirtPkg/QemuFwCfgLib: move to FDT client protocol

Make this library depend on the FDT client protocol to access the
host supplied device tree directly rather than depending on VirtFdtDxe
to set them using dynamic PCDs.

Since this library is used by several drivers (BdsDxe, SmbiosPlatformDxe,
SmbiosDxe and QemuFwCfgAcpiPlatformDxe), we will end up parsing the device
tree and the fwcfg node at least four times. However, no dynamic PCDs are
involved anymore, and will even be removed completely in a subsequent
patch. So the conversion is not optimal, but guaranteed to be safe.

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 agoBaseTools: use unsigned chars on ARM architectures
Leif Lindholm [Thu, 17 Mar 2016 13:22:52 +0000 (21:22 +0800)]
BaseTools: use unsigned chars on ARM architectures

By default, the ARM architectures have unsigned chars, whereas the other
architectures supported by EDK2 by default have signed chars.
However, EDK2 uses -funsigned-chars on those architectures to change the
default behaviour.

Unfortunately, the ARM architectures explicitly break their default
behaviour by specifying -fsigned-chars (I presume in a pre-emptive
attempt at avoiding incompatibility).

Since this situation is already confusing enough, switch the ARM
architectures to also specify -funsigned-chars explicitly rather than
just dropping the current parameter.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools: generate hash value in build report for each output EFI image
Yonghong Zhu [Thu, 7 Apr 2016 05:57:14 +0000 (13:57 +0800)]
BaseTools: generate hash value in build report for each output EFI image

Build report add new report type 'HASH' to include the hash value for
each output EFI image.

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/VolInfo: generate HASH value for each PE image
Yonghong Zhu [Thu, 7 Apr 2016 05:56:44 +0000 (13:56 +0800)]
BaseTools/VolInfo: generate HASH value for each PE image

VolInfo Tool add new option --hash to use openssl to generate hash value
for each PE image. If the image base address is not zero, we will rebase
its base address to zero before generate hash value.

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 agoArmVirtPkg/VirtFdtDxe: remove timer DT node handling
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:57 +0000 (11:44 +0200)]
ArmVirtPkg/VirtFdtDxe: remove timer DT node handling

The timer code no longer relies on VirtFdtDxe to set the PCDs, so remove
the handling of the timer node and the references to those PCDs.

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: move TimerDxe to FDT client library
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:56 +0000 (11:44 +0200)]
ArmVirtPkg: move TimerDxe to FDT client library

Move to the new dedicated ArmVirtTimerFdtClientLib to populate the
various timer related PCDs at driver load time rather than relying on
VirtFdtDxe to do it. Since ArmPkg/TimerDxe is the only consumer of these
PCDs, which is the DXE driver ArmVirtTimerFdtClientLib is intended to
complement, this conversion is guaranteed to be safe.

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: implement ArmVirtTimerFdtClientLib
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:55 +0000 (11:44 +0200)]
ArmVirtPkg: implement ArmVirtTimerFdtClientLib

This implements a library ArmVirtTimerFdtClientLib which is intended to
be incorporated into TimerDxe via NULL library class resolution. This
allows us to make TimerDxe depend on the FDT client protocol, and
discover the timer interrupts from the device tree directly rather than
relying on VirtFdtDxe to set the dynamic PCDs.

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: drop detection of PSCI method
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:54 +0000 (11:44 +0200)]
ArmVirtPkg/VirtFdtDxe: drop detection of PSCI method

The detection of the PSCI method has been moved to the EfiResetSystemLib
implementation, so drop the handling from VirtFdtDxe. Since no users
remain of gArmVirtTokenSpaceGuid.PcdArmPsciMethod, remove that as well.

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/ArmVirtPsciResetSystemLib: move to FDT client protocol
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:53 +0000 (11:44 +0200)]
ArmVirtPkg/ArmVirtPsciResetSystemLib: move to FDT client protocol

Instead of relying on VirtFdtDxe to detect the PSCI method, move our
EfiResetSystemLib to the FDT client protocol to interrogate the device
tree directly.

Since this library is only consumed by EmbeddedPkg/ResetRuntimeDxe, and
considering that the PCD is no longer set, and even removed completely in a
subsequent patch, this conversion is guaranteed to be safe.

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: remove GIC discovery
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:52 +0000 (11:44 +0200)]
ArmVirtPkg/VirtFdtDxe: remove GIC discovery

Now that we moved the GIC discovery to our ArmGicArchLib implementation,
we can remove it from VirtFdtDxe, since it is no longer used. Remove the
PcdArmGicRevision declaration and definitions as well: VirtFdtDxe no longer
sets it, and no other drivers consume its value.

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/ArmGicArchLib: move to FdtClient protocol
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:51 +0000 (11:44 +0200)]
ArmVirtPkg/ArmGicArchLib: move to FdtClient protocol

Instead of relying on VirtFdtDxe to populate the GIC related PCDs, move
this handling to our implementation of ArmGicArchLib, and retrieve the
required DT info using the new FDT client protocol.

This removes one of the reasons we need to load VirtFdtDxe first using
an 'A PRIORI' declaration in the platform FDF.

As Laszlo kindly confirms:

  So, ultimately, the only user of this library instance is
  "ArmPkg/Drivers/ArmGic/ArmGicDxe.inf". ... Indeed, checking the build
  report file for ArmVirtQemu (AARCH64), I find ArmVirtGicArchLib (and
  ArmGicLib too) only under "ArmPkg/Drivers/ArmGic/ArmGicDxe.inf".

which means that the constructor is only invoked once, and so the dynamic
PCDs are set in time for ArmGicDxe to consume them, and never afterwards.

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: add FdtClientDxe to the ArmVirtPkg platforms
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:50 +0000 (11:44 +0200)]
ArmVirtPkg: add FdtClientDxe to the ArmVirtPkg platforms

Add FdtClientDxe to the various platforms under ArmVirtPkg, so that the
drivers we will update to depend on the FDT client protocol in subsequent
patches will remain in working order.

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/FdtClientDxe: implement new driver
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:49 +0000 (11:44 +0200)]
ArmVirtPkg/FdtClientDxe: implement new driver

This implements a new DXE driver FdtClientDxe to produce the FDT client
protocol based on a device tree image supplied by the virt host.

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: introduce FdtClientProtocol
Ard Biesheuvel [Fri, 8 Apr 2016 09:44:48 +0000 (11:44 +0200)]
ArmVirtPkg: introduce FdtClientProtocol

This introduces the FdtClientProtocol, which will be used to expose the
device tree provided by the host to other DXE drivers.

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 agoUefiCpuPkg: CpuIo2Dxe: optimize FIFO reads and writes of IO ports
Laszlo Ersek [Thu, 7 Apr 2016 20:28:38 +0000 (22:28 +0200)]
UefiCpuPkg: CpuIo2Dxe: optimize FIFO reads and writes of IO ports

* Short description:

  The CpuIoServiceRead() and CpuIoServiceWrite() functions transfer data
  between memory and IO ports with individual Io(Read|Write)(8|16|32)
  function calls, each in an appropriately set up loop.

  On the Ia32 and X64 platforms however, FIFO reads and writes can be
  optimized, by coding them in assembly, and delegating the loop to the
  CPU, with the REP prefix.

  On KVM virtualization hosts, this difference has a huge performance
  impact: if the loop is open-coded, then the virtual machine traps to the
  hypervisor on every single UINT8 / UINT16 / UINT32 transfer, whereas
  with the REP prefix, KVM can transfer up to a page of data per VM trap.
  This is especially noticeable with IDE PIO transfers, where all the data
  are squeezed through IO ports.

* Long description:

  The RootBridgeIoIoRW() function in

    PcAtChipsetPkg/PciHostBridgeDxe/PciRootBridgeIo.c

  used to have the exact same IO port acces optimization, dating back
  verbatim to commit 1fd376d9792:

    PcAtChipsetPkg/PciHostBridgeDxe: Improve KVM FIFO I/O read/write
      performance

  OvmfPkg cloned the "PcAtChipsetPkg/PciHostBridgeDxe" driver (for
  unrelated reasons), and inherited the optimization from PcAtChipsetPkg.

  The "PcAtChipsetPkg/PciHostBridgeDxe" driver was ultimately removed in
  commit 111d79db47:

    PcAtChipsetPkg/PciHostBridge: Remove PciHostBridge driver

  and OvmfPkg too was rebased to the new core Pci Host Bridge Driver, in
  commit 4014885ffd:

    OvmfPkg: switch to MdeModulePkg/Bus/Pci/PciHostBridgeDxe

  This caused the optimization to go lost. Namely, the
  RootBridgeIoIoRead() and RootBridgeIoIoWrite() functions in the new core
  Pci Host Bridge Driver delegate IO port accesses to
  EFI_CPU_IO2_PROTOCOL. And, in OvmfPkg (and likely most other Ia32 / X64
  edk2 platforms), this protocol is provided by "UefiCpuPkg/CpuIo2Dxe",
  which lacks the optimization.

  Therefore, this patch ports the C source code logic from commit
  1fd376d9792 (see above) to "UefiCpuPkg/CpuIo2Dxe", plus it ports the
  NASM-converted assembly helper functions from OvmfPkg commits
  6026bf460037 and ace1d0517b65:

    OvmfPkg PciHostBridgeDxe: Convert Ia32/IoFifo.asm to NASM

    OvmfPkg PciHostBridgeDxe: Convert X64/IoFifo.asm to NASM

  In order to support the MSFT and INTEL toolchains as well, the *.asm
  files are ported from OvmfPkg as well, immediately from before the above
  conversion (that is, at 6026bf460037^).

* Notes about the port:

  - The write and read branches from commit 1fd376d9792 are split to the
    separate functions CpuIoServiceWrite() and CpuIoServiceRead().

  - The EfiPciWidthUintXX constants are replaced with EfiCpuIoWidthUintXX.

  - The cast expression "(UINTN) Address" is replaced with
    "(UINTN)Address" (i.e., no space), because that's how the receiving
    functions spell it as well.

  - The labels in the switch statements are unindented by one level, to
    match the edk2 coding style (and the rest of UefiCpuPkg) better.

* The first signoff belongs to Jordan, because he authored all of
  1fd376d97926026bf460037 and ace1d0517b65.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Ref: https://www.redhat.com/archives/vfio-users/2016-April/msg00029.html
Reported-by: Mark <kram321@gmail.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/10424/focus=10432
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Mark <kram321@gmail.com>
Tested-by: Mark <kram321@gmail.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
8 years agoMdeModulePkg: Update PerformanceLib instances not to check Identifier.
Liming Gao [Fri, 8 Apr 2016 09:35:18 +0000 (17:35 +0800)]
MdeModulePkg: Update PerformanceLib instances not to check Identifier.

In PerformanceLib, Identifier is for single PERF, not the pair of PERF.
When find the matched START and END pair, the identifier will not be checked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoMdePkg: Update PerformanceLib comments not to check Identifier.
Liming Gao [Fri, 8 Apr 2016 09:34:58 +0000 (17:34 +0800)]
MdePkg: Update PerformanceLib comments not to check Identifier.

In PerformanceLib, Identifier is for single PERF, not the pair of PERF.
When find the matched START and END pair, the identifier will not be checked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
8 years agoUpdate edksetup.bat to check EDK_TOOLS_PATH before set it.
Liming Gao [Fri, 8 Apr 2016 05:32:07 +0000 (13:32 +0800)]
Update edksetup.bat to check EDK_TOOLS_PATH before set it.

If EDK_TOOLS_PATH is set, then not set it again.
If EDK_TOOLS_PATH is not set, then set it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
8 years agoMdeModulePkg/Ps2Keyboard: Add missing PCD and protocol to DEC file
Ruiyu Ni [Mon, 11 Apr 2016 02:55:31 +0000 (10:55 +0800)]
MdeModulePkg/Ps2Keyboard: Add missing PCD and protocol to DEC file

gEfiPs2PolicyProtocolGuid and PcdFastPS2Detection was missed when
resolving the conflict.
Check in the two definition to MdeModulePkg.dec to fix build failure.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoUefiCpuPkg/CpuMpPei: Fix potential AP mwait wakeup issue
Jeff Fan [Thu, 31 Mar 2016 11:15:05 +0000 (19:15 +0800)]
UefiCpuPkg/CpuMpPei: Fix potential AP mwait wakeup issue

If ApLoopMode is set to ApInMwaitLoop, AP will be placed into C-State by mwait
instruction. BSP will wakeup AP by write start-up signal in monitor address.
However, AP maybe waken by SMI/NMI/MCE and other condition. On this case, AP
will check if BSP wants to wakeup itself really. If not, AP will continue to
execute mwait to C-State.

One potential issue: BSP may not recognize AP was wakeup from C-State by other
event and BSP still writes start-up signal to wakeup AP. But AP does not aware
it and still execute mwait instruction to C-State. So, AP cannot be wakeup on
this case.

This fix is let AP to clear start-up signal when it really is wakeup to execute
AP function. And BSP will write start-up signal till AP clears it.

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: Feng Tian <feng.tian@intel.com>
8 years agoNetworkPkg: Add RAM disk boot support to HTTP Boot driver.
Fu Siyuan [Tue, 22 Mar 2016 05:30:58 +0000 (13:30 +0800)]
NetworkPkg: Add RAM disk boot support to HTTP Boot driver.

This patch updates the HTTP Boot driver to support the download and boot
a RAM disk image from HTTP server.
The HTTP RAM disk boot is described in section 23.7 "HTTP Boot" in
UEFI 2.6. HTTP server could provide either an UEFI image or a RAM disk image
for the HTTP boot client to use. The RAM disk image must contain a UEFI
compliant file system in it.
HTTP boot driver will identify the image type either by the "Content-Type"
entity header filed or by the file name extension as below:
  "application/efi" or *.efi -> EFI Image
  *.iso                      -> CD/DVD Image
  *.img                      -> Virtual Disk Image

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
8 years agoShellPkg: Fix Shell ASSERT when mv file with cwd is NULL.
Qiu Shumin [Fri, 8 Apr 2016 07:41:06 +0000 (15:41 +0800)]
ShellPkg: Fix Shell ASSERT when mv file with cwd is NULL.

Shell will ASSERT when doing the following operation:
""
Shell> mv fs2:\file1 fs2:\file2
""
This patch add NULL pointer check to fix this issue.

Fixes: https://github.com/tianocore/edk2/issues/76
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoMdeModulePkg BootScriptExecutorDxe: Consume PcdAcpiS3Enable to control the code
Star Zeng [Thu, 7 Apr 2016 05:54:47 +0000 (13:54 +0800)]
MdeModulePkg BootScriptExecutorDxe: Consume PcdAcpiS3Enable to control the code

Cc: Feng Tian <feng.tian@intel.com>
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>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMdeModulePkg SmmS3SaveStateDxe: Consume PcdAcpiS3Enable to control the code
Star Zeng [Thu, 7 Apr 2016 05:47:52 +0000 (13:47 +0800)]
MdeModulePkg SmmS3SaveStateDxe: Consume PcdAcpiS3Enable to control the code

Cc: Feng Tian <feng.tian@intel.com>
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>
8 years agoMdeModulePkg: Add new macros and refine codes
Zhang Lubo [Fri, 8 Apr 2016 01:48:14 +0000 (09:48 +0800)]
MdeModulePkg: Add new macros and refine codes

Add 2 macros inNetLib.h
#define  IP4_MASK_MAX          32
#define  IP6_PREFIX_MAX        128
we will use these two macros to check the max mask/prefix length,
instead of
#define  IP4_MASK_NUM          33
#define  IP6_PREFIX_NUM        129
which means a valid number.
This will make the code readability and maintainability.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
8 years agoNetworkPkg: Add new macros and refine codes
Zhang Lubo [Fri, 8 Apr 2016 01:44:09 +0000 (09:44 +0800)]
NetworkPkg: Add new macros and refine codes

v2:
*refine some codes

Add 2 macros in NetLib.h
#define  IP4_MASK_MAX          32
#define  IP6_PREFIX_MAX        128
we will use these two macros to check the max mask/prefix length,
instead of
#define  IP4_MASK_NUM          33
#define  IP6_PREFIX_NUM        129
which means a valid number
This will make the code readability and maintainability.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@@hpe.com>
8 years agoNt32Pkg: Convert to build FatPkg from source
Jordan Justen [Wed, 6 Apr 2016 07:09:16 +0000 (00:09 -0700)]
Nt32Pkg: Convert to build FatPkg from source

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Note: Not build tested

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
8 years agoDuetPkg: Convert to build FatPkg from source
Jordan Justen [Wed, 6 Apr 2016 07:08:38 +0000 (00:08 -0700)]
DuetPkg: Convert to build FatPkg from source

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Note: Build tested with GCC 5.3 on IA32 and X64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
8 years agoDuetPkg scripts: Support building with GCC45 - GCC49
Jordan Justen [Wed, 6 Apr 2016 07:39:17 +0000 (00:39 -0700)]
DuetPkg scripts: Support building with GCC45 - GCC49

Build tested with GCC 5.3 with both IA32 and X64. Unfortunately both
seemed to hang very early when boot tested on QEMU.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
8 years agoMdeModulePkg: Add Ps2MouseDxe driver
Ruiyu Ni [Fri, 17 Jul 2015 09:40:15 +0000 (17:40 +0800)]
MdeModulePkg: Add Ps2MouseDxe driver

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoMdeModulePkg: Add Ps2KeyboardDxe driver.
Ruiyu Ni [Fri, 17 Jul 2015 09:39:00 +0000 (17:39 +0800)]
MdeModulePkg: Add Ps2KeyboardDxe driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
8 years agoMdeModulePkg/UefiBootManagerLib: API BmIsValidLoadOptionVariableName
Thomas Palmer [Mon, 4 Apr 2016 19:51:42 +0000 (03:51 +0800)]
MdeModulePkg/UefiBootManagerLib: API BmIsValidLoadOptionVariableName

Redfine the BmIsValidLoadOptionVariableName function to allow public use. Change name to EfiBootManagerIsValidLoadOptionVariableName to match naming scheme. Check that VariableName is never NULL and allow OptionType and OptionNumber to be optional.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
8 years agoBaseTools: Remove /Oi from Visual Studio tool chains.
Cinnamon Shia [Wed, 16 Mar 2016 08:23:02 +0000 (16:23 +0800)]
BaseTools: Remove /Oi from Visual Studio tool chains.

Remove /Oi from Visual Studio tool chains. because of the following reasons:
1. Intrinsic is Compiler-dependent.
2. Adding /Oi (Generate Intrinsic Functions) doesn't promise 100% replacing
   the function call with inline functions.
   /Oi is only a request, but doesn't force, the compilers to use the intrinsic.
   The visual studio optimizer can still use the library version.
3. Since EDK2 doesn't include Visual Studio header files, intrinsic function
   should not be used.

Built Nt32Pkg, OvmfPkg, ShellPkg, MdeModulePkg and CryptoPkg successfully.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Qin Long <qin.long@intel.com>
8 years agoSecurityPkg OpalPasswordDxe: Clean up debug message in OpalHii.c
Eric Dong [Thu, 7 Apr 2016 13:24:05 +0000 (21:24 +0800)]
SecurityPkg OpalPasswordDxe: Clean up debug message in OpalHii.c

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: Fix wrong condition judgment.
Eric Dong [Thu, 7 Apr 2016 13:20:01 +0000 (21:20 +0800)]
SecurityPkg TcgStorageOpalLib: Fix wrong condition judgment.

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: Suppress option for special device.
Eric Dong [Thu, 7 Apr 2016 05:56:44 +0000 (13:56 +0800)]
SecurityPkg OpalPasswordDxe: Suppress option for special device.

According to current Pyrite SSC Spec 1.00, there is no parameter
for RevertSP method. So suppress KeepUserData option for the
Pyrite Ssc type device.

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 agoOvmfPkg: remove PciHostBridgeDxe fork
Laszlo Ersek [Thu, 7 Apr 2016 14:43:52 +0000 (16:43 +0200)]
OvmfPkg: remove PciHostBridgeDxe fork

This driver is now unused.

Cc: 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: remove USE_OLD_PCI_HOST build option
Laszlo Ersek [Thu, 7 Apr 2016 14:30:08 +0000 (16:30 +0200)]
OvmfPkg: remove USE_OLD_PCI_HOST build option

It's been a month since the following commits appeared in the repo:

  4014885ffdfa8 OvmfPkg: switch to MdeModulePkg/Bus/Pci/PciHostBridgeDxe
  c47ed6fcb5e60 OvmfPkg: match PCI config access to machine type (if not
                USE_OLD_PCI_HOST)

in which we introduced the USE_OLD_PCI_HOST fallback, and made other work
depend on it. I have not heard of any problems (primarily from the
vfio-users group that uses Gerd's daily / hourly OVMF builds), so it's
time to drop the fallback.

Cc: 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: Convert to using FatPkg in the EDK II tree
Jordan Justen [Wed, 6 Apr 2016 05:58:40 +0000 (22:58 -0700)]
OvmfPkg: Convert to using FatPkg in the EDK II tree

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Build tested with GCC 5.3 on IA32 and X64. Boot tested to UEFI Shell
on IA32 and UEFI Linux on X64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoEmulatorPkg: Convert to always build FatPkg
Jordan Justen [Wed, 6 Apr 2016 06:18:57 +0000 (23:18 -0700)]
EmulatorPkg: Convert to always build FatPkg

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we always build and use it directly.

Build and boot tested with GCC 5.3 on X64, but I did not test
attaching a disk image with a FAT filesystem.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Andrew Fish <afish@apple.com>
Reviewed-by: Andrew Fish <afish@apple.com>
8 years agoBeagleBoardPkg: Convert to build FatPkg from source
Jordan Justen [Wed, 6 Apr 2016 07:06:17 +0000 (00:06 -0700)]
BeagleBoardPkg: Convert to build FatPkg from source

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Build-tested-by: Leif Lindholm <leif.lindholm@linaro.org>
Build-tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmVirtPkg: Convert to build FatPkg from source
Jordan Justen [Wed, 6 Apr 2016 07:05:59 +0000 (00:05 -0700)]
ArmVirtPkg: Convert to build FatPkg from source

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoArmVirtPkg: drop dependency on PeiPcdLib for PEI Pcd.inf
Ard Biesheuvel [Wed, 6 Apr 2016 12:37:21 +0000 (14:37 +0200)]
ArmVirtPkg: drop dependency on PeiPcdLib for PEI Pcd.inf

The PcdPeim dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the PEI module
can never be dispatched since it transitively (via PeiPcdLib) depends on
a PPI it produces itself. So use the NULL PcdLib explicitly only for
this driver.

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: drop dependency on DxePcdLib for DXE Pcd.inf
Ard Biesheuvel [Wed, 6 Apr 2016 11:42:28 +0000 (13:42 +0200)]
ArmVirtPkg: drop dependency on DxePcdLib for DXE Pcd.inf

The PcdDxe dynamic PCD driver is dispatched explicitly via an 'A PRIORI'
declaration in the platform DSC. Without that declaration, the DXE driver
can never be dispatched since it transitively (via DxePcdLib) depends on
protocols it produces itself. So use the NULL PcdLib explicitly only for
this driver.

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 agoCorebootPayloadPkg: Convert to build FatPkg from source
Justen, Jordan L [Wed, 6 Apr 2016 15:14:55 +0000 (08:14 -0700)]
CorebootPayloadPkg: Convert to build FatPkg from source

Now that FatPkg is open source (and therefore can be included in the
EDK II tree) we build and use it directly.

Note: Build tested with GCC 5.3 on IA32 and IA32+X64.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Prince Agyeman <prince.agyeman@intel.com>
8 years agoIntelFrameworkModulePkg AcpiS3SaveDxe: Remove S3Ready() functional code
Star Zeng [Thu, 7 Apr 2016 10:19:29 +0000 (18:19 +0800)]
IntelFrameworkModulePkg AcpiS3SaveDxe: Remove S3Ready() functional code

The S3Ready() functional code has been moved to S3SaveStateDxe in
MdeModulePkg, the ACPI global variable related code is leaved as is
for compatibility.
PcdS3BootScriptStackSize is also moved to MdeModulePkg.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jeff Fan <jeff.fan@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>
8 years agoIntelFrameworkModulePkg AcpiS3SaveDxe: Consume PcdAcpiS3Enable to control the code
Star Zeng [Thu, 7 Apr 2016 10:19:28 +0000 (18:19 +0800)]
IntelFrameworkModulePkg AcpiS3SaveDxe: Consume PcdAcpiS3Enable to control the code

Cc: Jeff Fan <jeff.fan@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.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>
8 years agoOvmfPkg: Retire AcpiS3SaveDxe
Star Zeng [Thu, 7 Apr 2016 10:19:27 +0000 (18:19 +0800)]
OvmfPkg: Retire AcpiS3SaveDxe

The same functional code has been in S3SaveStateDxe,
OVMF AcpiS3SaveDxe can be retired now.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
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: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMdeModulePkg S3SaveStateDxe: Move S3Ready() functional code from AcpiS3SaveDxe
Star Zeng [Thu, 7 Apr 2016 10:19:26 +0000 (18:19 +0800)]
MdeModulePkg S3SaveStateDxe: Move S3Ready() functional code from AcpiS3SaveDxe

The S3Ready() functional code in AcpiS3SaveDxe of IntelFrameworkModulePkg
is to do ACPI S3 Context save. In fact, that is not really related to
Intel framework ACPI S3 protocol.

IntelFrameworkModulePkg will be deprecated step by step, so move the
functional code to MdeModulePkg and S3SaveStateDxe is a good place.
The ACPI global variable related code is leaved as is in IntelFrameworkModulePkg
AcpiS3SaveDxe for compatibility.
PcdS3BootScriptStackSize is also moved from IntelFrameworkModulePkg.

The functional code need to get ACPI FACS table and consume LockBoxLib,
so need to be before DxeSmmReadyToLock that will shut down SMM lock box
interface, EndOfDxe is a good point (OVMF AcpiS3SaveDxe has the reference
implementation).

Cc: Jiewen Yao <jiewen.yao@intel.com>
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: Jiewen Yao <jiewen.yao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMdeModulePkg S3SaveStateDxe: Consume PcdAcpiS3Enable to control the code
Star Zeng [Thu, 7 Apr 2016 10:19:25 +0000 (18:19 +0800)]
MdeModulePkg S3SaveStateDxe: Consume PcdAcpiS3Enable to control the code

Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
8 years agoOvmfPkg: Install LockBox protocol in constructor of LockBoxDxeLib
Star Zeng [Thu, 7 Apr 2016 10:19:24 +0000 (18:19 +0800)]
OvmfPkg: Install LockBox protocol in constructor of LockBoxDxeLib

Currently, the LockBox protocol is installed in entrypoint of
OVMF AcpiS3SaveDxe.

We can let the first driver run with LockBoxDxeLib linked to have its
library constructor to install LockBox protocol on the ImageHandle.
As other drivers may have gEfiLockBoxProtocolGuid dependency,
the first driver should run before them.

The later patches to retire AcpiS3SaveDxe for OVMF depends on this patch.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoOvmfPkg: Set PcdAcpiS3Enable according to QemuFwCfgS3Enabled()
Star Zeng [Thu, 7 Apr 2016 10:19:23 +0000 (18:19 +0800)]
OvmfPkg: Set PcdAcpiS3Enable according to QemuFwCfgS3Enabled()

Also need to declare PcdAcpiS3Enable as DynamicDefault in *.dsc.

Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoMdeModulePkg: Introduce new PCD PcdAcpiS3Enable
Star Zeng [Thu, 7 Apr 2016 10:19:22 +0000 (18:19 +0800)]
MdeModulePkg: Introduce new PCD PcdAcpiS3Enable

Platform can configure the PCD statically or dynamically
to control if ACPI S3 will be enabled.
S3 related modules can consume the PCD to control the code.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Laszlo Ersek <lersek@redhat.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>
Tested-by: Laszlo Ersek <lersek@redhat.com>
8 years agoArmVirtPkg: drop bogus ArmPlatformSecExtraActionLib resolution
Ard Biesheuvel [Thu, 7 Apr 2016 12:10:06 +0000 (14:10 +0200)]
ArmVirtPkg: drop bogus ArmPlatformSecExtraActionLib resolution

Nothing we use on any of the ArmVirtPkg platforms depends on the
ArmPlatformSecExtraActionLib library class, so drop the resolution
from ArmVirt.dsc.inc

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
8 years agoArmVirtPkg: remove linux loader from ARM builds
Ard Biesheuvel [Thu, 7 Apr 2016 12:07:00 +0000 (14:07 +0200)]
ArmVirtPkg: remove linux loader from ARM builds

The built in Linux loader was a temporary solution to boot ARM Linux
without EFI support in the OS. Now that EFI support is merged in the
upstream v4.5 release, we no longer need it. So drop it.

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 agoMerge 2-clause BSD licensed FatPkg
Jordan Justen [Thu, 7 Apr 2016 06:27:37 +0000 (23:27 -0700)]
Merge 2-clause BSD licensed FatPkg

This merges the FatPkg into the EDK II tree with the 2-clause BSD open
source license. A script was used to convert the FatPkg commits while
retaining the history of the FatPkg development.

The following FatPkg commits were dropped because they were empty
after the relicense script was run:

3b073bba550e54ebdd6fbc13cb2cedc74757bac9
b36c76fc3dab6c4a8782406b53a2b5d1134ddfd0
0c9dc3d809b4506f4ffe0d9f23c91deeeb5a4a21

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoFatPkg: Add NOOPT target in FatPkg.dsc
Hao Wu [Mon, 25 Jan 2016 02:30:45 +0000 (02:30 +0000)]
FatPkg: Add NOOPT target in FatPkg.dsc

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>
(based on FatPkg commit 278d45c7f6c05cc3443126964677d21bf9e2ee30)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg EnhancedFatDxe: Use safe string functions
Hao Wu [Mon, 6 Jul 2015 01:41:45 +0000 (01:41 +0000)]
FatPkg EnhancedFatDxe: Use safe string functions

Unsafe string functions are replaced with safe ones.

Safe string functions will assert if DestMax is not greater than
StrnLenS(Source, DestMax). Therefore, additional assert for checking the
size of source and destination buffers can be removed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(based on FatPkg commit 2cb92b4f19b096daf133d6501afa13e5a85062c5)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg/FatPei: Fix build error
Feng Tian [Thu, 21 May 2015 07:07:38 +0000 (07:07 +0000)]
FatPkg/FatPei: Fix build error

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
(based on FatPkg commit c20b33e706e0ce7ffd395dd5c48a13aa24ca77fb)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg: Add RecoveryBlockIo2Ppi support
Feng Tian [Wed, 20 May 2015 05:57:50 +0000 (05:57 +0000)]
FatPkg: Add RecoveryBlockIo2Ppi support

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(based on FatPkg commit add52adf722d2b0f1db4c8780a30289dacd59e02)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoEFI_FILE_PROTOCOL spec conformance bug fix.
Ruiyu Ni [Wed, 28 Jan 2015 08:58:38 +0000 (08:58 +0000)]
EFI_FILE_PROTOCOL spec conformance bug fix.

1. Write() should return Unsupported instead of WriteProtected when operating above a directory in read-only media.
2. SetInfo() should return Unsupported instead of WriteProtected when operating above a directory using a undefined GUID in read-only media.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Jin <eric.jin@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
(based on FatPkg commit 8ff136aaa3fff82d81514fd3091961ec4a63c873)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoAdd stack protection to ARM architectures. BaseStackCheckLib is now required to build...
Olivier Martin [Wed, 10 Sep 2014 01:32:03 +0000 (01:32 +0000)]
Add stack protection to ARM architectures. BaseStackCheckLib is now required to build on ARM architectures.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(based on FatPkg commit 5ac547632d735ddd3f69898ccf75f88cc205f8b3)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Acked-by: Leif Lindholm <leif.lindholm@arm.com>
8 years agoFatPkg: INF/DEC file updates to EDK II packages
Shumin Qiu [Thu, 28 Aug 2014 06:41:40 +0000 (06:41 +0000)]
FatPkg: INF/DEC file updates to EDK II packages

5. Add PACKAGE_UNI_FILE UNI file that contains the localized Abstract and Description of a package and localized strings associated with PCDs.
a. Addresses an information gap between DEC files and the UEFI Distribution Packaging Specification XML schema
b. There will be an associated update to UPT in BaseTools to consume PACKAGE_UNI_FILE and associated UNI file during UDP creation that performs the DEC -> XML conversion.
c. There will be an associated update to UPT in BaseTools to produce PACKAGE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> DEC conversion.

6. Add Package Extra UNI file that provides the localized Name of a package.
a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a package to specify extra files to be added to a UDP without having to list the files in the UPT package information data file.
b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation.
c. UNI file contains localized name of a package to go along with the localized Abstract and Description from the PACKAGE_UNI_FILE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu, Shumin <shumin.qiu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
(based on FatPkg commit 406c08cfb70d188c10df1f62fcaca8e92b27d5ff)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg: INF/DEC file updates to EDK II packages
Shumin Qiu [Thu, 28 Aug 2014 06:41:06 +0000 (06:41 +0000)]
FatPkg: INF/DEC file updates to EDK II packages

4. PCD information in DEC file comment blocks are either incomplete or incorrect.
This includes detailed description, @Prompt, @ValidRange, @ValidList, @Expression, and [Error.<TokenSpaceGuid>] validation error messages.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu, Shumin <shumin.qiu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
(based on FatPkg commit 922454602923922bd195a384eac25b873dd304cc)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg: INF/DEC file updates to EDK II packages
Shumin Qiu [Thu, 28 Aug 2014 06:40:39 +0000 (06:40 +0000)]
FatPkg: INF/DEC file updates to EDK II packages

2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module.
a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema
b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion.
c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion.

3. Add Module Extra UNI file that provides the localized Name of a module.
a. [UserExtensions.TianoCore."ExtraFiles"] provides an easy method for a module to specify extra files not listed in [Sources] or [Binaries] sections to be added to a UDP without having to list the files in the UPT package information data file.
b. There will be an associated update to UPT in BaseTools to package up files listed in [UserExtensions.TianoCore."ExtraFiles"] during UDP creation.
c. UNI file contains localized name of a module to go along with the localized Abstract and Description from the MODULE_UNI_FILE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu, Shumin <shumin.qiu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
(based on FatPkg commit 72df7b600a778b150a0362aec3cf6031284cd64f)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFatPkg: INF/DEC file updates to EDK II packages
Shumin Qiu [Thu, 28 Aug 2014 06:39:53 +0000 (06:39 +0000)]
FatPkg: INF/DEC file updates to EDK II packages

1. Usage information in INF file comment blocks are either incomplete or incorrect.
This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes.
The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu, Shumin <shumin.qiu@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
(based on FatPkg commit 808c87363023e16a6b81068dd7e21648e16c7f57)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoFix a potential buffer over flow issue.
Ruiyu Ni [Wed, 13 Aug 2014 07:00:57 +0000 (07:00 +0000)]
Fix a potential buffer over flow issue.

Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
(based on FatPkg commit 2355ea2cf327c047d7d448a1ae4e606707c82ded)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
8 years agoRefine code to make it more safely.
Eric Dong [Wed, 25 Jun 2014 05:17:32 +0000 (05:17 +0000)]
Refine code to make it more safely.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(based on FatPkg commit 059c24212d10c63351e377636b73a22e480a024b)

[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>