summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-07-13ShellPkg: ShellFileHandleReadLine must return UCS2 lines.Jim Dailey
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)
2016-07-13ShellPkg: Fix ASCII and UNICODE file pipes.jaben carsey
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)
2016-07-13ShellPkg: Refine the code to avoid use a constant number as offset.Qiu Shumin
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)
2016-07-13ShellPkg: UefiShellBcfgCommandLib: bump VERSION_STRINGLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): print optional data with DumpHex()Laszlo Ersek
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)
2016-07-13ShellPkg: elevate DumpHex() from Debug1-internal to generic-internalLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): fix ShellPrintEx() call siteLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): fix reporting of OptionalDataLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): calculate OptionalDataOffset explicitlyLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): eliminate FilePathList duplicationLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): call Description[Size] by nameLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): address FilePathListLength by nameLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): enforce minimum size for Boot#### and co.Laszlo Ersek
"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)
2016-07-13ShellPkg: BcfgDisplayDump(): accumulate errorsLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): hoist NULL-init of DevPath[String]Laszlo Ersek
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)
2016-07-13ShellPkg: UefiShellBcfgCommandLib: drop unused string tokensLaszlo Ersek
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)
2016-07-13ShellPkg: BcfgDisplayDump(): update whitespace & layoutLaszlo Ersek
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)
2016-07-13ShellPkg UefiDpLib: Use Image->FilePath to get name for SMM driversStar Zeng
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)
2016-07-13ShellPkg: Add NOOPT target in ShellPkg.dscHao Wu
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-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@19679 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit 2a65e41012bcbbc4f20d180238a1519e55bf82ad)
2016-07-13ShellPkg: Update 'dh' command to reflect correct driver handle informationTapan Shah
'dh' command shows Supported EFI Specification Version value as DriverVersion. Changing it to 'SupportedEfiSpecVersion' to provide more accurate information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Samer El-Haj-Mahmoud <elhaj@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19648 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit ccdf8bcfe4df040f952f362999c8a3cc8a3bb738)
2016-07-13ShellPkg: Clean-up 'map' command error message handlingTapan Shah
Refactor 'map' command error handling code and add standard error message Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Tapan Shah <tapandshah@hpe.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19616 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit e49ecad0fa2f918eded65bc3477cfb64e4fb133a)
2016-07-13Revert "ShellPkg : Add UEFI_APPLICATION module type to ↵Laszlo Ersek
UefiShellInstall1CommandsLib.inf" SVN r19585 broke the OVMF build: > ShellPkg/Library/UefiShellInstall1CommandsLib/UefiShellInstall1CommandsLib.inf(20): > error 3001: MODULE_TYPE UEFI_DRIVER UEFI_APPLICATION is not supported > for EDK II, valid values are: > BASE SEC PEI_CORE PEIM DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER > DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_DRIVER UEFI_APPLICATION USER_DEFINED > SMM_CORE Revert the patch. Reported-by: Laszlo Ersek <lersek@redhat.com> Suggested-by: "El-Haj-Mahmoud, Samer" <samer.el-haj-mahmoud@hpe.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19610 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit bdc063e1347d84266bb86574a8d3e352edd1ab32)
2016-07-13ShellPkg: Make 'alias' can display a single alias name.Qiu Shumin
When we run command "alias cat" Shell print out "alias: Too few arguments". This patch makes value of single alias name can be displayed. 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@19608 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit 7f9c4a515adc08f831990ea721bba3f3fa933717)
2016-07-13ShellPkg: Fix Shell assert when mv a file to a NULL target.Qiu Shumin
When run command 'mv file ' the Shell assert. The patch refined the length of the buffer to fix this bug. 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@19607 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit 10e547ac2d4cf41df2cef1a7ac5ae45184e57d17)
2016-07-13ShellPkg : Add UEFI_APPLICATION module type to UefiShellInstall1CommandsLib.infSamer El-Haj-Mahmoud
Using UEFI_APPLICATION for all Shell app and libraries allows the use of different compiler flags for the Shell application itself and for other applications that are built separately that use Shell libraries. 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> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19585 6f19259b-4bc3-4df7-8a09-765794883524 (cherry picked from commit 76f9e333b4de7648ed79b3aec638ff6abfa4846f)
2016-07-13IntelFsp2Pkg SecFspSecPlatformLibNull: Remove MASM/GAS filesLiming Gao
Keep NASM file only for new added modules. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit f0fe58bc72e2efd8bb7e30bdf1d00e239664618f)
2016-07-13IntelFsp2Pkg BaseFspSwitchStackLib: Remove MASM/GAS filesLiming Gao
Keep NASM file only for new added modules. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit 01dbab7048ef01554ec1fb4bdf55ae823cf97214)
2016-07-13IntelFsp2Pkg BaseFspDebugLibSerialPort: Remove MASM/GAS filesLiming Gao
Keep NASM file only for new added modules. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit 119748ee58c44a084cfa0e919689d7651abdf01f)
2016-07-13IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Remove MASM/GAS filesLiming Gao
Keep NASM file only for new added modules. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit ce545345b1213134d601070cbf7771548ef3279c)
2016-07-13IntelFsp2WrapperPkg BaseFspWrapperApiLib: Remove MASM/GAS filesLiming Gao
Keep NASM file only for new added modules. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Giri Mudusuru <giri.p.mudusuru@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> (cherry picked from commit b422ddb2155826b20dad35099b23038efff94d62)
2016-07-13CryptoPkg BaseCryptLib: Init the content of struct 'CertCtx' before useHao Wu
Some fields in structure 'CertCtx' might be used uninitialized in function Pkcs7GetCertificatesList(). This commit makes sure that 'CertCtx' gets initialized before being used. Cc: Long Qin <qin.long@intel.com> Cc: Ye Ting <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> (cherry picked from commit 07cae0659795b4d6b59f67eabb8426c7c7742318)
2016-07-13CryptoPkg BaseCryptLib: Avoid passing NULL ptr to function BN_bn2bin()Hao Wu
This commit modifies the code logic to avoid passing NULL pointer to function BN_bn2bin(). Cc: Long Qin <qin.long@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: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> (cherry picked from commit 8824c6144c73fe4b6355df6dfaee3e80e068c3b1)
2016-07-13CryptoPkg: Fix typos in commentsGiri P Mudusuru
- availabe to available Cc: Qin Long <qin.long@intel.com> Cc: Ting Ye <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Giri P Mudusuru <giri.p.mudusuru@intel.com> Reviewed-by: Qin Long <qin.long@intel.com> (cherry picked from commit ab6cee31e7dd468f8656d7ca101bf783a0fe9b82)
2016-07-13CryptoPkg: update openssl to ignore RVCT 3079Eugene Cohen
Getting openssl 1.0.2g building with ARM RVCT requires a change to ignore an unset variable used before set was necessary. (NOTE: This was fixed in OpenSSL 1.1 HEAD with commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.) corrects x509_vfy.c(875): error C3017: ok may be used before being set Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Eugene Cohen <eugene@hp.com> Reviewed-by: Qin Long <qin.long@intel.com> (cherry picked from commit 179bcd31f320111adde639ebc3f69170be254c73)
2016-07-13CryptoPkg/SmmCryptLib: Enable AES support for SMM.Qin Long
Enable AES cipher support for SmmCryptLib instance. Cc: Ting Ye <ting.ye@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qin Long <qin.long@intel.com> Reviewed-by: Ting Ye <ting.ye@intel.com> (cherry picked from commit bfba88bc68eed24c71ff500b740c3f563531d49c)
2016-07-13BaseTools: Add support for $(FAMILY) macroYonghong Zhu
Build spec mentions $(FAMILY) macro be used in DSC/FDF to specify the tool chain family, like GCC, MSFT. This patch add the support for this macro. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 40b4e21dbc6c4c3ba2a1748be97bf90acb3b45b8)
2016-07-13BaseTools Scripts: Add MemoryProfileSymbolGen.pyStar Zeng
This tool depends on DIA2Dump.exe (VS) or nm (gcc) to parse debug entry. Usage: MemoryProfileSymbolGen.py [--version] [-h] [--help] [-i inputfile [-o outputfile]] Copyright (c) 2016, Intel Corporation. All rights reserved. Options: --version show program's version number and exit -h, --help show this help message and exit -i INPUTFILENAME, --inputfile=INPUTFILENAME The input memory profile info file output from MemoryProfileInfo application in MdeModulePkg -o OUTPUTFILENAME, --outputfile=OUTPUTFILENAME The output memory profile info file with symbol, MemoryProfileInfoSymbol.txt will be used if it is not Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@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> (cherry picked from commit 1d9869f9e91605f6c099237eeb3414887f1258a9)
2016-07-13BaseTools ConvertMasmToNasm: Don't try to reconvert .nasm filesJordan Justen
We now check to see if the destination .nasm file already exists. If it does, then we don't try to convert the .asm to .nasm. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit ad00b0452e0c6cf09aecfe1b0cf64d81f191a507)
2016-07-13BaseTools ConvertMasmToNasm: Support preserving assembly filesJordan Justen
In the first stage of conversion, we need to preserve the AT&T style .s assembly files for use with OS X toolchains. This change allows '--keep=s' to be used with the script to preserve these files. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 5de927b54b9f4b314ec65bd2ae1d1908ceabd423)
2016-07-13BaseTools ConvertMasmToNasm: put filter/map result in tuple for python3Jordan Justen
Python 3's filter and map functions returns an iterator which you can't call len() on. Since we'll want to use len() later, we put the filter results into a tuple. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 90694f121865073c93123c41046349ca84eb1a25)
2016-07-13BaseTools ConvertMasmToNasm: Support ASM_PFX in .asm filesJordan Justen
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit c8102434ba8703ff3bd18d8f53675c2de3830f97)
2016-07-13BaseTools: ignore the binary LIB file in gen_libsYonghong Zhu
For single module build, it would call gen_libs target. then if it use binary LIB file, it cause build failure. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8832c79d6439adc09d7cc89b22268899026ff7f8)
2016-07-13BaseTools: fix the bug to build a compressed ROM image via .INF fileYonghong Zhu
Fix the bug that always use the '-e' as OPTROM_FLAGS even the .INF file has statement 'PCI_COMPRESS = TRUE'. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 9ccb26bc99465e16c00fa5cf5e5f43b12dc73f46)
2016-07-13BaseTools: Add error handling for current_dir is not existYonghong Zhu
Add the error handling to cover the case that current_dir is not exist. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 570ae1ebc857d27e73210e034fef0082df17dc29)
2016-07-13BaseTools: Bash script fix for PosixLike/LzmaF86CompressThomas Palmer
Add missing "done" token needed to complete the for loop. Tested in Ubuntu 14.04 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Thomas Palmer <thomas.palmer@hpe.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit f285d0213b135e14419833df0aa760e3748e8182)
2016-07-13BaseTools: Fix bad macro expansion during tools_def.txt parsingMichael Zimmermann
this is something I missed in 8ac46e4 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 6608330d76d50746aeba63a032d85a5389164a54)
2016-07-13BaseTools: add '!include' support to tools_def.txt parserMichael Zimmermann
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8ac46e4ef76ee56778430bb3dbcc545cce49d208)
2016-07-13BaseTools: Fix comments about return value of 'LoadToolDefFile'Michael Zimmermann
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Michael Zimmermann <sigmaepsilon92@gmail.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit 8b14b35b192dc57eb01e091b7bf32af3b0e960b3)
2016-07-13BaseTools: Fix GenFds issue to wrongly get file without postfix.Liming Gao
GenFds GenSection will search the output file based on the file extension. If the output file has no extension, it should be skip. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Andrew Fish <afish@apple.com> (cherry picked from commit 483b01d2da22bab88f0815a2f01025ea6b9333f5)
2016-07-13BaseTools/GenFds: enhance to get TOOL_CHAIN_TAG and TARGET valueYonghong Zhu
when user don't set TOOL_CHAIN_TAG and TARGET by –D Flag, then GenFds would report failure for format: FILE DATA = $(OUTPUT_DIRECTORY)/$(TARGET)_$(TOOL_CHAIN_TAG)/testfile so this patch enhance to get the TOOL_CHAIN_TAG and TARGET value by following priority (high to low): 1. the Macro value set by -D Flag; 2. Get the value by the -t/-b option. 3. get the value from target.txt file. Besides, this patch also remove the error checking for missing -t/-b option. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> (cherry picked from commit e4979beee9e5d334d97fd8e2c79670ad08587bc6)