diff options
Diffstat (limited to 'MdePkg/Library/BaseLib/X64')
-rw-r--r-- | MdePkg/Library/BaseLib/X64/Thunk16.S | 5 | ||||
-rw-r--r-- | MdePkg/Library/BaseLib/X64/Thunk16.asm | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.S b/MdePkg/Library/BaseLib/X64/Thunk16.S index 4c3c5605fa..d037a71043 100644 --- a/MdePkg/Library/BaseLib/X64/Thunk16.S +++ b/MdePkg/Library/BaseLib/X64/Thunk16.S @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license may be found at
@@ -109,7 +109,8 @@ L_1: orb $2,%al
outb %al, $0x92 # deactivate A20M#
L_2:
- movw %ss,%ax
+ xorw %ax, %ax # xor eax, eax
+ movl %ss, %eax # mov ax, ss
lea IA32_REGS_SIZE(%esp), %bp
#
# rsi in the following 2 instructions is indeed bp in 16-bit code
diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.asm b/MdePkg/Library/BaseLib/X64/Thunk16.asm index 829df1c2a0..8b208fdb58 100644 --- a/MdePkg/Library/BaseLib/X64/Thunk16.asm +++ b/MdePkg/Library/BaseLib/X64/Thunk16.asm @@ -3,7 +3,7 @@ ;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+; Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
@@ -105,7 +105,8 @@ _ThunkAttr DD ? or al, 2
out 92h, al ; deactivate A20M#
@2:
- mov ax, ss
+ xor ax, ax ; xor eax, eax
+ mov eax, ss ; mov ax, ss
lea bp, [esp + sizeof (IA32_REGS)]
;
; rsi in the following 2 instructions is indeed bp in 16-bit code
|