]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Fix the issue that the high 16-bit of EAX may contain invalid data, which cause bad...
authorli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Nov 2010 07:47:27 +0000 (07:47 +0000)
committerli-elvin <li-elvin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 12 Nov 2010 07:47:27 +0000 (07:47 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11047 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 75d857501a0d4ea9e8e7623c53084d8c0a27bd16..44aea1a5ef709e91ea02b785ac9563ce0fe98095 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2010, 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
@@ -55,7 +55,7 @@ ASM_PFX(ThunkAttr): .space  4
     orb     $2, %al\r
     outb    %al, $0x92                  # deactivate A20M#\r
 2:\r
-    movl    %ss, %eax\r
+    movw    %ss, %ax\r
     .byte   0x67, 0x66, 0x8d, 0x6c, 0x24, 0x34, 0x66\r
     mov     %ebp, 0xffffffd8(%esi)\r
     mov     0xfffffff8(%esi), %ebx\r
index a7560a247f478d10fa42a090e3a07721fb76a595..31f9254ad519d9641e96479231f5976e8c3583f8 100644 (file)
@@ -3,7 +3,7 @@
 \r
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2006 - 2010, 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
@@ -109,7 +109,7 @@ _ThunkAttr  DD      ?
     or      al, 2\r
     out     92h, al                     ; deactivate A20M#\r
 @2:\r
-    mov     eax, ss\r
+    mov     ax, ss\r
     DB      67h\r
     lea     bp, [esp + sizeof (IA32_REGS)]\r
     ;\r
index fa9b3d6035b211e754eadee29c80624f5230f697..049ec86355fd21f5355af42a5c8b0fd5795910f8 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2010, 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
@@ -104,7 +104,7 @@ L_1:
     orb     $2,%al\r
     outb    %al, $0x92                   # deactivate A20M#\r
 L_2: \r
-    movl    %ss,%eax\r
+    movw    %ss,%ax\r
     lea     IA32_REGS_SIZE(%esp), %bp\r
     #\r
     # rsi in the following 2 instructions is indeed bp in 16-bit code\r
index 459966a43ffe46e76571bd95570658f454f5bb4c..829df1c2a06c84135c1f9824f597bcc3b1d3d272 100644 (file)
@@ -3,7 +3,7 @@
 \r
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+; Copyright (c) 2006 - 2010, 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
@@ -105,7 +105,7 @@ _ThunkAttr  DD      ?
     or      al, 2\r
     out     92h, al                     ; deactivate A20M#\r
 @2:\r
-    mov     eax, ss\r
+    mov     ax, ss\r
     lea     bp, [esp + sizeof (IA32_REGS)]\r
     ;\r
     ; rsi in the following 2 instructions is indeed bp in 16-bit code\r