Age | Commit message (Collapse) | Author |
|
This patch is used to update ping command options to sync
with shell2.2 Spec.
Considering the backward compatible issue, the patch keeps
ā-_sā command option unchanged, only add the new option '-s'
and make the old option '-_s' function same as new one.
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 0b42d7d8a34a99a02becf4dece78481d3cd2b2fc)
|
|
the performance.
Currently UEFI Shell reads variable storage to get the environment
variables every time running a new command. And reading(writing)
UEFI variables is a high cost operation on most platforms. In order
to enhance the performance this patch read the variable storage once
and cache the environment variables in memory. Every further 'set'
command will save the variable not only to Shell cache, but also the
flash variable storage.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by:Ruiyu Ni <ruiyu.ni@intel.com>
(cherry picked from commit b62bb8854fc5ab36b9b88f8bee9a276558bbcd96)
|
|
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
(cherry picked from commit 06ac66ecb6c1b5d2bf712e84c0a36add6a262015)
|
|
Shell will ASSERT when doing the following operation:
""
Shell> mv fs2:\file1 fs2:\file2
""
This patch add NULL pointer check to fix this issue.
Fixes: https://github.com/tianocore/edk2/issues/76
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(cherry picked from commit 64ee6ed72ad5c1e4b7c9a96f419c3592e93314ad)
|
|
For Boolean values not use explicit comparisons to TRUE or FALSE. For non-Boolean
comparisons we should use a compare operator.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit ac14846aad016a1f88ebe4a09e00779dd03fcf88)
|
|
The allocated memory of ParamPackage is not freed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
(cherry picked from commit 3751a092b67f2d3481fa2295cb45a0afda6a9118)
|
|
The BuildOptions for AARCH64 in Application/Shell/Shell.inf only affect
the core Shell binary, and not the Shell component libraries which are
merged into the final Shell binary via NULL library class resolution.
This means we need to override the UEFI_APPLICATION build options in
the platform .DSC anyway, there is no point in setting these options
here as well. So remove them.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
(cherry picked from commit 481b93f7f00feb9bbc9e5a412c5065c0740b20f4)
|
|
Pass in GUID* for the GUID reference in a CatSPrint statement. Issue was noticed when running "dh -d -v" command on a system with a PCI NIC installed.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
(cherry picked from commit 5d54bbec2ce3861d646fbbd19072b1c3c1537f17)
|
|
Remove variable FStartRow that is declared, assigned but never referenced.
This fixes a warning emitted by GCC when -Wunused-but-set-variable is in
effect.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Liming Gao <liming.gao@intel.com>
(cherry picked from commit e36ed7a84b2768443de22371f0aad5cf502328b1)
|
|
Protocol Image Descriptor Information.
Modify 'dh' shell command to dump FirmwareManagement Protocol information.
Add FirmwareManagement image descriptor V1 and V2 structure definition in UefiHandleParsingLib.h to support decoding V1/V2 revisions.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 8985d6127afc380ce10212a3eb7bb04bc5630380)
|
|
1. Make the USB mouse cursor move smoothly in 'edit'.
2. Make the USB mouse can drag and select text in 'edit'.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit ee60bd2b6aa473fdff6af3bfc62203ed8ca5c52a)
|
|
Remove the unused local variable to refine the code.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Cc:Ard Biesheuvel <ard.biesheuvel@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(cherry picked from commit 19c427a7ce6f5e036270543086c3e15c09c27e81)
|
|
This patch makes Shell support -nonesting invocation option. This option
specifies that EFI_SHELL_PROTOCOL.Execute API nesting of a new Shell
instance is optional and dependent on the 'nonesting' Shell environment
variable.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jim Dailey <Jim_Dailey@Dell.com>
(cherry picked from commit dcbdb8bfb026588cb888949c2c0adb43687935f3)
|
|
Free 'FoundFileList' when read 'TAB' key fail to avoid memory leak and ASSERT.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(cherry picked from commit 9c17810a3635f6c0ca2afa78e3ec05bbb807d4be)
|
|
Use DOS format end of line(CR, LF).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 231ad7d8660d674d95fc4e03361338ac573c1f9f)
|
|
Support UEFI shell execution break.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Samer EL-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 196ccda08fc481dae4fc97db8f2938df87801edb)
|
|
According to the new Shell spec, we add Network2 profile and
merge Ping6 and Ifconfig6 tools to Shell command.
Cc: Carsey Jaben <jaben.carsey@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.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: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-By: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
(cherry picked from commit 43ca17532bd7292eee5ad979e26b19ddd0d3e55a)
|
|
Fix SMBIOSVIEW decode of the HeaderLog fields of the PCIe
AER structure . The PCIe 2.1 Base Specification, section 7.10, lists
this as 16 bytes, or 4 DWORDs.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 2c328aca1d5dfd99e7541d85db63318be3d4da62)
|
|
This patch is used to update ifconfig -r implementation
to sync with UEFI Shell 2.2.
option -r means to reconfigure all or specified interface,
and set DHCP policy. If specified interface is already set
to DHCP, then refresh the IPv4 configuration.
If the interface name is specified
with '-r', DHCP DORA process will be triggered by the policy
transition (static -> dhcp).
Cc: Ye Ting <ting.ye@intel.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Carsey Jaben <jaben.carsey@intel.com>
Cc: El-Haj-Mahmoud Samer <samer.el-haj-mahmoud@hpe.com>
Cc: Subramanian Sriram <sriram-s@hpe.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
(cherry picked from commit 913ba15120b4dfa58fb90e859161ccf976015321)
|
|
If data of any real size were to be piped from one command to another,
an inordinate amount of time could be taken up by reallocating memory
that is only 10 bytes bigger than what is currently needed. Also, this
could cause unwelcome memory fragmentation.
Added a define to control how much memory is reallocated beyond that
which is currently needed. Set it to 1K vs. the original 10 bytes.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit c8d9d0e2bd376cbbe6a37da786784e7fc736c7d9)
|
|
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit d73fc181e722d787581eef7b6dc41b2550236fd8)
|
|
The shell uses the memory file structure to manage temporary files in
memory that support piping of output from one command into the the
input of another command. The BufferSize member is the size of the
internal buffer, not the size of the data that was written to the
file. So, it was possible to read beyond the EOF of these files as
reads used BufferSize. Now FileSize tracks the actual size of these
files (the number of bytes written, not the number of bytes available
in the buffer), and the reads use this member.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 7bcd3ff611821e9f3f05207ebf157e30d030795b)
|
|
'd6cf1af9' is associated with '3d0a49ad' commit. So, this patch is
used to respond the revert for '3d0a49ad' to adapt the Ipv4 config
policy update.
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: Fu Siyuan <siyuan.fu@intel.com>
Reviewed-by: Ye Ting <ting.ye@intel.com>
(cherry picked from commit db54ae0845e321e4cce35f0ccbb16b7fcb2b57db)
|
|
If the BOM is stripped from StdIn, then an app that duplicates StdIn
will not be able to duplicate, say, a UCS2 file that was piped into
it (the output file it creates would not start with a BOM).
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
Reviewed-by: Jaben Carsey <Jaben.Carsey@intel.com>
(cherry picked from commit 0b966ddd61a90b3ba116c2eeaa93ee4247832a1a)
|
|
USB mouse cursor cannot move unless the left button is down. The patch
refresh the FileBuffer of Editor every time when the 'MainEditorRefresh'
is called to fix this bug.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
(cherry picked from commit fb9dd8322532cd71d897b3b5690a3d2268bb1603)
|
|
UEFI Shell scandalizes the help message in spec level so that a standalone
UEFI shell application can never get "-?" switch, instead the Shell core
(interpreter) detects the "-?" and finds .MAN file for that shell
application in certain spec defined paths, then show the help extracted
from that .MAN file.
But it means distributing a UEFI shell application not only means
distributing a .EFI file but also distributing a .MAN file. If the text
formatted .MAN file is corrupted (edited by user by mistake), or is
missing (deleted by user by mistake), no help will be shown to user.
So this patch enhance the Shell to make it support finding help message
imbedded in resource section of application image.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
(cherry picked from commit 8d4eec6d97db143d9568631102c2027ed594eadb)
|
|
Do NULL pointer check before the pointer is used to avoid dereferenced.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit e3b76f3b5e80df1219fb4adf0199b9606e84b8e7)
|
|
When the last line in a script file is not an empty line the Shell
will not execute the command in the last line. The patch refine the
logic in function 'ShellFileHandleReturnLine' and fix the issue.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
(cherry picked from commit f79d7b62ba11db018db7bd489dd44051bfc067ae)
|
|
The pointer 'FileInterface->Buffer' returned from 'AllocateZeroPool' in function
'CreateFileInterfaceMem' may be NULL and will be dereferenced at the following code.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 9eec4d38c027e9eb95c545875a1f847f0cb3dcbf)
|
|
Replace gBS->LocateHandle with gBS->LocateHandleBuffer
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Cinnamon Shia <cinnamon.shia@hpe.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com>
(cherry picked from commit 64c51ed181545f2c9914ad49c8dcbabe2f9a32e2)
|
|
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <Jim_Dailey@Dell.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 1095b4323dab2e64e71bf7896ea88a0eb5d64706)
|
|
Fix various errors when piping a UNICODE or ASCII file to a simple shell application that reads standard input and writes it to standard output.
1) When the memory file is created by CreateFileInferfaceMem() to capture the pipe output, no UNICODE BOM is written to the memory file. Later, when the memory file is read by the application using ShellFileHandleReadLine(), the function indicates that the file is ASCII because there is no BOM.
2) If the file is piped as ASCII, the ASCII memory image is not correctly created by FileInterfaceMemWrite() as each ASCII character is followed by '\0' in the image (when the ASCII data is written to the memory image, the file position should only be incremented by half the buffer size).
3) ShellFileHandleReadLine() does not read ASCII files correctly (writes to Buffer need to be cast as CHAR8*).
4) FileInterfaceMemRead() and FileInterfaceMemWrite() as somewhat hard to read and difficult to debug with certain tools due to the typecasting of This. Added a local variable (MemFile) of the correct type to these functions and used it instead of This.
Enhancement: ShellFileHandleReadLine() now returns EFI_END_OF_FILE when appropriate.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit d2a0d2e6acea4d6a3dbe31b68a9a7fe7511cb478)
|
|
An earlier change had this function returning the type of lines that were in
the file being read (ASCII or UCS2). The way it is used, UCS2 output is
expected, even when the file being read is ASCII. This change restores that
behavior and documents it.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <Jim_Dailey@Dell.com>
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 2dda8a12329700f9026236d83be4de9e5369f97f)
|
|
Fix various errors when piping a UNICODE or ASCII file to a simple shell application that reads standard input and writes it to standard output.
1) When the memory file is created by CreateFileInferfaceMem() to capture the pipe output, no UNICODE BOM is written to the memory file. Later, when the memory file is read by the application using ShellFileHandleReadLine(), the function indicates that the file is ASCII because there is no BOM.
2) If the file is piped as ASCII, the ASCII memory image is not correctly created by FileInterfaceMemWrite() as each ASCII character is followed by '\0' in the image (when the ASCII data is written to the memory image, the file position should only be incremented by half the buffer size).
3) ShellFileHandleReadLine() does not read ASCII files correctly (writes to Buffer need to be cast as CHAR8*).
4) FileInterfaceMemRead() and FileInterfaceMemWrite() as somewhat hard to read and difficult to debug with certain tools due to the typecasting of This. Added a local variable (MemFile) of the correct type to these functions and used it instead of This.
Enhancement: ShellFileHandleReadLine() now returns EFI_END_OF_FILE when appropriate.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jim Dailey <jim_dailey@dell.com>
reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
(cherry picked from commit 9ed21946c76e430097e9c4e59b419af928e0cb8c)
|
|
Refine the code to use 'sizeof(EFI_LOAD_OPTION)' as offset in buffer to get 'description' instead of using a constant number.
This change makes the code more readable.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-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@19746 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit aed8c66dac8731e8175cdeaff78e24c1ff728b90)
|
|
The changes due to the previous patches should be reflected in a higher
minor version number.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Suggested-by: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19719 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit af3e209f93d42263bc8949e03b17d5bd3640db11)
|
|
The DumpHex() function produces very friendly output (known from DMPSTORE,
for example); let's use it with "BCFG -v" as well.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19718 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 2de293cd96294c314999e6935b46d6d12d2091f9)
|
|
The UEFI Shell specification classifies shell commands into various shell
levels / profiles.
Currently the DumpHex() internal function is only used by commands that
belong to the Debug1 profile exclusively (i.e., they are not required to
be present in other than Debug1 profiles):
- SMBIOSVIEW
- PCI
- DMPSTORE
- DMEM
- DBLK
In the next patch, we'd like to call DumpHex() from BCFG as well. However,
BCFG is not only required to be present in the Debug1 profile; the
Install1 profile contains BCFG as well. For this reason, move DumpHex()
from UefiShellDebug1CommandsLib to the more generic UefiShellCommandLib,
which "Provides interface to shell internal functions for shell commands".
The matching header file is "ShellPkg/Include/Library/ShellCommandLib.h".
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19717 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 3bd89603625eb451b166ee64676c2b31818d1a1f)
|
|
This is likely a copy & paste error from the preceding ShellPrintHiiEx()
function call. ShellPrintEx() takes no Language parameter, so remove the
NULL argument, which is currently misinterpreted as a format string.
This bug prevents the hexdump of optional data even when -v is passed to
BCFG, and optional data exist.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19716 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit cf3c9b1884b9918f9ea509c86c1765cea054ebaa)
|
|
In this cleaned up form of BcfgDisplayDump(), it is easier to see that the
OptionalDataOffset <= BufferSize
expression, used to report whether optional data are *absent*, is
incorrect. For any well-formed EFI_LOAD_OPTION, this inequality always
holds.
Optional data are present exactly if
OptionalDataOffset < BufferSize
therefore the absence condition is the negation of the above,
OptionalDataOffset >= BufferSize
This patch fixes the bug where BCFG always reports "Optional- N", even if
optional data exist.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19715 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 898962530445979706a2c17e2f8a8c5a573e4e77)
|
|
Eliminate some more repeated pointer arithmetic.
This patch too is only refactoring.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19714 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 5a5a659092ebc3936ecd18c3b78c6fc850d4af1c)
|
|
Copying and releasing each EFI_LOAD_OPTION.FilePathList under the name
DevPath is wasteful -- we only need FilePathList for a single conversion
to text. Do it directly from the EFI_LOAD_OPTION object.
This patch is not supposed to change observable behavior.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19713 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 40de6483ec902472dabf61332595194937f5c260)
|
|
Introduce two more helper variables to avoid repeated pointer arithmetic.
This patch is not supposed to change behavior.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19712 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 5dc03ade6adbb7e91ec7ce90045692154dbef2aa)
|
|
The Buffer variable points at the beginning of an EFI_LOAD_OPTION
structure. We might as well address the "FilePathListLength" member by
name, rather than with *(UINT16*)(Buffer+4).
This patch is not supposed to change behavior.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19711 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 3b6b1105cf31a3547d6157e912d72ec9ddc69a4b)
|
|
"3.1.1 Boot Manager Programming" in the UEFI 2.5 spec mandates that
Boot#### and similar options contain EFI_LOAD_OPTION structures. The
EFI_LOAD_OPTION structure encodes the fixed initial part of the payload,
and we can (and should) use it to enforce a minimum size for variable
contents.
This patch is meant as a safety improvement.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19710 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit e5945ef78463a2a90631c91e9f8cff109fd20625)
|
|
Don't exit the command immediately when a variable access fails; continue
processing after printing the error message. Let the final return status
reflect any encountered errors.
This patch is intended as a functional improvement.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19709 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 8f2c09f8b2a8708db49e42bcac4cdfbccfa817d8)
|
|
It will help with error handling if we move these initializations near the
top of the loop body.
This patch is not supposed to change behavior.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19708 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 43da602cb4e14efa921a359afb9c4c06c7138eba)
|
|
STR_GEN_PROBLEM_VAL, STR_GEN_TOO_MANY, and STR_BCFG_LOCATION_RANGE are not
used in the C source code. Remove them to decrease clutter.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19707 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit c7e97f6d4464d0adcc5f26c980e0b5a97064a6e0)
|
|
This patch incurs no functional changes, it just modifies some whitespace,
so we can separate these non-functional changes from the functional
changes in the next patches.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19706 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 15f8a738dda9c6f207e8194758a20641b1d3f4f5)
|
|
This enhancement is to use the FilePath field in the loaded image
protocol to find the name of an image as a fallback for when the
loaded image device path protocol is not installed on the image handle.
This is necessary because the SMM core does not install the loaded
image device path protocol, so DP was displaying "Unknown Driver Name"
for every SMM driver.
Cc: Liming Gao <liming.gao@intel.com>
Cc: Jaben Carsey <jaben.carsey@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: Liming Gao <liming.gao@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19683 6f19259b-4bc3-4df7-8a09-765794883524
(cherry picked from commit 3b672240e6c77ccf3f5cc0f3e8dbf026fc9e2751)
|