]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Current Thunk16.asm implementation clears reserved bits, which does not follow IA32...
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 7 Jan 2013 07:12:19 +0000 (07:12 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 7 Jan 2013 07:12:19 +0000 (07:12 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14037 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/Ia32/Thunk16.S
MdePkg/Library/BaseLib/Ia32/Thunk16.asm
MdePkg/Library/BaseLib/X64/Thunk16.S
MdePkg/Library/BaseLib/X64/Thunk16.asm

index 0555cf1bfdb89d8d729faf69ebd2efad8fa085f2..8356c5a1c7d3bad02b3910555fbf5472eca58d7e 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -175,7 +175,7 @@ ASM_PFX(InternalAsmThunk16):
     andl    $0x7ffffffe, %eax           # clear PE, PG bits\r
     movl    %cr4, %ebp\r
     mov     %ebp, 0xfffffff1(%edx)\r
-    andl    $0x300, %ebp                # clear all but PCE and OSFXSR bits\r
+    andl    $0xffffffcf, %ebp           # clear PAE, PSE bits\r
     pushl   $0x10\r
     pop     %ecx                        # ecx <- selector for data segments\r
     lgdtl   0x20(%edx)\r
index 6df0a4a46adae20437302233146a0c67dad8a9a0..3e84aedf3df72b84621644895a6e6791e58da092 100644 (file)
@@ -3,7 +3,7 @@
 \r
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -237,7 +237,7 @@ InternalAsmThunk16  PROC    USES    ebp ebx esi edi ds  es  fs  gs
     and     eax, 7ffffffeh              ; clear PE, PG bits\r
     mov     ebp, cr4\r
     mov     [edx + (SavedCr4 - SavedCr0)], ebp\r
-    and     ebp, 300h                   ; clear all but PCE and OSFXSR bits\r
+    and     ebp, NOT 30h                ; clear PAE, PSE bits\r
     push    10h\r
     pop     ecx                         ; ecx <- selector for data segments\r
     lgdt    fword ptr [edx + (_16Gdtr - SavedCr0)]\r
index d037a71043a06f15888e21e679ef3d19d2c5efce..a521aff31b3bcf34bcb5a142ce0dd00f69e225d6 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
 # which accompanies this distribution.  The full text of the license may be found at\r
@@ -295,7 +295,7 @@ ASM_PFX(InternalAsmThunk16):
     andl    $0x7ffffffe,%eax            # clear PE, PG bits\r
     movq    %cr4, %rbp\r
     movl    %ebp, (%rcx)                # save CR4 in SavedCr4\r
-    andl    $0x300,%ebp                 # clear all but PCE and OSFXSR bits\r
+    andl    $0xffffffcf,%ebp            # clear PAE, PSE bits\r
     movl    %r8d, %esi                  # esi <- 16-bit stack segment\r
     .byte      0x6a, DATA32\r
     popq    %rdx\r
index 8b208fdb584bab799c0117479eeea0e31994fc94..01051341f6d4d76a7d709fdc124727515ef10c70 100644 (file)
@@ -3,7 +3,7 @@
 \r
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
 ; This program and the accompanying materials\r
 ; are licensed and made available under the terms and conditions of the BSD License\r
 ; which accompanies this distribution.  The full text of the license may be found at\r
@@ -282,7 +282,7 @@ InternalAsmThunk16  PROC    USES    rbp rbx rsi rdi
     and     eax, 7ffffffeh              ; clear PE, PG bits\r
     mov     rbp, cr4\r
     mov     [rcx], ebp                  ; save CR4 in SavedCr4\r
-    and     ebp, 300h                   ; clear all but PCE and OSFXSR bits\r
+    and     ebp, NOT 30h                ; clear PAE, PSE bits\r
     mov     esi, r8d                    ; esi <- 16-bit stack segment\r
     DB      6ah, DATA32                 ; push DATA32\r
     pop     rdx                         ; rdx <- 32-bit data segment selector\r