]> git.proxmox.com Git - mirror_edk2.git/log
mirror_edk2.git
8 years agoArmPlatformPkg: delete Juno ACPI tables
Leif Lindholm [Mon, 15 Feb 2016 17:09:07 +0000 (17:09 +0000)]
ArmPlatformPkg: delete Juno ACPI tables

Juno is now managed in OpenPlatformPkg, including the ACPI
tables - so delete this unmaintained copy.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoMdePkg: Refine the function comments in Keyword Handler Protocol
Dandan Bi [Mon, 15 Feb 2016 06:39:11 +0000 (14:39 +0800)]
MdePkg: Refine the function comments in Keyword Handler Protocol

Refine the function comments in HiiConfigKeyword.h.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg: Refine function comments in Keyword Handler Protocol
Dandan Bi [Mon, 1 Feb 2016 03:34:32 +0000 (11:34 +0800)]
MdeModulePkg: Refine function comments in Keyword Handler Protocol

Refine the function comments in ConfigKeywordHandler.c and
HiiDatabase.h.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoBaseTools-Source: Update displayed version information
edk2 dev [Tue, 16 Feb 2016 02:47:30 +0000 (10:47 +0800)]
BaseTools-Source: Update displayed version information

Standardize the --version and --help text command-line options

Updated tools to correctly display the Build number when using command-line
option --version and exit successfully after termination.
Ecc was also updated to print informational messages after the options are
parsed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Larry Hauch <larry.hauch@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
8 years agoOvmfPkg: simplify VARIABLE_STORE_HEADER generation
Laszlo Ersek [Fri, 5 Feb 2016 19:35:30 +0000 (20:35 +0100)]
OvmfPkg: simplify VARIABLE_STORE_HEADER generation

Before the merger of the authenticated and non-authenticated variable
drivers (commit fa0737a839d0), we had to match the varstore header GUID in
"OvmfPkg/VarStore.fdf.inc" to SECURE_BOOT_ENABLE, because the opposite
GUID would cause either driver to fail an assertion. The header structures
for individual variables residing in the varstore were different
(VARIABLE_HEADER vs. AUTHENTICATED_VARIABLE_HEADER), and each driver could
only handle its own, so this GUID enforcement was necessary.

Since the unification of the variable driver however, it treats (a)
variable store format, and (b) AuthVariableLib instance as independent
characteristics; it can always manipulate variable stores with both header
types. All variations boot now; the difference is whether authenticated
variables, and special variables computed from them (like SecureBoot) are
supported at runtime:

    variable store                                  non-auth   auth and SB
    header GUID            AuthVariableLib          variables  variables
--  ---------------------  -------------------  ->  ---------  -----------
 1  Variable               SecurityPkg/...          supported  unsupported
 2  Variable               AuthVariableLibNull      supported  unsupported
 3  AuthenticatedVariable  SecurityPkg/...          supported  supported
 4  AuthenticatedVariable  AuthVariableLibNull      supported  unsupported

At the moment, SECURE_BOOT_ENABLE selects between cases #2 (FALSE) and #3
(TRUE). That is, it controls both the varstore header GUID in
"OvmfPkg/VarStore.fdf.inc", and the AuthVariableLib resolution in the DSC
files.

Exploiting the unified driver's flexibility, we can simplify
"OvmfPkg/VarStore.fdf.inc" by picking the AuthenticatedVariable GUID as a
constant, and letting SECURE_BOOT_ENABLE control only the AuthVariableLib
resolution. This amounts to SECURE_BOOT_ENABLE choosing between cases #3
(TRUE) and #4 (FALSE), with identical results as before.

Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Ref: http://thread.gmane.org/gmane.comp.bios.edk2.devel/7319/focus=7344
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: Star Zeng <star.zeng@intel.com>
8 years agoMdeModulePkg DxeCore: Minor comments update to AllocatePool()
Star Zeng [Fri, 29 Jan 2016 08:32:54 +0000 (16:32 +0800)]
MdeModulePkg DxeCore: Minor comments update to AllocatePool()

Follow UEFI 2.6 spec to minor update the comments of AllocatePool().

Cc: Liming Gao <liming.gao@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: Liming Gao <liming.gao@intel.com>
8 years agoMdePkg: Minor comments update to AllocatePages() and AllocatePool()
Star Zeng [Fri, 29 Jan 2016 08:29:38 +0000 (16:29 +0800)]
MdePkg: Minor comments update to AllocatePages() and AllocatePool()

Follow UEFI 2.6 spec to minor update the comments of
AllocatePages() and AllocatePool().

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdeModulePkg DxeCore: Missing change for OEM reserved memory type at R17460
Star Zeng [Fri, 29 Jan 2016 08:24:10 +0000 (16:24 +0800)]
MdeModulePkg DxeCore: Missing change for OEM reserved memory type at R17460

At the end of CoreFreePoolI(), the check to see if it is a specific
memory type should also cover OEM reserved memory type.
It was missed when adding OEM reserved memory type support at R17460.

Cc: Liming Gao <liming.gao@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: Liming Gao <liming.gao@intel.com>
8 years agoArmPkg: DefaultExceptionHandler fixes for use with DxeCore
Cohen, Eugene [Wed, 10 Feb 2016 23:05:18 +0000 (23:05 +0000)]
ArmPkg: DefaultExceptionHandler fixes for use with DxeCore

Modify the DefaultExceptionHandler (uefi-variant) so it can be used by
DxeCore (via CpuExceptionHandlerLib) where the debug info table is not
yet published at library constructor time.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoBaseTools/GenFw AARCH64: add support for relative data relocations
Ard Biesheuvel [Fri, 12 Feb 2016 09:06:58 +0000 (10:06 +0100)]
BaseTools/GenFw AARCH64: add support for relative data relocations

This adds support to the ELF to PE/COFF conversion performed by GenFw for
the AArch64 ELF relocation types R_AARCH64_PREL64, R_AARCH64_PREL32 and
R_AARCH64_PREL16. Since we already require the ELF and PE/COFF section
layouts to be identical in order to support other relative relocation
types, this is simply a matter of whitelisting these new relocation types
in the same way.

While we're at it, clean up the code a bit, and add a comment explaining
why these relocations are ignored in WriteRelocations64 ().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdePkg: Update the UEFI version to reflect new revision
Hao Wu [Mon, 1 Feb 2016 07:12:16 +0000 (15:12 +0800)]
MdePkg: Update the UEFI version to reflect new revision

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>
8 years agoMdePkg: Add EFI Supplicant Protocol definitions
Hao Wu [Fri, 8 May 2015 07:46:30 +0000 (15:46 +0800)]
MdePkg: Add EFI Supplicant Protocol definitions

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
8 years agoMdePkg: Add EFI Wireless MAC Connection II Protocol definitions
Hao Wu [Fri, 29 Jan 2016 03:27:53 +0000 (11:27 +0800)]
MdePkg: Add EFI Wireless MAC Connection II Protocol definitions

This commit also removes common structure definitions between EFI Wireless
MAC Connection Protocol and EFI Wireless MAC Connection II Protocol from
WiFi.h and place them in WiFi2.h.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
8 years agoMdePkg: Update Acpi.h to include 6.1.
jiewen yao [Sun, 14 Feb 2016 05:53:54 +0000 (13:53 +0800)]
MdePkg: Update Acpi.h to include 6.1.

Update Acpi.h to include latest Acpi6.1
header file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Gao, Liming" <liming.gao@intel.com>
8 years agoMdePkg: Add ACPI6.1 definition.
jiewen yao [Sun, 14 Feb 2016 05:53:29 +0000 (13:53 +0800)]
MdePkg: Add ACPI6.1 definition.

Add ACPI 6.1 definitions from the ACPI
Specification Revision 6.1 January, 2016.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Gao, Liming" <liming.gao@intel.com>
8 years agoMdePkg: Add missing definition for ACPI6.0.
jiewen yao [Sun, 14 Feb 2016 05:52:41 +0000 (13:52 +0800)]
MdePkg: Add missing definition for ACPI6.0.

Add missing definition in ACPI6.0 specification.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Gao, Liming" <liming.gao@intel.com>
8 years agoNetworkPkg: better sanity check on Ipv6 prefix length
Samer El-Haj-Mahmoud [Thu, 11 Feb 2016 23:57:59 +0000 (07:57 +0800)]
NetworkPkg: better sanity check on Ipv6 prefix length

Fix a possible buffer overrun issue that could occur if PrefixLength >
128 . Changed == 128 to >= 128. Also remove check for Byte < 16, which
is no longer possible because of the first change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
8 years agoNetworkPkg: Reword PXE download message
Samer El-Haj-Mahmoud [Fri, 12 Feb 2016 00:38:30 +0000 (08:38 +0800)]
NetworkPkg: Reword PXE download message

Fix a minor grammatical error in the PXE boot message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
8 years agoMdePkg: Update Base.h to fix compilation issues with ICC.
edk2-devel [Fri, 29 Jan 2016 23:55:57 +0000 (15:55 -0800)]
MdePkg: Update Base.h to fix compilation issues with ICC.

Recent versions of the Intel C compiler define the _MSC_EXTENSIONS
constant. Base.h checks if this constant is defined to decide whether
or not to use a pragma intrinsic, which is unsupported by the latest
version of the Intel C compiler. Thus the check has been modified to
only pass in the case __INTEL_COMPILER is not defined.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Marvin Haeuser <Marvin.Haeuser@outlook.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
8 years agoArmPlatformPkg/ArmJunoPkg: only have 1 PCD for the FDT
Ryan Harkin [Wed, 10 Feb 2016 16:25:35 +0000 (16:25 +0000)]
ArmPlatformPkg/ArmJunoPkg: only have 1 PCD for the FDT

Juno doesn't have lots of DTB files in NOR flash, it only has 1 file,
called "board.dtb" and the motherboard configuration makes the right
choice about which DTB file gets written as board.dtb in NOR.

The code attempts to select which DTB it should use based on the board
variant or configuration.  And this doesn't work because those DTB files
aren't present in NOR flash.

So remove the DTB variants and only load board.dtb.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
8 years agoArmPlatformPkg/ArmJunoPkg: don't create default boot entries
Ryan Harkin [Wed, 10 Feb 2016 16:25:09 +0000 (16:25 +0000)]
ArmPlatformPkg/ArmJunoPkg: don't create default boot entries

Code was inserted to create default boot entries for Juno R1.  These
don't work, but they are also preventing the board from booting into the
default options that Intel BDS would otherwise boot.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
8 years agoShellPkg: complete previous incomplete patch
Jim Dailey [Wed, 10 Feb 2016 21:17:56 +0000 (13:17 -0800)]
ShellPkg: complete previous incomplete patch

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <Jim_Dailey@Dell.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
8 years agoMerge branch 'master' of https://github.com/tianocore/edk2
Jaben Carsey [Wed, 10 Feb 2016 17:00:35 +0000 (09:00 -0800)]
Merge branch 'master' of https://github.com/tianocore/edk2

8 years agoEmbeddedPkg/Lan9118Dxe: rename TimeOut to Retries
Ryan Harkin [Tue, 9 Feb 2016 17:10:02 +0000 (17:10 +0000)]
EmbeddedPkg/Lan9118Dxe: rename TimeOut to Retries

The variable TimeOut is actually a retry, not a timeout, so I renamed
the variable accordingly.

This patch makes no functional change.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoEmbeddedPkg/Lan9118Dxe: minor DEBUG tidyup
Ryan Harkin [Tue, 9 Feb 2016 10:07:13 +0000 (10:07 +0000)]
EmbeddedPkg/Lan9118Dxe: minor DEBUG tidyup

This patch makes a few minor DEBUG output changes:

- Fix typo in DEBUG output: Negociation->Negotiation

- Change DEBUG occurrences of "Lan9118" to "LAN9118" to make grepping
  the log output easier.

- Change the warning that auto-negotiation is not supported when
  AutoNegotiate() returns an error.
  The function already reports if the feature is supported or not and
  can also return an error for other reasons.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoEmbeddedPkg/Lan9118Dxe: add PCD for negotiation timeout
Ryan Harkin [Mon, 8 Feb 2016 14:38:05 +0000 (14:38 +0000)]
EmbeddedPkg/Lan9118Dxe: add PCD for negotiation timeout

Add a PCD for the link negotiation timeout so the platform can over-ride
the default value.

The code previously did 2000 iterations of the loop with a 2us stall, so
the code has been changed subtly to set the number of iterations equal
to the PCD value divided by the stall time.

Since the stall time has not changed, the default PCD value is set at
4000 so the original behaviour is not changed.

The problems were discovered when the ARM Juno Development Platform used
the "EFI Network" option with then LAN9118 driver.  It fails to boot the
first time and so the board drops back to Shell again:

  Warning: LAN9118 Driver in stopped state
  Link timeout in auto-negotiation.
  Lan9118: Auto Negociation not supported.
  EhcExecTransfer: transfer failed with 2
  EhcControlTransfer: error - Device Error, transfer - 2
  Buffer: EFI Hard Drive
  Booting EFI Misc Device
  Booting EFI Misc Device 1
  Booting EFI Hard Drive
  Booting EFI Network
  Warning: LAN9118 Driver not initialized
  Link timeout in auto-negotiation.
  Lan9118: Auto Negociation not supported.
  Booting EFI Internal Shell

Exiting Shell drops the user back to the Intel BDS UI.  Selecting
"Continue" then succeeds in booting from the EFI Network:

  Booting EFI Misc Device
  Booting EFI Misc Device 1
  Booting EFI Hard Drive
  Booting EFI Network
  ..MnpFreeTxBuf: Duplicated recycle report from SNP.
  MnpFreeTxBuf: Duplicated recycle report from SNP.
  [snip repeated errors]

Discussion on the edk2-devel mailing list [1] prompted Laszlo Ersek to
suggest the time taken for the NIC to negotiate was causing a problem.
He suggested the solution contained in this patch to provide a PCD
configurable by the platform.

The default PCD value does not work for Juno.  Setting the PCD to a
larger value works for Juno R0, R1 and R2.

[1] http://article.gmane.org/gmane.comp.bios.edk2.devel/7341

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoEmbeddedPkg/Lan9118Dxe: use MemoryFence
Ryan Harkin [Tue, 9 Feb 2016 08:52:32 +0000 (08:52 +0000)]
EmbeddedPkg/Lan9118Dxe: use MemoryFence

When reviewing my LAN9118 driver PCD patch [1], Ard Biesheuvel noted
that most calls to gBS->Stall() in this driver seem to be used to
prevent timing issues between the device updating data and the host
reading the values.  And that replacing most of these calls with a
MemoryFence() would be more robust.

The only exceptions are the stalls that are enclosed inside retry loops:

 - in the AutoNegotiate() function.
   This stall is waiting for the link to negotiate, which may require
   stalling until it is ready.

 - in the Lan9118Initialize() function.
   These two stalls are waiting for devices and time out after a number
   of retries.

 - in the SoftReset() function.
   This stall is inside a loop where the comment states:
   "If time taken exceeds 100us, then there was an error condition"

In these instances, I kept the stall, but also added a MemoryFence().

[1] http://article.gmane.org/gmane.comp.bios.edk2.devel/7389

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoMerge branch 'master' of https://github.com/tianocore/edk2
Jaben Carsey [Wed, 10 Feb 2016 16:56:33 +0000 (08:56 -0800)]
Merge branch 'master' of https://github.com/tianocore/edk2

8 years agoShellPkg: ShellFileHandleReadLine must return UCS2 lines.
Jim Dailey [Wed, 10 Feb 2016 16:53:00 +0000 (08:53 -0800)]
ShellPkg: ShellFileHandleReadLine must return UCS2 lines.

An earlier change had this function returning the type of lines that were in
the file being read (ASCII or UCS2). The way it is used, UCS2 output is
expected, even when the file being read is ASCII. This change restores that
behavior and documents it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <Jim_Dailey@Dell.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
8 years agoMaintainers.txt: Update maintainers for ShellBinPkg
Leif Lindholm [Tue, 9 Feb 2016 17:18:55 +0000 (17:18 +0000)]
Maintainers.txt: Update maintainers for ShellBinPkg

Separate ShellPkg and ShellBinPkg into separate entities.
Add Leif Lindholm and Ard Biesheuvel as ShellBinPkg maintainers
for ARM/AArch64 only.
Add indicaton that Jaben Carsey and Shumin Qiu are maintainers for
Ia32/X64 specifically.

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: Jaben Carsey <jaben.carsey@intel.com>
8 years agoShellPkg: Fix ASCII and UNICODE file pipes.
jaben carsey [Mon, 8 Feb 2016 23:59:04 +0000 (15:59 -0800)]
ShellPkg: Fix ASCII and UNICODE file pipes.

Fix various errors when piping a UNICODE or ASCII file to a simple shell application that reads standard input and writes it to standard output.

1) When the memory file is created by CreateFileInferfaceMem() to capture the pipe output, no UNICODE BOM is written to the memory file. Later, when the memory file is read by the application using ShellFileHandleReadLine(), the function indicates that the file is ASCII because there is no BOM.

2) If the file is piped as ASCII, the ASCII memory image is not correctly created by FileInterfaceMemWrite() as each ASCII character is followed by '\0' in the image (when the ASCII data is written to the memory image, the file position should only be incremented by half the buffer size).

3) ShellFileHandleReadLine() does not read ASCII files correctly (writes to Buffer need to be cast as CHAR8*).

4) FileInterfaceMemRead() and FileInterfaceMemWrite() as somewhat hard to read and difficult to debug with certain tools due to the typecasting of This. Added a local variable (MemFile) of the correct type to these functions and used it instead of This.

Enhancement: ShellFileHandleReadLine() now returns EFI_END_OF_FILE when appropriate.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

8 years agoArmPlatformPkg/Bds: Early Console Initialization
Supreeth Venkatesh [Mon, 8 Feb 2016 21:33:30 +0000 (15:33 -0600)]
ArmPlatformPkg/Bds: Early Console Initialization

Setup the EFI System Table with information about the
Console Devices early, so that error messages in bds
are printed on the console earlier.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Supreeth Venkatesh <supreeth.venkatesh@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
8 years agoShellBinPkg: Arm/AArch64 Shell binary update.
Leif Lindholm [Tue, 9 Feb 2016 15:47:45 +0000 (15:47 +0000)]
ShellBinPkg: Arm/AArch64 Shell binary update.

The binaries of ShellBinPkg are generated with ShellPkg from
9a8f6fb40712 ("ArmPlatformPkg: remove unused Sec library").

This reintroduces the non-standard tftp commands that were
unintentionally dropped with svn r18243.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
8 years agoArmPlatformPkg: remove unused Sec library
Ryan Harkin [Wed, 3 Feb 2016 11:38:12 +0000 (11:38 +0000)]
ArmPlatformPkg: remove unused Sec library

The Sec library was built by the AARCH64 FVP models, but the binary was
unused because it was part of a legacy booting strategy from before ARM
Trusted Firmware came along.

This change requires changes in OpenPlatformPkg to remove the Sec binary
from the FVP build.

Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoArmPlatformPkg: remove ArmVExpress-RTSM-A15_MPCore.dsc/fdf
Ryan Harkin [Wed, 3 Feb 2016 10:56:53 +0000 (10:56 +0000)]
ArmPlatformPkg: remove ArmVExpress-RTSM-A15_MPCore.dsc/fdf

This platform is untested and no longer supported, so remove it from the
tree.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoArmPlatformPkg: remove ArmJuno.dsc/fdf
Ryan Harkin [Fri, 29 Jan 2016 18:07:28 +0000 (18:07 +0000)]
ArmPlatformPkg: remove ArmJuno.dsc/fdf

ARM Ltd Platform support is migrating to use OpenPlatformPkg [1].

Currently, Juno exists both in EDK2's ArmPlatformPkg and in
OpenPlatformPkg [2].  And they are starting to diverge, with
OpenPlatformPkg being the most up-to-date with current developments.
To prevent this divergence, remove the .dsc and .fdf files from
ArmPlatformPkg and leave OpenPlatformPkg as the master.

We can't remove ArmJuno.dec yet because ACPI still uses it to set the
include path to ArmPlatform.h.

[1] https://git.linaro.org/uefi/OpenPlatformPkg.git
[2] https://git.linaro.org/uefi/OpenPlatformPkg.git/tree/master:/Platforms/ARM/Juno

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoArmPlatformPkg: remove ArmVExpress-FVP-AArch64.dsc/fdf
Ryan Harkin [Fri, 29 Jan 2016 18:06:08 +0000 (18:06 +0000)]
ArmPlatformPkg: remove ArmVExpress-FVP-AArch64.dsc/fdf

ARM Ltd Platform support is migrating to use OpenPlatformPkg [1].

Currently, FVP exists both in EDK2's ArmPlatformPkg and in
OpenPlatformPkg [2].  And they are starting to diverge, with
OpenPlatformPkg being the most up-to-date with current developments.
To prevent this divergence, remove the .dsc and .fdf files from
ArmPlatformPkg and leave OpenPlatformPkg as the master.

[1] https://git.linaro.org/uefi/OpenPlatformPkg.git
[2] https://git.linaro.org/uefi/OpenPlatformPkg.git/tree/master:/Platforms/ARM/VExpress

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoArmPlatformPkg: remove ArmVExpress-CTA15-A7.dsc/fdf
Ryan Harkin [Fri, 29 Jan 2016 17:54:40 +0000 (17:54 +0000)]
ArmPlatformPkg: remove ArmVExpress-CTA15-A7.dsc/fdf

ARM Ltd Platform support is migrating to use OpenPlatformPkg [1].

Currently, TC2 exists both in EDK2's ArmPlatformPkg and in
OpenPlatformPkg [2].  And they are starting to diverge, with
OpenPlatformPkg being the most up-to-date with current developments.
To prevent this divergence, remove the .dsc and .fdf files from
ArmPlatformPkg and leave OpenPlatformPkg as the master.

[1] https://git.linaro.org/uefi/OpenPlatformPkg.git

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
8 years agoShellPkg: Fix ASCII and UNICODE file pipes.
jaben carsey [Mon, 8 Feb 2016 23:59:04 +0000 (15:59 -0800)]
ShellPkg: Fix ASCII and UNICODE file pipes.

Fix various errors when piping a UNICODE or ASCII file to a simple shell application that reads standard input and writes it to standard output.

1) When the memory file is created by CreateFileInferfaceMem() to capture the pipe output, no UNICODE BOM is written to the memory file. Later, when the memory file is read by the application using ShellFileHandleReadLine(), the function indicates that the file is ASCII because there is no BOM.

2) If the file is piped as ASCII, the ASCII memory image is not correctly created by FileInterfaceMemWrite() as each ASCII character is followed by '\0' in the image (when the ASCII data is written to the memory image, the file position should only be incremented by half the buffer size).

3) ShellFileHandleReadLine() does not read ASCII files correctly (writes to Buffer need to be cast as CHAR8*).

4) FileInterfaceMemRead() and FileInterfaceMemWrite() as somewhat hard to read and difficult to debug with certain tools due to the typecasting of This. Added a local variable (MemFile) of the correct type to these functions and used it instead of This.

Enhancement: ShellFileHandleReadLine() now returns EFI_END_OF_FILE when appropriate.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

8 years agoArmVirtPkg: implement ArmVirtQemuKernel
Ard Biesheuvel [Fri, 5 Feb 2016 13:57:57 +0000 (14:57 +0100)]
ArmVirtPkg: implement ArmVirtQemuKernel

This implements a version of ArmVirtQemu that does not execute in place from
emulated NOR flash, but implements the Linux kernel boot protocol, and executes
from DRAM instead. This allows UEFI to be loaded as a payload by a previous
bootloader stage such as ARM Trusted Firmware/OP-TEE.

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 agoArmVirtPkg: introduce new ArmQemuRelocatablePlatformLib
Ard Biesheuvel [Fri, 5 Feb 2016 13:54:42 +0000 (14:54 +0100)]
ArmVirtPkg: introduce new ArmQemuRelocatablePlatformLib

This introduces ArmQemuRelocatablePlatformLib, which started out as a
straight copy of ArmXenRelocatablePlatformLib, but has been modified so
that ArmVirtPkg/PrePi/ArmVirtPrePiUniCoreRelocatable.inf can be used with
QEMU as well as with Xen. It retains the self relocation and FDT parsing
for the system memory, but uses the QEMU MMU layout.

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 agoArmVirtPkg/EarlyFdtPL011: allow patchable PCD for initial DT base address
Ard Biesheuvel [Fri, 5 Feb 2016 13:52:30 +0000 (14:52 +0100)]
ArmVirtPkg/EarlyFdtPL011: allow patchable PCD for initial DT base address

Allow the use of a patchable PCD for the initial DT base address recorded in
gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress, so that the module
can be reused by a relocatable version of ArmVirtQemu.

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 agoArmPlatformPkg: remove unused .dsc and .fdf files
Ryan Harkin [Fri, 5 Feb 2016 10:28:09 +0000 (10:28 +0000)]
ArmPlatformPkg: remove unused .dsc and .fdf files

The .dsc and .fdf files in ArmPlatformPkg are unused.  Remove them as
part of a general cleanup of ArmPlatformPkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
8 years agoMdeModulePkg: Update DxeCore dispatcher to ignore PEI and SMM depex for FV.
Liming Gao [Wed, 3 Feb 2016 14:00:20 +0000 (22:00 +0800)]
MdeModulePkg: Update DxeCore dispatcher to ignore PEI and SMM depex for FV.

If FV image without DXE depex, it will be dispatched by DxeCore.
If FV image with SMM depex, it is the invalid image. ASSERT will be trig.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
8 years agoArmPkg: Add isb when setting SCR
Evan Lloyd [Wed, 3 Feb 2016 17:07:47 +0000 (17:07 +0000)]
ArmPkg: Add isb when setting SCR

Some updates to SCR can cause a problem which manifests as an undefined opcode exception.
This may be when a speculative secure instruction fetch happens after the NS bit is set.
An isb is required to make the register change take effect fully.

Contributed-under: Tianocore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <Evan.Lloyd@arm.com>
Reviewed-by: Sami Mujawar <Sami.Mujawar@arm.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
8 years agoMdeModulePkg/PcRtc: Still create timezone variable when Daylight != 0
Ruiyu Ni [Tue, 2 Feb 2016 08:36:23 +0000 (16:36 +0800)]
MdeModulePkg/PcRtc: Still create timezone variable when Daylight != 0

The patch fixes a regression bug caused by last check-in which
causes Daylight setting cannot be set when timezone is unspecified.

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/UsbAbsPointer:Fix GetState() to return absolute value
Ruiyu Ni [Fri, 29 Jan 2016 08:03:05 +0000 (16:03 +0800)]
MdeModulePkg/UsbAbsPointer:Fix GetState() to return absolute value

Fix UsbMouseAbsolutePointer driver GetState() interface to return
absolute value instead of relative value.
The driver is ported from UsbMouse driver. The GetState of
SimplePointer protocol returns relative value but the GetState
of AbsolutePointer protocol should return absolute value.

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: Correct one return status code in SNP Transmit function.
Fu Siyuan [Mon, 1 Feb 2016 02:30:47 +0000 (10:30 +0800)]
MdeModulePkg: Correct one return status code in SNP Transmit function.

According to UEFI spec, a BUFFER_FULL return status in UNDI Transmit command
indicates UNDI "Transmit buffer is full. Call Get Status command toempty
buffer." So this patch updates the SNP Transmit to return EFI_NOT_READY for
BUFFER_FULL to let the call know the buffer full status.

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: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
8 years agoMdeModulePkg: Update the default size of MNP TX buffer pool.
Fu Siyuan [Mon, 1 Feb 2016 02:24:43 +0000 (10:24 +0800)]
MdeModulePkg: Update the default size of MNP TX buffer pool.

The MNP and SNP are independent drivers so the MNP_TX_BUFFER_INCREASEMENT could choose
any value as needed. While this patch update the default value of this macro to 32,
to be same as the maximum recycled buffer numbers in one UNDI GetStatus command. It is
a workaround for some incorrect UNDI drivers which may not return the correct statuses
for the SNP and MNP to correctly retry/call GetStatus to clear the buffers.

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: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
8 years agoMdeModulePkg: Update DBsize in SNP GetStatus command.
Fu Siyuan [Wed, 3 Feb 2016 07:15:20 +0000 (15:15 +0800)]
MdeModulePkg: Update DBsize in SNP GetStatus command.

Update the DBsize in GetStatus command to let UNDI return an array of recycled
buffers. This is to make the loop at the end of PxeGetStatus() useful and to
prevent buffer overflow with some non-conformant UNDI drivers which not check
the value of the input DBsize in UNDI GetStatus command.

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: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
8 years agoNetworkPkg:Add a new error status code EFI_HTTP_ERROR
Zhang Lubo [Fri, 29 Jan 2016 03:17:34 +0000 (11:17 +0800)]
NetworkPkg:Add a new error status code EFI_HTTP_ERROR

v4:
* Update macro HTTP_ERROR_STATUS to HTTP_ERROR_OR_NOT_SUPPORT_STATUS_CODE
Update copyright year.
When the Error Status of ResponseData returned from HttpIoRecvResponse
function during the Http HEAD method, it should also return error status
to Load file protocol.

Add a new error status code EFI_HTTP_ERROR in corresponding with the
UEFI 2.6 spec . When a HTTP error occurred during the network operation,
The EFI_HTTP_ERROR is returned in token.

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: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
8 years agoMdePkg:Add a new error status code EFI_HTTP_ERROR.
Zhang Lubo [Thu, 28 Jan 2016 07:34:11 +0000 (15:34 +0800)]
MdePkg:Add a new error status code EFI_HTTP_ERROR.

v2:
*Return the EFI_HTTP_ERROR in the “Status” field in token, instead of
in the status codes returned table of EFI_HTTP_PROTOCOL.Response() interface.

Add a new error status code EFI_HTTP_ERROR in corresponding with
the UEFI 2.6 spec

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
8 years agoNetworkPkg: Fix suspicious dereference of pointer 'Mode.Ia'
Zhang Lubo [Mon, 1 Feb 2016 03:29:57 +0000 (11:29 +0800)]
NetworkPkg: Fix suspicious dereference of pointer 'Mode.Ia'

This patch is used to fix suspicious dereference of pointer 'Mode.Ia'
before NULL check.

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: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
8 years agoMaintainers.txt: Update source repository urls
Jordan Justen [Tue, 2 Feb 2016 16:53:59 +0000 (08:53 -0800)]
Maintainers.txt: Update source repository urls

Add 'mirror' to mirror/backup git repositories, and mark svn as
read-only and deprecated.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
8 years agoMaintainers.txt: Add newline to final line of file
Jordan Justen [Tue, 2 Feb 2016 19:05:09 +0000 (19:05 +0000)]
Maintainers.txt: Add newline to final line of file

(Actually, this is a test to see if SVN is read-only.)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19793 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: QemuBootOrderLib: recognize NVMe devices
Laszlo Ersek [Tue, 2 Feb 2016 15:30:27 +0000 (15:30 +0000)]
OvmfPkg: QemuBootOrderLib: recognize NVMe devices

This patch enables QemuBootOrderLib to parse OFW device paths formatted by
QEMU commit a907ec52cc1a:

  nvme: generate OpenFirmware device path in the "bootorder" fw_cfg file

With both patches applied, OVMF will honor the bootindex=N property of the
NVMe device:

  -drive id=drive0,if=none,format=FORMAT,file=PATHNAME \
  -device nvme,drive=drive0,serial=SERIAL,bootindex=N
                                          ^^^^^^^^^^^

Cc: Vladislav Vovchenko <vladislav.vovchenko@sk.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reference: https://github.com/tianocore/edk2/issues/48
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Vladislav Vovchenko <vladislav.vovchenko@sk.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19792 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOvmfPkg: include NvmExpressDxe driver
Laszlo Ersek [Tue, 2 Feb 2016 15:30:25 +0000 (15:30 +0000)]
OvmfPkg: include NvmExpressDxe driver

QEMU emulates NVMe. NvmExpressDxe seems to work well with it. The relevant
QEMU options are

  -drive id=drive0,if=none,format=FORMAT,file=PATHNAME \
  -device nvme,drive=drive0,serial=SERIAL

where the required SERIAL value sets the Serial Number (SN) field of the
"Identify Controller Data Structure". It is an ASCII string with up to 20
characters, which QEMU pads with spaces to maximum length.

(Refer to "NVME_ADMIN_CONTROLLER_DATA.Sn" in
"MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.h".)

Cc: Vladislav Vovchenko <vladislav.vovchenko@sk.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Reference: https://github.com/tianocore/edk2/issues/48
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Vladislav Vovchenko <vladislav.vovchenko@sk.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19791 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoOmap35xxPkg: Rectify file modes
Evan Lloyd [Tue, 2 Feb 2016 11:43:00 +0000 (11:43 +0000)]
Omap35xxPkg: Rectify file modes

Problems have been encountered because some of the source files have
execute permission set.  This can cause git to report them as changed
when they are checked out onto a file system with inherited permissions.
This has been seen using Cygwin, MinGW and PowerShell Git.

This patch makes no change to source file content, and only aims to
correct the file modes/permissions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19790 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoEmbeddedPkg: Rectify file modes
Evan Lloyd [Tue, 2 Feb 2016 11:42:51 +0000 (11:42 +0000)]
EmbeddedPkg: Rectify file modes

Problems have been encountered because some of the source files have
execute permission set.  This can cause git to report them as changed
when they are checked out onto a file system with inherited permissions.
This has been seen using Cygwin, MinGW and PowerShell Git.

This patch makes no change to source file content, and only aims to
correct the file modes/permissions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19789 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBeagleBoardPkg: Rectify file modes
Evan Lloyd [Tue, 2 Feb 2016 11:42:41 +0000 (11:42 +0000)]
BeagleBoardPkg: Rectify file modes

Problems have been encountered because some of the source files have
execute permission set.  This can cause git to report them as changed
when they are checked out onto a file system with inherited permissions.
This has been seen using Cygwin, MinGW and PowerShell Git.

This patch makes no change to source file content, and only aims to
correct the file modes/permissions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19788 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoArmPlatformPkg: Rectify file modes
Evan Lloyd [Tue, 2 Feb 2016 11:42:31 +0000 (11:42 +0000)]
ArmPlatformPkg: Rectify file modes

Problems have been encountered because some of the source files have
execute permission set.  This can cause git to report them as changed
when they are checked out onto a file system with inherited permissions.
This has been seen using Cygwin, MinGW and PowerShell Git.

This patch makes no change to source file content, and only aims to
correct the file modes/permissions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19787 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoSecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth...
Chao Zhang [Tue, 2 Feb 2016 01:02:31 +0000 (01:02 +0000)]
SecurityPkg: AuthVariableLib: Add new cert database for volatile time based Auth variable

Add a new cert data base "certdbv" to store signer certs for volatile time based
Auth variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19786 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg: Add BS+RT+AT variable attribute definition
Chao Zhang [Tue, 2 Feb 2016 00:53:39 +0000 (00:53 +0000)]
MdeModulePkg: Add BS+RT+AT variable attribute definition

Add BS+RT+AT variable attribute definition.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19785 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdePkg: Add new enum EfiPlatformConfigurationActionUnsupportedGuid
Ruiyu Ni [Mon, 1 Feb 2016 03:01:39 +0000 (03:01 +0000)]
MdePkg: Add new enum EfiPlatformConfigurationActionUnsupportedGuid

Add new enum EfiPlatformConfigurationActionUnsupportedGuid to
EFI_PLATFORM_CONFIGURATION_ACTION to be used by Response() when
Query() returns a unsupported ParameterTypeGuid.

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

8 years agoPcAtChipsetPkg/Rtc: Don't unnecessarily create timezone variable.
Ruiyu Ni [Mon, 1 Feb 2016 02:32:44 +0000 (02:32 +0000)]
PcAtChipsetPkg/Rtc: Don't unnecessarily create timezone variable.

When SetTime() is called with EFI_UNSPECIFIED_TIMEZONE, the code
can optimally not create the private timezone variable because
absence of timezone variable indicates the timezone is unspecified.

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

8 years agoMaintainers.txt: Update maintainers for NetworkPkg
Jiaxin Wu [Mon, 1 Feb 2016 01:49:29 +0000 (01:49 +0000)]
Maintainers.txt: Update maintainers for NetworkPkg

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

8 years agoNetworkPkg: Correct inconsistent function descriptions in DNS
Jiaxin Wu [Mon, 1 Feb 2016 01:43:12 +0000 (01:43 +0000)]
NetworkPkg: Correct inconsistent function descriptions in DNS

This patch is used to correct inconsistent function descriptions
in DnsDxe.

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

8 years agoMdePkg: Correct inconsistent function descriptions in DNS
Jiaxin Wu [Mon, 1 Feb 2016 01:36:25 +0000 (01:36 +0000)]
MdePkg: Correct inconsistent function descriptions in DNS

This patch is used to correct inconsistent function descriptions
in Dns4.h and Dns6.h.

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

8 years agoQuarkPlatformPkg/Readme.md: Move images to tianocore wiki
Michael Kinney [Sun, 31 Jan 2016 19:22:57 +0000 (19:22 +0000)]
QuarkPlatformPkg/Readme.md: Move images to tianocore wiki

Move image files associated with Readme.md from tianocore website
to tianocore wiki.

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

8 years agoArmPkg: Rectify file modes
Evan Lloyd [Sat, 30 Jan 2016 12:25:59 +0000 (12:25 +0000)]
ArmPkg: Rectify file modes

Problems have been encountered because some of the source files have
execute permission set.  This can cause git to report them as changed
when they are checked out onto a file system with inherited permissions.
This has been seen using Cygwin, MinGW and PowerShell Git.

This patch makes no change to source file content, and only aims to
correct the file modes/permissions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Evan Lloyd <evan.lloyd@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19778 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoQuarkPlatformPkg: Add modules required for TCG MOR feature
Michael Kinney [Fri, 29 Jan 2016 23:38:58 +0000 (23:38 +0000)]
QuarkPlatformPkg: Add modules required for TCG MOR feature

Add the TcgSmm and TcgMor modules that are required to manage
UEFI variable that conveys TCG MOR request to memory init module
in PEI phase.

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

8 years agoQuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request
Michael Kinney [Fri, 29 Jan 2016 23:38:52 +0000 (23:38 +0000)]
QuarkPlatformPkg/PlatformInit: Clear memory based on TCG MOR request

If TCG Memory Overwrite Request is set, then clear all memory
available for use by an OS.  An OS may optionally use embedded
SRAM in Quark SoC X1000, so the embedded SRAM should is cleared
too.  TCG MOR requests are communicated through a UEFI variable.
This module reads UEFI variable to check state of MOR request.

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

8 years agoOvmfPkg: Increase default RELEASE build image size to 2MB
Jordan Justen [Fri, 29 Jan 2016 19:06:47 +0000 (19:06 +0000)]
OvmfPkg: Increase default RELEASE build image size to 2MB

Fixes: https://github.com/tianocore/edk2/issues/47
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Bruce Cran <bruce@cran.org.uk>
Cc: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19775 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMaintainers.txt: Update maintainers for MdeModulePkg
Star Zeng [Fri, 29 Jan 2016 09:33:10 +0000 (09:33 +0000)]
Maintainers.txt: Update maintainers for MdeModulePkg

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

8 years agoMdeModulePkg: Minor comments update to GetNextHighMonotonicCount()
Star Zeng [Fri, 29 Jan 2016 09:26:49 +0000 (09:26 +0000)]
MdeModulePkg: Minor comments update to GetNextHighMonotonicCount()

Description of the GetNextHighMonotonicCount does not state that the counter
is incremented on calling this function. However, the example usage of this
API documented relies on this behavior.

UEFI 2.6 spec is to update description to match usage documented.

The high 32-bit value is nonvolatile and is increased by 1 whenever the system
resets whenever the low 32-bit count (returned by GetNextMonoticCount()) overflows.

->

The high 32-bit value is nonvolatile and is increased by 1 whenever the system
resets, whenever GetNextHighMonotonicCount() is called, or whenever the low
32-bit count (returned by GetNextMonoticCount()) overflows.

Cc: Liming Gao <liming.gao@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: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19773 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoDuetPkg FSVariable: Minor update to the Data parameter for GetVariable()
Star Zeng [Fri, 29 Jan 2016 09:15:53 +0000 (09:15 +0000)]
DuetPkg FSVariable: Minor update to the Data parameter for GetVariable()

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

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

The comments of Data parameter:
Data The buffer to return the contents of the variable.
->
Data The buffer to return the contents of the variable. May be NULL
        with a zero DataSize in order to determine the size buffer needed.

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

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

8 years agoMdeModulePkg Variable: Minor update to the Data parameter for GetVariable()
Star Zeng [Fri, 29 Jan 2016 09:15:43 +0000 (09:15 +0000)]
MdeModulePkg Variable: Minor update to the Data parameter for GetVariable()

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

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

The comments of Data parameter:
Data The buffer to return the contents of the variable.
->
Data The buffer to return the contents of the variable. May be NULL
        with a zero DataSize in order to determine the size buffer needed.

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

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

8 years agoMdePkg: Minor update to the Data parameter for GetVariable()
Star Zeng [Fri, 29 Jan 2016 09:15:33 +0000 (09:15 +0000)]
MdePkg: Minor update to the Data parameter for GetVariable()

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

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

The comments of Data parameter:
Data The buffer to return the contents of the variable.
->
Data The buffer to return the contents of the variable. May be NULL
        with a zero DataSize in order to determine the size buffer needed.

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

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

8 years agoMdePkg: Remove magic number
Jiaxin Wu [Fri, 29 Jan 2016 06:45:39 +0000 (06:45 +0000)]
MdePkg: Remove magic number

This patch is used to update structure of
EFI_IP4_CONFIG2_INTERFACE_INFO to remove
magic number.

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

8 years agoBaseTools: Update BaseTools to pass VS2015 compiler
Yonghong Zhu [Fri, 29 Jan 2016 04:54:37 +0000 (04:54 +0000)]
BaseTools: Update BaseTools to pass VS2015 compiler

Fix some errors to pass VS2015 compiler.
1. warning C4456: declaration of xxx hides previous local declaration
2. warning C4005: 'UINT8_MAX': macro redefinition

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

8 years agoBaseTools:Incremental build not work if VPD values in DSC changed by -D
Yonghong Zhu [Fri, 29 Jan 2016 04:48:55 +0000 (04:48 +0000)]
BaseTools:Incremental build not work if VPD values in DSC changed by -D

If a -D flag is passed into build that selects different lines in
[PcdsDynamicExVpd], then build does not see any changes to the timestamp
of the DSC file and the VPD tool is not used to regenerate the VPD
region based in the statements that are active. so we changed the detect
condition and use SaveFileOnChange function to generate VPD.

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

8 years agoBaseTools: Fix the bug for VOID* Patchable PCD declaration in Library
Yonghong Zhu [Fri, 29 Jan 2016 04:46:47 +0000 (04:46 +0000)]
BaseTools: Fix the bug for VOID* Patchable PCD declaration in Library

VOID* Patchable PCD in Library has the different declaration from the
one in Driver, this issue that will cause GCC LTO build failure.

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

8 years agoBaseTools: Fix a bug for VpdOffset calculate
Yonghong Zhu [Fri, 29 Jan 2016 04:44:54 +0000 (04:44 +0000)]
BaseTools: Fix a bug for VpdOffset calculate

The VpdOffset value in the DSC both support integer and Hex value, so we
fix the bug to support both format.

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

8 years agoQuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg
Michael Kinney [Fri, 29 Jan 2016 00:54:32 +0000 (00:54 +0000)]
QuarkPlatformPkg: Add Readme.md for QuarkPlatformPkg

Add a Readme.md for the QuarkPlatformPkg that describes how to
clone, build, boot, debug, and enable/disable features for the
Intel(R) Galileo Development Board and the Intel(R) Galileo Gen 2
Development Board.

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

8 years agoMdeModulePkg: NvmExpressDxe: clean up NvmeRead() / NvmeWrite() debug msgs
Laszlo Ersek [Thu, 28 Jan 2016 11:03:15 +0000 (11:03 +0000)]
MdeModulePkg: NvmExpressDxe: clean up NvmeRead() / NvmeWrite() debug msgs

These workhorse functions are part of the BlockIo protocol that
NvmExpressDxe produces. For bulk data access, they are called very
frequently. Their debug messages should be therefore downgraded to
EFI_D_VERBOSE.

In addition, the following DEBUG() warts are cleaned up:

- The function name should be printed with %a / __FUNCTION__, so that
  renaming the function, or copying the DEBUG() elsewhere, be reflected in
  the debug output automatically. (In fact, after this patch, the DEBUG()
  calls become identical.)

- "Lba" is of type UINT64, therefore it should be printed with %Lx, not
  %x.

- "OrginalBlocks" and "Blocks" are both UINTN. The only portable way to
  print UINTN is to convert it to UINT64 manually, then format it with the
  %Lx (or %Lu) conversion specifier.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Feng Tian <feng.tian@Intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19763 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoMdeModulePkg/PeiCore: Fix the debug info of PEI temp heap length
Cinnamon Shia [Thu, 28 Jan 2016 08:08:57 +0000 (08:08 +0000)]
MdeModulePkg/PeiCore: Fix the debug info of PEI temp heap length

(HandoffInformationTable->EfiFreeMemoryBottom - Private->HobList.Raw)
is the PEI temp heap used instead of the length of PEI temp heap.

The length of PEI temp heap should be:
(HandoffInformationTable->EfiFreeMemoryTop - Private->HobList.Raw)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19762 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg: Change HTTP API typos.
Zhang Lubo [Thu, 28 Jan 2016 03:15:35 +0000 (03:15 +0000)]
NetworkPkg: Change HTTP API typos.

Change HTTP API typos and clarify returned status code in HTTP API.

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

8 years agoMdePkg:Change HTTP API typos.
Zhang Lubo [Thu, 28 Jan 2016 03:11:05 +0000 (03:11 +0000)]
MdePkg:Change HTTP API typos.

change HTTP API typos and clarify returned status code in HTTP API.

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

8 years agoMdePkg:Add new traffic statistics definition for Wireless NIC.
Zhang Lubo [Thu, 28 Jan 2016 02:40:01 +0000 (02:40 +0000)]
MdePkg:Add new traffic statistics definition for Wireless NIC.

Add New traffic statistics  which will be used by wireless NIC.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19759 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNetworkPkg:Fix Network memory leak when calling GetModeData interface
Zhang Lubo [Thu, 28 Jan 2016 02:32:43 +0000 (02:32 +0000)]
NetworkPkg:Fix Network memory leak when calling GetModeData interface

Multiple network protocols have a GetModeData() interface, which may
allocate memory resource in the return mode data structure. It's
callers responsibility to free these buffers.

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

8 years agoSecurityPkg: Correct data copy in Tpm2NvReadPublic.
Yao, Jiewen [Wed, 27 Jan 2016 12:16:47 +0000 (12:16 +0000)]
SecurityPkg: Correct data copy in Tpm2NvReadPublic.

1) NvPublic.dataSize data should be got from original
receive buffer, instead of returned NvPublic.

2) NvNameSize means the size of NvName without size field.
The original code treats it to be size of NvName with size
field, so the last 2 bytes are missing.

This patch fixed problem.

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

8 years agoSecurityPkg: Add TPM PTP detection in Tpm12SubmitCommand.
Yao, Jiewen [Wed, 27 Jan 2016 12:15:59 +0000 (12:15 +0000)]
SecurityPkg: Add TPM PTP detection in Tpm12SubmitCommand.

Previously, we only add PTP detection in Tpm12RequestUseTpm,
because RequestUseTpm does not check TPM command.
This patch also adds similar check in Tpm12SubmitCommand.
PTP device does not accept TPM12 command, so that it can
return error on PTP device, instead of wait till timeout.

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

8 years agoMdeModulePkg DxeCore: Avoid the closed event to be signaled wrongly
Star Zeng [Wed, 27 Jan 2016 10:15:15 +0000 (10:15 +0000)]
MdeModulePkg DxeCore: Avoid the closed event to be signaled wrongly

Signal a closed event will still invoke the event notification function,
it could only be exposed when no the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED
bit set in PcdDebugPropertyMask.

For example:
  gBS->CreateEvent (
                EVT_NOTIFY_SIGNAL,
                TPL_CALLBACK,
                CallbackFun,
                NULL,
                &Event
                );
  gBS->CloseEvent (Event);
  gBS->SignalEvent (Event);      <- CallbackFun still be invoked

Although the case to signal a closed event is abnormal, the code could
still be enhanced to avoid it.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Thomas Palmer <thomas.palmer@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19754 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoNt32Pkg: Add NOOPT to NT32 build target
Cinnamon Shia [Wed, 27 Jan 2016 09:46:24 +0000 (09:46 +0000)]
Nt32Pkg: Add NOOPT to NT32 build target

Add NOOPT to NT32 build target. With it, all modules of NT32 are
built with optimization disabled.

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

8 years agoNt32Pkg: Increase the NT32 FD size from 0x26000 to 0x38000
Cinnamon Shia [Wed, 27 Jan 2016 09:46:15 +0000 (09:46 +0000)]
Nt32Pkg: Increase the NT32 FD size from 0x26000 to 0x38000

Increase the NT32 FD size from 0x26000 to 0x38000 for the following reasons:
- disabling optimization.
- enabling secure boot

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

8 years agoSecurityPkg: SecureBootConfigDxe: Fix potential NULL pointer dereference
Chao Zhang [Wed, 27 Jan 2016 02:46:51 +0000 (02:46 +0000)]
SecurityPkg: SecureBootConfigDxe: Fix potential NULL pointer dereference

Fix SecureBoot potential NULL pointer dereference.

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

8 years agoMdeModulePkg:Restore the HiiValue for string opcode
Dandan Bi [Wed, 27 Jan 2016 02:35:36 +0000 (02:35 +0000)]
MdeModulePkg:Restore the HiiValue for string opcode

String opcode has HiiValue and BufferValue,BufferValue for string content,
HiiValue for StringId.Function GetQuestionValue only update the
BufferValue(string content),but the StringId and string content
do not match,now fix this issue.

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

8 years agoMdeModulePkg:Make the logic in ConfigRouting.c clear and safe
Dandan Bi [Tue, 26 Jan 2016 09:42:58 +0000 (09:42 +0000)]
MdeModulePkg:Make the logic in ConfigRouting.c clear and safe

The BlockData is expected to be NULL when to call function
IsThisOpcodeRequired in each opcode,but now exists case that the
Blockdata not be cleaned,then will be used in other opcode.it
is not correct,now add the check before use.

The comments and logic in function IsThisOpcodeRequired are not
consistent,now refine the code to make the logic clear.

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

8 years agoCryptoPkg: Fix function qsort for non 32-bit machines
Karyne Mayer [Tue, 26 Jan 2016 08:51:13 +0000 (08:51 +0000)]
CryptoPkg: Fix function qsort for non 32-bit machines

Although the function qsort receives as an argument a "compare" function
which returns an "int", QuickSortWorker (the function used internally by
qsort to do its job) receives as an argument a "CompareFunction" which
returns an "INTN". In a 32-bit machine, "INTN" is defined as "INT32",
which is defined as "int" and everything works well. However, when qsort
is compiled for a 64-bit machine, "INTN" is defined as "INT64" and the
return values of the compare functions become incompatible ("int" for
qsort and "INT64" for QuickSortWorker), causing malfunction.

For example, let's assume qsort is being compiled for a 64-bit machine.
As stated before, the "compare" function will be returning an "int",
and "CompareFunction" will be returning an "INT64". When, for example,
the "compare" function (which was passed as an argument to qsort and,
then, re-passed as an argument to QuickSortWorker) returns -1 (or
0xffffffff, in a 32-bit integer, its original return type) from inside
a call to QuickSortWorker, its return value is interpreted as being an
"INT64" value - which turns out to be 4294967295 (or 0x00000000ffffffff,
in a 64-bit integer) -, making the function QuickSortWorker to behave
unexpectedly.

Note that this unexpected (or incorrect) conversion does not happen when
casting an "INT32" to an "INT64" directly, but does happen when casting
function types.

The issue is fixed by changing the return type of SORT_COMPARE (the type
of "CompareFunction", used by QuickSortWorker) from "INTN" to "int".
This way, both qsort and QuickSortWorker use compatible definitions for
their compare functions.

Contributed-under: TianoCore Contribution Agreement 1.0
Acked-by: Paulo Alcantara Cavalcanti <paulo.alc.cavalcanti@hp.com>
Signed-off-by: Karyne Mayer <kmayer@hp.com>
Signed-off-by: Rodrigo Dias Correa <rodrigo.dia.correa@hp.com>
Signed-off-by: Arthur Crippa Burigo <acb@hp.com>
Reviewed-by: Qin Long <qin.long@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19748 6f19259b-4bc3-4df7-8a09-765794883524

8 years agoBaseTools: Fix the bug when no FD section in the FDF file
Yonghong Zhu [Tue, 26 Jan 2016 08:45:34 +0000 (08:45 +0000)]
BaseTools: Fix the bug when no FD section in the FDF file

Check if the Fdf.CurrentFdName is not None and in Fdf.Profile.FdDict
before using it which fix a crash issue when no FD section in FDF file.

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