summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-12-26Keep consistent about the return value between the caller and callee.Eric Dong
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@15021 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-25Update XhcWaitOpRegBit to take Timout argument as microsecond.Elvin Li
Signed-off-by: Elvin Li <elvin.li@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15020 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-25Fix ECC errors:1.Update the comments in function headers to follow the ↵Shumin Qiu
Doxygen special documentation. 2.Make the first line of text in a comment block end with a period. 3.Update the member variable name for SHELL_OPERATION_TYPES to follow the rules "Must contain lower case characters". 4. Return type of a function should exist and in the first line. Signed-off-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Dong, Eric <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15019 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-24Add default way for switch in function 'RunCommandOrFile' of 'Shell.c'.Laszlo Ersek
Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Shumin Qiu <shumin.qiu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15018 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-23Fix a bug for vlan ping failure.Wu Jiaxin
Signed-off-by: Wu Jiaxin <jiaxin.wu@intel.com > Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Jin Eric <eric.jin@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15017 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-23MdePkg PcdLib: Follow the comment of LibPcdGetNextToken to ASSERT when an ↵Star Zeng
invalid TokenNumber input. 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@15016 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-23MdeModulePkg Pcd: Extend PcdVpdBaseAddress to support PcdsPatchableInModule ↵Star Zeng
type. 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@15015 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-20ShellPkg: fix DmpStore for deletingJaben Carsey
This change allows DmpStore command to delete all variables whereas before it would stop after a single deletion due to looping errors. It uses a recursive function and deletes the last item returned from GetNextVariableName() first and then goes "backwards" to the first items. This can't delete authenticated variables. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15014 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-20Only save HostSequenceNo for new command in Debug Timer handler.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15013 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-201. Only dump CPU Context and CpuDeadLoop () for CPU exception.Jeff Fan
2. mEnabledInterruptNum is total enabled interrupt number, InterruptType should less than mEnabledInterruptNum. Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15012 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-20ShellPkg: pre-verify split commandsJaben Carsey
This makes sure that all parts of commands split via pipe operation are valid before starting. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15011 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19ShellPkg: API name typo.Jaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15010 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19ShellPkg: fix whitespace character trimmingJaben Carsey
This makes TrimSpaces() trim tab characters off the end of the string also (not just the beginning). Also updates loop to prevent buffer underrun. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15009 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19ShellPkg: CTRL-C stops a running script at the same timeJaben Carsey
This makes CTRL-C stop a running script after trying to stop the command. And adds comments to describe the behavior more clearly. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15008 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19ShellPkg: Refactor the RunCommand APIJaben Carsey
This almost completely splits the RunCommand API into sub-routines. - the ProcessCommandLineToFinal API handles replacing the a found alias and any found environment variables. This will redirect "-?" to "help", if necessary. Upon return, the command line is complete and finalized. It may still have redirection in it, and those will get chopped off later (but no further modifications occur). - the SetupAndRunCommandOrFile API handles updating and then later restoring StdIn, StdOut, and StdErr (and removing their information from the command line). It will call into RunCommandOrFile. - the RunCommandOrFile API divides the logic to RunInternalCommand, RunScriptFile, or running an .EFI file directly. - the RunInternalCommand API handles updating and then restoring Argc and Argv. It will run the internal command in between. - the SetLastError API handles updating of the environment variable "lasterror" - the DoHelpUpdateArgcArgv was changed to DoHelpUpdate and now works on the raw command line and not the argc/argv. This allows the processing to be moved earlier. Note this change has the following positive side effects (this eliminates unnecessary step): - Argc/Argv are only updated for internal commands (as they are library based) - no Argv/Argc/StdIn/StdOut/StdErr processing is done for file system changes. - The ProcessCommandLineToFinal API exists and it's critical to the ability to correctly pre-process split ("|") command lines ahead of time to verify their correctness. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15007 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-19Converse the return value from 'int' to 'BOOLEAN' for function ↵Shumin Qiu
‘ContainsSplit’ in Shell.c. Signed-off-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Ni, Ruiyu <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15006 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18OvmfPkg: VirtioBlkInit(): log topology attributesLaszlo Ersek
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15005 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18OvmfPkg: VirtioBlkInit(): expose virtio-blk topology in BlockIoLaszlo Ersek
UEFI spec virtio spec ======================================= ================================= LowestAlignedLba EFI_LBA (UINT64) alignment_offset u8 +-------------------------------------- +-------------------------------- | first LBA that is aligned to a | offset of first aligned | physical block boundary (SCSI | logical block | definition) LogicalBlocksPerPhysicalBlock UINT32 physical_block_exp u8 +-------------------------------------- +-------------------------------- | number of logical blocks per | # of logical blocks per | physical block [...] does not contain | physical block (log2) | an exponential value OptimalTransferLengthGranularity UINT32 opt_io_size le32 +-------------------------------------- +-------------------------------- | optimal transfer length granularity | optimal (suggested maximum) I/O | as a number of logical blocks [...] A | size in blocks | value of 0 means there is no reported | optimal transfer length granularity Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15004 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18OvmfPkg/VirtioBlkDxe/VirtioBlk.c: rewrap overlong linesLaszlo Ersek
Lines should be no longer than 79 characters. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15003 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18OvmfPkg: IndustryStandard/VirtioBlk: introduce topology-related definitionsLaszlo Ersek
Based on <https://tools.oasis-open.org/version-control/browse/wsvn/virtio/virtio-v1.0-wd01-part1-specification.txt?rev=159>, which is the last text format revision. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15002 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18OvmfPkg: IndustryStandard/VirtioBlk: add extra horizontal whitespaceLaszlo Ersek
We're going to introduce a new macro and a new VIRTIO_BLK_CONFIG member that need realignment of existing definitions and comments. Separate out the whitespace changes in this patch. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15001 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18Rollback the change to EFI_BOOT_KEY_DATA structure since UEFI Spec adds the ↵Ruiyu Ni
clarification that bitfields are ordered such that bit 0 is the least significant bit. Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15000 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-18Update code to avoid using potential NULL pointer.Eric Dong
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14999 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17ShellPkg: Add missing function header commentsJaben Carsey
I found that some function headers had insufficient/incorrect information. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14998 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17ShellPkg: Fix "for" command statement initialization.Jaben Carsey
The shell was failing to correctly parse up to the space only for “run (1 3)” and also losing the space for “in ” a b” c” for loop initialization. This fixes for initialization to be correct. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14997 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17OvmfPkg: QemuFlashFvbServicesRuntimeDxe: fix out-of-LBA write accessLaszlo Ersek
When QemuFlashWrite() is asked to write a range that includes the last byte of the LBA, then the byte that the function uses to switch the flash device back to read mode (ROMD mode in KVM speak) actually falls out of the LBA. Normally this doesn't cause visible problems. However, if the variable store and the firmware code are backed by separate flash devices, as implemented by [Qemu-devel] [PATCH v2] hw/i386/pc_sysfw: support two flash drives http://thread.gmane.org/gmane.comp.emulators.qemu/243678 plus [edk2] [edk2 PATCH] OvmfPkg: split the variable store to a separate file http://thread.gmane.org/gmane.comp.bios.tianocore.devel/5045/focus=5046 then the READ_ARRAY_CMD not only reaches a different LBA, it reaches a different qemu device. This results in a guest reboot soon after. Fix this by ensuring that we always stay within the LBA just written when issuing READ_ARRAY_CMD. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14996 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17Update code to support guid op nest in the statement.Eric Dong
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@14995 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17Fix a bug in TCP driver’s component name print function.Fu Siyuan
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Dong, Guo <guo.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14994 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17Fix two issues in PeiCore. Liming Gao
1. HOB address is not 8 byte alignment. 2. FV with the max supported PEIM can't be dispatched. Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14993 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17Get entire variable data for efi varstore at first time.Eric Dong
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@14992 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17Add the missing assignment of EFI_DISK_IO2_TOKEN::Token in FlushDiskEx() ↵Ruiyu Ni
implementation. Without the assignment, system may hang sometimes. 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@14991 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-17Update code to ensure the pointer ‘CurrentName’ in function ↵Shumin Qiu
‘PerformSingleMappingDisplay’ isn’t null before being processed. Signed-off-by: Shumin Qiu <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@14990 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-16Add a new line to initialize the variable “PassThruProtocol” in ↵Shumin Qiu
ConsoleWrapers.c to ensure the initialization not to be a part of its declaration. Signed-off-by: Shumin Qiu <shumin.qiu@intel.com> Reviewed-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14989 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-16MdeModulePkg CapsuleRuntimeDxe: Get PcdMaxSizeNonPopulateCapsule and ↵Star Zeng
PcdMaxSizePopulateCapsule by PcdGet32 in EntryPoint. PcdMaxSizeNonPopulateCapsule and PcdMaxSizePopulateCapsule are declared to support Dynamic, but used by FixedPcdGet32 in CapsuleRuntimeDxe. QueryCapsuleCapabilities is a runtime interface and PCD protocol can’t be used in runtime environment. 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@14988 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-15OvmfPkg/QemuVideoDxe: child handles should have open parent protocol ↵Chris Ruffin
BY_CHILD_CONTROLLER The QemuVideoDxe driver creates child controller handles, so it is acting as a hybrid bus driver. The child handles should open the parent's bus protocol BY_CHILD_CONTROLLER to properly maintain the protocol usage count. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Chris Ruffin <chris.ruffin@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14987 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ShellPkg: add error messages into functionJaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14986 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ShellPkg: Refactor updating command line for help useJaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14985 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13Fix the non-blocking behavior for connect. The behavior was correct if the ↵lpleahy leroy.p.leahy
code polled the connect routine but was not correct when using select to complete the asynchronous request. This change fixes the select case by moving where some of the operations performed upon the connection completion. Signed-off-by: lpleahy leroy.p.leahy@intel.com Reviewed-by: Daniel Moura oxesoft@gmail.com git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14984 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ShellPkg: Refactor change to current file systemJaben Carsey
This moves the initialization for handling file system changes into a separate function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14983 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ShellPkg: Refactor Split/Pipe based command linesJaben Carsey
This moves the initialization for handling command lines with pipe ‘|’ into a separate function. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14982 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ArmPlatformPkg/ArmFvpDxe: Added Virtio Block supportOlivier Martin
Right now the ARM Platform driver does not do much, but I expect to move most platform specific code into platform specific driver in the future. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> v5: - ensure / document that the VIRTIO_BLK_DEVICE_PATH structure must be packed - fix whitespace damage in definition of "mVirtioBlockDevicePath" - the platform driver is added to all platform DSC and FDF files in the previous patch; this patch focuses on virtio only Change-Id: I3505bfc5b31085b8017bd9e6895a155bd7a2eee9 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14981 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ArmPlatformPkg/ArmVExpressPkg: Added the empty 'ArmFvpDxe' platform UEFI driverOlivier Martin
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> v5: - For uniformity, add the empty driver to ArmVExpress-RTSM-AEMv8Ax4-foundation.* too in this patch, not just ArmVExpress-RTSM-AEMv8Ax4.*. V4 added the empty driver to ArmVExpress-RTSM-AEMv8Ax4-foundation.* not sooner than the next patch, fusing it with other (= virtio) functionality. Let's split these changes cleanly. Change-Id: I7d635011c8d3ac59097c728b7c7786d8677c80cb Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14980 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13Check Context before use it.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14979 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13Fix meta file issue.Jeff Fan
Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Hesheng Chen <hesheng.chen@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14978 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13UefiCpuPkg: S3Resume2Pei: align return stacks explicitlyLaszlo Ersek
S3RestoreConfig2() can optionally stack-switch to the SMM S3 Resume Entry Point and ask it to transfer to S3ResumeExecuteBootScript(). Similarly, S3ResumeExecuteBootScript() stack-switches explicitly to the boot script executor, and asks it to transfer to S3ResumeBootOs(). Currently the stack pointers specified for the SMM S3 Resume Entry Point and the boot script executor to use for returning are derived from addresses of the first local variables in S3RestoreConfig2() and S3ResumeExecuteBootScript(), respectively. Since (theoretically) the stack grows down as local variables are defined and functions are called, the idea is presumably to allow the respective callee to overwrite the caller's local variables. (The callees in question can never return normally, only by explicit stack switching.) Taking the address of "Status" is less portable than optimal however. Compilers are free to juggle local variables at build time as they please, including order and alignment on the stack. For example, when the code is built for 64-bit PEI with gcc-4.8.2, the address of "Status" trips up the alignment assertion in SwitchStack(). Let's align the address of "Status" down to CPU_STACK_ALIGNMENT explicitly. If a compiler ensures such alignment and places "Status" at the highest address automatically, then this change has no effect. Otherwise, we'll prepare ReturnStackPointer values that (a) are correctly aligned, (b) preserve the same amount or more (but never less) from the caller's local variables than before, which should be safe. 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@14977 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13MdeModulePkg/XhciDxe: Fix ICC compiler build warning.Feng Tian
Signed-off-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14976 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-13ShellPkg: add API for determining operation typeJaben Carsey
There are no callers for this new API yet. They will be added in the next commits. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14975 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12ShellPkg: Refactor Variable replacement into separate functionJaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14974 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12ShellPkg: Refactor Alias replacement into separate functionJaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14973 6f19259b-4bc3-4df7-8a09-765794883524
2013-12-12ShellPkg: refactor out leading and trailing space trimmingJaben Carsey
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14972 6f19259b-4bc3-4df7-8a09-765794883524