Sync patch r13864 from main trunk.
Fix coding style issue in CryptoPkg.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@14228 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches part of r13512, r13530, r13534, part of r13535 and r13725 main trunk.
1. Include read data buffer in CommBufferSize when calculate the buffer size.
2. Add SMRAM range check to variable SMM SMI handler.
3. Fix a buffer overflow bug in VariableSmm driver.
4. Return EFI_UNSUPPORTED if READY_TO_BOOT function is invoked at SMM runtime.
5. MdeModulePkg/VariableSmm: Fix a VariableSmm bug when reading variable with size 0.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@14229 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches part of r13859, r13885 and r13940 from main trunk.
1. Fix a bug in PXE driver that the PXE boot do not restart if a new boot option on the different IP stack is selected.
2. Retrieve the IP information after iSCSI TCPv6 connection established and fill it into iBFT table.
3. Generate a random IAID for each NIC port to require different IPv6 address in PXE driver.
4. Update function EfiMtftp6Configure() and Mtftp6RrqHandleOack() to allocate at most one UdpIo.
5. Fix a typo from 'destory' to 'destroy' in network code.
6. Fix issue that ifconfig -c cannot clear IP address details.


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@14230 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches r13935, r13948, r13952, r13980, r13981 and r14062 from main trunk.
1. Allocate ReservedMemory instead of ACPIMemoryNVS for its shadow memory space which is not required to be restored by OS.
2. Use IA32_IDT_GATE_DESCRIPTOR defined in BaseLib instead of local struct INTERRUPT_GATE_DESCRIPTOR.
3. Just reserve memory space for page table, but not create it, and allocate the memory with ReservedMemory instead of ACPIMemoryNVS.
4. ACPI4.0/5.0 have clear description:
FIRMWARE_CTRL: If the X_FIRMWARE_CTRL field contains a non zero value then this field must be zero.
X_FIRMWARE_CTRL: This field is used when the physical address of the FACS is above 4GB. If the FIRMWARE_CTRL field contains a non zero value then this field must be zero.

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