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) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
# 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
@@ -60,7 +60,7 @@ COMPONENT_TYPE = LIBRARY
Math.c
[sources.x64]
X64/EfiCopyMemRep1.asm
X64/EfiCopyMemRep4.asm
X64/EfiSetMemRep4.asm
X64/EfiZeroMemRep4.asm
# X64/EfiCopyMem.asm

View File

@@ -1,6 +1,6 @@
#/*++
#
# Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.<BR>
# 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
@@ -85,14 +85,14 @@ COMPONENT_TYPE = LIBRARY
Math.c
[sources.x64]
X64/EfiCopyMemRep1.asm | MSFT
X64/EfiCopyMemRep4.asm | MSFT
X64/EfiSetMemRep4.asm | MSFT
X64/EfiZeroMemRep4.asm | MSFT
# X64/EfiCopyMem.asm | MSFT
# X64/EfiSetMem.asm | MSFT
# X64/EfiZeroMem.asm | MSFT
X64/EfiCopyMemRep1.asm | INTEL
X64/EfiCopyMemRep4.asm | INTEL
X64/EfiSetMemRep4.asm | INTEL
X64/EfiZeroMemRep4.asm | INTEL
# X64/EfiCopyMem.asm | INTEL

View File

@@ -75,16 +75,16 @@ ASM_PFX(EfiCommonLibCopyMem):
movl %esi, %eax
addl %ecx, %eax # Source + Count
cmpl %edi, %eax
jle _StartByteCopy
jbe _StartByteCopy
movl %edi, %eax
addl %ecx, %eax # Dest + Count
cmpl %esi, %eax
jle _StartByteCopy
jbe _StartByteCopy
cmpl %edi, %esi
je _CopyMemDone
jl _CopyOverlapped # too bad -- overlaps
jb _CopyOverlapped # too bad -- overlaps
# Pick up misaligned start bytes to get destination pointer 4-byte aligned
_StartByteCopy:

View File

@@ -73,16 +73,16 @@ EfiCommonLibCopyMem PROC
mov eax, esi
add eax, ecx ; Source + Count
cmp eax, edi
jle _StartByteCopy
jbe _StartByteCopy
mov eax, edi
add eax, ecx ; Dest + Count
cmp eax, esi
jle _StartByteCopy
jbe _StartByteCopy
cmp esi, edi
je _CopyMemDone
jl _CopyOverlapped ; too bad -- overlaps
jb _CopyOverlapped ; too bad -- overlaps
; Pick up misaligned start bytes to get destination pointer 4-byte aligned
_StartByteCopy:

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
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
@@ -58,20 +58,21 @@ Returns:
; if (Source == Destination) => do nothing
; if (Source + Count <= Destination) => regular copy
; if (Destination + Count <= Source) => regular copy
; if (Source >= Destination) => regular copy
; otherwise, do a reverse copy
mov eax, esi
add eax, ecx ; Source + Count
cmp eax, edi
jle _StartByteCopy
jbe _StartByteCopy
mov eax, edi
add eax, ecx ; Dest + Count
cmp eax, esi
jle _StartByteCopy
jbe _StartByteCopy
cmp esi, edi
je _CopyMemDone
jl _CopyOverlapped ; too bad -- overlaps
jb _CopyOverlapped ; too bad -- overlaps
; Pick up misaligned start bytes to get destination pointer 4-byte aligned
_StartByteCopy:

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
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
@@ -104,13 +104,13 @@ _CopyBlocks:
copyxmm:
movdqu xmm0, OWORD PTR ds:[esi]
movdqu QWORD PTR ds:[edi], xmm0
movdqu OWORD PTR ds:[edi], xmm0
movdqu xmm1, OWORD PTR ds:[esi+16]
movdqu QWORD PTR ds:[edi+16], xmm1
movdqu OWORD PTR ds:[edi+16], xmm1
movdqu xmm2, OWORD PTR ds:[esi+32]
movdqu QWORD PTR ds:[edi+32], xmm2
movdqu OWORD PTR ds:[edi+32], xmm2
movdqu xmm3, OWORD PTR ds:[esi+48]
movdqu QWORD PTR ds:[edi+48], xmm3
movdqu OWORD PTR ds:[edi+48], xmm3
add edi, 64
add esi, 64

View File

@@ -65,11 +65,13 @@ ASM_PFX(Power10U64):
jcxz _Power10U64_Done
_Power10U64_Wend:
pushl %ecx
pushl $10
push 0xC(%ebp)
push 0x8(%ebp)
call ASM_PFX(MultU64x32)
addl $0xc, %esp
popl %ecx
movl %eax, 8(%ebp) # dword ptr Operand[0]
movl %edx, 0xC(%ebp) # dword ptr Operand[4]
loopl _Power10U64_Wend

View File

@@ -64,11 +64,13 @@ Power10U64 PROC
jcxz _Power10U64_Done
_Power10U64_Wend:
push ecx
push 10
push [ebp + 0Ch]; dword ptr Operand[4]
push [ebp + 8]; dword ptr Operand[0]
call MultU64x32
add esp, 0cH
pop ecx
mov [ebp + 8] , eax; dword ptr Operand[0]
mov [ebp + 0Ch] , edx; dword ptr Operand[4]
loop _Power10U64_Wend

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
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
@@ -56,11 +56,13 @@ Returns:
jcxz _Power10U64_Done
_Power10U64_Wend:
push ecx
push 10
push dword ptr Operand[4]
push dword ptr Operand[0]
call MultU64x32
add esp, 0Ch
pop ecx
mov dword ptr Operand[0], eax
mov dword ptr Operand[4], edx
loop _Power10U64_Wend

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>
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
@@ -75,6 +75,21 @@ Returns:
return Multiplicand * Multiplier;
}
UINT64
Power10U64 (
IN UINT64 Operand,
IN UINTN Power
)
{
UINT64 Result;
Result = Operand;
while (Power-- > 0) {
Result *= 10;
}
return Result;
}
UINT64
RShiftU64 (
IN UINT64 Operand,

View File

@@ -1,6 +1,6 @@
/*++
Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.<BR>
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
@@ -20,8 +20,8 @@ Abstract:
#include "Tiano.h"
#include "pei.h"
#include "cpuio.h"
#include "pcicfg.h"
#include "pcicfg2.h"
#include EFI_PPI_CONSUMER (PciCfg)
#include EFI_PPI_CONSUMER (PciCfg2)
#include EFI_PROTOCOL_CONSUMER (PciRootBridgeIo)
//
@@ -68,8 +68,6 @@ Returns:
--*/
{
EFI_STATUS Status;
mPeiServices = NULL;
CpuIoPpi = NULL;
PciCfgPpi = NULL;
@@ -136,7 +134,7 @@ Returns:
EFI_STATUS Status;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo;
if (mPeiServices == NULL) {
if (mPeiServices != NULL) {
//
// The function is called in PEI phase, use PEI interfaces
//
@@ -197,7 +195,7 @@ Returns:
EFI_STATUS Status;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo;
if (mPeiServices == NULL) {
if (mPeiServices != NULL) {
//
// The function is called in PEI phase, use PEI interfaces
//
@@ -260,7 +258,7 @@ Returns:
UINT8 *Buffer8;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo;
if (mPeiServices == NULL) {
if (mPeiServices != NULL) {
//
// The function is called in PEI phase, use PEI interfaces
//