Commit Graph

712 Commits

Author SHA1 Message Date
Liming Gao 7a9395cd7b MdeModulePkg: Update PerformanceLib instances not to check Identifier.
In PerformanceLib, Identifier is for single PERF, not the pair of PERF.
When find the matched START and END pair, the identifier will not be checked.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-04-11 16:20:28 +08:00
Zhang Lubo 364f4efa44 MdeModulePkg: Add new macros and refine codes
Add 2 macros inNetLib.h
#define  IP4_MASK_MAX          32
#define  IP6_PREFIX_MAX        128
we will use these two macros to check the max mask/prefix length,
instead of
#define  IP4_MASK_NUM          33
#define  IP6_PREFIX_NUM        129
which means a valid number.
This will make the code readability and maintainability.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
2016-04-11 08:25:33 +08:00
Thomas Palmer 3dc5c1ae5c MdeModulePkg/UefiBootManagerLib: API BmIsValidLoadOptionVariableName
Redfine the BmIsValidLoadOptionVariableName function to allow public use. Change name to EfiBootManagerIsValidLoadOptionVariableName to match naming scheme. Check that VariableName is never NULL and allow OptionType and OptionNumber to be optional.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-04-08 12:28:02 +08:00
Ruiyu Ni 542417972d MdeModulePkg/Bds: Fix build failures of VS tool chain
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-04-07 11:23:07 +08:00
Ruiyu Ni b1bb6f5961 MdeModulePkg/Bds: Fix a boot hang due to Ram Disk boot support
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-04-06 14:49:25 +08:00
Ni, Ruiyu 024bdafc68 MdeModulePkg/Bds: Memory Bins don't count the memory used by RAM Disk
MemoryTypeInformation don't count the reserved memory used by RAM Disk,
but it still check all types of memory and do reset when any type
of memory size changes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
2016-04-06 13:27:09 +08:00
Ni, Ruiyu 339ae051f6 MdeModulePkg/Bds: Free resources after ram disk boot finishes
The resource free includes to un-register the ram disk device and
free the memory occupied by the ram disk.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
2016-04-06 13:27:09 +08:00
Ni, Ruiyu 026ede493c MdeModulePkg/Bds: Allocate reserved memory for RAM Disk boot media
Use reserved memory to hold the buffer for the RAM disk to
follow the ACPI spec requirement.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
2016-04-06 13:27:09 +08:00
Laszlo Ersek 166a6552a8 MdeModulePkg: DxeUdpIoLib: fix non-empty payload path in UDP reception
Commit 1b31acb66c ("MdeModulePkg: Check received packet size before use
it.") introduced a chunk of code under the new "Resume" label, in function
UdpIoOnDgramRcvdDpc(). The new code is supposed to run only when the
received packet has zero-length payload, but a "return" statement was
forgotten, and the code is reached on the normal (nonzero-length payload)
path as well, after the packet has been processed (and possibly freed) by
RxToken->CallBack(). This is a logic bug, with the direct symptom being
use-after-free / General Protection Fault.

Cc: Siyuan Fu <siyuan.fu@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Ting Ye <ting.ye@intel.com>
Cc: "Subramanian, Sriram (EG Servers Platform SW)" <sriram-s@hpe.com>
Fixes: 1b31acb66c
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
2016-04-04 13:53:12 +02:00
Fu Siyuan 1b31acb66c MdeModulePkg: Check received packet size before use it.
Arbitrary length of packet may be received from network, including the
packets with zero payload data or malformed protocol header. So the code
much check the actually received data size before using it. For example, in
current edk2 network stack, an zero payload UDP packet may cause the
platform ASSERT in NetbufFromExt() because of the zero fragment number.
This patch update the IpIoLib and UdpIoLib to check and discard the zero
payload data packet to avoid above assert. Some other network drivers are
also updated to check the packet size to guarantee the minimum length of
protocol header is received from upper layer driver.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
2016-04-01 13:30:08 +08:00
Thomas Palmer 065e587c17 MdeModulePkg/UefiBootManagerLib: BmGetActiveConsoleIn code cleanup
Check for NULL from AllocateCopyPool before setting Count to 1. Also
change sizeof (EFI_HANDLE*) to sizeof (EFI_HANDLE).  Handles is a
EFI_HANDLE pointer, so the allocated memory must be the size of
EFI_HANDLE.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-03-31 09:21:05 +08:00
Laszlo Ersek 3b93b8070d MdeModulePkg: DeviceManagerUiLib: remove set but unused variables
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25 10:52:29 +01:00
Laszlo Ersek 8192be265e MdeModulePkg: BootMaintenanceManagerUiLib: remove set but unused variables
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
2016-03-25 10:52:28 +01:00
Ruiyu Ni b99e9ca916 MdeModulePkg/Bds: Fix VS2012 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>
2016-03-24 11:24:30 +08:00
Dandan Bi c7d1e742ec MdeModulePkg/BootMaintenanceManagerUiLib: Remove type casting in ChooseFile
The type casting is not necessary and now remove it.

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: Gary Lin <glin@suse.com>
2016-03-23 16:04:03 +08:00
Dandan Bi bdf0da37c9 MdeModulePkg/BootMaintManagerUiLib: Declare EFIAPI for ChooseFile handler
The BootMaintenanceManagerUiLib use ChooseFile() from FileExplorerLib
to select files. And the third parameter in ChooseFile() is CHOOSE_HANDLER,
per the definition of CHOOSE_HANDLER, it must use EFIAPI as the calling
convention. But the calling convention was not specified for following
handlers: CreateBootOptionFromFile, CreateDriverOptionFromFile,
BootFromFile. Now specifies the calling convention for those functions.

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: Gary Lin <glin@suse.com>
2016-03-23 16:03:52 +08:00
Ruiyu Ni 2d15a83017 MdeModulePkg/Bds: BDS hotkey shouldn't work on inactive consoles
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
Reviewed-by: Sunny Wang <sunnywang@intel.com>
2016-03-23 13:22:30 +08:00
Star Zeng 58f025afd5 MdeModulePkg PlatformVarCleanupLib: Locate VarCheck protocol when using
Do not locate VarCheck protocol in Constructor, then the
gEdkiiVarCheckProtocolGuid could be removed from [Depex].
It will be more flexible for the library Consumer to work without VarCheck
protocol installed, for example at recovery boot mode with EmuRuntimeDxe.

The unused UefiLib is also been removed from [LibraryClasses] in *.inf.

Cc: Ruiyu Ni <ruiyu.ni@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: Ruiyu Ni <ruiyu.ni@intel.com>
2016-03-18 15:14:34 +08:00
Jiaxin Wu 6ddc2e438b MdeModulePkg: Coding style update for DxeHttpLib.inf
Cc: Fu Siyuan <siyuan.fu@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: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
2016-03-16 14:01:26 +08:00
Dandan Bi c7d310dd16 MdeModulePkg: Refine the UI code
Remove the ASSERT in UI code that may be triggered,
and clean up the useless code.

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:41:25 +08:00
Ghazi Belaam 558b99a6a3 ModulePkg/DxeHttpLib: Adding Functions to HttpLib
There some usefull functions in edk2 private modules that could be used,
so we added them to the httpLib

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ghazi Belaam <Ghazi.belaam@hpe.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
2016-03-10 09:51:42 +08:00
Cinnamon Shia 7c50b34343 MdeModulePkg: Increase the maximum number of PEI performance log entries
The maximum number of PEI performance log entries is 255.
Add a new PCD, PcdMaxPeiPerformanceLogEntries16, to increase the maximum
number of PEI performance log entries.

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>
Reviewed-by: Joseph Shifflett <joseph.shifflett@hpe.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
2016-03-08 21:00:04 +08:00
Ruiyu Ni e4c7cefe3d MdeModulePkg/Bds: More user-friendly network boot option description
The patch enhances the UefiBootManagerLib to use more user-friendly
network boot option description.
It builds description like below:
 "PXEv6 (MAC:112233445566 VLAN1)"
 "HTTPv4 (MAC:112233445566)"

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
2016-03-07 13:35:43 +08:00
Ruiyu Ni 1f2e80af22 MdeModulePkg/UefiBootManagerLib: Separate boot description functions.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
2016-03-07 13:35:43 +08:00
Ruiyu Ni eeab16c88d MdeModulePkg/Bds: Fix VS2010/VS2012 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>
2016-03-07 13:34:21 +08:00
Ruiyu Ni f5c12172f1 MdeModulePkg/Bds: Support booting from remote file system.
Enhance BDS to support booting from a remote file system exposed
by a HTTP boot option.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-03-04 16:00:50 +08:00
Ruiyu Ni 4a285ec18d MdeModulePkg/Bds: Support short-form URI boot.
The patch adds short-form URI boot support to follow
UEFI Spec.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-03-04 16:00:50 +08:00
Ruiyu Ni bf5328f088 MdeModulePkg/Bds: Wide match HTTP boot option.
Enhance BDS to wide match the HTTP boot option without matching
the specific device path data in IP device path and URI device
path node.
It's to follow UEFI Spec 2.6.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-03-04 16:00:50 +08:00
Ruiyu Ni 525839edeb MdeModulePkg/Bds: Refine the code to load file from FV.
Change BmGetFileBufferByMemmapFv to BmGetFileBufferByFvFilePath.
The original function gets the file buffer only from memory mapped
FV device path and leaves GUIDed FV device path to the code below;
The new function gets the file buffer from both formats of FV device
paths.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
2016-03-04 16:00:50 +08:00
Ruiyu Ni eea222ced0 MdeModulePkg/PciHostBridgeLib: Correct the function header comments
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
2016-03-03 18:24:25 +01:00
Dandan Bi d0d34cdf1d MdeModulePkg: Add ASSERT to make sure pointers are not NULL
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-02 15:18:56 +08:00
Dandan Bi 1b96026e14 MdeModulePkg: FileExplorerLib: Modify the EFI_FILE_EXPLORE_FORMSET_GUID
Currently the EFI_FILE_EXPLORE_FORMSET_GUID value in BdsDxe in
IntelFrameworkModulePkg is same with the GUID VALUE in FileExplorerLib.
This patch is to modify the EFI_FILE_EXPLORE_FORMSET_GUID in
FileExplorerLib to avoid 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>
2016-03-02 15:16:45 +08:00
Dandan Bi bbd6b0106e MdeModulePkg: FileExplorerLib: Add check when to call FreePool function
when free up resource allocated for a MenuEntry, there exists
the case that the DevicePath and DisplayString are NULL,
so before calling FreePool function, need to check.

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-02 12:10:15 +08:00
Fu Siyuan 6796629dbb MdeModulePkg: Add new API HttpUrlGetPath() to HttpLib.h
This patch is to add a new interface to get the "Path" component according to
the URI parse result, it would be helpful for the library user to extract the
file path value in a URI.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Wu Jiaxin <jiaxin.wu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-03-01 10:41:45 +08:00
Laszlo Ersek 9b6b938538 MdeModulePkg: PciHostBridgeLibNull: rewrap source to 79 characters
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Marcel Apfelbaum <marcel@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2016-02-29 13:08:58 +01:00
Dandan Bi 48c18bd166 MdeModulePkg: Add ASSERT to make sure pointer 'OptionalData' not be NULL
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: Liming Gao <liming.gao@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
2016-02-26 16:47:07 +08:00
Dandan Bi 97033ebfa3 MdeModulePkg: Fix the build fail issue on VS2008\VS2010\GCC
This is caused by my last commit,the LoadOption may
not initialize when call FreePool, and after investigation,
find that we can delete the LoadOption variable, this patch
is to 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>
2016-02-25 11:06:19 +08:00
Dandan Bi 2ba36b2f0e MdeModulePkg: Refine the code in BootMaintenanceManagerUiLib
Refine the code in function Var_UpdateDriverOption and Var_UpdateBootOption,
use the existed API(EfiBootManagerInitializeLoadOption and
EfiBootManagerAddLoadOptionVariable) supplied by UefiBootManagerLib
to replace the same logic in the two functions. And remove the useless
code.

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-23 17:03:21 +08:00
Jiaxin Wu dba6e9a935 MdeModulePkg: Define a general function to create DNS QName
This patch is used to define a general function to create
DNS QName.
QName is a domain name represented as a sequence
of labels, where each label consists of a length octet
followed by that number of octets. The domain name terminates
with the zero length octet for the null label of the root.

Cc: Hegde Nagaraj P <nagaraj-p.hegde@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: Hegde Nagaraj P <nagaraj-p.hegde@hpe.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
2016-02-18 13:07:56 +08:00
Dandan Bi 3910f66918 MdeModulePkg:Modify related files because of rename action
Rename DeviceManagerLib,need to modify these files.

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@19667 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 03:30:57 +00:00
Dandan Bi 0b6d3330d8 MdeModulePkg:Rename DeviceManagerLib to DeviceManagerUiLib
Avoid any confusion,add the keyword "Ui",
user can understand the use of the library clearly.

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@19666 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 03:30:33 +00:00
Dandan Bi 120c88936d MdeModulePkg:Modify relative files because of rename action
Rename BootManagerLib,need to modify these files.

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@19665 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 03:30:02 +00:00
Dandan Bi d513b3ddcc MdeModulePkg:Rename BootManagerLib to BootManagerUiLib
Avoid any confusion,add the keyword "Ui",
user can understand the use of the library clearly.

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@19664 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 03:29:40 +00:00
Dandan Bi 13c4e86462 MdeModulePkg:Modify the inf file and c file because of the rename action
Rename BootMaintenanceManagerLib,need to modify these files.

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@19663 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 03:29:10 +00:00
Dandan Bi 67013151ba MdeModulePkg:Rename BootMaintenanceManagerLib to BootMaintenanceManagerUiLib
Avoid any confusion,add the keyword "Ui",
user can understand the use of the library clearly.

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@19662 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-19 03:28:46 +00:00
Ruiyu Ni 7ff66d3c4a MdeModulePkg: Add PciHostBridgeLibNull
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@19656 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-18 04:49:54 +00:00
Hao Wu 4977ee965f MdeModulePkg BaseSerialPortLib: Fix VS2010 build error
When overriding compiler options '/GL' with '/GL-', VS2010 will report
warning C4701 potentially uninitialized local variable for 'LcrParity'
and 'LcrStop' in function SerialPortSetAttributes().

This commit fixes this build issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19628 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-11 00:34:15 +00:00
Ruiyu Ni 2e26862c6d MdeModulePkg: DeleteLoadOptionVariable() removes Boot####
Change EfiBootManagerDeleteLoadOptionVariable() to not just
remove #### from BootOrder but also remove Boot#### variable.

The old behavior tries to do less for performance but it leaves
unreferenced Boot#### which cannot be reclaimed in variable
reclaim operation though the Boot#### will be eventually be overwritten
by EfiBootManagerAddLoadOptionVariable().

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@19626 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-08 07:16:22 +00:00
Eric Dong 20fe162556 Refine error handle code, avoid assert when load this module twice.
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@19625 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-08 05:21:55 +00:00
Hao Wu 8a1c4a8cf9 MdeModulePkg DxeHttpLib: Fix typos in function descriptions
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@19597 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 01:11:00 +00:00
Dandan Bi f79865264f MdeModulePkg:Change the type of BootNext
Currently the invalid boot next set to the number of boot option,
when add a new boot option,also need update the boot next value,
otherwise it will be incorrect.Now set the type of BootNext value
to UINT32,the number out of the range of UINT16 means it is an
invalid BootNext Value.

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@19591 6f19259b-4bc3-4df7-8a09-765794883524
2016-01-06 00:55:12 +00:00
Liming Gao 28bf7f2370 MdeModulePkg: Add the missing library uni files of UI instances
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@19508 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24 02:29:58 +00:00
Liming Gao 0666a04c2d MdeModulePkg: Add the missing Library uni files of ImageDecode instances
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19507 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24 02:29:23 +00:00
Liming Gao 04378ba694 MdeModulePkg: Add the missing Library uni files of Ipmi instances
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19506 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-24 02:28:45 +00:00
Daocheng Bu 12166c2f1b MdeModulePkg: Add SmmIpmiLibSmmIpmiProtocol Library Instance.
Add SmmIpmiLibSmmIpmiProtocol Library Instance based on
Ipmi smm protocol in SMM mode.

In V5, change for code style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19490 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23 08:18:14 +00:00
Daocheng Bu ddff9ce318 MdeModulePkg: Add DxeIpmiLibIpmiProtocol Library Instance.
Add DxeIpmiLibIpmiProtocol Library Instance based on
Ipmi Protocol in DXE phase.

In V5,change for coding style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19489 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23 08:17:50 +00:00
Daocheng Bu 0f2bca7642 MdeModulePkg: Add PeiIpmiLibIpmiPpi Library Instance.
Add PeiIpmiLibIpmiPpi Library Instance based on Ipmi Ppi.

In V5, change for code style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19488 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23 08:17:26 +00:00
Daocheng Bu 92cd1682aa MdeModulePkg: Add BaseIpmiLib Null Library Instance.
Add BaseIpmiLib Null Library Instance for BMC-LESS
platform.

In V5, change for coding style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Daocheng Bu <daocheng.bu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19487 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-23 08:17:02 +00:00
Dandan Bi 1b43162d70 MdeModulePkg:Clear the screen before booting the boot option
When do UiApp remodeling task,miss clearing the screen before booting
the selected boot option,so cause some behaviors change.Now add the code
to 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@19441 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-22 09:37:33 +00:00
Dandan Bi 0034796f6c MdeModulePkg:Update Boot Manager form when enter it.
Currently BootManager is an independent library,used by UiApp.It only load boot
option when enter UiApp.So when add boot option through boot maintenance manager,
it will not display in boot manager. In order to fix this issue,now we update the
boot manager form every time we enter 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@19440 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-22 09:16:21 +00:00
Zhang Lubo 47bda627ee MdeModulePkg:Fix a bug HttpLib can't parse last chunked data well
When HttpLib parsing the last chunked data down, the Http NextMsg pointer
in the HttpBodyParserCallback function should point to the character
after '/n' flag.

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19310 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-17 01:12:11 +00:00
Eric Dong 850ba6a953 FileExplorerLib: Remove the useless code.
The caller has initial the input parameter before call this function, So this code is useless.

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@19302 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 11:54:50 +00:00
Eric Dong bd69e72c8a BootManagerLib: Check the pointer to avoid 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@19301 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 11:48:27 +00:00
Eric Dong 4c8274a0d7 MdeModulePkg FileExplorerLib: 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@19297 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 03:21:44 +00:00
Eric Dong 426ddd0b6a MdeModulePkg DxeFileExplorerProtocol: 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@19296 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-16 03:20:21 +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
Eric Dong f0afe75ff8 DeviceManagerLib: Update copyright, use BSD license instead of Intel license.
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@19171 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08 13:49:40 +00:00
Eric Dong 91afa21006 BootMaintenanceManagerLib: Update copyright, use BSD license instead of Intel license.
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@19170 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08 13:49:15 +00:00
Eric Dong 5ea7178725 FileExplorerLib: Update copyright, use BSD license instead of Intel license.
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@19169 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08 13:48:35 +00:00
Eric Dong f3b006c852 BootManagerLib: Update copyright, use BSD license instead of Intel license.
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@19168 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08 13:47:23 +00:00
Dandan Bi e750958bbc MdeModulePkg: Use PcdSet##S to replace PcdSet##
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19166 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-08 08:03:42 +00:00
Chao Zhang 0f4f6d202a MdeModulePkg: VarCheckUefiLib: Add DeployedMode/AuditMode var check logic
DeployedMode & AuditMode are UINT8 Global variable according to Enable Secure Boot feature defined in UEFI2.5 Mantis 1263. Add them to var check list.
  https://mantis.uefi.org/mantis/view.php?id=1263

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Zeng Star <star.zeng@intel.com>
Reviewed-by: Long Qin <qin.long@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19131 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-07 06:15:49 +00:00
Baraneedharan Anbazhagan 39eccb9c66 MdeModulePkg: DebugAssert enhancement
If the assert happens in a library, then it's hard to determine which module
using that library is generating that assert. Use gEfiCallerBaseName in
DebugAssert to display the module name.

V2: Updated code to use copy mem and ModuleNameSize calculation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@19128 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-07 03:06:30 +00:00
Ruiyu Ni 911f3dede2 MdeModulePkg/BootLogoLib: Fix INF comments to follow coding standards
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@19083 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-01 06:56:36 +00:00
Ruiyu Ni ecbff74945 MdeModulePkg/BmpImageDecoderLib: Fix function header comments
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@19082 6f19259b-4bc3-4df7-8a09-765794883524
2015-12-01 06:52:44 +00:00
Dandan Bi cd32c66f94 MdeModulePkg:Replace unsafe string function with safe one.
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@19029 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-30 07:26:07 +00:00
Ruiyu Ni 404bd44294 MdeModulePkg/BDS: Do not pass unnecessary option to boot option
BDS puts a special GUID in boot option optional data for
auto-discovered boot option. But when launching that boot
option, the BDS core unconditionally pass the special GUID
to the executable.

A good written application/OS loader can ignore the unexpected
parameters, but BDS core should still avoid passing the
unnecessary 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@19007 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-30 03:08:49 +00:00
Dandan Bi 21f9922e3c MdeModulePkg:Refine the comments in INF files
Add comments in INF file in BootMaintenanceManagerLib.inf.
Refine the comments in INF file in FileExplorerLib.inf

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@18975 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 10:00:12 +00:00
Star Zeng c0e6c39315 MdeModulePkg BaseSerialPortLib16550:Implement Get(Set)Control/SetAttributes
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 D Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18965 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-26 08:47:44 +00:00
Zhang Lubo b8b65a0320 MdeModulePkg: Clean code to follow C Coding style.
Clean code to follow C Coding style.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18943 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-25 08:08:25 +00:00
Ruiyu Ni 665b26ba33 MdeModulePkg/UefiBootManagerLib: Always create MemoryTypeInfo variable
Align to old BDS behavior (IntelFrameworkModulePkg/BDS) to always create
MemoryTypeInfo variable regardless of the PcdResetOnMemoryTypeInformationChange
value.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18926 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-24 06:56:05 +00:00
Dandan Bi 4af04335ac MdeModulePkg:Create Boot Maintenance Manager Library
Split the boot maintenance manager library from UiApp in MdeModulePkg/Application
and put the library in MdeModulePkg/Library.

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@18923 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 09:34:55 +00:00
Dandan Bi 32465d9ae7 MdeModulePkg:Create Device Manager Library
Split the device manager library from UiApp in MdeModulePkg/Application
and put the library in MdeModulePkg/Library.

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@18922 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 09:33:42 +00:00
Dandan Bi 3a2dc0f5a9 MdeModulePkg:Create Boot Manager Library
Split the boot manager library from UiApp in MdeModulePkg/Application
and put the library in MdeModulePkg/Library.

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@18921 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 09:32:08 +00:00
Eric Dong 78b6eb659d MdeModulePkg DxeFileExplorerProtocol: Create wrapper fileexplorer library.
This library wrapper explorer protocol and produce the file explorer library.

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@18919 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 05:42:50 +00:00
Eric Dong ba529e7e5a MdeModulePkg FileExplorerLib: Create file explorer library.
This library support select one file from the specified directory or from system root directory.

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@18917 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 05:41:28 +00:00
Ruiyu Ni 8084b26e92 MdeModulePkg/BootLogoLib: Fix GCC 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@18916 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-23 00:48:46 +00:00
Star Zeng 02018760ca MdeModulePkg BaseSerialPortLib16550: Fix typo in SerialPortWrite()
The "read" word in SerialPortWrite() header comment block should be
"write".

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

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18910 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-20 01:51:15 +00:00
Ruiyu Ni b9335cf562 MdeModulePkg: Change BootLogoEnableLogo use INTN for minus value
The parameter name is also changed from Coordinate* to Offset* to
reflect that it's the offset to the location specified by Attribute.
For example, when the Attribute is Center, OffsetX and OffsetY are
used to specify the offset to the Center. OffsetX = 100 means
100 pixels right to the Center.

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@18867 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-18 05:05:22 +00:00
Ruiyu Ni 51b655a8a0 MdeModulePkg/VarCheck: Add VarCheck handler for PlatformRecovery####
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18864 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:16:02 +00:00
Ruiyu Ni 780e05caec MdeModulePkg: Add Platform recovery support
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@18859 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:11:44 +00:00
Ruiyu Ni ccb66799e3 MdeModulePkg: Support to expand File device path
To support platform recovery, File device path expanding capability
is added.

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@18858 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:10:54 +00:00
Ruiyu Ni 121300c452 MdeModulePkg: Use BmForEachVariable to collect all key options
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@18857 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:10:16 +00:00
Ruiyu Ni f9a24380b8 MdeModulePkg: Use BM_OPTION_NAME_LEN instead of sizeof L"Boot####"
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@18856 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:09:25 +00:00
Ruiyu Ni 418e8cd924 MdeModulePkg: Use BmCharToUint in BmIsKeyOptionVariable
The patch also moves the BmCharToUint to BmMisc.c because it
belongs to misc functions.

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@18855 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:08:40 +00:00
Ruiyu Ni d95ff8e8d8 MdeModulePkg: Add Bm prefix for internal functions
Change VARIABLE_VISITOR to BM_VARIABLE_VISITOR
Change ForEachVariable to BmForEachVariable

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@18854 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-17 10:07:43 +00:00
Laszlo Ersek bd3afeb1d6 MdeModulePkg: SmmLockBoxPeiLib: work without EFI_PEI_SMM_COMMUNICATION_PPI
The RestoreLockBox() and RestoreAllLockBoxInPlace() functions handle the
case when EFI_PEI_SMM_COMMUNICATION_PPI.Communicate() returns
EFI_NOT_STARTED: they access the SMRAM directly, for restoring LockBox
data.

This occurs if a PEIM needs to restore LockBox data *before* the SMBASE is
relocated and the SMI handler is installed for all processors.

One such PEIM is UefiCpuPkg/Universal/Acpi/S3Resume2Pei. On the S3 resume
path, in function S3RestoreConfig2(), LockBox data are restored *before*
the SmmRestoreCpu() function of UefiCpuPkg/PiSmmCpuDxeSmm is called via
SmmS3ResumeState->SmmS3ResumeEntryPoint. (The latter SmmRestoreCpu()
function is responsible for the SMBASE relocation.)

If a platform knows that its PEIMs restore LockBox data *only* before
SMBASE relocation -- e.g., due to S3Resume2Pei being the platform's only
SmmLockBoxPeiLib client --, then the platform might not want to include
"UefiCpuPkg/PiSmmCommunication/PiSmmCommunicationPei.inf" at all (hence
not provide EFI_PEI_SMM_COMMUNICATION_PPI) -- because all of those
restores would be serviced by direct SMRAM access anyway.

Currently the absence of EFI_PEI_SMM_COMMUNICATION_PPI is not supported by
SmmLockBoxPeiLib, but it's not hard to implement. Handle it the same as
when EFI_PEI_SMM_COMMUNICATION_PPI.Communicate() returns EFI_NOT_STARTED:
restore LockBox data directly from SMRAM.

Suggested-by: Jiewen Yao <jiewen.yao@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18823 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-16 18:29:14 +00:00
Ruiyu Ni b3535ab4ef MdeModulePkg/BmpImageDecoderLib: Support ImageFormatUnknown type
Enhance the library to handle unknown image format.

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@18774 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 07:14:40 +00:00
Ruiyu Ni 8dfe7fd239 MdeModulePkg: Add BootLogoLib to provide interfaces about logo display.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@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@18772 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 05:23:25 +00:00
Ruiyu Ni 328de7ae41 MdeModulePkg: Add BmpImageDecoderLib to provide BMP decoding capability
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@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@18771 6f19259b-4bc3-4df7-8a09-765794883524
2015-11-12 05:22:21 +00:00