diff options
author | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-13 06:02:11 +0000 |
---|---|---|
committer | vanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-04-13 06:02:11 +0000 |
commit | 9cea4c4c14c82ead857674fa76c55cb7b207d8cb (patch) | |
tree | 70fd7daacf377bc97a16bc73e47f78f460c5f09c | |
parent | cec0c889f1bdc35b354e97a8b26cc73a801216cf (diff) | |
download | edk2-9cea4c4c14c82ead857674fa76c55cb7b207d8cb.tar.gz |
sync patch r11046, r11047, from main trunk.
Fix the issue that the high 16-bit of EAX may contain invalid data, which cause bad stack pointer,
the change will ensure the high 16-bit of EAX is cleared.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/branches/UDK2010@11527 6f19259b-4bc3-4df7-8a09-765794883524
8 files changed, 24 insertions, 24 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S index d9f2fc4c1f..6055ca663c 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.S @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------
#
-# Copyright (c) 2006, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2006 - 2010, 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
# http://opensource.org/licenses/bsd-license.php
@@ -55,7 +55,7 @@ ASM_PFX(ThunkAttr): .space 4 orb $2, %al
outb %al, $0x92 # deactivate A20M#
2:
- movl %ss, %eax
+ movw %ss, %ax
.byte 0x67, 0x66, 0x8d, 0x6c, 0x24, 0x34, 0x66
mov %ebp, 0xffffffd8(%esi)
mov 0xfffffff8(%esi), %ebx
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.asm index 154008f99a..61508d73bc 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.asm +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/Thunk16.asm @@ -1,5 +1,5 @@ -; Copyright (c) 2004, Intel Corporation
-; All rights reserved. This program and the accompanying materials
+; Copyright (c) 2004 - 2010, 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
; http://opensource.org/licenses/bsd-license.php
@@ -108,7 +108,7 @@ _ThunkAttr DD ? or al, 2
out 92h, al ; deactivate A20M#
@2:
- mov eax, ss
+ mov ax, ss
DB 67h
lea bp, [esp + sizeof (IA32_REGS)]
;
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S index 37c32787a7..da626ad47c 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.S @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2006 - 2010, 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
# http://opensource.org/licenses/bsd-license.php
@@ -104,7 +104,7 @@ L_1: orb $2,%al
outb %al, $0x92 # deactivate A20M#
L_2:
- movl %ss,%eax
+ movw %ss,%ax
lea IA32_REGS_SIZE(%esp), %bp
#
# rsi in the following 2 instructions is indeed bp in 16-bit code
diff --git a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.asm b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.asm index 05d7e5ed1e..c7d9caefe7 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.asm +++ b/EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/Thunk16.asm @@ -1,5 +1,5 @@ -; Copyright (c) 2004, Intel Corporation
-; All rights reserved. This program and the accompanying materials
+; Copyright (c) 2004 - 2010, 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
; http://opensource.org/licenses/bsd-license.php
@@ -103,7 +103,7 @@ _ThunkAttr DD ? or al, 2
out 92h, al ; deactivate A20M#
@2:
- 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
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.S b/MdePkg/Library/BaseLib/Ia32/Thunk16.S index d942a04947..35f4dfa80d 100644 --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.S +++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.S @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2008, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2006 - 2010, 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
# http://opensource.org/licenses/bsd-license.php
@@ -55,7 +55,7 @@ ASM_PFX(ThunkAttr): .space 4 orb $2, %al
outb %al, $0x92 # deactivate A20M#
2:
- movl %ss, %eax
+ movw %ss, %ax
.byte 0x67, 0x66, 0x8d, 0x6c, 0x24, 0x34, 0x66
mov %ebp, 0xffffffd8(%esi)
mov 0xfffffff8(%esi), %ebx
diff --git a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm index 3614b0f544..0b67514eff 100644 --- a/MdePkg/Library/BaseLib/Ia32/Thunk16.asm +++ b/MdePkg/Library/BaseLib/Ia32/Thunk16.asm @@ -3,8 +3,8 @@ ;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2008, Intel Corporation
-; All rights reserved. This program and the accompanying materials
+; Copyright (c) 2006 - 2010, 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
; http://opensource.org/licenses/bsd-license.php
@@ -109,7 +109,7 @@ _ThunkAttr DD ? or al, 2
out 92h, al ; deactivate A20M#
@2:
- mov eax, ss
+ mov ax, ss
DB 67h
lea bp, [esp + sizeof (IA32_REGS)]
;
diff --git a/MdePkg/Library/BaseLib/X64/Thunk16.S b/MdePkg/Library/BaseLib/X64/Thunk16.S index 51798dc224..e804892875 100644 --- a/MdePkg/Library/BaseLib/X64/Thunk16.S +++ b/MdePkg/Library/BaseLib/X64/Thunk16.S @@ -1,7 +1,7 @@ #------------------------------------------------------------------------------
#
-# Copyright (c) 2006 - 2009, Intel Corporation
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2006 - 2010, 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
# http://opensource.org/licenses/bsd-license.php
@@ -104,7 +104,7 @@ L_1: orb $2,%al
outb %al, $0x92 # deactivate A20M#
L_2:
- movl %ss,%eax
+ movw %ss,%ax
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 7d9136d4ab..0625078075 100644 --- a/MdePkg/Library/BaseLib/X64/Thunk16.asm +++ b/MdePkg/Library/BaseLib/X64/Thunk16.asm @@ -3,8 +3,8 @@ ;------------------------------------------------------------------------------
;
-; Copyright (c) 2006 - 2008, Intel Corporation
-; All rights reserved. This program and the accompanying materials
+; Copyright (c) 2006 - 2010, 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
; http://opensource.org/licenses/bsd-license.php
@@ -105,7 +105,7 @@ _ThunkAttr DD ? or al, 2
out 92h, al ; deactivate A20M#
@2:
- 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
|