ShellPkg: Replace assignment statement with 'StrnCpy' to append terminal NULL character in a string.

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@16064 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg: Fix XCODE Link Issue in DxeCore
 
In XCODE tool chain, the 64-bit bit wise and operation is causing the compiler to emit an __umoddi3.
This patch uses BaseLib API to replace 64-bit bit operation.
 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Andrew Fish <afish@apple.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16065 6f19259b-4bc3-4df7-8a09-765794883524
OvmfPkg: AcpiTimerLib: Access power mgmt regs based on host bridge type

Pick the appropriate bus:dev.fn for accessing ACPI power management
registers (00:01.3 on PIIX4 vs. 00:1f.0 on Q35) based on the device
ID of the host bridge (assumed always present at 00:00.0).

With this patch, OVMF can boot QEMU's "-machine q35" x86 machine type.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
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@16066 6f19259b-4bc3-4df7-8a09-765794883524
SourceLevelDebugPkg: DebugAgentLib: Fix clang/Xcode 5 compile/link errors

Move ExceptionStubHeaderSize from 16 to 32 bits to work around clang relocation limitation. Use movw, not move for 32-bit segment register operations. 

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>




git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16067 6f19259b-4bc3-4df7-8a09-765794883524
UefiCpuPkg: CpuExceptionHandlerLib: Make self modifying code work with Xcode
 
CpuExceptionHandlerLib has code that contains absolute relocations, not supported by
Xcode for X64, and it then copies this code to an alternate location in memory. It is 
very hard to write IP relative self-modifiying code. I had to update AsmVectorNumFixup()
to also patch in the absolute addressess after the code was copied. 
 
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anderw Fish <afish@apple.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16068 6f19259b-4bc3-4df7-8a09-765794883524