Commit Graph

2392 Commits

Author SHA1 Message Date
Dandan Bi 41c244b6b9 MdeModulePkg/DriverSampleDxe: Uninstall the ConfigAccess protocol
In DriverSampleInit, has installed the configAccess protocol to
the DriverHandle[1], but don't uninstall it in DriverSampleUnload.
Now uninstall the configAccess protocol.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-03-16 10:40:55 +08:00
Star Zeng efef6ad6d7 MdeModulePkg AcpiTableDxe: Use Rsdt to check against NULL
Some static scan tool may regard CurrentRsdtEntry to be potentially
referenced to NULL pointer if CurrentRsdtEntry == NULL is used in
the right above if condition judgment.

        CopyMem (CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32));

It is introduced by commit f9bbb8d9c3.
To avoid it and have same style with
"((Xsdt == NULL) || CurrentTablePointer64 == (UINT64) (UINTN) Table->Table)",
use Rsdt instead of CurrentRsdtEntry to check against NULL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
2016-03-08 18:05:16 +08:00
Star Zeng f53a313443 MdeModulePkg AcpiTableDxe: Don't uninstall Acpi Sdt Protocol at ReadyToLock
1. The consumer of Acpi Sdt Protocol may want to use the API after ReadyToLock.
2. The ACPI system configuration table even could be overwritten,
   we see little issue in leaving Acpi Sdt Protocol installed.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
2016-03-04 17:13:53 +08:00
Samer El-Haj-Mahmoud 4f0f2316ed MdeModulePkg: Fix IPv4 double free
Fix a possible ASSERT after NBP finishes loading from a PXE
boot. Ip4Dxe driver calls Ip4Config2SetPolicy which calls
CloseEvent on the Dhcp4Event struct member.  After NBP is
downloaded, it then calls Ip4Config2CleanInstance which calls
CloseEvent again on Dhcp4Event.  This double free can cause an
ASSERT. When the event is closed, set the event pointer to NULL
so the Ip4 code won't call CloseEvent on it again.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-03-04 15:20:58 +08:00
Dandan Bi 8a45f80eda MdeModulePkg: Make HII configuration settings available to OS runtime
This feature is aimed to allow OS make use of the HII database
during runtime. In this case, the contents of the HII Database
is exported to a buffer. The pointer to the buffer is placed
in the EFI System Configuration Table, where it can be retrieved
by an OS application.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Brian J. Johnson <bjohnson@sgi.com>
Cc: Andrew Fish <afish@apple.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-03-04 14:04:43 +08:00
Dandan Bi 89a77e4051 MdeModulePkg/DisplayEngineDxe: Refine the coding style
Remove the empty line to conform with current coding style.

Cc: Qiu Shumin <shumin.qiu@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>
2016-03-04 14:03:25 +08:00
Feng Tian b07c966581 MdeModulePkg/FvSimpleFs: don't open DevicePath with BY_DRIVER mode
The device path protocol doesn't get closed at FvSimpleFilesystem
driver stop() when it's opened at start() with BY_DRIVER mode.

We change it to open DevicePath with GET_PROTOCOL mode as FV2 protocol with BY_DRIVER is enough.

Cc: Chao Zhang <chao.b.zhang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Chao Zhang <chao.b.zhang@intel.com>
2016-03-03 15:50:19 +08:00
Jiaxin Wu 7648748e99 MdeModulePkg: Change the default IPv4 config policy
Git version '3d0a49ad' commit provided a scenario to resolve the
performance issue for IPv4, but it's not workable for IPv6. To
avoid IPv4 and IPv6 inconsistency, we decided to revert that version
fix.

If so, the default policy for Ip4Config2 is Ip4Config2PolicyDhcp,
which results in all NIC ports attempting DHCP. So, this patch is
used to changes the the default IPv4 config policy to
Ip4Config2PolicyStatic and also defer the SetData operation after
Ip4Config2Protocol installed. This update let the other platform
drivers have chance to change the default config data by consume
Ip4Config2Protocol.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Subramanian Sriram <sriram-s@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-03-02 15:43:50 +08:00
Cinnamon Shia f5e6aa8e17 MdeModulePkg/HiiDatabaseDxe: Fix a variable is uninitialized.
The StringSize variable in the FindStringBlock function is a IN OUT
parameter of the GetUnicodeStringTextOrSize function.
Thought the GetUnicodeStringTextOrSize function changes the value of
the StringSize variable, it is better to initialize the StringSize
variable before passing it to the GetUnicodeStringTextOrSize function.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-02-29 14:19:27 +01:00
Hao Wu 216fefa3f5 MdeModulePkg RamDiskDxe: Install Block I/O 2 Protocol on RAM disk devices
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-02-29 13:51:19 +08:00
Hao Wu 20752cb8e7 MdeModulePkg: Add RamDiskDxe driver implementation
The RamDiskDxe driver will:
1. Produce the EFI RAM Disk Protocol
2. Install RAM disk device path and block I/O related protocols on the
   RAM disk device handle.
3. Install RAM disk configuration form to HII database

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-02-29 13:51:08 +08:00
Zhang Lubo 0bb073b9e2 MdeModulePkg:Fix a robustness issue of Mnp Driver
v3:
*
When there exists duplicate items in VLAN variable , save the correct
variable content back to the variable storage after duplicate items are removed

Duplicate items in VLAN variable will cause MNP driver binding
start function fall into infinite loop,so we should check it's
content before using it.

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: Ye Ting <ting.ye@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
2016-02-29 09:24:58 +08:00
Laszlo Ersek ffbb5ae3ba MdeModulePkg: RegularExpressionDxe: support free(NULL)
The ISO C standard says about free(),

  If ptr is a null pointer, no action occurs.

This is not true of the FreePool() interface of the MemoryAllocationLib
class:

  Buffer must have been allocated on a previous call to the pool
  allocation services of the Memory Allocation Library. [...] If Buffer
  was not allocated with a pool allocation function in the Memory
  Allocation Library, then ASSERT().

Therefore we must not forward the argument of free() to FreePool() without
checking.

Cc: Cecil Sheng <cecil.sheng@hpe.com>
Cc: Cinnamon Shia <cinnamon.shia@hpe.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Qiu Shumin <shumin.qiu@intel.com>
Cc: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Cc: Yao Jiewen <Jiewen.Yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-By: Cinnamon Shia <cinnamon.shia@hpe.com>
2016-02-26 18:30:14 +01:00
Ard Biesheuvel 3a61de23b3 MdeModulePkg: AcpiTableDxe: fix VS2008 build by merging adjacent if blocks
The assignment of CurrentRsdtEntry and its subsequent dereference are
subject to the same condition, but for some reason, VS2008 does not see
that and warns about the dereference possibly involving an uninitialized
pointer. Since the single statememt between the blocks is unrelated, we
can just move it and merge the two conditional blocks together.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: David Woodhouse <David.Woodhouse@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-02-26 14:02:36 +01:00
Dandan Bi 003f3c00d8 MdeModulePkg: Add submitted callback test case in DriverSample
Now we add new HII action type EFI_BROWSER_ACTION_SUBMITTED in
EFI HII Configuration Access Protocol, so add the test case in
DriverSample to show how to use it and whether it works.

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>
2016-02-25 14:42:25 +08:00
Dandan Bi 3cb44c207c MdeModulePkg: Add new HII action type EFI_BROWSER_ACTION_SUBMITTED
Add new HII action type EFI_BROWSER_ACTION_SUBMITTED
to notify HII driver when its question values are submitted.

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>
2016-02-25 14:42:24 +08:00
Ard Biesheuvel f9bbb8d9c3 MdeModulePkg: AcpiTableDxe: make 4 GB table allocation limit optional
AARCH64 systems never require compatibility with legacy ACPI OSes, and
may not have any 32-bit addressable system RAM. To support ACPI on these
systems, we need to be able to relax the 4 GB allocation restriction.

So add a PCD PcdAcpiExposedTableVersions containing a bitmask describing
which ACPI versions are targeted, and wire it up it up to the memory
allocation calls in AcpiTableDxe/AcpiTableProtocol.c. I.e., if ACPI v1.0b
is not among the supported versions, the memory allocations are not limited
to 4 GB, and only table types that carry 64-bit addresses are emitted.

Note that this will inhibit the publishing of any tables that carry only
32-bit addresses, i.e., RSDPv1, RSDTv1 and RSDTv3.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-02-24 09:18:44 +01:00
Dandan Bi 3a2718d74e MdeModulePkg: HiiDatabaseDxe: HiiStringToImage() should not overwrite BltX
when has next line to draw, should not overwrite the BltX
to 0, instead should keep the BltX value that pass into
StringToImage function.

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>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2016-02-23 17:03:20 +08:00
Ni, Ruiyu ad24a4d735 MdeModulePkg/Partition: Fix 64bit build failure caused by last patch
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-02-23 15:21:32 +08:00
Ruiyu Ni e665a69d9d MdeModulePkg/Partition: Use proper partition number for MBR
UEFI Spec 2.3.1.D Section 9.3.5.1 says Partitions are numbered
according to their entry in their respective partition table,
starting with 1.
Update the code for MBR partition to follow this rule.

Ref: https://github.com/tianocore/edk2/issues/50

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
2016-02-19 10:50:09 +08:00
Fu Siyuan 3af347b3b8 MdeModulePkg: SNP should check Cdb.StatCode with PXE_STATCODE_SUCCESS.
This patch fixes a bug in SNP driver that the Cdb.StatCode should be check with
PXE_STATCODE_SUCCESS instead of EFI_SUCCESS.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-02-17 08:51:03 +08:00
Fu Siyuan 1e7b3ef63a MdeModulePkg: Make the DEBUG info consistent in SNP driver.
SNP driver will print the UNDI returned StatFlags:StatCode with DEBUG macro,
while in some please it uses the reverse order (StatCode:StatFlags). This patch
is to make the print info consistent, that StatFlags always come first.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-02-17 08:50:54 +08:00
Dandan Bi 91af324da0 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>
2016-02-16 17:56:11 +08:00
Fu Siyuan c1a1980675 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>
2016-02-03 15:17:06 +08:00
Fu Siyuan 7b334a31b8 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>
2016-02-03 15:17:05 +08:00
Fu Siyuan f000a8c60e 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>
2016-02-03 15:17:04 +08:00
Star Zeng 898552fd91 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
2016-01-29 09:26:49 +00:00
Star Zeng dd59d95e19 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
2016-01-29 09:15:43 +00:00
Dandan Bi cb312fb1f7 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
2016-01-27 02:35:36 +00:00
Dandan Bi f447734e4f 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
2016-01-26 09:42:58 +00:00
Eric Dong 2a244a5d9f MdeModulePkg: HiiDatabase: Refine the code to make it more safely.
Refine the code to avoid potential buffer overflow or use NULL pointer.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19735 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-25 03:38:19 +00:00
Laszlo Ersek 31ae446b1a MdeModulePkg: TerminalDxe: select the UART's default receive FIFO depth
The Serial IO protocol instances provided by SerialDxe and consumed by
TerminalDxe come with a Mode.ReceiveFifoDepth=1 default setting, as
required by UEFI 2.5.

Although TerminalDxe calls EFI_SERIAL_IO_PROTOCOL.SetAttributes() in the
TerminalDriverBindingStart() and TerminalConInTimerHandler() functions, it
only does so to change the Mode.Timeout member. Other members of Mode,
including Mode.ReceiveFifoDepth, are preserved.

On some platforms this causes the UART that underlies TerminalDxe not to
have enough room for bursts of scan codes, which translates to broken
parsing of escape sequences, e.g. cursor movement keys.

According to the UEFI spec, passing ReceiveFifoDepth=0 to
EFI_SERIAL_IO_PROTOCOL.SetAttributes() "will use the device's default FIFO
depth". While TerminalDxe could try to configure a receive FIFO depth that
matches the longest escape sequence it wishes to parse, in practice the
device-specific default FIFO depth -- which may well differ from the
spec-mandated SerialIo->Mode.ReceiveFifoDepth=1 default -- seems to work.
Hence let's just set that.

This issue was exposed by SVN r18971 / git commit 921e987b2b
("ArmPlatformPkg: Use SerialDxe in MdeModulePkg instead of EmbeddedPkg").
In that conversion, MdeModulePkg's SerialDxe started to initialize
Mode.ReceiveFifoDepth to 1 (in conformance with the spec), unlike the
prior, non-conformant initialization to 0 in EmbeddedPkg's SerialDxe.

Since TerminalDxe would never change ReceiveFifoDepth from the new default
value 1, and the ArmPlatformPkg/Drivers/PL011Uart library instance,
underlying SerialDxe through SerialPortLib, would obey it too, they would
collectively effect a receive queue depth of 1, rather than the default 16
or 32. This broke cursor keys on the ARM FVP and Juno platforms.

It is the client of EFI_SERIAL_IO_PROTOCOL that is responsible for
modifying the attributes, if the defaults are not appropriate, hence this
patch modifies TerminalDxe.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Reported-by: Ryan Harkin <ryan.harkin@linaro.org>
Reference: http://thread.gmane.org/gmane.comp.bios.edk2.devel/4779/focus=6553
Reference: http://thread.gmane.org/gmane.comp.bios.edk2.devel/6594
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19701 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-21 00:29:12 +00:00
Laszlo Ersek ea01261940 MdeModulePkg: SerialDxe: sync EFI_SERIAL_IO_MODE.Timeout with the spec
In "11.8 Serial I/O Protocol", UEFI 2.5 requires:

  The default attributes for all UART-style serial device interfaces are:
  (a) 115,200 baud,
  (b) a 1 byte receive FIFO,
  (c) a 1,000,000 microsecond timeout per character,
  (d) no parity,
  (e) 8 data bits,
  (f) and 1 stop bit.

It also says, about the EFI_SERIAL_IO_MODE.ControlMask member:

  (g) A mask of the Control bits that the device supports. The device must
      always support the Input Buffer Empty control bit.

SerialDxe complies with requirement (b) via hard-coded constants. It
complies with requirements (a), (d), (e) and (f) through PCD defaults (see
MdePkg/MdePkg.dec):

(a) 115,200 baud:
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200|UINT64|0x00000020

(d) no parity:
  # 1 - No Parity.<BR>
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultParity|1|UINT8|0x00000022

(e) 8 data bits:
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultDataBits|8|UINT8|0x00000021

(f) 1 stop bit:
  # 1 - One Stop Bit.<BR>
  gEfiMdePkgTokenSpaceGuid.PcdUartDefaultStopBits|1|UINT8|0x00000023

SerialDxe does not comply with requirements (c) and (g). In this patch, we
fix (c), and leave (g) for later.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19700 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-21 00:29:07 +00:00
Laszlo Ersek c0beed6de1 MdeModulePkg: SerialDxe: lay out mSerialIoMode initializer more nicely
This patch doesn't change behavior; it only modifies whitespace and
comments.

Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Cc: Leif Lindholm <leif.lindholm@linaro.org>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19699 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-21 00:29:03 +00:00
Yao, Jiewen 2f6aa774fe MdeModulePkg: Add MorLock to variable driver.
This patch adds MorLock function to Variable main function.
It also updates corresponding INF file to pass build.

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>
Reviewed-by: "Zeng, Star" <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19690 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 13:22:05 +00:00
Yao, Jiewen a0994dbe3c MdeModulePkg: Add MorLockDxe to variable driver.
Per secure MOR implementation document, it is not proper to add MOR lock in non-SMM version, because DXE version can not provide protection.

This patch add standalone TcgMorLockDxe implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
Reviewed-by: "Zeng, Star" <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19689 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 13:21:18 +00:00
Yao, Jiewen abad83e6c2 MdeModulePkg: Add MorLockSmm to variable driver.
Microsoft published secure MOR implementation at https://msdn.microsoft.com/en-us/library/windows/hardware/mt270973(v=vs.85).aspx
with revision 2 update. See URL for tech detail.
Previous revision 1 is handled in SecurityPkg\Tcg\ MemoryOverwriteRequestControlLock.
But the VarCheck API can not satisfy revision 2 requirement.
So we decide include MOR lock control into variable driver directly.

This patch add standalone TcgMorLockSmm implementation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zhang, Chao B" <chao.b.zhang@intel.com>
Reviewed-by: "Zeng, Star" <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19688 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 13:20:50 +00:00
Dandan Bi 0196c24a94 MdeModulePkg:Fix the potential memory leak issue in Display Engine
The MenuOption insert to gMenuOption allocate memory every time,but not free.
Now add the code to free it.And for Date/Time,it will create 3 menus,but previously
the Description point to the same address,so when free the Description,it will cause
issue,now reset the Description pointer.

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@19647 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-15 09:50:40 +00:00
Ruiyu Ni e8e1bdd66a MdeModulePkg: Fix GraphicsConsole driver resolution out of sync issue
When the GOP doesn't support the resolution specified by
PcdVideoHorizontalResolution and PcdVideoVerticalResolution,
the code tries to set the resolution to 800x600 but uses the resolution
equals to the PCD when calculating the text print position.
The patch fixes the bug by updating the resolution to 800x600 for
this case.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19630 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-11 02:29:09 +00:00
Fu Siyuan 0507449955 MdeModulePkg: Update MNP driver to recycle TX buffer asynchronously.
This patch updates the MNP driver to recycle TX buffer asynchronously, instead 
of using a while loop wait after each transmit command.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19624 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-08 02:38:34 +00:00
Fu Siyuan 7b4b93a247 MdeModulePkg: update SNP.GetStatus to handle multiple recycled TX buffer.
This patch fixes a bug in SNP.GetStatus() interface. The UNDI driver may return
multiple transmitted buffers in a single GetStatus command, while SNP.GetStatus
could only return one pointer each time, the rest of them are lost. This patch
fixes this issue by store these recycled pointer in a temporary buffer in SNP
driver.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19623 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-08 02:21:25 +00:00
Dandan Bi d85509a321 Rollback the commit because it has potential issue.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19606 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 03:25:50 +00:00
Hao Wu 6ea00fdd9a MdeModulePkg IScsiDxe: Fix a typo in function description
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19599 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 01:11:49 +00:00
Hao Wu af3833ac32 MdeModulePkg AcpiTableDxe: Fix a typo in function description
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19598 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 01:11:25 +00:00
Dandan Bi b954a4fe01 MdeModulePkg:Fix the potential memory leak issue in Display Engine
The MenuOption insert to gMenuOption allocate memory everytime,but not free.
Now add the code to free it.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19593 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 00:57:23 +00:00
Dandan Bi 1f9f60ad5a MdeModulePkg:Avoid ASSERT in HiiConfigRoutingRouteConfig
Add error handling code to enhance the code,the driver may not install
the ConfigAccess protocol,so should not just ASSERT here.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19590 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 00:52:53 +00:00
Qiu Shumin 61e078ddcb MdeModulePkg: For RegularExpressionDxe use 'sprintf_s' to replace 'sprintf'.
Function 'sprintf' has potential buffer overflow risk. This patch use 'sprintf_s' to improve the code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
Reviewed-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19582 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-04 05:14:53 +00:00
Star Zeng 38eb83b89a MdeModulePkg Variable: Add a missing variable info record
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19578 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-30 05:09:50 +00:00
Star Zeng 14326ed091 MdeModulePkg Variable: Handle ftw driver executes prior to variable driver
Variable driver uses gEdkiiFaultTolerantWriteGuid hob and copies  data to NvStorageData if hob exists.
But if ftw driver executes prior to variable driver then spare block is erased.

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

Cc: Liming Gao <liming.gao@intel.com>
Reported-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Baraneedharan Anbazhagan <anbazhagan@hp.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19577 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-30 05:09:16 +00:00
Star Zeng 4a23636a34 MdeModulePkg Variable: VarErrFlag need to be consistent in NV flash and cache
The code wrongly has TempFlag wrote to NV flash, but has Flag assigned to NV cache.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19573 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-29 09:04:55 +00:00
Star Zeng b2c59ce83c MdeModulePkg Variable: ###VariableTotalSize need to be initialized to 0 first
HwErrVariableTotalSize/CommonVariableTotalSize/CommonUserVariableTotalSize
need to be initialized to 0 first after reclaim failed, then to be assigned by += operation.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19572 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-29 09:00:58 +00:00
Liming Gao b46354d6dd MdeModulePkg: Update SerialDxe inf to include the module uni
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19509 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24 02:30:22 +00:00
Hao Wu 66ca22d05c MdeModulePkg DiskIoDxe: Check for MediaPresent in DiskIo2ReadWriteDisk()
Add check to see if there is a media in the disk device. If not return
EFI_NO_MEDIA directly.

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@19446 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-22 13:55:13 +00:00
Andrew Fish b7789dc6b6 MdeModulePkg: Variable add missing VA_COPY
Xcode fails to compile:
error: array type 'VA_LIST' (aka '__builtin_va_list') is not assignable

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Andrew Fish <afish@apple.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19419 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-18 10:11:25 +00:00
Qiu Shumin fbaab71534 MdeModulePkg: Fix VS2012 build failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19365 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-18 05:59:10 +00:00
Dandan Bi 4858527b54 MdeModulePkg:Fix bug that get the password width info incorrectly
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@19336 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-18 02:14:27 +00:00
Liming Gao d584dc6cb6 MdeModulePkg: Correct usage gEfiIp4Config2ProtocolGuid in Ip4Dxe
Ip4Dxe driver installs gEfiIp4Config2ProtocolGuid.
Its usage should be BY_START.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19315 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-17 08:29:17 +00:00
Eric Dong 311b5a6ff9 MdeModulePkg BdsDxe: Change file format which the existed folder has mixed file format.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19299 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 03:23:37 +00:00
Eric Dong 6f3251c29c MdeModulePkg FileExplorerDxe: Change file format which has mixed file format.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19298 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 03:22:39 +00:00
Samer El-Haj-Mahmoud b2e3542666 MdeModulePkg: Fix RegularExpressionDxe memcpy intrinsic.
Use explicit CopyMem to resolve intrinsic memcpy errors on some compilers.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19292 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 02:46:53 +00:00
Qiu Shumin b0c2b79738 MdeModulePkg: Add NULL pointer check for RegularExpressionDxe.
Refine code by adding NULL pointer check to avoid potential NULL pointer dereferenced.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19271 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 08:40:55 +00:00
Cecil Sheng 00d1c2a35e MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.
On a failed REF_OP callback, all changed fields in the Selection should be restored.

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




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19268 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 05:53:46 +00:00
Cecil Sheng 8ab3c094b3 Rollback change r19245 because it missed one change.
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@19267 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 05:49:14 +00:00
Jordan Justen 3f5287971f MdeModulePkg: Convert all .uni files to utf-8
To convert these files I ran:

$ python3 BaseTools/Scripts/ConvertUni.py MdeModulePkg

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19257 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 04:56:23 +00:00
Cecil Sheng fb567b2f74 MdeModulePkg: Improved SetupBrowser handling to failed GOTO callback.
On a failed REF_OP callback, all changed fields in the Selection should be restored.

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


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19245 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-15 02:53:34 +00:00
Eugene Cohen a115a9efaa MdeModulePkg: Convert HiiDatabaseDxe ConfigRouting ASSERT to return an error
This should just return an error and not assert.  We hit this when testing with a client that was trying to access the old IP4_CONFIG on firmware implementing IP4_CONFIG2.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eugene Cohen <eugene@hp.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19219 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-11 03:07:59 +00:00
Liming Gao 4d454c54d1 MdeModulePkg: Fix VS2015 warning C4311 & C4312 in RegularExpressionDxe
warning C4311: pointer truncation from 'void *' to 'unsigned long'
warning C4312: conversion from 'unsigned long' to 'void *' of greater size
Update code to convert type to UINTN first, then convert it to other type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Acked-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19114 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-04 03:15:08 +00:00
Liming Gao d76946e328 MdeModulePkg: Fix VS2015 warning C4456 in RegularExpressionDxe
warning C4456: declaration of 'q' hides previous local declaration.
Update code to use the different local variable name.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hpe.com>
Acked-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19113 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-04 03:14:14 +00:00
Liming Gao 7b2c31ae65 MdeModulePkg: Fix VS2015 warning C4459 in DriverSampleDxe
warning C4459: declaration of 'PrivateData' hides global declaration.
Update DriverSampleDxe to rename global variable name to be different.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19112 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-04 03:06:07 +00:00
Ard Biesheuvel ce3ecf1364 MdeModulePkg: remove unreachable code
Some compilers (like RVCT) are finicky about unreachable code,
so remove it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19106 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-03 08:51:17 +00:00
Star Zeng bf6b810fca MdeModulePkg: Upstream SerialDxe from EmbeddedPkg
This Serial driver layers on top of a Serial Port Library instance
to produce serial IO protocol.

There is also another SerialDxe implementation in CorebootPayloadPkg,
but SerialDxe from EmbeddedPkg should be better that also consumes
the extended interfaces GetControl/SetControl/SetAttributes in
EmbeddedPkg/Include/Library/SerialPortExtLib.h for serial IO protocol.
And the extended interfaces GetControl/SetControl/SetAttributes in
EmbeddedPkg/Include/Library/SerialPortExtLib.h has been upstream to
MdePkg/Include/Library/SerialPortLib.h.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
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>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18966 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 08:48:10 +00:00
Star Zeng d9b51b21e7 MdeModulePkg: TerminalDxe: avoid checking uninitialized variable
The SerialIo->GetControl() function is not required to set the
Control output parameter on error. Make sure we apply the
EFI_SERIAL_INPUT_BUFFER_EMPTY optimization in
TerminalConInTimerHandler() only if the SerialIo->GetControl()
function call set that bit in the Control variable.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Suggested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18962 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 08:46:20 +00:00
Ruiyu Ni 67b1c254dd MdeModulePkg/BdsDxe: Fix EBC build failure
Define EFI_REMOVABLE_MEDIA_FILE_NAME for EBC ARCH to fix EBC build failure.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18927 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-24 06:57:47 +00:00
Eric Dong 515575f737 MdeModulePkg FileExplorerDxe: Create file explorer Protocol.
This driver produces file explorer protocol layered on top of the FileExplorerLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18918 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 05:42:21 +00:00
Ruiyu Ni 68456d8ac1 MdeModulePkg: Enable PlatformRecovery in BdsDxe driver
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18863 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:15:09 +00:00
Ruiyu Ni d175f4e612 MdeModulePkg: Add PlatformRecovery#### pointing to default file path
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18862 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:14:13 +00:00
Ruiyu Ni cc4812f63e MdeModulePkg: Use UefiSpec.h defined macro to replace L"xxx" string
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18861 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:13:21 +00:00
Ruiyu Ni dc477dd27d MdeModulePkg: Add missing PrintLib to BdsDxe.inf
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18860 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:12:38 +00:00
Cinnamon Shia e7e346962b MdeModulePkg/RegularExpressionDxe: Add missing PrintLib
AsciiVSPrint is used in RegularExpressionDxe/Oniguruma/OnigurumaUefiPort.c.
But PrintLib is missing in RegularExpressionDxe.inf.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18721 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-03 02:44:48 +00:00
Cinnamon Shia 0af8e57c74 MdeModulePkg/RegularExpressionDxe: Correct copyright
Correct copyrights in RegularExpressionDxe

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18720 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-03 02:43:03 +00:00
Star Zeng 8aa6ebe83f MdeModulePkg SmbiosMeasurementDxe: NULL check to String from GetSmbiosStringById
When StringId is not 0, String returned from GetSmbiosStringById is expected to non-NULL.
Add ASSERT (String != NULL); to ensure this.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18713 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-02 01:42:51 +00:00
Star Zeng 35a19d4840 MdeModulePkg SmbiosMeasurementDxe: Correct the comments
1. Correct the return comments of entrypoint function.
2. Add parameters' comments for MeasureSmbiosTable().
3. Correct the Protocols and Guids usage comments in SmbiosMeasurementDxe.inf.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18695 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-29 01:13:59 +00:00
Star Zeng 14c218b398 MdeModulePkg SmbiosMeasurementDxe: Remove the tailing whitespace
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18694 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-29 01:13:32 +00:00
Star Zeng e293bc24ed MdeModulePkg SmbiosMeasurementDxe: Use EFI_D_VERBOSE for internal dump functions
Use EFI_D_VERBOSE instead of EFI_D_INFO in InternalDumpData() and InternalDumpHex().
And also add DEBUG_CODE wrapper to InternalDumpHex() call.
It is to avoid the bother from the internal verbose debug information.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18693 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-29 01:13:07 +00:00
Star Zeng 8c1d873522 MdeModulePkg SmbiosMeasurementDxe: Add (VOID **) typecast for GCC build failure
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18692 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-29 01:12:43 +00:00
Star Zeng 3c394a6775 MdeModulePkg SmbiosMeasurementDxe: Use SMBIOS table and GUID correctly
1. Smbios3Table used as SmbiosTable wrongly after SmbiosTable got from configuration table.
2. Use correct VendorGuid and VendorTable to measure.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18691 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-29 01:10:18 +00:00
Star Zeng ae658d9163 MdeModulePkg Variable: Move CacheVariable->InDeletedTransitionPtr NULL pointer check
This change is triggered by R18654 "Enhance variable performance by reading from existed memory cache"
that changed the code to use CacheVariable to improve performance.
So the CacheVariable->InDeletedTransitionPtr NULL pointer check needs to be moved to the place before
it is been used.

Cc: Shumin Qiu <shumin.qiu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18688 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-28 00:48:43 +00:00
Eric Dong b6f6125526 MdeModulePkg SetupBrowserDxe: Save global variable values before nest function called.
The SendForm function can be called nest in it. This function also uses some global variables. So we must save global variable values before it been called again.

Checked in the missing change for gBrowserFormSetList.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18681 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-27 07:37:56 +00:00
Yao, Jiewen c00a0c8761 Move Smbios measurement from TCG driver to Smbios driver.
This is patch to add smbios measurement.

The problem of current SMBIOS measurement is:
1) TCG drivers do not support SMBIOS3.0 table.
2) TCG drivers do not follow TCG platform spec on: "Platform configuration information that is automatically updated,
 such as clock registers, and system unique information, such as asset numbers or serial numbers,
 MUST NOT be measured into PCR [1], or any other PCR."

So we decide to move Smbios measurement from TCG drivers to Smbios driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zeng, Star" <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18680 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-27 04:46:50 +00:00
Yao, Jiewen 7254d13470 Move Smbios table MAX length definition to Mde header filer.
So that other module can also refer to them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Zeng, Star" <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18674 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-27 02:43:39 +00:00
Derek Lin 9b18845a4b MdeModulePkg Variable: Enhance variable performance by reading from existed memory cache.
Current variable driver already have memory cache to improve performance.
Change the code which read from physical MMIO address to read from memory cache.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Derek Lin <derek.lin2@hpe.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18654 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-23 05:28:38 +00:00
Eric Dong f4c3c92396 MdeModulePkg SetupBrowserDxe: Save global variable values before nest function called.
The SendForm function can be called nest in it. This function also uses some global variables. So we must save global variable values before it been called again.

Old implementation miss to save some global variables, this patch fixed it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18650 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-21 06:10:57 +00:00
Laszlo Ersek 5efb28784f MdeModulePkg: SmbiosDxe: soften DEBUG messages about table reallocation
These messages don't report errors, hence they should be emitted as
EFI_D_INFO (or EFI_D_VERBOSE even).

Cc: Star Zeng <star.zeng@intel.com>
Cc: Drew Jones <drjones@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@18621 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 15:46:42 +00:00
Laszlo Ersek fcdfd249ec MdeModulePkg: FaultTolerantWriteDxe: clean up some "success" messages
The "success" messages in FtwRestart(), FtwAbort(), and FtwGetLastWrite()
should be logged on EFI_D_INFO level. We can also unify their format with
the __FUNCTION__ macro.

Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Drew Jones <drjones@redhat.com>
Suggested-by: Star Zeng <star.zeng@intel.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@18620 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 15:46:37 +00:00
Laszlo Ersek 8a4b243578 MdeModulePkg: FaultTolerantWriteDxe: mellow DEBUGs about workspace reinit
The IsValidWorkSpace() function checks if the working block header of the
workspace is valid. A mismatch detected by this function is not
necessarily an error; it can happen with an as-yet unwritten flash chip,
which is e.g. common and normal when a new ArmVirtQemu virtual machine is
booted. Therefore downgrade the message emitted by IsValidWorkSpace() from
EFI_D_ERROR to EFI_D_INFO, and change the wording from "error" to
"mismatch".

The only caller of IsValidWorkSpace(), InitFtwProtocol(), handles all of
the following cases:

(1) IsValidWorkSpace() succeeds for the working block -- this is normal
    operation,

(2) IsValidWorkSpace() fails for the working block, but succeeds for the
    spare block -- InitFtwProtocol() then restores the working block from
    the spare block,

(3) IsValidWorkSpace() fails for both the working and spare blocks --
    InitFtwProtocol() reinitializes the full workspace.

In cases (2) and (3), InitFtwProtocol() logs additional messages about the
branch taken. Their current level is EFI_D_ERROR, but the messages are
arguably informative, not necessarily error reports.

Downgrade these messages from EFI_D_ERROR to EFI_D_INFO, so that they
don't clutter the debug output when the PcdDebugPrintErrorLevel mask only
enables EFI_D_ERROR (i.e., in a "silent" build).

These messages have annoyed / confused users; see for example:
- https://bugzilla.redhat.com/show_bug.cgi?id=1270279

Cc: Star Zeng <star.zeng@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Cc: Drew Jones <drjones@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@18619 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 15:46:32 +00:00
Fu Siyuan 30268f29bd MdeModulePkg: reset DHCP child when leaving PXE LoadFile.
The DHCP4 can have only one configured child instance so we need to reset
the DHCP4 child when leaving PXE driver's LoadFile() function, otherwise the
other programs which also need to use DHCP4 (like HTTP boot) will be impacted.

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: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18615 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 07:18:38 +00:00
Star Zeng 9d366450b7 MdeModulePkg VariableRuntimeDxe: Add the missing gEfiImageSecurityDatabaseGuid
Otherwise there will be build failure if without VarCheckUefiLib linked.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18612 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-16 01:32:22 +00:00
Eric Dong 7bf301dbc5 MdeModulePkg DriverSampleDxe: Add optional ";" to keep consistent with existed vfr op-code.
Refine the sample code,  add extra ";" to keep consistent for the condition opcode in different use cases.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18607 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-15 01:04:08 +00:00
Eric Dong 291422d78b Update register hot key logic, return EFI_ALREADY_START status if same hot key already existed.
In current case, if one key was requested to register twice, browser will override old hot key with new one. This behavior is not user friendly.
Now update the logic, return EFI_ALREADY_STARTED for this case. If user still want to override it, he must unregistered it first.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18604 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-15 00:57:20 +00:00
Eric Dong 377680ae64 MdeModulePkg: Use PcdSet##S to replace PcdSet##
PcdSet## has no error status returned, then the caller has no idea about whether the set operation is successful or not.
PcdSet##S were added to return error status and PcdSet## APIs were put in ifndef DISABLE_NEW_DEPRECATED_INTERFACES condition.
To adopt PcdSet##S and further code development with DISABLE_NEW_DEPRECATED_INTERFACES defined, we need to Replace PcdSet## usage with PcdSet##S.

Normally, DynamicDefault PCD set is expected to be success, but DynamicHii PCD set failure is a legal case.
So for DynamicDefault, we add assert when set failure. For DynamicHii, we add logic to handle it.

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18603 6f19259b-4bc3-4df7-8a09-765794883524
2015-10-15 00:56:41 +00:00
Samer El-Haj-Mahmoud 9feefde0cb MdeModulePkg Ip4Dxe: Ip4Config2 to request DHCP Option6 DNS server IP
Ip4Config2 protocol implementation must request for DNS server info when the
policy is set to DHCP. And when a DHCP server responds to it with a list of
DNS server addresses, it must parse it and set it for the instance. Without
this, nobody can do a Ip4Config->GetData for DNS server IPs before calling
Dns->Configure(). This will mean a DHCP is initiated when calling
Dns->Configure(), thus causing serious performance issues. This patch
attempts to address this issue.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18560 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30 03:01:13 +00:00
Dandan Bi 2d3e4cd167 MdeModulePkg:Fix the bug the incorrect change of StrCpyS function
The pointer to the destination string changed,the max length also changed.Previous change neglect this point.
And base on the code logic,we can use StrCatS to replace StrCpyS.Now this patch is to fix this bug.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18497 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-17 07:21:22 +00:00
Eric Dong 580d230d12 MdeModulePkg/HiiDatabase: Refine KeywordHandlerProtocol->SetData().
Update this function to follow UEFI spec requirement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18490 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-17 01:20:37 +00:00
Eric Dong 6c20eda777 MdeModulePkg/HiiDatabase: Refine KeywordHandlerProtocol->GetData().
Update this function to follow UEFI spec requirement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18489 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-17 01:15:32 +00:00
Eric Dong 3f4288fe26 MdeModulePkg/HiiDatabase: Fix Progress not point to the correct place issue.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18488 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-17 01:08:54 +00:00
Fu Siyuan f70f52f5ed MdeModulePkg: Change the algorithm in SNP to use the first found BAR index.
The driver binding start function in SNP.c goes through all the BARs and get
the last BAR index for use. Theoretically it should work with all valid BARs,
but we got reports some device did always use the first valid BAR, so we change
the logic in SNP to use the first found BAR index instead of the last one.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18455 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-15 03:12:15 +00:00
Dandan Bi 27b5bf5d4b MdeModulePkg:Refine the code comments in RegularExpressionDxe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18444 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-11 09:35:43 +00:00
Zhang Lubo 6758032da9 MdeModulePkg: PXE Driver's LoadFile protocol should check FilePath
PXE driver's LoadFile protocol should check the input parameter
FilePath to see whether it's a supported device path.If not,
it should return invalid parameter, do not continue PXE boot.

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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18435 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-10 09:46:59 +00:00
Cecil Sheng ddd097e33f Fixed GCC tool chain build fail.
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@18419 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-09 06:29:14 +00:00
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
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
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
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
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
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
Dandan Bi e68c776bf8 MdeModulePkg:Set default string value
Previously construct Default Value in AltResp for string opcode is String Id,
Now change it to string value if the string opcode has default value.
This change is compatible for SetupBrowser to handle.And add default value
for string in DriverSample to test this case.

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@18337 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-27 08:35:19 +00:00
Eric Dong cf34f86bc2 MdeModulePkg: Replace deprecated function.
Replace GetEfiGlobalVariable with GetEfiGlobalVariable2.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18332 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-27 04:52:24 +00:00
Star Zeng de2d7497fd MdeModulePkg FaultTolerantWrite: Error handling for erase operation failure
There may be anti-flash wear out feature to forbid erase operation after end of dxe.
The code is missing some error handling for erase operation failure,
it should return directly after the erase operation failed.

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@18320 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-26 09:46:29 +00:00
Star Zeng 8021f4c716 MdeModulePkg Variable: Consume the separated VarCheckLib
Since the variable check service has be separated to VarCheckLib
from Variable driver, so update Variable driver to consume the
separated VarCheckLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18286 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-25 03:01:56 +00:00
Dandan Bi 2295075793 MdeModulePkg:Refine the code in HiiDatabaseDxe
Check the local variable 'NameSpace' before use it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18274 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-24 06:25:50 +00:00
Ruiyu Ni c418872798 MdeModulePkg: Fix BdsDxe VS2015 build failure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18273 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-24 05:49:24 +00:00
Jiaxin Wu e371cc146d MdeModulePkg: Fix default router table and interface missing error
Ip4StartAutoConfig() will always free its default router table and interface,
which may cause IP instance missing its correct default interface. e.g. when
the policy is dhcp, and one child is configured to use default address.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18245 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-20 06:47:13 +00:00
Eric Dong e74c427978 Validate the input namespace field to avoid assert.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18239 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-20 00:22:16 +00:00
Eric Dong 9946c0a93e Allocate temp buffer to avoid potential change user input string buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18238 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-19 12:12:59 +00:00
Jiaxin Wu 2c3200072f MdeModulePkg: IP4 should re-initiate a DHCP if it detects network reconnection
v2:
* Update the MediaPresent detect declaring.

IP4 driver should re-initiate a DHCP if it detects that there is a network.
To fix this issue, we can implement the DHCP re-initiate policy while the media
change detected. The Ip4 driver should set a timer to signal the Ip4 to run the
DHCP configuration again(D.O.R.A). IP4 driver should free old IP address related
resource, then initiate a DHCP process to acquire new IP.

Cc: Ye Ting <ting.ye@intel.com>
Cc: Zhang Lubo <lubo.zhang@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: Lubo Zhang <lubo.zhang@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18232 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-18 03:12:16 +00:00
Star Zeng 313491310c MdeModulePkg Variable: Handle variable Attributes mismatch case
between variable HOB and NV storage.

Variable HOB may be built by a system that supports and loads variable
default, the variables in the HOB will be flush to NV storage after
variable write search ready.
After that, if the variable's Attributes is changed by someone and
system reboots and tries to load default again, the variable Attributes
mismatch case between variable HOB and NV storage will appear.

Original code did not handle the case correctly, that may eventually
cause NV storage contains two valid same variables that will lead to
system hang if GetNextVariableName() called.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18225 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-17 02:30:43 +00:00
Jiaxin Wu 3d0a49ad47 MdeModulePkg: Fix issue about current Ip4Dxe implementation for DHCP DORA process
DHCP policy is applied as default at boot time on all NICs in the system, which results
in all NIC ports attempting DHCP and trying to acquire IP addresses during boot.
Ip4 driver should only set dhcp as default policy, and not trigger DORA at driver binding
start(). We should start DORA until one IP child is configured to use default address.

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>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18201 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-11 11:07:17 +00:00
fanwang2 00f6c6cf9f MdeModulePkg: Change the macro name to fit coding style
Change a macro name to fit EDK2 naming conventions: Use all capital letters for #define.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: fanwang2 <fan.wang@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18200 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-11 01:11:54 +00:00
Dandan Bi 40ffc3b9f7 MdeModulePkg:Fix the issue that refresh the question fail in DriverSample
Once the question is refreshed,the processing should happen in the callback function
of EFI_BROWSER_ACTION_RETRIEVE case,rather than EFI_BROWSER_ACTION_CHANGING in DriverSample.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18150 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-04 09:09:10 +00:00
Dandan Bi a0973dcb77 MdeModulePkg:Fix the issue FindQuestionFromProgress in SetupBrowserDxe is broken
If the storage of the question is EFI_HII_VARSTORE_BUFFER/EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER,
in SetupBrowserDxe the configuration stings contain uppercase,but HiiDataBaseDxe generates the
ConfigResp string in lowercase,they mismatch,so FindQuestionFromProgress function is broken.
Now convert the configuration string in SetupBrowserDxe to lowercase to fix this issue.

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@18143 6f19259b-4bc3-4df7-8a09-765794883524
2015-08-03 09:44:04 +00:00
Michael D Kinney 26c2edd51f MdeModulePkg/Variable: Fix VS2015 warning about uninitialized local var.
This fix is used to solve VS2015 warning "local variable is not initialized before use"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18108 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-29 11:11:34 +00:00
Zhang Lubo 14e84fd888 MdeModulePkg: Fix the issue cannot boot to UEFI Network after reset
DHCP4 service allows only one of its children to be configured
in the active state,If the DHCP4 D.O.R.A started by IP4 auto
configuration and has not been completed, the Dhcp4 state machine
will not be in the right state for the PXE to start a new round
D.O.R.A., so we need to switch it's policy to static.

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@18107 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-29 06:37:48 +00:00
Dandan Bi 299c3aec0f MdeModulePkg:Add ESC key support in setup browser pop-up message box
When load default value or save changes will pop up message box to let user
confirm,Y means confirm and N means ignore,now add Esc key with the
same function of N key.And change the content of pop up message in .uni file,
now will display "Press 'Y' to confirm, 'N'/'ESC' to ignore."

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@18076 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 09:49:01 +00:00
Dandan Bi 0b5c288ccc MdeModulePkg:SetupBrowser output debug message when DisplayEngineDxe is not installed
Enhance the setupbrowserdxe to output debug message when DisplayEngineDxe is
not installed and this will be easy for user to find the reason why can not
enter Setup page.

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@18075 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 09:44:39 +00:00
Eric Dong 8fa9ac60f5 Support get string from configuration string packages.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18074 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 07:40:18 +00:00
Star Zeng b2d2a7f3f2 MdeModulePkg CapsuleRuntimeDxe: Reduce reserved memory consumption
Reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

The code is updated to only allocate 2 pages (1G page enabled) or
6 pages for 4G page table, and 8 extra pages to handles > 4G request
by page fault.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18070 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 03:05:13 +00:00
Star Zeng 716087e2be MdeModulePkg CapsuleX64: Reduce reserved memory consumption
We are going to reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

The code is updated to build 4G page table by default and only use 8 extra
pages to handles > 4G request by page fault.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18069 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 03:04:41 +00:00
Star Zeng c6368abcf0 MdeModulePkg BootScriptExecutorDxe: Reduce reserved memory consumption
We are going to reduce reserved memory consumption by page table buffer,
then OS can have more available memory to use.
Take PhysicalAddressBits = 48 and 2MB page granularity as example,
1:1 Virtual to Physical identity mapping page table buffer needs to be
((512 + 1) * 512 + 1) * 4096 = 1075843072 bytes = 0x40201000 bytes.

Current BootScriptExecutorDxe handles > 4G request by page fault because
S3ResumePeim only builds 4G page table when long mode waking vector is
not needed, but BootScriptExecutorDxe still assume the page table buffer for
page table is at 1:1 Virtual to Physical identity mapping.

To reduce reserved memory consumption, the code is updated to only use
8 extra pages to handles > 4G request by page fault.
Another, when both BIOS and OS wants long mode waking vector,
S3ResumePei should have established 1:1 Virtual to Physical identity mapping
page table for ACPI spec requirement, so no need to hook page fault handler.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18067 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 03:03:25 +00:00
Star Zeng cdc83ccf71 MdeModulePkg Variable: Read MonotonicCount by ReadUnaligned64()
As variable HEADER_ALIGNMENT = 4, the MonotonicCount in
AUTHENTICATED_VARIABLE_HEADER may be not UINT64 aligned,
so go to use ReadUnaligned64() to ensure read data correctly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18064 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-27 00:49:00 +00:00
fanwang2 7b0b360633 MdeModulePkg: Add old IPv4_DEVICE_PATH support for new IScsiDxe
GatewayIpAddress and SubnetMask do not exist in old IPv4_DEVICE_PATH, this
will lead new IScsiDxe to error if IPv4_DEVICE_PATH in system is not
updated.

Following UEFI2.5 spec of IPv4_DEVICE_PATH do a check before accessing
fields only defined in new version, add a judgement here to make old
IPv4_DEVICE_PATH and new IScsiDxe can cowork.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: fanwang2 <fan.wang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
[lersek@redhat.com: rewrapped commit message]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18057 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:04:04 +00:00
Star Zeng e43525ee3c MdeModulePkg VariableDxe: Correct address pointers from AuthVariableLib
Originally, the double pointer (VOID **) is not correct for convert
address pointers from AuthVariableLib.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>
Tested-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18054 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:50 +00:00
Dandan Bi b2f35637da MdeModulePkg: Check the case caused by mismatch
When mismatch happens,there exists one case that exit current
form and display last form.Assert code don't cover this case.
Now add check to handle this situation.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18053 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:44 +00:00
Dandan Bi 588fde6c15 MdeModulePkg: Correct the parameter order in match2 sample opcode
The first parameter of match2 opcode should be the pattern
and the second one should be the string.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18052 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:40 +00:00
Zhang Lubo cbfb9e5eaf MdeModulePkg: Fix the issue EfiPxeBcDhcp() may return wrong status.
if the instance of the DHCP4 protocol driver is in the Dhcp4Bound
status that is DHCP configuration has completed, so the Dhcp4->Start
FUNC in the EfiPxcBcDhcp() will return EFI_ALREADY_STARTED status
which lead to EfiPxeBcDhcp FUNC not in correspondence with UEFI spec.

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>
[lersek@redhat.com: updated copyright year as Siyuan asked]
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18050 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:30 +00:00
Jiaxin Wu 48bd653033 MdeModulePkg: Remove TransmitReceive() and ActiveChild dependency
Fix git 59a8cfd4 (SVN r17869) removes DHCP4.TransmitReceive()and DORA
process dependency, but it updated TransmitReceive() to take the ownership
of DhcpSb->ActiveChild but never release it. This will break the retransmit
and lease time out counter of DORA.
To fix that, TransmitReceive() doesn't need to be the ActiveChild, and the
timer routine should be updated to handle the TransmitReceive specially.

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: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18048 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:03:20 +00:00
Laszlo Ersek 3413cf56dc MdeModulePkg: SmbiosDxe: ARM and AARCH64 are VALID_ARCHITECTURES
This driver is soon going to be built by ArmVirtPkg/ArmVirtQemu.dsc
(without any changes). Although VALID_ARCHITECTURES is not used by the
build system (it is just a comment), it is best kept up-to-date for human
readers' sake.

Cc: Feng Tian <feng.tian@intel.com>
Cc: Elvin Li <elvin.li@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18041 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-26 08:02:45 +00:00
Heyi Guo cf1e634b4b MdeModulePkg/TerminalDxe: Some improvements
1. Get default terminal type from PCD rather than using PCANSI
directly in BuildTeminalDevpath;
2. Only terminal type is needed to create an TerminalDev instance, so
remove the useless code of creating and freeing DefaultNode.
3. Some white space refining.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-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@18027 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-16 08:50:43 +00:00
Heyi Guo f8fdf8cd0a MdeModulePkg/TerminalDxe: Set NullRemaining to FALSE by default
This is bug fix for TerminalDxe: NullRemaining should be set to FALSE
by fault and then be set to TRUE conditionally.

Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Heyi Guo <heyi.guo@linaro.org>
Reviewed-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@18026 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-16 08:50:34 +00:00
fanwang2 b1d4218a51 MdeModulePkg: Code logic optimization for Ip4Dxe driver
Move null check before set value to address to avoid null address dereferenced.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: fanwang2 <fan.wang@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17924 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 09:01:42 +00:00
Zhang Lubo 6b6fe3e9aa MdeModulePkg: Fix a bug that return type differs from the left one when assigned.
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: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: jiaxinwu <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17922 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 06:57:22 +00:00
Jiaxin Wu 2aa0eb5df6 MdeModulePkg: Remove Ip4ConfigDxe and related guid definition
Ip4ConfigDxe driver is deprecated in UEFI 2.5, so we will not support original Ip4Config Protocol, 
which is replace by Ip4Config2 Protocol integrated in Ip4Dxe driver(git commit 1f6729ff (SVN r17853)).

Dependent network drivers, libraries and applications have been migrated to (or extended to) the new protocol version.
For example:
git 7c25b7ea (SVN r17869): ping & ifconfig
git 00a6ad1b (SVN r17870): UefiHandleParsingLib
git 6c5c70d6 (SVN r17873): DxeNetLib
git 39561686 (SVN r17874): IpSecDxe
git c581e503 (SVN r17875): EfiSocketLib

This patch is based on related packages(MdeModulePkg, Nt32Pkg,  ArmPlatformPkg, ArmVirtPkg, EmulatorPkg, OvmfPkg, Vlv2TbltDevicePkg) clean-up work finished.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17917 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 05:49:48 +00:00
Roy Franz 5421247d1e MdeModulePkg: Fix TerminalDxe VS2013 build failure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17910 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-10 03:21:09 +00:00
Olivier Martin 1ca40fa9d9 MdeModulePkg/FvSimpleFileSystemDxe: Support file opening with no '.efi'
FvSimpleFileSystem adds '.efi' to the EFI application and drivers
filenames even through this extension is not present in the real
filename of the EFI module.

In the current behaviour, it would not be possible to open an EFI
application using FvSimpleFileSystem if the extension has been omitted
in the given filename.
It can be create some confusion if someone wants to try to
open a file with the real application name (eg: 'Shell').

This patch adds support to try again to look for the file with the
extension if it had failed to find it without the extension.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17903 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-09 10:34:27 +00:00
Roy Franz 014f93acab Accept VT220 DEL and function keys for TTY terminal type
Accept the VT220 escape code [3~ as backspace for TtyTerm terminals.  This is
sent by many Linux terminals by default.  Also accept VT220 function keys
F1-F12, and VT100 F1-F4 keys as these are commonly sent by Linux terminals.
The VT220 escape codes are longer, and variable length so a new state is added
to the state machine along with a variable to construct the multibyte escape
sequence.
There are currently no ambiguous escape sequence prefixes accepted, so the TTY
terminal accepts escape sequences for a variety of terminals.  The goal is to
'just work' with as many terminals as possible, rather than properly emulating
any specific terminal.  Backspace, Del, and F10 have been tested on xterm,
rxvt, tmux, and screen.
Note: The existing vt100 function key handling does not match the vt100
documentation that I found, so I added the TTY terminal handling
of VT100 F1-F4 (really PF1-PF4 on vt100) separately.  The vt100
has no F5-F10 keys, so I don't know what the current vt100 code
is based on.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17897 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-09 06:24:20 +00:00
Roy Franz 34098df212 Treat ASCII 0x7F as backspace for TtyTerm terminals
Treat ASCII 0x7F as backspace, rather than delete, for TTY terminals.  This
better matches the default Linux terminal settings that are used when connecting
to a simulated platform using xterm or a similar terminal program.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17896 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-09 06:24:15 +00:00
Roy Franz 6e3227c88c Add "TtyTerm" terminal type to TerminalDxe
This patch a adds new terminal type, TtyTerm, to TerminalDxe.  This terminal
type provides a place to add support for various *nix terminals that don't
behave like standard VT terminals.  The goal is to 'just work' with as many
terminals as possible, rather than properly emulating any one specific
terminal.

Signed-off-by: Roy Franz <roy.franz@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17895 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-09 06:24:11 +00:00
Zhang Lubo e0f74cea66 fix the problem that data type conversion may loss data.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17886 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 09:49:41 +00:00
Star Zeng 01267e224b MdeModulePkg AcpiTableDxe: Install config table at ACPI data change
UEFI spec has clear description below:

Configuration Table Groups
The GUID for a configuration table also defines a corresponding event group GUID with the same value.
If the data represented by a configuration table is changed,
InstallConfigurationTable() should be called.
When InstallConfigurationTable() is called, the corresponding event is signaled.
When this event is signaled,
any components that cache information from the configuration table can optionally update their cached state.
For example, EFI_ACPI_TABLE_GUID defines a configuration table for ACPI data.
When ACPI data is changed, InstallConfigurationTable() is called.
During the execution of InstallConfigurationTable(),
a corresponding event group with EFI_ACPI_TABLE_GUID is signaled,
allowing an application to invalidate any cached ACPI data.

But current implementation only InstallConfigurationTable() at first time ACPI data change.
  if (((Version & EFI_ACPI_TABLE_VERSION_1_0B) != 0) &&
      !AcpiTableInstance->TablesInstalled1) {
    Status = gBS->InstallConfigurationTable (&gEfiAcpi10TableGuid, AcpiTableInstance->Rsdp1);
    if (EFI_ERROR (Status)) {
      return EFI_ABORTED;
    }

    AcpiTableInstance->TablesInstalled1 = TRUE;
  }

  if (((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) &&
      !AcpiTableInstance->TablesInstalled3) {
    Status = gBS->InstallConfigurationTable (&gEfiAcpiTableGuid, AcpiTableInstance->Rsdp3);
    if (EFI_ERROR (Status)) {
      return EFI_ABORTED;
    }

    AcpiTableInstance->TablesInstalled3= TRUE;
  }

The AcpiTableInstance->TablesInstalled1 and AcpiTableInstance->TablesInstalled3 conditional judgment need to be removed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17885 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 09:44:46 +00:00
Zhang Lubo 206b5f51be MdeModulePkg: Replace unsafe string functions.
Replace unsafe string functions with new added safe string functions.

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: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17881 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-08 06:35:37 +00:00
Ronald Cron df473cc1fc MdeModulePkg/PartitionDxe: Fix media probe
The call in ProbeMediaStatus() to the ReadDisk() function of the
EFI_DISK_IO_PROTOCOL interface implemented in DiskIoDxe/DiskIo.c
crashed in DiskIo2ReadWriteDisk() because of the NULL value of
the destination buffer pointer.

Pass the address of a buffer in the stack instead of a NULL
pointer.

In addition to avoiding the crash, that way, the media probe does not
depend anymore on the way the EFI_DISK_IO_PROTOCOL implementation deals
with a NULL value of the destination buffer pointer as the UEFI
specification does not specify the expected behaviour.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ronald Cron <Ronald.Cron@arm.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17859 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 11:26:27 +00:00
jiaxinwu 1f6729ffe9 MdeModulePkg: Update Ip4Dxe driver to support Ip4Config2 protocol,
and also add new UI configuration support in Ip4Dxe driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jiaxinwu <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17853 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 08:19:55 +00:00
Dandan Bi 01a9598e31 MdeModulePkg:Refine the function comments
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17852 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 08:17:28 +00:00
Dandan Bi 4d5b08684f MdeModulePkg:Modify the incorrect DestStr length in safe string functions
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@17847 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 04:37:07 +00:00
Hao Wu c64816c652 MdeModulePkg: Remove mZeroGuid definition in Universal/Variable/RuntimeDxe
MdeModulePkg has defined gZeroGuid in 'Guid/ZeroGuid.h', therefore, the
mZeroGuid defined in Universal/Variable/RuntimeDxe is redundant.

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>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17840 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 02:56:01 +00:00
Hao Wu 32eabfd593 MdeModulePkg: Remove gZeroGuid definition in SetupBrowserDxe
MdeModulePkg has defined gZeroGuid in 'Guid/ZeroGuid.h', therefore, the
gZeroGuid defined in SetupBrowserDxe is redundant.

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>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17839 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-07 02:55:34 +00:00
Qiu Shumin a645180666 MdeModulePkg: Refine code to make it more readable.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17818 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-03 01:39:06 +00:00
Star Zeng dbd030bb98 MdeModulePkg: Fix EBC build failure
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17814 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 10:06:32 +00:00
Star Zeng 3735017c6e MdeModulePkg Variable: Minor enhancement to VarCheck
1. When Property->Attributes == 0, don't check input Attributes.
2. Enhance comments to be indent aligned and debug message
to be aligned with other messages.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17794 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-02 00:50:42 +00:00
Qiu Shumin 568a5119a1 MdeModulePkg/Universal/Variable: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17789 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:34:22 +00:00
Qiu Shumin 5e4b8bfe43 MdeModulePkg/Universal/SmbiosDxe: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17788 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:32:29 +00:00
Qiu Shumin 3860b1a232 MdeModulePkg/Universal/PlatformDriOverrideDxe: Use safe string functions to refine code.
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@17787 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:28:13 +00:00
Qiu Shumin e85e284e25 MdeModulePkg/Universal/PCD: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17786 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:27:03 +00:00
Qiu Shumin f5fc27424b MdeModulePkg/Universal/FvSimpleFileSystemDxe: Use safe string functions to refine code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17785 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:25:33 +00:00
Qiu Shumin 931d4d8269 MdeModulePkg/Universal/CapsuleRuntimeDxe: Use safe string functions to refine code.
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@17784 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:23:30 +00:00
Qiu Shumin 59d1f4f0ab MdeModulePkg/Universal/CapsulePei: Use safe string functions to refine code.
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@17783 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 08:22:31 +00:00
Star Zeng fa0737a839 MdeModulePkg Variable: Merge from Auth Variable driver in SecurityPkg
What to do:
1. Merge from Auth Variable driver in SecurityPkg to Variable drive in
MdeModulePkg. Then the merged Variable driver in MdeModulePkg will
link to AuthVariableLib and TpmMeasurementLib.
AuthVariableLibNull and TpmMeasurementLibNull in MdeModulePkg
could be used for non auth variable support.
AuthVariableLib and DxeTpmMeasurementLib in SecurityPkg
may be used for auth variable support.

Why to do:
1. Remove code duplication and reduce maintenance effort.
After auth variable service separated from Auth Variable driver in SecurityPkg
to AuthVariableLib. The remaining code logic of Auth Variable driver in SecurityPkg
will be almost same with Variable driver in MdeModulePkg. Now it is to
merge them.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17765 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:08:29 +00:00
Star Zeng b6477d820b MdeModulePkg: Add AuthVariableLib LibraryClass
What to do:
1. Add AuthVariableLib LibraryClass definitions.
2. Implement a NULL AuthVariableLib library instance.
3. Add VARIABLE_ENTRY_PROPERTY definition to VarCheck.h.
4. Add VARIABLE_ENTRY_CONSISTENCY and variable attribute
combinations definitions to VariableFormat.h.

Why to do:
1. Share code.
1.1. Separate auth variable service from Auth Variable driver in
SecurityPkg to AuthVariableLib. Then the AuthVariableLib could benefit
and be used by different implementation of Auth Variable drivers.

1.2 The VARIABLE_ENTRY_PROPERTY definition to VarCheck.h,
VARIABLE_ENTRY_CONSISTENCY and variable attribute
combinations definitions to VariableFormat.h will be shared
by merged Variable driver and AuthVariableLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17757 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:04:18 +00:00
Star Zeng 77ba12cc61 MdeModulePkg VariablePei: Merge from VariablePei in SecurityPkg
What to do:
1. Merge from VariablePei in SecurityPkg to VariablePei in MdeModulePkg.

Why to do:
1. Remove code duplication and reduce maintenance effort.
The code logic of VariablePei in SecurityPkg is same with VariablePei
in MdeModulePkg.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17756 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 03:03:26 +00:00
Star Zeng 4eebb8632a MdeModulePkg PlatDriOverrideDxe: Remove unneeded VARIABLE_HEADER reference
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17752 6f19259b-4bc3-4df7-8a09-765794883524
2015-07-01 02:51:41 +00:00
Dandan Bi 5ad66ec692 MdeModulePkg:Use safe string functions
Replace unsafe String functions with new added safe string functions

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@17724 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-29 02:36:31 +00:00
Star Zeng de4db4da31 MdeModulePkg AcpiTableDxe: Non-Boolean comparisons should use a compare operator.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17675 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-19 12:11:01 +00:00
Ard Biesheuvel 27f1971727 MdeModulePkg: Remove two instances of 'DHCP_SERVICE *DhcpSb'
in function scope that are assigned but never used afterwards.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17664 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-19 01:12:20 +00:00
Wu Jiaxin 35bc88dddc MdeModulePkg: Fix DHCP4 driver hang issue in some case.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <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@17653 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-18 00:48:35 +00:00
Wu Jiaxin ce96473329 MdeModulePkg: Remove DHCP4.TransmitReceive()and DORA process dependency.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <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@17652 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-18 00:43:15 +00:00
Dandan Bi cc63add853 MdeModulePkg:System hangs in setup menu
System hangs when RTC time rollover 1999 to 2000
Error processing of GetTime function:
If get time fail,the date/time will display ??,
and update help info to let user know get time fail.

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@17651 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-17 09:36:35 +00:00
Star Zeng f0071740ec MdeModulePkg AcpiTableDxe: Cover EFI_ACPI_TABLE_VERSION_5_0.
Follow PI 1.4 spec,
1. Cover EFI_ACPI_TABLE_VERSION_5_0.
2. Update TableKey parameter description in the
EFI_ACPI_SDT_PROTOCOL.GetAcpiTable() section.
3. Update EFI_ACPI_SDT_PROTOCOL.GetAcpiTable() description.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17649 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-17 02:51:47 +00:00
Star Zeng aa2868b3f1 MdeModulePkg Variable: Move VariableLock install into SmmVariableReady().
VariableLock in VariableSmmRuntimeDxe.c is installed in EntryPoint now.
It works based on SMM variable handler by SMM communication with
payload buffer. But the payload buffer and SMM variable handler will
be not ready in EntryPoint before SmmVariableReady() call back.

VarCheck in VariableSmmRuntimeDxe.c has the same issue,
so move VarCheck install into SmmVariableReady() also.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17626 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-11 10:24:36 +00:00
Star Zeng a856128a15 MdeModulePkg PcdDxe: TokenNumber should start from 1.
Because 0 is reserved as invalid token number.

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@17613 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-11 01:23:15 +00:00
Qiu Shumin fd0618c1f2 MdeModulePkg: Add type cast to avoid build failure in GCC.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17594 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 08:34:02 +00:00
Dandan Bi 5e30b69eb4 EDKII:Display engine should not depend on the framework code
Display engine base on class opcode to detect whether in
front page.Now remove class/subclass and use FormsetGuid
or ClassGuid to judge whether in front page

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@17590 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 05:09:50 +00:00
Qiu Shumin 9d58ab0923 MdeModulePkg: Refine the comments format for PropertiesTable.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17589 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-09 03:24:06 +00:00
Star Zeng 03e2cad6dd MdeModulePkg Variable: Add SysPrepOrder and SysPrep#### to global list.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17577 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-08 09:35:53 +00:00
Yao, Jiewen 03d486b2a0 Add UEFI 2.5 properties table support in DXE core.
Add PropertiesTableAttributesDxe driver to set ACPINvs/Reserved memory type to be XP, as default policy.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: "Yao, Jiewen" <Jiewen.yao@intel.com>
Reviewed-by: "Zeng, Star" <Star.Zeng@intel.com>
Reviewed-by: "Gao, Liming" <Liming.Gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17564 6f19259b-4bc3-4df7-8a09-765794883524
2015-06-05 12:08:12 +00:00
Olivier Martin 4e295e0392 MdeModulePkg/HiiDatabaseDxe: Fixed build error.
ARM toolchain raises the error: "statement is unreachable"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17529 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-28 00:49:30 +00:00
Eric Dong f2e7732e44 MdeModulePkg: Enable reconnect request from action request or question flag.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17516 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-27 02:32:59 +00:00
Dandan Bi e6557276f0 MdeModulePkg:fix browser not call EFI_BROWSER_ACTION_CHANGED
fix bellow bug:
change checkbox  from FALSE to TRUE.EFI_BROWSER_ACTION_CHANGED called
but when checkbox change back to FALSE,don't call EFI_BROWSER_ACTION_CHANGED

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17512 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-26 11:43:18 +00:00
Dandan Bi 1e9c722958 MdeModulePkg:Support delete key
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17511 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-26 11:36:52 +00:00
Eric Dong cbbc454b2a MdeModulePkg: Validate the return value before use it.
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@17494 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-22 05:37:44 +00:00
Dandan Bi b965bd99c5 Remove Framework HII "class\subclass" in all VFR
class/subclass is the obseleted key word in VFR file. It is designed in framework HII.
After convert to UEFI HII, it is not used any longer. Now remove them from VFR

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17493 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-21 07:58:12 +00:00
Dandan Bi 8c9c60b662 MdeModulePkg:fix more than one arrow shows for one goto menu
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17492 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-21 07:44:59 +00:00
Dandan Bi 2d9cdfd86e MdeModulePkg:Add line break character
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17491 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-21 07:02:51 +00:00
Feng Tian 02c9f1448c MdeModulePkg/CdExpressPei: Fix build error
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17489 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-21 05:36:40 +00:00
Feng Tian f9964c8019 MdeModulePkg/CdExpressPei: Add RecoveryBlockIo2Ppi support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17481 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-20 06:32:03 +00:00
Chao Zhang a3ac258751 MdeModulePkg: Update coding style
Update to follow Tiano Coding style. Fix potential NULL memory copy

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@17474 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-20 02:19:17 +00:00
Eric Dong aee257db53 MdeModulePkg: Fix potential buffer overflow issues.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17472 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-19 09:26:25 +00:00
Eric Dong 5f25ead991 MdeModulePkg: Enumerate all string packages in one driver when search the keyword.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17471 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-19 09:22:59 +00:00
Star Zeng d3460bcbdc MdeModulePkg Variable: Prevent BS variable update in legacy OS runtime.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17467 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-19 01:32:52 +00:00
Ruiyu Ni 579282ac56 MdeModulePkg: Add UNI files for DriverHealthManagerDxe driver.
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@17453 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-15 08:46:34 +00:00
Ruiyu Ni 67b6269ada MdeModulePkg: Add UNI files for BootManagerPolicyDxe driver.
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@17452 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-15 08:46:06 +00:00
Ruiyu Ni 99294cbbdb MdeModulePkg: Add UNI file for BdsDxe driver.
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@17451 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-15 08:45:35 +00:00
Eric Dong 1a03ab8ae2 MdeModulePkg: Fix Typo.
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@17449 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-14 23:35:01 +00:00
Ard Biesheuvel e44c60aa2a MdeModulePkg: remove unused variable DevicePathSize
Remove the unused DevicePathSize variable from EnumerateAllKeywords().
Due to our use of -Werror=unused-but-set-variable when building under GCC, the presence of DevicePathSize is breaking the build.

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: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17448 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-14 23:33:28 +00:00
Laszlo Ersek c24001450b MdeModulePkg: ConfigKeywordHandler: fix pointer target signedness.
SVN r17428 ("MdeModulePkg: Implement UEFI25 HII Config keyword handler protocol") introduced code that triggers

  -Werror=pointer-sign

under gcc ("warn for pointer argument passing or assignment with different signedness"). This patch fix up those locations.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17445 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-14 02:46:11 +00:00
Eric Dong 34326197d1 MdeModulePkg: Add sample code for keyword handler protocol.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17431 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 08:45:21 +00:00
Eric Dong f736c1f198 MdeModulePkg: Avoid update keyword string package.
When add new string, only update normal string package, avoid update keyword string package.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17430 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 08:36:49 +00:00
Eric Dong 87bfeb11f8 MdeModulePkg: Implement UEFI25 HII Config keyword handler protocol.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17428 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 08:35:29 +00:00
Chao Zhang acd32208b0 MdeModulePkg: Add ESRT management module.
It provides a repository to cache ESRT info for FMP or Non-FMP instance.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Gao Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17426 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-13 08:30:45 +00:00
Ruiyu Ni 2e04a2f99a MdeModulePkg: Add BootManagerPolicyDxe to produce BootManagerPolicy protocol.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17405 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 06:34:53 +00:00
Ruiyu Ni 1634214dbb MdeModulePkg: Process Sys Prep load options in BdsDxe driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17403 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-11 06:33:45 +00:00
Liming Gao 522dfbf380 MdeModulePkg: Update FirmwarePerformanceDataTableDxe for LegacyBoot
Change the code to listen EFI_SW_DXE_BS_PC_LEGACY_BOOT_EVENT instead of the Legacy Boot event to provide more precise performance data.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17377 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-08 07:44:59 +00:00
Liming Gao 09d4699523 MdeModulePkg: Update CapsulePei to consume PI1.4 CapsulePpi
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17374 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-08 07:43:35 +00:00
Eric Dong afc9bf796c MdeModulePkg: Enhance the check for numeric opcode with EFI_IFR_DISPLAY_INT_DEC attribute.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17345 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 12:30:13 +00:00
Eric Dong 9bd22b08d1 MdeModulePkg: Add match2 opcode support in SetupBrowserDxe and sample code in DriverSampleDxe
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17340 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 10:40:53 +00:00
Eric Dong 1f9837b41e MdeModulePkg: update comments for question.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17337 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 10:12:53 +00:00
Eric Dong 0b567d184d MdeModulePkg: Enable buffer type value for default and oneofoption opcode.
In order to support default value for orderedlist opcode, support buffer type value for default/oneofoption opcode.
If oneofoption used as a default value, it will not be added to normal option list.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17336 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 09:36:40 +00:00
Eric Dong 790447b2a5 MdeModluePkg: Enable refresh opcode to refresh the entire form.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17334 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 09:29:39 +00:00
Ruiyu Ni 3bb5c81370 MdeModulePkg: Add DriverHealthManagerDxe driver.
DriverHealthManagerDxe provides a driver health management VFR form
which will be sent by UefiBootManagerLib when booting a boot option.
It also provides another driver health management VFR form which will
be included by certain boot manager menu through the VFR class GUID.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17331 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 04:50:56 +00:00
Ruiyu Ni f4cd24da28 MdeModulePkg: Add BdsDxe driver and PlatformBootManagerNull library.
BdsDxe driver links to UefiBootManagerLib and PlatformBootManager to
provide a pure UEFI boot manager conforming to the UEFI spec.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17328 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 04:48:56 +00:00
Hao Wu 04f4c2d6a4 MdeModulePkg: Remove GetBootMode() at FirmwarePerformancePeiEntryPoint
Boot mode maybe changed at any point during the PEI phase, therefore, boot
mode should be checked later rather at entry point.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17323 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 03:31:28 +00:00
Eric Dong 40ad4b1a6b Update the logic for action opcode, also support user input a empty string for QuestionConfig part.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17189 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-20 04:26:39 +00:00
Eric Dong ab2cf8eabb Update the logic: After check the environment, calculate the new parameter and update it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17188 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-20 04:25:45 +00:00
BALATON Zoltan 49789216fa Fix some grammar and converge formatting of the two versions of TcpInput.c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17186 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-17 02:25:05 +00:00
Laszlo Ersek a78d3a279b MdeModulePkg: PCD/Pei: eliminate unused but set variable
- SVN r14866:

  MdePkg and MdeModulePkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and
  EFI_GET_PCD_INFO_PPI support for PI 1.2.1 compliance.

added the "DataBase" local variable to PcdPeimInit(), and both set it and
used it.

- SVN r14869:

  MdeModulePkg and Nt32Pkg Pcd: Add the new EFI_GET_PCD_INFO_PROTOCOL and
  EFI_GET_PCD_INFO_PPI support for PI 1.2.1  compliance.

changed the PcdPeimInit() function, but "DataBase" remained both set and
used.

- SVN r17173:

  MdeModulePkg Pcd: Check the input SkuId in SetSku()

changed the function again; and this time "DataBase" became
set-but-unused. It triggers the following build error, when building
ArmVirtualizationQemu.dsc with gcc-4.8:

  MdeModulePkg/Universal/PCD/Pei/Pcd.c:150:21: error: variable 'DataBase'
  set but not used [-Werror=unused-but-set-variable]
     PEI_PCD_DATABASE  *DataBase;
                       ^
  cc1: all warnings being treated as errors

Fix the error by removing the DataBase variable, restoring the pre-r14866
state locally, when the BuildPcdDatabase() function was called, but its
return value was thrown away.

Cc: Star Zeng <star.zeng@intel.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@17179 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-15 01:06:15 +00:00
Star Zeng 85d0b97d8d MdeModulePkg Pcd: Check the input SkuId in SetSku()
then GetSku() could return the currently active SkuId.

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@17173 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-14 08:54:11 +00:00
BALATON Zoltan 185395a4a2 Save initial TSVal from TCP connection initiation packets.
RFC1323 says the most recently received TSVal must be echoed in TSecr in ACK packets
which was not done at first connection because the code saving the TSVal from the peer
was skipped at this point. This resulted in sending an ACK reply with a 0 TSecr that
was rejected at least by FreeBSD. This patch fixes this by updating the saved TSVal
also for connection initiation packets.
Thanks to Laszlo Ersek for analysis and help in debugging.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17165 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-13 01:39:29 +00:00
Star Zeng 23f3e119c7 MdeModulePkg: Add ATTRIBUTE (+/-RT, RO) support in PCD declaration in DSC file.
Also update PCD_SERVICE_PEI_VERSION and PCD_SERVICE_DXE_VERSION to match with
the new PcdDataBase binary generated by BaseTools.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17161 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-10 09:01:46 +00:00
Star Zeng e56e187044 MdeModulePkg Variable: Enhance the code logic about VariableLock
to just return EFI_SUCCESS if the variable has been in the locked list.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17141 6f19259b-4bc3-4df7-8a09-765794883524
2015-04-10 01:53:38 +00:00
Star Zeng afe5262ecc MdeModulePkg BootScriptExecutorDxe: Fix 32bit build failure.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17065 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-19 02:08:27 +00:00
Star Zeng 32a81741db MdeModulePkg BootScriptExecutorDxe: Use ImageContext.ImageSize to allocate memory for PE image
to handle the case PE file alignment is not same as PE section alignment.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17063 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-18 08:47:47 +00:00
Elvin Li e63f3308e0 MdeModulePkg: Add SMBIOS 64-bit support for SMBIOS 3.0.
Add SMBIOS 64-bit entry point and 64-bit table support for SMBIOS 3.0.
Introduce PcdSmbiosEntryPointProvideMethod to produce 32-bit or 64-bit
SMBIOS table.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17051 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-16 02:41:48 +00:00
Shumin Qiu e50a226b2f MdeModulePkg: Fix typo.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17045 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-13 08:13:16 +00:00
Star Zeng 82e47eb22f MdeModulePkg Variable: Keep the behavior of Variable Dxe and SMM drivers consistent
to return EFI_NOT_FOUND when a specified variable doesn't exist and
Data parameter is NULL but DataSize parameter is valid in GetVariable() invocation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17030 6f19259b-4bc3-4df7-8a09-765794883524
2015-03-09 13:03:42 +00:00
Olivier Martin 92141e1777 MdeModulePkg/FvSimpleFileSystemDxe: Fixed ARM compiler error
Some compilers requires an empty line at the end of the file.
ARM compiler version 5 is one of these compilers:
error  #1-D: last line of file ends without a newline

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16918 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-25 02:24:04 +00:00
Wu Jiaxin 0e40240230 Open default Tcp child via BY_CHILD_CONTROLLER.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <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@16775 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-05 07:56:44 +00:00
Star Zeng b4e09b0f62 MdeModulePkg: Cleanup gEfiSmmAccess2ProtocolGuid reference.
As the drivers and library do not reference gEfiSmmAccess2ProtocolGuid explicitly now
after SmmMemLib introduced.

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@16760 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-05 00:59:56 +00:00
Ye Ting 57f2e11478 Enhance the parameter check to avoid potential issue in negotiation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ye Ting <ting.ye@intel.com> 
Reviewed-by: Tian Feng <feng.tian@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16750 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 08:53:56 +00:00
Wu Jiaxin 35a26499af Initialize data and correct faulty logic in TcpComponentNameGetControllerName().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <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@16743 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 06:43:34 +00:00
Wu Jiaxin c615a4bc73 Verified ChildHandle, and correct the name for a child.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wu Jiaxin <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@16741 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-04 05:47:58 +00:00
Roy Franz 385d44ba4e Update the code not require optional parameters include DataPDUInOrder and DataSequenceInOrder.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Roy Franz <roy.franz@linaro.org>
Reviewed-by: Ye Ting <ting.ye@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16700 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-03 00:53:37 +00:00
Yao, Jiewen 842b1242d1 Use SmmMemLib to check communication buffer.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: "Yao, Jiewen" <jiewen.yao@intel.com>
Reviewed-by: "Gao, Liming" <liming.gao@intel.com>
Reviewed-by: "Fan, Jeff" <jeff.fan@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16694 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 14:42:22 +00:00
Star Zeng 0fb5e515f2 MdeModulePkg Variable: Introduce PcdReclaimVariableSpaceAtEndOfDxe
for trying to reclaim variable space at EndOfDxe.

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@16687 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 09:30:34 +00:00
Star Zeng 00ab76e0fe MdeModulePkg Variable: Before EndOfDxe, just record the current boot VarErrorFlag to local variable.
And leave the variable error flag in NV flash as the last boot variable error flag.
After EndOfDxe in InitializeVarErrorFlag (), the variable error flag in NV flash
will be initialized to this local current boot variable error flag.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16684 6f19259b-4bc3-4df7-8a09-765794883524
2015-02-02 03:17:27 +00:00
Eric Dong a35ecb7584 Move ConfigHdr from browser_storage to Formset_storage, avoid device path lost for drivers.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16680 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-30 05:35:30 +00:00
Star Zeng 4edb18663f MdeModulePkg Variable: Implement variable quota management.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16669 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-27 08:42:47 +00:00
Laszlo Ersek f798e8bff7 MdeModulePkg: Acpi: enforce exclusion between FirmwareCtrl and XFirmwareCtrl
The code in AcpiTableDxe handles the installation of FADT and FACS in both
possible orders. In the [FADT, FACS] installation order, the FACS is at
once linked into the FADT. In the [FACS, FADT] installation order, the
FACS is stashed temporarily, and it is linked into the FADT when the FADT
is installed later.

According to the ACPI specification, *at most one* of FADT.FirmwareCtrl
and FADT.XFirmwareCtrl may be nonzero. The code is aware of this
requirement, and it never sets both of them to nonzero values at once.

However, the code doesn't expect the following:

- The caller first installs the FACS, which is stashed. The address that
  is saved happens to fall below 4GB.

- The caller then installs a FADT, with a zero FirmwareCtrl field, and a
  nonzero (pre-populated) XFirmwareCtrl field.

In this case the code sets FADT.FirmwareCtrl to the less-than-4GB address
of the stashed FACS, and leaves the different nonzero value in
FADT.XFirmwareCtrl. This violates the ACPI specification.

Prevent this by always zeroing the field that we do *not* set.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <Jiewen.Yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16659 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-26 08:05:04 +00:00
Eric Dong a687a1d207 The default type is not returned by display engine, this code update the logic to return it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16647 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 06:11:22 +00:00
Eric Dong 23c7d4258f Enable popup dialog when user press the hotkey.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16645 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 05:51:07 +00:00
Eric Dong fc2e750266 Avoid change the return status from above code which will also be used later.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16644 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 05:49:31 +00:00
Eric Dong 44cbe89ec8 Locate the config route protocol before install the config access protocol to fix potential issue.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16643 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-23 05:48:44 +00:00
Ruiyu Ni 173acde916 Fix IA32 build failure: Use MultU64x32 for 64bit * 32bit.
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@16604 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-13 05:33:47 +00:00
Olivier Martin 5d6bf9e229 MdeModulePkg/PartitionDxe: Fixed El Torito support when the medium is not a CDROM
El Torito format can be used on different media (eg: USB).
A ISO image can be dumped onto a USB mass-storage.

These media might not have the same block size as the CDROM media (ie: 2KB).
The El Torito code and the specification assumes a LBA 2KB.

In addition, the specification says in "12.3.4.4 CD-ROM and DVD-ROM":
UEFI code does not assume a fixed block size.

I was able to dupliacte the issue by copying a debian ISO on a USB driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16600 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-12 12:28:36 +00:00
Eric Dong c792e5b8a3 Restore question value for question without storage after CHANGING callback return error.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16592 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-09 02:38:39 +00:00
Star Zeng efb01a104d MdeModulePkg Variable: Implement VarCheck PROTOCOL
and follow UEFI spec to check UEFI defined variables.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16579 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-05 03:38:36 +00:00
Dong Guo 1fcbeaeacd Remove the FV header assumption in variable driver.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong Guo <guo.dong@intel.com>
Reviewed-by: Gao Liming <liming.gao@intel.com>
Reviewed-by: Zeng Star <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16564 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-31 01:46:50 +00:00
Feng Tian 5a2dcd134a MdeModulePkg/FvSimpleFileSystem:Fix a potential NULL dereference issue.
Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16562 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-30 08:18:57 +00:00
Feng Tian 270fc03f3e MdeModulePkg/FvSimpleFileSystem: Fix building error with 32bit tool chains.
Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16558 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-25 07:08:02 +00:00
Brendan Jackman 9da91aea69 MdeModulePkg/FvSimpleFileSystem: Add a new module to provide access to executable files in FVs.
This module implements Simple FileSystem protocol over Firmware Volume (FV).
EFI Modules included into a FV can be listed and launched from the EFI Shell or any other EFI applications.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Brendan Jackman <brendan.jackman@arm.com>
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Olivier Martin <olivier.martin@arm.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16547 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-23 03:18:04 +00:00
Jordan Justen a1252397f5 MdeModulePkg DebugSupportDxe: Fix build error with GNU assembler
The GNU assembler (2.24.51.20140918) is failing to build when movw is used on this instruction. 
Instead use the mov instruction, which matches the other cases of loading segment registers.

The error message seen is:
  AsmFuncs.iii:283: Error: incorrect register `%rax' used with `w' suffix

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16529 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-17 05:16:48 +00:00
Laszlo Ersek 84b8497338 Eliminate the variable.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16519 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-15 08:00:40 +00:00
Liming Gao 0b24f2cfe0 MdeModulePkg DXE FpdtStatusCodeHandler: Check Boolean value in if statement.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16503 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-12 03:17:55 +00:00
Eric Dong 300c1f0d35 MdeModulePkg: Update the device path info for the storage when former drivers not provide it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16499 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-11 08:03:19 +00:00
Randy Pawell 35f910f08b MdeModulePkg: Source fixes and cleanup for ARMGCC compiles
- Fix EFI_IPv4_ADDRESS usages to use a macro to copy the structure
  instead of direct assignment, to avoid runtime alignment errors.
- Fix a EFI_INPUT_KEY usage in TerminalDxe to use CopyMem()  to copy the
   structure instead of direct assignment, to avoid runtime alignment error.
- Delete excess local variables that are initialized but otherwise unused.
- CompilerIntrinsicsLib library now imported for AARCH64, as well as ARM.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Randy Pawell <randy_pawell@hp.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16471 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-04 00:32:24 +00:00
Liming Gao 40a0f8cb78 MdeModulePkg: Unregister DXE FpdtStatusCodeHandler.
DXE FpdtStatusCodeHandler is required to be unregistered even if StatusCodeReport is disabled. This change makes sure FpdtStatusCodeHandler be always unregistered.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Vincent Zimmer <vincent.zimmer@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16470 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-03 15:34:08 +00:00
Samer El-Haj-Mahmoud b8ff0f16d9 Fix memory leak in Ip4Config.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Tian Feng <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16465 6f19259b-4bc3-4df7-8a09-765794883524
2014-12-02 01:51:37 +00:00
Eric Dong 2e097165e9 Fix build fail for VS2005 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16451 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-27 02:14:14 +00:00
Samer El-Haj-Mahmoud 0133195170 MdeModulePkg: Misc comments and DEBUG messages
Fixed some spelling typos in some comments. Added a couple of useful DEBUG messages 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <samer.el-haj-mahmoud@hp.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16450 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-27 01:01:43 +00:00
Samer El-Haj-Mahmoud 8cc87d32c6 Fix an issue in the PCD service to prevent potential out of bound array access
that can cause an exception. mPeiExMapppingTableSize is the table size, but the 
code needs to check the entry number.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16448 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-26 07:17:31 +00:00
Eric Dong 42645c3dcf Fixed user input arrow down/ page down caused form display highlight menu error.
When scroll menu to the one not shows in current form, and this menu has option mismatch error, current display engine will not highlight this menu. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>








git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16447 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-26 02:44:06 +00:00
Eric Dong 787fc2a600 MdeModulePkg: Refine the get default value logic.
Based on the input request to get default value for questions.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16413 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-21 01:23:09 +00:00
Star Zeng eb774e2ef5 MdeModulePkg/SecurityPkg VariablePei: Fix VS2013 build failure.
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@16406 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-19 07:13:35 +00:00
Star Zeng 18a7dbbc02 MdeModulePkg Variable: Add missing warning annotation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16401 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-19 01:08:23 +00:00
Star Zeng 84edd20bd0 MdeModulePkg DxeCore/PiSmmCore: Add UEFI memory and SMRAM profile support.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16335 6f19259b-4bc3-4df7-8a09-765794883524
2014-11-12 03:27:48 +00:00
Star Zeng 6ebffb67c8 MdeModulePkg/SecurityPkg Variable: Add boundary check for while (IsValidVariableHeader (Variable)).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16280 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31 10:26:54 +00:00
Fu Siyuan 3f103c08ba Fix a bug introuduced by r16104, not all NIC device implement both memory and IO bar.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-By: Ye, Ting (ting.ye@intel.com)
Reviewed-By: Wu, Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16278 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-31 00:38:39 +00:00
Eric Dong ca2be85487 Check the question value before call CHANGED. Only when question value has been changed, browser will call CHANGED callback type.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16222 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-21 05:50:06 +00:00
Eric Dong 79e1ffbdd4 Clean up the code. Action statement should not have text two opcode.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16221 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-21 05:48:00 +00:00
Ruiyu Ni bf5a9493fa AtaBusDxe: Fix ReadBlockEx andWriteBlockEx to still signal event when the BufferSize is 0.
DiskIoDxe: Fix ReadDiskEx and WriteDiskEx to not modify the user’s buffer when the BufferSize is 0.
DiskIoDxe: Fix ReadDiskEx and WriteDiskEx hang issue when the submitted blockio2 task is completed before submitting another blockio2 task.
DiskIoDxe: Fix FlushEx to free the flush task item in callback (memory leak issue).

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@16215 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-15 04:49:04 +00:00
Star Zeng 2618ea2c05 MdeModulePkg FaultTolerantWriteDxe: Remove unnecessary @para from function header comments of ReadWorkSpaceData().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16202 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-10 04:52:38 +00:00
Star Zeng 0d3edd9d26 MdeModulePkg FaultTolerantWriteDxe: Remove assumptions below in FTW driver.
1. Work space and spare block must be in a FVB with FV header.
Updated to work space and spare block could be in independent FVBs that are without FV header.
2. NV region, work space and spare block must have same BlockSize.
Updated to NV region, work space and spare block could have different BlockSize.
3. Works space size must be <= one block size.
Update to work space size could be <= one block size (not span blocks) or > one block size (block size aligned).

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@16201 6f19259b-4bc3-4df7-8a09-765794883524
2014-10-10 02:27:14 +00:00
Olivier Martin 831537d6ca Removes some unused assigned variables.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16189 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-29 09:02:57 +00:00
Ye Ting d28c4ed72b Enhance TargetName check when save iSCSI configuration.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ye Ting  <ting.ye@intel.com>
Reviewed-by: Wu, Jiaxin <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@16167 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-24 09:35:32 +00:00
Eric Dong 7a9612ceb2 Refine get default value process for browser.
Before get default value for each questions, call ExtractConfig function to get the altcfg string for all formset. Later when question try to get default value from AltCfg string, just get the value from the saved altcfg string instead of call ExtractConfig function to get it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16162 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-23 08:06:23 +00:00
Samer El-Haj-Mahmoud elhaj b15aae9f2e Fix X64 native function call prolog. Prepare space for at least 4 arguments,
even if the native function's arguments are less than 4.
 
From MSDN x64 Software Conventions, Overview of x64 Calling Conventions:
“The caller is responsible for allocating space for parameters to the
callee, and must always allocate sufficient space for the 4 register
parameters, even if the callee doesn’t have that many parameters.
This aids in the simplicity of supporting C unprototyped functions,
and vararg C/C++ functions.”
 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud elhaj@hp.com 
Reviewed by: Jiewen Yao <Jiewen.Yao@intel.com>
Reviewed by: Feng Tian <Feng.Tian@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16152 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-22 05:54:41 +00:00
Eric Dong 44833d441b Add more check for the code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16129 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-18 08:45:26 +00:00
Fu, Siyuan c4a7d20890 1. Use the PciIo->GetBarAttributes to find the logical bar index of the memory mapped bar and IO mapped bar.
2. Remove unused code for undi 3.0.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-By: Ye, Ting (ting.ye@intel.com)
Reviewed-By: Ni, Ruiyu <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16104 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-15 03:37:58 +00:00
Dong, Guo e7bafeb9a8 MdeModulePkg VariableRuntimeDxe: Bug fix and and refine debug message.
Correct NV variable base address for flash memory attribute set to EFI_MEMORY_RUNTIME.
Refine the debug error message.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dong, Guo <guo.dong@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Zeng, Star <star.zeng@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16054 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 09:16:04 +00:00
Gao, Liming 35c77daed9 MdeModulePkg: Convert non DOS format files to DOS format and remove unused module UNI files.
1. Module UNI and Package UNI files are not DOS format. Convert them to DOS format.
2. Remove unused SectionExtractionDxeModStrs.uni and SectionExtractionPeiModStrs.uni

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16044 6f19259b-4bc3-4df7-8a09-765794883524
2014-09-03 08:39:12 +00:00
Elvin Li fd9abd045e Allocate EfiReservedMemoryType of memory.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Signed-off-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15977 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-29 09:01:52 +00:00
Zeng, Star fea55a1661 MdeModulePkg: INF/DEC file updates to EDK II packages
2. Add MODULE_UNI_FILE file that contains the localized Abstract and Description of a module.
a. Addresses an information gap between INF files and the UEFI Distribution Packaging Specification XML schema
b. There will be an associated update to UPT in BaseTools to consume MODULE_UNI_FILE and associated UNI file during UDP creation that performs the INF -> XML conversion.
c. There will be an associated update to UPT in BaseTools to produce MODULE_UNI_FILE and associated UNI file during UDP installation that performs the XML -> INF conversion.

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

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15963 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 06:53:43 +00:00
Zeng, Star 6036e94dc9 MdeModulePkg: INF/DEC file updates to EDK II packages
1. Usage information in INF file comment blocks are either incomplete or incorrect.  
This includes usage information for Protocols/PPIs/GUIDs/PCDs/HOBs/Events/BootModes.  
The syntax for usage information in comment blocks is defined in the EDK II Module Information (INF) Specification

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15962 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-28 06:34:06 +00:00
Eric Dong 275ea01efd Refine the fix for the bug that cause assert when do the reconnect in the callback function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15914 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-27 03:29:01 +00:00
Elvin Li b5040e4c55 1. CapsuleLongModeBuffer variable should not have EFI_VARIABLE_RUNTIME_ACCESS attribute.
2.	CapsuleLongModeBuffer variable should be set to Read-Only.  It should not be changed by someone else.
3.	Introduce a new PCD PcdIdentifyMappingPageTablePtr to share the same range of page table between AcpiS3 and Capsule.
4.	Capsule stack size is allocated from PcdCapsulePeiLongModeStackSize.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15909 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 12:26:32 +00:00
Eric Dong 3abc11f65e Clean up the framework style code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15899 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 07:46:38 +00:00
Samer El-Haj-Mahmoud elhaj c4866c7710 The original code does not initialize the global width constants before creating menu options. That caused an issue when long strings are used in the first HII form, but only when displayed for the first time.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud elhaj@hp.com 
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15898 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-26 07:16:29 +00:00
Qiu Shumin a361d39160 Append the terminating null character at the end of the string to avoid buffer overflow.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15888 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-25 08:04:52 +00:00
Eric Dong e62fa17c58 Clean up the useless code in DriverSampleDxe.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15830 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 08:10:09 +00:00
Eric Dong 17e95ca9a7 Refine the code logic, use dynamic allocate buffer instead of static array to fix potential buffer overflow.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15829 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 07:20:19 +00:00
Sergey Isakov 69c0fbd2c5 MdeModulePkg/PartitionDxe: Simplify the error handling of DriverBindingSupported().
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
Reviewed-by: Feng Tian <feng.tian@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15828 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 05:37:28 +00:00
Eric Dong d5eea98e20 Refine the comments for the function header.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15827 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-19 02:44:24 +00:00
Michael Kinney a402e12924 Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Michael Kinney  <michael.d.kinney@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

Add support for RSA 2048 SHA 256 signing and verification encoded in a PI FFS GUIDED Encapsulation Section.  The primary use case of this feature is in support of signing and verification of encapsulated FVs for Recovery and Capsule Update, but can potentially be used for signing and verification of any content that can be stored in a PI conformant FFS file.  Signing operations are performed from python scripts that wrap OpenSsl command line utilities.  Verification operations are performed using the OpenSsl libraries in the CryptoPkg.

The guided encapsulation sections uses the UEFI 2.4 Specification defined GUID called EFI_CERT_TYPE_RSA2048_SHA256_GUID.  The data layout for the encapsulation section starts with the UEFI 2.4 Specification defined structure called EFI_CERT_BLOCK_RSA_2048_SHA256 followed immediately by the data.  The signing tool included in these patches performs encode/decode operations using this data layout.  HashType is set to the UEFI 2.4 Specification defined GUID called EFI_HASH_ALGORITHM_SHA256_GUID.

MdePkg/Include/Guid/WinCertificate.h
================================= 
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
// 
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
  {0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }

///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
/// 
typedef struct {
  EFI_GUID  HashType;
  UINT8     PublicKey[256];
  UINT8     Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;

MdePkg/Include/Protocol/Hash.h
================================= 
#define EFI_HASH_ALGORITHM_SHA256_GUID \
  { \
    0x51aa59de, 0xfdf2, 0x4ea3, {0xbc, 0x63, 0x87, 0x5f, 0xb7, 0x84, 0x2e, 0xe9 } \
  }

The verification operations require the use of public key(s).  A new PCD called gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer is added to the SecurityPkg that supports one or more SHA 256 hashes of the public keys.  A SHA 256 hash is performed to minimize the FLASH overhead of storing the public keys.  When a verification operation is performed, a SHA 256 hash is performed on EFI_CERT_BLOCK_RSA_2048_SHA256.PublicKey and a check is made to see if that hash matches any of the hashes in the new PCD.  It is recommended that this PCD always be configured in the DSC file as storage type of [PcdsDynamixExVpd], so the public keys are stored in a protected read-only region.

While working on this feature, I noticed that the CRC32 signing and verification feature was incomplete.  It only supported CRC32 based verification in the DXE Phase, so the attached patches also provide support for CRC32 based verification in the PEI Phase.

I also noticed that the most common method for incorporating guided section extraction libraries was to directly link them to the DXE Core, which is not very flexible.  The attached patches also add a generic section extraction PEIM and a generic section extraction DXE driver that can each be linked against one or more section extraction libraries.  This provides a platform developer with the option of providing section extraction services with the DXE Core or providing section extraction services with these generic PEIM/DXE Drivers.

Patch Summary
==============
1)	BaseTools - Rsa2049Sha256Sign python script that can perform test signing or custom signing of PI FFS file GUIDed sections
  a.	Wrapper for a set of OpenSsl command line utility operations
  b.	OpenSsl command line tool must be installed in location that is in standard OS path or in path specified by OS environment variable called OPENSSL_PATH
  c.	Provides standard EDK II command line arguments for a tool that encodes/decodes guided encapsulation section 

Rsa2048Sha256Sign - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256Sign -e|-d [options] <input_file>

positional arguments:
  input_file            specify the input filename

optional arguments:
  -e                    encode file
  -d                    decode file
  -o filename, --output filename
                        specify the output filename
  --private-key PRIVATEKEYFILE
                        specify the private key filename. If not specified, a
                        test signing key is used.
  -v, --verbose         increase output messages
  -q, --quiet           reduce output messages
  --debug [0-9]         set debug level
  --version             display the program version and exit
  -h, --help            display this help text

2)	BaseTools - Rsa2049Sha256GenerateKeys python script that can generate new private/public key and PCD value that is SHA 256 hash of public key using OpenSsl command line utilities.
  a.	Wrapper for a set of OpenSsl command line utility operations
  b.	OpenSsl command line tool must be installed in location that is in standard path or in path specified by OS environment variable called OPENSSL_PATH

Rsa2048Sha256GenerateKeys - Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
usage: Rsa2048Sha256GenerateKeys [options]

optional arguments:
  -o [filename [filename ...]], --output [filename [filename ...]]
                        specify the output private key filename in PEM format
  -i [filename [filename ...]], --input [filename [filename ...]]
                        specify the input private key filename in PEM format
  --public-key-hash PUBLICKEYHASHFILE
                        specify the public key hash filename that is SHA 256
                        hash of 2048 bit RSA public key in binary format
  --public-key-hash-c PUBLICKEYHASHCFILE
                        specify the public key hash filename that is SHA 256
                        hash of 2048 bit RSA public key in C structure format
  -v, --verbose         increase output messages
  -q, --quiet           reduce output messages
  --debug [0-9]         set debug level
  --version             display the program version and exit
  -h, --help            display this help text

3)	BaseTools\Conf\tools_def.template
  a.	Define GUID/Tool to perform RSA 2048 SHA 256 test signing and instructions on how to use alternate private/public key
b.	GUID is EFI_CERT_TYPE_RSA2048_SHA256_GUID
  c.	Tool is Rsa2049Sha256Sign
4)	MdeModulePkg\Library\PeiCrc32GuidedSectionExtractionLib
  a.	Add peer for DxeCrc32GuidedSectionExtractionLib so both PEI and DXE phases can perform basic integrity checks of PEI and DXE components
5)	MdeModulePkg\Universal\SectionExtractionPei
  a.	Generic PEIM that can link against one or more NULL section extraction library instances to provided one or more GUIDED Section Extraction PPIs
6)	MdeModulePkg\Universal\SectionExtractionDxe
  a.	Generic DXE Driver that can link against one or more NULL section extraction library instances to provide one or more GUIDED Section Extraction Protocols.
7)	SecurityPkg\Library\PeiRsa2048Sha256GuidedSectionExtractLib
  a.	NULL library instances that performs PEI phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
  b.	Based on algorithms from SecurityPkg Authenticated Variable services
  c.	Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.
8)	SecurityPkg\Library\DxeRsa2048Sha256GuidedSectionExtractLib
  a.	NULL library instances that performs DXE phase RSA 2048 SHA 256 signature verification using OpenSsl libraries from CryptoPkg.
  b.	Based on algorithms from SecurityPkg Authenticated Variable services
  c.	Uses public key from gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer.


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15799 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 06:29:07 +00:00
Zeng, Star fe7819402c MdeModulePkg/IntelFrameworkModulePkg: Update PeiCore, SmbiosDxe and IsaSerialDxe to use PcdGetxx() instead of FixedPcdGetxx().
It changes some of the PCD declarations to add more supported PCD storage types and
the change in the PCD access methods is associated with that.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zeng, Star <star.zeng@intel.com>
Reviewed-by: Kinney, Michael D <michael.d.kinney@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15798 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-14 05:55:08 +00:00
Eric Dong 2ca7b36631 Clean the useless code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15776 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-08 03:20:29 +00:00
Feng Tian 6e1e540554 1) Add type cast for better coding style.
2) replace StrCpy() usage in Variable driver with StrnCpy().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15770 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-07 08:54:34 +00:00
Harry Liebel 35d74819a0 The pointer argument should be set to NULL if not used not FALSE.
FALSE evaluates to 0. This was flagged by LLVM compiler as a
  warning:
  "expression which evaluates to zero treated as a null pointer
   constant of type 'EFI_MTFTP4_OVERRIDE_DATA *'
   [-Wnon-literal-null-conversion]"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
Reviewed-By: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-By: Ye, Ting (ting.ye@intel.com)

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15741 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-04 01:26:57 +00:00
Elvin Li ffbc792ce5 MdeModulePkg: Fix wrong check for SetAttribute in Consplitter
Original code check if Attribute > 0x7FFFFFFF, this is wrong and fail to check valid case per UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15734 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-01 05:08:40 +00:00
Elvin Li d81c462d61 MdeModulePkg: Removed valid text mode check in SetAttribute interface in GraphicsConsole.
UEFI spec mentioned that the color mask can be set even when the device is in an invalid text mode. But the current code add text mode check. Removed the check now.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15721 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-31 03:21:39 +00:00
Eric Dong 784952b189 Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15720 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-30 01:19:21 +00:00
Eric Dong 4e1005eca7 Update code to support VS2013 tool chain.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15695 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:52:57 +00:00
Eric Dong 40578d09d1 Update the code to follow UEFI spec, process date/time/ref value type as buffer type when in an expression.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15690 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 07:10:22 +00:00
Li, Elvin 5d0f0ac480 Print the CodeType and Value of status code with fixed length.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Li, Elvin <elvin.li@intel.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15687 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-28 01:59:02 +00:00
Jaben Carsey 6cb9566f26 MdeModulePkg: Fix parameter verification for SetAttribute
Check for 8th bit being reserved as per UEFI spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Elvin Li <elvin.li@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15680 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-25 15:57:20 +00:00
Elvin Li 34717ef034 Clear the whole EFI_PHYSICAL_ADDRESS CapsuleDataPtr64 to 0 at first to avoid rubbish data in high 32 bits.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Elvin Li <elvin.li@intel.com>
Review-by: Feng Tian <feng.tian@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15675 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-24 05:58:50 +00:00
Eric Dong dcca25d17d Refine code to follow good coding style.
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@15666 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-21 09:59:06 +00:00
Eric Dong e77d2f9db2 Add check to make code more safely.
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@15655 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-14 11:01:17 +00:00
Eric Dong 93551a01fe Check the validation when return from callback function to avoid use the invalid form set.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15654 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-14 06:14:20 +00:00
Eric Dong 5039b444fe Fix build fail for VS2005 tool chain.
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@15649 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-10 01:52:28 +00:00
Chen Fan e364478661 Fixed typos: hanlder should be handler.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15642 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-09 03:51:56 +00:00
Eric Dong ae026b0a9b Refine the sample for action, should not use text two part.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15641 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-09 02:49:24 +00:00
Eric Dong 63442a19ba Fix build fail for VS2005 tool chain.
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@15640 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-09 01:50:55 +00:00
Eric Dong 4d4deaaccb Refine the save action for the browser.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15639 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-08 06:04:53 +00:00
Eric Dong 737adca337 Restore the question value before call the CHANGED callback type.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15633 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-07 05:56:26 +00:00
Eric Dong a94733b0d6 Correct the default value for date opcode.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15612 6f19259b-4bc3-4df7-8a09-765794883524
2014-07-02 05:54:41 +00:00
Fu, Siyuan 48178d7ab1 Fix a bug in IP4 driver when computing the network broadcast adress.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu, Siyuan <siyuan.fu@intel.com>
Reviewed-By: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15603 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-30 07:48:23 +00:00
Eric Dong 523f48e771 Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15598 6f19259b-4bc3-4df7-8a09-765794883524
2014-06-26 03:24:25 +00:00
Brendan Jackman 21def103d5 Add 'file not found' debug message to MTFTP.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Brendan Jackman <Brendan.JackMan@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.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@15543 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-21 05:59:47 +00:00
Olivier Martin 129ff94661 Fix some build issues (ARM toolchain).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.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@15533 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-15 01:13:05 +00:00
Eric Dong 7da62bc02d Based on request, export ResetRequired info used by browser.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Gao, Liming <liming,gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15525 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-14 01:52:31 +00:00
Gao, Liming 690f491dba Correct String language tag.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Dong, Eric <eric.dong@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15519 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-12 09:39:03 +00:00
Fu Siyuan d551cc64cd 1. Mark the network volatile variables as deprecated in code comments and remove related code to set/get these variable.
2. Remove the GetTime() call when receiving Udp4/6 packets.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye, Ting <ting.ye@intel.com>
Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15497 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-07 06:17:31 +00:00
Star Zeng 5966402ed5 MdeModulePkg/IntelFrameworkModulePkg ACPI: Follow the new UEFI 2.4a spec to return EFI_ACCESS_DENIED for duplicated FADT, FACS or DSDT installation.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15496 6f19259b-4bc3-4df7-8a09-765794883524
2014-05-06 02:11:23 +00:00
Gao, Liming 50c455da00 Correct the incorrect string.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Dong, Eric <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15482 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-24 02:19:23 +00:00
Eric Dong 4f467fd33b Fix GCC build fail.
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@15477 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-21 02:17:29 +00:00
Eric Dong e6106e892d Refine the check expression result logic.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Gao, Liming <liming,gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15476 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-18 06:40:13 +00:00
Eric Dong 7e2f32894b Enhance the browser parse opcode logic, skip the opcode which is not defined in UEFI spec.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Gao, Liming <liming,gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15475 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-18 03:17:54 +00:00
Eric Dong bfae1330cc Update question validation logic, move the check pointer from after user input to after finish call the CHANGING callback.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15468 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-15 15:38:48 +00:00
Eric Dong 6fd184d032 Call EFI_BROWSER_ACTION_RETRIEVE for each form instead of only call once before enter this formset.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15465 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-14 10:03:00 +00:00
Eric Dong e213ae4552 Update logic, only question with interactive attribute should trig the callback function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15449 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 06:17:03 +00:00
Eric Dong 061d546224 Sync value for string opcode after call the Callback function.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming, Gao <liming.gao@intel.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15448 6f19259b-4bc3-4df7-8a09-765794883524
2014-04-11 06:15:57 +00:00