1. Remove any references on other files from DebugTimer.c, to avoid un-used symbols linked.
2. Add GLOBAL_REMOVE_IF_UNREFERENCED for all global variables.

Contributed-under: TianoCore Contribution Agreement 1.0
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@16298 6f19259b-4bc3-4df7-8a09-765794883524
MdePkg: fix comments typo about EFIAPI for X64

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com>
Reviewed-by: Gao, Liming <liming.gao@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16299 6f19259b-4bc3-4df7-8a09-765794883524
ShellPkg: Fix timezone command

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by : Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Tapan Shah <tapandshah@hp.com>
Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16300 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg: Add InSmm() API in PiSmmCoreSmmServicesTableLib instance

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gao, Liming <liming.gao@intel.com>
Reviewed-by: Fan, Jeff <jeff.fan@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16301 6f19259b-4bc3-4df7-8a09-765794883524
MdeModulePkg DebugSupportDxe: Fix build error with GNU assembler

The GNU assembler (2.24.51.20140918) is failing to build when movw is
used on this instruction. Instead use the mov instruction, which
matches the other cases of loading segment registers.

The error message seen is:
  AsmFuncs.iii:283: Error: incorrect register `%rax' used with `w' suffix

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseLib: EXTERNDEF=>EXTERN in X64/SetJump

NASM doesn't support EXTERNDEF, so convert this to EXTERN.

This will make it easier to convert this code to NASM using an
automated script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseMemoryLibSse2: Use movq for 64-bit move to xmm0

movd is intended for a 32-bit move, but we want to use a 64-bit move
of r8 into the low 64-bits of xmm0.

Without this change, after converting this code to NASM, this error
will be reported:
error: invalid combination of opcode and operands

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseLib Ia32 assembly: Specify DWORD sizes

NASM wants this code to specify a size.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdeModulePkg BootScriptExecutorDxe: Use NASM compatible syntax

Without this change, after converting this code to NASM, this error
will be reported:
error: invalid combination of opcode and operands

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdeModulePkg BootScriptExecutorDxe: EXTERNDEF=>EXTERN in S3Asm

NASM doesn't support EXTERNDEF, so convert this to PUBLIC.

This will make it easier to convert this code to NASM using an
automated script.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdeModulePkg EbcDxe: Use NASM compatible syntax

Without this change, after converting this code to NASM, this error
will be reported:
error: comma or end of line expected

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseLib X64: Tag MSFT/INTEL for .asm routines in GccInline.c

Once the MASM code is converted to NASM, it will be linked into GCC
builds. Since GccInline.c provides these routines for GCC, we need to
prevent this linking.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseLib Ia32/DivU64x64Remainder: Make _@DivRemU64x64 private

This helps generate proper code when converted to NASM, and there is
also no reason for this symbol to be public.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseLib Thunk16: Replace IA32 & X64 MASM Thunk16 with NASM version

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
MdePkg BaseLib: Remove unused GNU assembly files

These routines are defined in GccInline.c.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
UefiCpuPkg BaseUefiCpuLib: Convert Ia32/InitializeFpu.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/InitializeFpu.asm to Ia32/InitializeFpu.nasm

Note: Manually updated fldcw and ldmxcsr parameters

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
UefiCpuPkg BaseUefiCpuLib: Convert X64/InitializeFpu.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/InitializeFpu.asm to X64/InitializeFpu.nasm

Note: Manually updated fldcw and ldmxcsr parameters

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
UefiCpuPkg CpuExceptionHandlerLib: Convert Ia32/ExceptionHandlerAsm.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/ExceptionHandlerAsm.asm to Ia32/ExceptionHandlerAsm.nasm

Note: Also applied many manual cleanups where conversion script failed

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
UefiCpuPkg CpuExceptionHandlerLib: Convert X64/ExceptionHandlerAsm.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/ExceptionHandlerAsm.asm to X64/ExceptionHandlerAsm.nasm

Note: Also applied many manual cleanups where conversion script failed

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
UefiCpuPkg CpuDxe: Convert Ia32/CpuAsm.asm to NASM

The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/CpuAsm.asm to Ia32/CpuAsm.nasm

Note: Manually updated code for dword far jmp

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>