Sync patches r12972, r12973 and r13308 from mail trunk.
1. Enable nest for suppressif/grayoutif/diableif for form/question/option.
2. Update the code to follow the spec when evaluate the expression.
3. Add logic to validate new input value with minimum.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13325 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches r13302, r13303, r13304, r13305 and r13306 from mail trunk.
1. Update CapsuleCoalesce() to return the correct size of the coalesced capsule include PrivateData, CapsuleImageData, CapsuleNumber and CapsuleOffset array.
2. DestPtr may point to the lower aligned address in the free memory region (FreeMemBase, FreeMemBase + FreeMemSize), the free memory region may be updated to override the private signature. So update FreeMemSize to avoid the potential overlap.
3. Make sure CapsuleImage size is equal or less than DataBlock Size. And when copy the Capsule data from DataBlock to the continuous memory, CapsuleImage size should be used instead of DataBlock.
4. Currently, CapsulePei assumes ScatterGatherList are all related. But, UEFI spec has no such requirement, ScatterGatherList may be standalone. So update CapsulePei to only ignore the invalid ScatterGatherList, and still keep the valid ScatterGatherList.
5. Enhance the code logic for RelocateBlockDescriptors.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13326 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches r13226, r13227, r13241, and r13311 from mail trunk.
1. MdeModulePkg: Skip to manage usb debug port in EDKII EHCI driver if it's used by usb debug port driver.
2. Enlarge timeout value to wait set_address request success for large capacity usb hard disk.
3. UsbMassStorage: Add 16 byte SCSI cmds support if the last LBA can not be presented by 4bytes width


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13327 6f19259b-4bc3-4df7-8a09-765794883524
Sync patch r13290 from mail trunk.
1. If string length exceeds 65535 bytes, return error. So infinite loop will not happen because of UINTN overflow.
2. When a SMBIOS entry is added or updated, check if the total length of SMBIOS table exceeds 65535 bytes, if it happens, return error.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13328 6f19259b-4bc3-4df7-8a09-765794883524
Sync patch r13296 from mail trunk.
Use PartitionHeader->SizeOfPartitionEntry instead of sizeof (EFI_PARTITION_ENTRY).


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13329 6f19259b-4bc3-4df7-8a09-765794883524
Sync patch r13307 from mail trunk.
The code line where judges if offset exceed the FTW work space boundary, in some special situations where there are so many records, the offset may happen to be just equal to FtwWorkSpaceSize. And then FtwHead will be updated to be outside of work space wrongly, and cause the system to hang in this driver.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13330 6f19259b-4bc3-4df7-8a09-765794883524
Sync patch r13314 from mail trunk.
Add Perf log for SMM driver Load and Start Image.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13331 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches r13222, r13225, and r13293 from mail trunk.
1.Return EFI_INVALID_PARAMETER when Type has either EVT_NOTIFY_SIGNAL or EVT_NOTIFY_WAIT set and NotifyTpl is not a supported TPL level.
2. Enhance the error handling for AllocatePool and AllocatePages function.
3. Fix the potential issue that NULL pointer may be referred in LoadImage().


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@13332 6f19259b-4bc3-4df7-8a09-765794883524