Sync patches r14005, r14011, r14012, r14021, r14022 and r14043 from main trunk.
1. Reclaim work space when the remaining space size is even not enough to contain one header + one record.
2. Check status before reporting error status code.
3. Initialize a local work space header to be used by IsValidWorkSpace() and InitWorkSpaceHeader() to avoid executing code(gBS->CalculateCrc32 ()) outside SMRAM while inside SMM.
4. MdeMdeModulePkg/Xhci: Fix a wrong conditional judgment which bring assertion with 1.0 hub.
5. MdeMdeModulePkg/Ehci: Add logic to dispatch OHCI driver first if the companion controller is OHCI.
6. Fix the bug that the device claiming too much resource cannot be rejected by the PciBus driver.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010.SR1@14232 6f19259b-4bc3-4df7-8a09-765794883524
Sync patches r14074, r14113, r14118, r14136, r14140, r14147, r14150, r14161, r14217, r14218 from main trunk.
1. Take the highest horizontal resolution as highest video resolution.
2. Update DxeCore to get correct AuthenticationStatus and invoke gSecurity after FV image file is extracted by ReadSection(), and remove the gSecurity invoking in SmmDriverDispatchHandler() in SmmCore since FV has been verified in DxeCore.
   Update SmmLoadImage() to return EFI_SECURITY_VIOLATION when gSecurity returns EFI_SECURITY_VIOLATION.
3. Update SecurityStub SAP protocol to support SecureHandler and SecureHandler2 both.
4. Update SmiManager() comments and implementation to follow the new rule clarified by PI 1.2.1 errata A. 
   a. If at least one of the handlers returns EFI_WARN_INTERRUPT_SOURCE_QUIESCED or EFI_SUCCESS then the function will return EFI_SUCCESS.
      If a handler returns EFI_SUCCESS and HandlerType is not NULL then no additional handlers will be processed.
   b. If a handler returns EFI_INTERRUPT_PENDING and HandlerType is not NULL then no additional handlers will be processed and EFI_INTERRUPT_PENDING will be returned.
5. Shouldn't free the PciDev structure because the PciDev needs to be saved to RemovedPciDev array.
6. Adds ASSERT check in DxePcd driver when error status of read DynamicHii PCD is not EFI_NOT_FOUND to avoid the incorrect value is used.
7. Not close gEfiEndOfDxeEventGroupGuid event in ReadyToLock event notify because PI spec doesn't say gEfiEndOfDxeEventGroupGuid must be notified before ReadyToLock event.
8. Enhance the ConPlatform driver to take care of the optional Controller device path node when comparing the GOP device path.
9. Fix a bug in the DXE Core that generates an ASSERT() when the page at address zero is freed and DEBUG_CLEAR_MEMORY() macros are enabled.
10. Guarantee that free memory in the 4K page starting at address 0 is always cleared to 0.

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