mirror of https://github.com/acidanthera/audk.git
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>
This commit is contained in:
parent
0ed65cc2f9
commit
9fa08ee485
|
@ -39,21 +39,22 @@ ASM_PFX(AsmTransferControl):
|
||||||
shrd ebx, ecx, 20
|
shrd ebx, ecx, 20
|
||||||
and ecx, 0xf
|
and ecx, 0xf
|
||||||
mov bx, cx
|
mov bx, cx
|
||||||
mov [@jmp_addr], ebx
|
mov [@jmp_addr + 1], ebx
|
||||||
retf
|
retf
|
||||||
|
|
||||||
|
BITS 16
|
||||||
.0:
|
.0:
|
||||||
DB 0xb8, 0x30, 0 ; mov ax, 30h as selector
|
mov ax, 0x30
|
||||||
mov ds, ax
|
o32 mov ds, eax
|
||||||
mov es, ax
|
o32 mov es, eax
|
||||||
mov fs, ax
|
o32 mov fs, eax
|
||||||
mov gs, ax
|
o32 mov gs, eax
|
||||||
mov ss, ax
|
o32 mov ss, eax
|
||||||
mov eax, cr0 ; Get control register 0
|
mov eax, cr0 ; Get control register 0
|
||||||
DB 0x66
|
and eax, 0x0fffffffe ; Clear PE bit (bit #0)
|
||||||
DB 0x83, 0xe0, 0xfe ; and eax, 0fffffffeh ; Clear PE bit (bit #0)
|
mov cr0, eax ; Activate real mode
|
||||||
DB 0xf, 0x22, 0xc0 ; mov cr0, eax ; Activate real mode
|
@jmp_addr:
|
||||||
DB 0xea ; jmp far @jmp_addr
|
jmp 0x0:0x0
|
||||||
@jmp_addr: DD 0
|
|
||||||
|
|
||||||
global ASM_PFX(AsmTransferControl32)
|
global ASM_PFX(AsmTransferControl32)
|
||||||
ASM_PFX(AsmTransferControl32):
|
ASM_PFX(AsmTransferControl32):
|
||||||
|
|
Loading…
Reference in New Issue