Sync all bug fixes between EDK1.04 and EDK1.06 into EdkCompatibilityPkg.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11094 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4
2010-11-26 01:54:49 +00:00
parent 68bb5ce77e
commit 3e99020dbf
183 changed files with 15250 additions and 2636 deletions

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2005, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 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
@@ -35,6 +35,8 @@ typedef struct {
UINT64 R14;
UINT64 R15;
UINT64 Rip;
UINT32 MxCsr;
UINT8 XmmBuffer[160]; // XMM6-XMM15
} EFI_JUMP_BUFFER;
#endif

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2005 - 2008, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2005 - 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
@@ -84,8 +84,6 @@ Returns:
--*/
{
*This = &mTransferControl;
mTransferControl.SetJump = TransferControlSetJump;
mTransferControl.LongJump = TransferControlLongJump;
return EFI_SUCCESS;
}
@@ -112,7 +110,6 @@ Returns:
--*/
{
*This = &mFlushInstructionCache;
mFlushInstructionCache.Flush = FlushInstructionCacheFlush;
return EFI_SUCCESS;
}

View File

@@ -1,6 +1,6 @@
;------------------------------------------------------------------------------
;
; Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.<BR>
; Copyright (c) 2005 - 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
@@ -73,6 +73,8 @@ _r13 QWORD ?
_r14 QWORD ?
_r15 QWORD ?
_rip QWORD ?
_MxCsr DWORD ?
_XmmBuffer DB 160 DUP (?)
_EFI_JUMP_BUFFER ENDS
EFI_JUMP_BUFFER TYPEDEF _EFI_JUMP_BUFFER
@@ -116,6 +118,19 @@ TransferControlSetJump PROC
mov (EFI_JUMP_BUFFER PTR [rdx])._r13, r13
mov (EFI_JUMP_BUFFER PTR [rdx])._r14, r14
mov (EFI_JUMP_BUFFER PTR [rdx])._r15, r15
; save non-volatile fp registers
stmxcsr (EFI_JUMP_BUFFER PTR [rdx])._MxCsr
lea rax, (EFI_JUMP_BUFFER PTR [rdx])._XmmBuffer
movdqu [rax], xmm6
movdqu [rax + 10h], xmm7
movdqu [rax + 20h], xmm8
movdqu [rax + 30h], xmm9
movdqu [rax + 40h], xmm10
movdqu [rax + 50h], xmm11
movdqu [rax + 60h], xmm12
movdqu [rax + 70h], xmm13
movdqu [rax + 80h], xmm14
movdqu [rax + 90h], xmm15
mov rax, QWORD PTR [rsp+0]
mov (EFI_JUMP_BUFFER PTR [rdx])._rip, rax
mov rax, EFI_SUCCESS
@@ -134,6 +149,19 @@ TransferControlSetJump ENDP
;
PUBLIC TransferControlLongJump
TransferControlLongJump PROC
; load non-volatile fp registers
ldmxcsr (EFI_JUMP_BUFFER PTR [rdx])._MxCsr
lea rax, (EFI_JUMP_BUFFER PTR [rdx])._XmmBuffer
movdqu xmm6, [rax]
movdqu xmm7, [rax + 10h]
movdqu xmm8, [rax + 20h]
movdqu xmm9, [rax + 30h]
movdqu xmm10, [rax + 40h]
movdqu xmm11, [rax + 50h]
movdqu xmm12, [rax + 60h]
movdqu xmm13, [rax + 70h]
movdqu xmm14, [rax + 80h]
movdqu xmm15, [rax + 90h]
; set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP
mov rax, EFI_WARN_RETURN_FROM_LONG_JUMP
mov rbx, (EFI_JUMP_BUFFER PTR [rdx])._rbx

View File

@@ -1,6 +1,6 @@
#------------------------------------------------------------------------------
#
# Copyright (c) 2008, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2008 - 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
@@ -99,6 +99,19 @@ ASM_PFX(TransferControlSetJump):
mov %r13,0x40(%rdx)
mov %r14,0x48(%rdx)
mov %r15,0x50(%rdx)
#; save non-volatile fp registers
stmxcsr 0x60(%rdx)
lea 0x68(%rdx), %rax
movdqu %xmm6, (%rax)
movdqu %xmm7, 0x10(%rax)
movdqu %xmm8, 0x20(%rax)
movdqu %xmm9, 0x30(%rax)
movdqu %xmm10, 0x40(%rax)
movdqu %xmm11, 0x50(%rax)
movdqu %xmm12, 0x60(%rax)
movdqu %xmm13, 0x70(%rax)
movdqu %xmm14, 0x80(%rax)
movdqu %xmm15, 0x90(%rax)
mov (%rsp),%rax
mov %rax,0x58(%rdx)
mov $0x0,%rax
@@ -115,7 +128,20 @@ ASM_PFX(TransferControlSetJump):
#
#
ASM_PFX(TransferControlLongJump):
# set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP
# set return from SetJump to EFI_WARN_RETURN_FROM_LONG_JUMP
#; load non-volatile fp registers
ldmxcsr 0x60(%rdx)
lea 0x68(%rdx), %rax
movdqu (%rax), %xmm6
movdqu 0x10(%rax), %xmm7
movdqu 0x20(%rax), %xmm8
movdqu 0x30(%rax), %xmm9
movdqu 0x40(%rax), %xmm10
movdqu 0x50(%rax), %xmm11
movdqu 0x60(%rax), %xmm12
movdqu 0x70(%rax), %xmm13
movdqu 0x80(%rax), %xmm14
movdqu 0x90(%rax), %xmm15
mov $0x5,%rax
mov (%rdx),%rbx
mov 0x8(%rdx),%rsp