Commit Graph

16704 Commits

Author SHA1 Message Date
Cecil Sheng 14b0e5781b MdeModulePkg: Regular expression protocol
Add driver to produce EFI_REGULAR_EXPRESSION_PROTOCOL.  Based on
Oniguruma v5.9.6 (BSD 2-clause license), which provides full Unicode
support, and POSIX ERE and Perl regex syntaxes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18413 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 07:10:03 +00:00
Eric Dong d8062f1573 Rollback the patch which has error changes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18412 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 07:04:28 +00:00
Cecil Sheng db3b92b40e MdeModulePkg: Regular expression protocol
Add driver to produce EFI_REGULAR_EXPRESSION_PROTOCOL.  Based on
Oniguruma v5.9.6 (BSD 2-clause license), which provides full Unicode
support, and POSIX ERE and Perl regex syntaxes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cecil Sheng <cecil.sheng@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18411 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 06:49:47 +00:00
Jiaxin Wu 2ba88dc554 NetworkPkg: Fix suspicious dereference of pointer 'FieldCount'
This patch is used to fix suspicious dereference of pointer 'FieldCount'
before NULL check.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18409 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-08 02:01:05 +00:00
Yao, Jiewen fb9819f13d Handle extra module patchable PCD variable in Linux map.
Add comment for python function, too.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Mudusuru, Giri P" <giri.p.mudusuru@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18406 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-06 22:36:43 +00:00
Jeff Fan a921cd16e6 Revert the change in r18404.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18405 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-06 08:58:25 +00:00
Jeff Fan ed30d582c1 Update BaseTools binary to match main trunk r18339.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18404 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-06 08:52:50 +00:00
Qiu Shumin 35e00ace19 SecurityPkg: Use pointer instead of array to make code readable.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18403 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-06 06:22:24 +00:00
Zhang Lubo 374ecd0450 NetworkPkg: Fix the HttpCloseConnection fail issue
When HTTP server is unavailable,HttpCloseConnection will enter
infinite loop to wait for TCP4->close Event return, So we need to
decide the Http Instance state whether in the appropriate state
before close it.

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@18400 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-06 01:30:44 +00:00
Jeff Fan 0a4f7aa056 UefiCpuPkg/MtrrLib: MtrrValidBitsMask and MtrrValidAddressMask wrong
Per IA32 SDM, if CPUID.80000008H is not available, software may assume that the
processor supports a 36-bit physical address size.
However, for such old processors (For example, Quark processor),
MtrrValidBitsMask and MtrrValidAddressMask values are reverted and wrong in
MtrrLib. MtrrValidBitsMask should be 0xFFFFFFFFFULL and MtrrValidAddressMask
should be 0xFFFFFF000ULL.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18396 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-05 02:07:02 +00:00
Ard Biesheuvel 5fe9871620 ArmPlatformPkg/HdLcd: add missing LcdIdentify()
Commit r18308 ("ArmPlatformPkg/LcdGraphicsOutputDxe: check PrimeCell ID
before initializing") introduced a LcdIdentify() function to the PL111
LCD driver that makes it fail gracefully when executed on hardware that
does not have the IP. However, the LcdGraphicsOutputDxe driver is shared
with the HdLcd driver, which now fails to build due to the fact that it
has no LcdIdentity() function. So add a dummy implementation that always
returns EFI_SUCCESS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18395 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-04 10:02:43 +00:00
Ard Biesheuvel 0f060e34a4 ArmPlatformPkg: signal EndOfDxe event in PlatformBsdInit
Like the ArmVirtPkg platforms up until SVN r17713, the ArmPlatformPkg
platforms built with the Intel BDS fail to signal the end-of-DXE event
'gEfiEndOfDxeEventGroupGuid' when entering the BDS phase, which results
in some loss of functionality, i.e., variable reclaim in the VariableDxe
drivers, and the splitting of the memory regions that is part of the recently
added UEFI 2.5 properties table feature.

As discussed on the edk2-devel mailing list here:

http://thread.gmane.org/gmane.comp.bios.tianocore.devel/16088/focus=16109

it is up to the platform BDS to signal that event, since there may be
platform specific ordering constraints with respect to the signalling
of the event that are difficult to honor at the generic level.

So add the SignalEvent () call to PlatformBdsInit () of ArmPlatformPkg's
PlatformBdsLib implementation for the Intel BDS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18394 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-04 06:11:42 +00:00
Laszlo Ersek c68d3a6978 OvmfPkg: PlatformPei: force 32-bit MMIO aperture above 3 GB on Q35
The logic we have in place for i440fx does not work reliably on q35. For
example, if the guest has 2GB of RAM, we allow the PCI root bridge driver
to allocate the legacy video RAM BAR from the [2048 MB, 2816 MB] range,
which falls strictly outside of the Q35 PCI host MMIO aperture that QEMU
configures, and advertizes in ACPI.

In turn, PCI BARs that exist outside of the PCI host aperture that is
exposed in ACPI break Windows guests.

Allocating PCI MMIO resources at or above 3GB on Q35 ensures that we stay
within QEMU's aperture. (See the "w32.begin" assignments in
"hw/pci-host/q35.c".) Furthermore, in pc_q35_init() (file
"hw/i386/pc_q35.c"), QEMU ensures that the low RAM never "leaks" above
3GB.

The i440fx logic is left unchanged.

The Windows guest malfunction on Q35 was reported by Jon Panozzo of Lime
Technology, Inc.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Jon Panozzo <jonp@lime-technology.com>
Cc: "Gabriel L. Somlo" <somlo@cmu.edu>
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: Jonathan Panozzo <jonp@lime-technology.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18393 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 18:45:44 +00:00
Laszlo Ersek f1cbea148c OvmfPkg: AcpiTables: serialize control methods that create named objects
Bruce Cran reported the following issue:

  With iasl version 20150410-64 building OvmfX64 (using OvmfPkg/build.sh
  -a X64 -t GCC49 -b RELEASE) results in a couple of warnings about
  methods that should be serialized:

  .../OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii
  95:       Method (_CRS, 0) {
  Remark   2120 - Control Method should be made Serialized ^  (due to
  creation of named objects within)

  .../OvmfPkg/AcpiTables/AcpiTables/OUTPUT/./Dsdt.iiii
  235:         Method (PCRS, 1, NotSerialized) {
  Remark   2120 - Control Method should be made Serialized ^  (due to
  creation of named objects within)

The ACPI 6.0 spec justifies the above warnings in "19.6.82 Method (Declare
Control Method)":

  [...] The serialize rule can be used to prevent reentering of a method.
  This is especially useful if the method creates namespace objects.
  Without the serialize rule, the reentering of a method will fail when it
  attempts to create the same namespace object. [...]

Cc: Bruce Cran <bruce@cran.org.uk>
Reported-by: Bruce Cran <bruce@cran.org.uk>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18392 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 18:45:40 +00:00
Laszlo Ersek 9be751890e OvmfPkg: PlatformPei: clear CMOS 0xF after setting mBootMode
We have an old bug in BootModeInitialization(): firmware is supposed to
clear the CMOS register 0xF after reading it for the last time. QEMU only
sets this register to 0xFE in "hw/timer/mc146818rtc.c", function
rtc_notify_suspend(), and never clears it. However, SeaBIOS does clear it
in "src/post.c" and "src/resume.c", so let's follow suit.

We've never noticed this until now because the register gets mysteriously
cleared on non-resume reboots when OVMF runs on qemu-system-x86_64. But on
qemu-system-i386, this bug breaks a (suspend, resume, reboot) triplet:
after the last step OVMF thinks it's resuming because when it actually
resumed (in the middle step), it failed to clear the register.

BootModeInitialization() is the perfect function to clear the register,
right after setting mBootMode: the function is executed on both normal
boot and on S3 resume; it succeeds DebugDumpCmos() -- so the dump is not
affected by this patch --; and everything that relies on S3 vs. normal
boot after we clear the register uses mBootMode anyway.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18391 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 18:45:35 +00:00
Heyi Guo da70563092 ArmPkg: Bug fix for UncachedMemoryAllocationLib
NewNode is the node we found, while Node is the last node in the
list. Also update mFreedBufferSize.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18390 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 16:29:31 +00:00
Qin Long f858b8715d CryptoPkg: Fix one wrong parameter for weak key checking
Fix one wrong offset which is passed into DES weak key checking in TdesInit().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18389 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 08:44:46 +00:00
Dandan Bi 9495c01ee8 MdeModulePkg:Support orderedList with default value
Our tool can support OrderedList which has default value,but doesn't update the
source code in HiiDatabase when parse the ifr data.Now update the code and add
test case in DriverSample.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18388 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 08:44:24 +00:00
Qin Long 5c4a3795a5 CryptoPkg: Replace string wrapper functions with safe string functions
EDKII core suggests to retire unsafe string functions. This patch is to
replace string wrapper functions with new-added safe string functions
for consistency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qin Long <qin.long@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18385 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 08:12:39 +00:00
Fu Siyuan 01097ae1c2 NetworkPkg: remove redundant words in function comment.
A function with void return type doesn't need @retval line in its function
comment. This patch removes one redundant line from Ip6 driver in r18365.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18384 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 07:40:21 +00:00
Yao, Jiewen 776566530b Add more strict check for MOR variable, besides MOR lock variable.
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@18383 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-02 06:29:06 +00:00
Ard Biesheuvel 465be78e4d ArmPlatformPkg/ArmVExpress-FVP: enable UEFI Secure Boot
This allows the FVP target to be built with UEFI Secure Boot enabled,
by passing -D SECURE_BOOT_ENABLE to the build command line. Note that
this requires the Intel BDS, or you will not be able to enroll
certificates, since the ARM BDS does not provide a GUI to do so.

The FVP Base model is recommended in this case, since the certificate
store is kept in NOR flash.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18379 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 17:29:23 +00:00
Ard Biesheuvel f46ac5fb69 ArmPlatformPkg/ArmVExpress-FVP: add support for the Intel BDS
This adds support for the Intel BDS and enables it by default.
To revert to using the ARM BDS, pass '-D USE_ARM_BDS' on the
build command line.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18378 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 17:29:14 +00:00
Ard Biesheuvel a680d52f4f ArmPlatformPkg/PlatformIntelBdsLib: add splash screen support
Add a call to EnableQuietBoot () to BdsPlatformPolicyBehavior(),
so that a splash screen is shown in case one is present under the
correct GUID in the FV, and we have graphics support.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18377 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 17:29:06 +00:00
Ard Biesheuvel 3d175bcb6e ArmPlatformPkg/PlatformIntelBdsLib: fix and clean up error handling
InitializeConsolePipe () shadowed its own Status variable, and then
clobbered the top one before printing its error message. Instead,
use a NULL check on the LocateProtocol () output argument.
Also clean up coding style on the error path.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18376 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 17:28:57 +00:00
Ard Biesheuvel 3baf5c9fc9 ArmPlatformPkg/PlatformIntelBdsLib: remove ARM BDS dependency
The Intel BDS platform library still depends on the ARM BDS specific
BdsLib. So replace its invocations with GenericBdsLib counterparts,
and fix up where needed, so that we can drop the dependency.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18375 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 17:28:48 +00:00
Jeff Fan 8b4c856c91 UefiCpuPkg/CpuMpPei: Fix CPU Healthy issue in PeiGetProcessorInfo ()
CPU Healthy state maybe changed by software. We should return Healthy state
from Healthy bit instead of from CPU BIST hardware information.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18374 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 08:56:14 +00:00
Jeff Fan f1c97bb3f4 UefiCpuPkg/CpuMpPei: Check Function pointer in PeiStartupAllAPs ()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18373 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 08:55:49 +00:00
Jeff Fan 44d2ec14d8 UefiCpuPkg/CpuMpPei: Update the old/new BSP state in SwitchBsp()
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18372 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 08:54:59 +00:00
Shifei Lu bf0dfea6e7 Fixed C-State issue of CPU1 of dual core.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shifei Lu <shifeix.a.lu@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18370 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 01:22:49 +00:00
Eric Dong 4c33aace3f ShellPkg: Replace use case of deprecated function GetVariable with GetVariable2.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18368 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-01 01:06:08 +00:00
Samer El-Haj-Mahmoud c79de074b6 MdeModulePkg/NetworkPkg: Locate IpSec on IP packet processing only if it's installed.
Modified the logic in Ip4Dxe and Ip6Dxe to not locate EFI_IPSEC2_PROTOCOL on each
message transmit/receive. Instead, register a callback in the drivers entry points
on the IpSec protocol installation, and process only if the protocol is installed.
This speeds up the network stacks when IpSec is not installed since there is a
penalty associated with searching the entire handle database on each packet processing.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18365 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-31 07:44:12 +00:00
Jiaxin Wu 34297cef1e ShellPkg: Get media status in ifconfig command
v2:
* Update to use NetLibDetectMedia() directly.

This patch is used to get media status in ifconfig command.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Jaben Carsey <jaben.carsey@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: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18363 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-31 03:13:33 +00:00
Laszlo Ersek ead7cb12d5 OvmfPkg: prevent code execution from DXE stack
SVN rev 18166 ("MdeModulePkg DxeIpl: Add stack NX support") enables
platforms to request non-executable stack for the DXE phase, by setting
PcdSetNxForStack to TRUE.

The PCD defaults to FALSE, because:

(a) A non-executable DXE stack is a new feature and causes changes in
    behavior. Some platform could rely on executing code from the stack.

(b) The code enabling NX in the DXE IPL PEIM enforces the

      PcdSetNxForStack ==> PcdDxeIplBuildPageTables

    implication for "64-bit PEI + 64-bit DXE" platforms, with a new
    ASSERT(). Some platform might not comply with this requirement
    immediately.

Regarding (a), in none of the OVMF builds do we try to execute code from
the stack.

Regarding (b):

- In the OvmfPkgX64.dsc build (which is where (b) applies) we simply
  inherit the PcdDxeIplBuildPageTables|TRUE default from
  "MdeModulePkg/MdeModulePkg.dec". Therefore we can set PcdSetNxForStack
  to TRUE.

- In OvmfPkgIa32X64.dsc, page tables are built by default for DXE. Hence
  we can set PcdSetNxForStack to TRUE.

- In OvmfPkgIa32.dsc, page tables used not to be necessary until now.
  After we set PcdSetNxForStack to TRUE in this patch, the DXE IPL will
  construct page tables even when it is built as part of OvmfPkgIa32.dsc,
  provided the (virtual) hardware supports both PAE mode and the XD bit.

Should this setting cause problems in a GPU (or other device) passthru
scenario, with a UEFI_DRIVER in the PCI option rom attempting to execute
code from the stack, the feature can be dynamically disabled on the QEMU
command line, with "-cpu <MODEL>,-nx".

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: "Zeng, Star" <star.zeng@intel.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18360 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 08:12:51 +00:00
Gary Ching-Pang Lin 1a85139d9e OvmfPkg: Build HTTP utilities driver
Since SVN r18316 / git 5ca29abe52, the HTTP driver needs the HTTP
utilities driver to parse the headers of HTTP requests. Add the driver
into OVMF so that the HTTP driver can work properly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Ching-Pang Lin <glin@suse.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18359 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 08:12:42 +00:00
Hao Wu 0cd35d739e MdePkg UefiDevicePathLib: Fix possible memory read/write cross boundary
The SSID field of a Wi-Fi device path node may not contain a NULL
termination.

Additonal handle is added to make sure no cross-boundary memory read/write
will occur.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18355 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 07:41:38 +00:00
Hao Wu a5cb7c824e MdePkg: Modify string expression of Wi-Fi device path to follow UEFI spec
According to UEFI 2.5 spec, the string expression of a Wi-Fi device node
should be displayed as: Wi-Fi(SSID). However, current code displays it as:
WiFi(SSID).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18354 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 07:41:08 +00:00
Hao Wu 678226f632 MdePkg: Modify string expression of BMC device path to follow UEFI spec
According to UEFI 2.5 spec, the string expression of a BMC device node
should be displayed as: BMC(Type,Address). However, current code displays
it as: Bmc(Type,Address).

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18353 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 07:36:55 +00:00
Jiaxin Wu 60cbd7fb2e NetworkPkg: Fix IpSec run into infinite loop issue in some case
v2:
* Update the copyright year and conditional judgment for removing.

When edit one SPEntry in SPD database, the corresponding SA entry will
be updated to the sas list of the new SPD entry. But before that, all
of them should be removed from the original sas list. If not, the list
will be broken into infinite loop.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18352 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 07:00:32 +00:00
Sunny Wang 4982ea57d9 MdeModulePkg: Remove unused variables from both UefiBootManagerLib and BdsDxe to fix GCC build.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18350 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 05:41:06 +00:00
Qiu Shumin bec1e0bdf9 ShellBinPkg: Ia32/X64 Shell binary update.
The binaries of ShellBinPkg are generated with ShellPkg project 18330. The binaries are built with no debug information by building with "RELEASE" target.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18349 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 04:51:21 +00:00
Eric Dong 92f62cfe0a DisplayEngineDxe: Fixed calculate help string page count error.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18348 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 04:28:05 +00:00
Ruiyu Ni fbce471eb1 FatBinPkg: Update EBC/IA32/X64/IPF binaries
Based on MdePkg and BaseTools (r18341), FatPkg (r96)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18347 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 03:14:25 +00:00
Qiu Shumin 6252f2715a MdePkg: Refine the device path text format for Bluetooth to follow spec.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18346 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:59:20 +00:00
Ruiyu Ni a5fb1e05ff FatBinPkg: Update EBC/IA32/X64/IPF binaries
Based on MdePkg and BaseTools (r18341), FatPkg (r96)

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18345 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:57:09 +00:00
Qiu Shumin d2e8af9714 SecurityPkg: Use safe string function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18344 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:51:50 +00:00
Liming Gao c91c8ba803 IntelFrameworkModulePkg: Ad the missing module UNI files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18343 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:47:31 +00:00
Liming Gao d6a55a12c0 MdeModulePkg: Add the missing module UNI files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18342 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:46:46 +00:00
Ruiyu Ni fb01cb5389 MdePkg: Change the EFI_ACPI_PNP_HID_END to EFI_PNP_ID (0x0000)
The current value doesn't follow the PI 1.4 spec.

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@18341 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:46:22 +00:00
Liming Gao 2df2d35ab2 MdePkg: Add the missing module UNI files
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18340 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-28 02:45:50 +00:00