Commit Graph

19479 Commits

Author SHA1 Message Date
Liming Gao 9ae1572caf SourceLevelDebugPkg DebugAgentLib: Add nasm source file into LIB INF files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:25 +08:00
Liming Gao 6f5f7e9903 SourceLevelDebugPkg DebugAgentLib: Convert X64/AsmFuncs.asm
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/AsmFuncs.asm to X64/AsmFuncs.nasm.
And, manually update the wrong replacement with 0H.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:24 +08:00
Liming Gao a338fb2235 SourceLevelDebugPkg DebugAgentLib: Convert Ia32/AsmFuncs.asm
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/AsmFuncs.asm to Ia32/AsmFuncs.nasm.
And, manually update the wrong replacement with 0H.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:24 +08:00
Liming Gao c6d06fdf43 SourceLevelDebugPkg PeCoffExtraActionLibDebug: Add nasm source file into INF
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:23 +08:00
Liming Gao de16b5ca08 SourceLevelDebugPkg PeCoffExtraActionLibDebug: Convert X64/IntHandler.asm
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/IntHandler.asm to X64/IntHandler.nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:22 +08:00
Liming Gao 3d73842f45 SourceLevelDebugPkg PeCoffExtraActionLibDebug: Convert Ia32/IntHandler.asm
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/IntHandler.asm to Ia32/IntHandler.nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:22 +08:00
Liming Gao e46be3494a IntelFrameworkModulePkg LegacyBiosDxe: Add nasm source file into INF file
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:21 +08:00
Liming Gao e4404f8be1 IntelFrameworkModulePkg LegacyBiosDxe: Convert X64/InterruptTable.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/InterruptTable.asm to X64/InterruptTable.nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:20 +08:00
Liming Gao 0199f24fd1 IntelFrameworkModulePkg LegacyBiosDxe: Convert Ia32/InterruptTable.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/InterruptTable.asm to Ia32/InterruptTable.nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:20 +08:00
Liming Gao ad9ec7efad UefiCpuPkg PiSmmCpuDxeSmm: Add nasm source file into INF file.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:19 +08:00
Liming Gao ba15b97142 UefiCpuPkg PiSmmCpuDxeSmm: Convert X64/SmmInit.asm to NASM
Manually convert X64/SmmInit.asm to X64/SmmInit.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:18 +08:00
Liming Gao 9f54832f4b UefiCpuPkg PiSmmCpuDxeSmm: Convert X64/SmiException.asm to NASM
Manually convert X64/SmiException.asm to X64/SmiException.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:18 +08:00
Liming Gao 9a36d4dc3f UefiCpuPkg PiSmmCpuDxeSmm: Convert X64/SmiEntry.asm to NASM
Manually convert X64/SmiEntry.asm to X64/SmiEntry.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:17 +08:00
Liming Gao e1f0eed1b2 UefiCpuPkg PiSmmCpuDxeSmm: Update X64/MpFuncs.nasm
Use 16bit and 32bit assembly code to replace hard code db.

In V2: add 0x67 prefixes to far jumps

Without the a32 modifier under FLAT32_JUMP, and the a16 modifier under
LONG_JUMP, nasm doesn't generate the 0x67 prefixes, and the far jumps
don't work. (For the former, KVM returns an emulation failure. For the
latter, KVM performs a triple fault (guest reboot).) By forcing the 0x67
prefixes we end up with the same machine code as the one open-coded in
"MpFuncs.asm".

This bug breaks S3 resume in the Ia32X64 + SMM_REQUIRE build of OVMF.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2016-06-28 09:52:16 +08:00
Liming Gao 78cf66eebb UefiCpuPkg PiSmmCpuDxeSmm: Convert X64/MpFuncs.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/MpFuncs.asm to X64/MpFuncs.nasm
And, manually update it to pass build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:16 +08:00
Liming Gao 246cd9085f UefiCpuPkg PiSmmCpuDxeSmm: Convert Ia32/SmmInit.asm to NASM
Manually convert Ia32/SmmInit.asm to Ia32/SmmInit.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:15 +08:00
Liming Gao 28ee581646 UefiCpuPkg PiSmmCpuDxeSmm: Convert Ia32/SmiException.asm to NASM
Manually convert Ia32/SmiException.asm to Ia32/SmiException.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:15 +08:00
Liming Gao 63a4f46076 UefiCpuPkg PiSmmCpuDxeSmm: Convert Ia32/SmiEntry.asm to NASM
Manually convert Ia32/SmiEntry.asm to Ia32/SmiEntry.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:14 +08:00
Liming Gao 55c6d5467e UefiCpuPkg PiSmmCpuDxeSmm: Update Ia32/MpFuncs.nasm
Use 16bit assembly code to replace hard code db.

In V2:
Add 0x67 prefix to far jump

When we enter protected mode, with the far jump still in big real mode,
the JMP instruction not only needs the 0x66 prefix (for 32-bit operand
size), but also the 0x67 prefix (for 32-bit address size). Use the a32
nasm modifier to enforce this.

This bug breaks S3 resume in the Ia32 + SMM_REQUIRE build of OVMF.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2016-06-28 09:52:13 +08:00
Liming Gao 6997711e7f UefiCpuPkg PiSmmCpuDxeSmm: Convert Ia32/MpFuncs.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/MpFuncs.asm to Ia32/MpFuncs.nasm.
And, manually update it to pass build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:13 +08:00
Liming Gao ac6229a7b8 UefiCpuPkg S3Resume2Pei: Add nasm source file into INF file.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:12 +08:00
Liming Gao b3cfdef49e UefiCpuPkg S3Resume2Pei: Convert X64/AsmFuncs.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/AsmFuncs.asm to X64/AsmFuncs.nasm.
And, manually add o16 prefix to specify 16bit operation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:12 +08:00
Liming Gao 5104be5fcf UefiCpuPkg S3Resume2Pei: Convert Ia32/AsmFuncs.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/AsmFuncs.asm to Ia32/AsmFuncs.nasm.
And, manually add o16 prefix to specify 16bit operation.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:11 +08:00
Liming Gao 70f3acf98a UefiCpuPkg CpuExceptionHandlerLib: Add nasm source files into INF files.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:10 +08:00
Liming Gao fb501e33c3 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.
Then, manually update nasm to pass build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:10 +08:00
Liming Gao ab7efb664c 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.
Then, manually update nasm to pass build.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:09 +08:00
Liming Gao 6bfe841ff2 UefiCpuPkg BaseUefiCpuLib: Add nasm source file in BaseUefiCpuLib.inf
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:08 +08:00
Liming Gao ce3e0a906f 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.
And, manually add .rdata section.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:08 +08:00
Liming Gao f893042d05 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.
And, manually add .rdata section.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:07 +08:00
Liming Gao b85a6ffb44 UefiCpuPkg CpuDxe: Add nasm source file in CpuDxe.inf
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:06 +08:00
Liming Gao 762e073a93 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

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:06 +08:00
Liming Gao 2d24f4e70b IntelFsp2WrapperPkg SecFspWrapperPlatformSecLibSample: Convert ASM to NASM
Manually converts Ia32/PeiCoreEntry.asm, Ia32/SecEntry.asm and Ia32/Stack.asm
to Ia32/PeiCoreEntry.nasm, Ia32/SecEntry.nasm and Ia32/Stack.nasm.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:05 +08:00
Liming Gao 24498828f7 IntelFsp2WrapperPkg BaseFspWrapperApiLib: Convert X64/Thunk64To32.asm to NASM
Manually convert X64/Thunk64To32.asm to X64/Thunk64To32.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:04 +08:00
Liming Gao b295fbba8d IntelFsp2Pkg SecFspSecPlatformLibNull: Convert Ia32/Flat32.asm to NASM
Manually convert Ia32/Flat32.asm to Ia32/Flat32.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:04 +08:00
Liming Gao 03e3033891 IntelFsp2Pkg SecFspSecPlatformLibNull: Convert Ia32/SecCarInit.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/SecCarInit.asm to Ia32/SecCarInit.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:03 +08:00
Liming Gao 4c42aaff8b IntelFsp2Pkg BaseFspSwitchStackLib: Convert Ia32/Stack.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/Stack.asm to Ia32/Stack.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:03 +08:00
Liming Gao 68ff74354e IntelFsp2Pkg BaseFspDebugLibSerialPort: Convert Ia32/FspDebug.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/FspDebug.asm to Ia32/FspDebug.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:02 +08:00
Liming Gao f4a94a7c31 MdeModulePkg BootScriptExecutorDxe: Convert X64/S3Asm.asm to NASM
Use real nasm instruction to replace DB bytes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:01 +08:00
Jordan Justen 79e1966432 MdeModulePkg BootScriptExecutorDxe: Convert X64/S3Asm.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/S3Asm.asm to X64/S3Asm.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-06-28 09:52:01 +08:00
Liming Gao 9fa08ee485 MdeModulePkg BootScriptExecutorDxe: Convert IA32/S3Asm.asm to NASM
Use real nasm instruction to replace DB bytes.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Liming Gao <liming.gao@intel.com>
2016-06-28 09:52:00 +08:00
Jordan Justen 0ed65cc2f9 MdeModulePkg BootScriptExecutorDxe: Convert IA32/S3Asm.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
IA32/S3Asm.asm to IA32/S3Asm.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-06-28 09:51:59 +08:00
Jordan Justen 92bcfd3796 MdeModulePkg EbcDxe: Convert X64/EbcLowLevel.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/EbcLowLevel.asm to X64/EbcLowLevel.nasm

And, manually update nasm code to use mov rcx, dword value and generate
the same assembly code with rcx register to asm code.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-06-28 09:51:58 +08:00
Jordan Justen 99d01823a8 MdeModulePkg EbcDxe: Convert Ia32/EbcLowLevel.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/EbcLowLevel.asm to Ia32/EbcLowLevel.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-06-28 09:51:58 +08:00
Jordan Justen 63b865c63c MdeModulePkg DebugSupportDxe: Convert X64/AsmFuncs.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/AsmFuncs.asm to X64/AsmFuncs.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>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
2016-06-28 09:51:57 +08:00
Jordan Justen 9b4ed881a5 MdeModulePkg DebugSupportDxe: Convert Ia32/AsmFuncs.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/AsmFuncs.asm to Ia32/AsmFuncs.nasm

Note: Also applied many manual cleanups where conversion script failed
And, update Vect2Desc() to be same to original logic

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
2016-06-28 09:51:56 +08:00
Jordan Justen 3763cfc1be MdeModulePkg CapsulePei: Convert X64/PageFaultHandler.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
X64/PageFaultHandler.asm to X64/PageFaultHandler.nasm

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
2016-06-28 09:51:55 +08:00
Jordan Justen d24f287625 MdeModulePkg DxeIplPeim: Convert Ia32/IdtVectorAsm.asm to NASM
The BaseTools/Scripts/ConvertMasmToNasm.py script was used to convert
Ia32/IdtVectorAsm.asm to Ia32/IdtVectorAsm.nasm

Note: Manually updated code storing @VectorTemplateBase address

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
2016-06-28 09:51:55 +08:00
Jordan Justen ea3be8b66f 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>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
2016-06-28 09:51:54 +08:00
Jordan Justen 5262695ceb MdeModulePkg BootScriptExecutorDxe: EXTERNDEF=>PUBLIC 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>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
2016-06-28 09:51:53 +08:00
Jordan Justen a230845601 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>
Cc: Feng Tian <feng.tian@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
2016-06-28 09:51:53 +08:00