]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/EnablePaging64.asm
1. Added comments to ASM files
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / EnablePaging64.asm
index 354d1fe60340c1a707adb6cfa689327f3dceafa5..435bb391058fabcd55d4d28e5592987272469574 100644 (file)
@@ -47,11 +47,11 @@ InternalX86EnablePaging64 PROC
     or      ah, 1                       ; set LME\r
     wrmsr\r
     mov     eax, cr0\r
-    bts     eax, 31\r
+    bts     eax, 31                     ; set PG\r
     mov     cr0, eax                    ; enable paging\r
-    retf\r
+    retf                                ; topmost 2 dwords hold the address\r
 @@:                                     ; long mode starts here\r
-    DB      67h, 48h\r
+    DB      67h, 48h                    ; 32-bit address size, 64-bit operand size\r
     mov     ebx, [esp]                  ; mov rbx, [esp]\r
     DB      67h, 48h\r
     mov     ecx, [esp + 8]              ; mov rcx, [esp + 8]\r
@@ -62,7 +62,7 @@ InternalX86EnablePaging64 PROC
     DB      48h\r
     add     esp, -20h                   ; add rsp, -20h\r
     call    ebx                         ; call rbx\r
-    jmp     $\r
+    hlt                                 ; no one should get here\r
 InternalX86EnablePaging64 ENDP\r
 \r
     END\r