From 4b79797eeadc83a9ce1df5efe99d1f1248bbc887 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Sat, 23 Aug 2008 09:31:51 +0000 Subject: [PATCH] 1) Cleanup for GCC and ICC tool-chain. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5718 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Foundation/Include/Ia32/EfiBind.h | 6 +- .../Foundation/Include/X64/EfiBind.h | 8 ++- .../EfiCommonLib/EfiCommonLib_Edk2.inf | 22 ++++--- .../Foundation/Library/Pei/PeiLib/FindFv.c | 4 +- .../Foundation/Library/Pei/PeiLib/Hob/Hob.c | 18 +++--- .../Foundation/Library/Pei/PeiLib/PeiLib.c | 6 +- .../Foundation/Library/Pei/PeiLib/Perf.c | 4 +- .../Library/Pei/PeiLib/ia32/Processor.c | 6 +- .../Library/Pei/PeiLib/x64/Processor.c | 6 +- .../EfiRuntimeLib/EfiRuntimeLib.inf | 3 +- .../EfiRuntimeLib/EfiRuntimeLib_Edk2.inf | 4 +- .../RuntimeDxe/EfiRuntimeLib/GetImage.c | 6 +- .../EfiRuntimeLib/ia32/CpuFlushCache.asm | 62 +++++++++++++++++++ .../EfiRuntimeLib/ia32/CpuFlushCache.c | 55 ++++++++++++++++ .../RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c | 6 +- .../EfiRuntimeLib/ia32/RuntimeLib.c | 38 +----------- .../RuntimeDxe/EfiRuntimeLib/x64/Fvb.c | 6 +- .../RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c | 6 +- .../Foundation/Protocol/Dpc/Dpc.h | 4 +- 19 files changed, 187 insertions(+), 83 deletions(-) create mode 100644 EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.asm create mode 100644 EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.c diff --git a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h index 61614355a8..6b102c3043 100644 --- a/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/Ia32/EfiBind.h @@ -299,7 +299,11 @@ typedef int32_t intn_t; // For symbol name in GNU assembly code, an extra "_" is necessary // #if __GNUC__ - #define ASM_PFX(name) _##name + #if defined(linux) + #define ASM_PFX(name) name + #else + #define ASM_PFX(name) _##name + #endif #endif #endif diff --git a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h index 19570c82b2..75ccf10511 100644 --- a/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h +++ b/EdkCompatibilityPkg/Foundation/Include/X64/EfiBind.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2007, Intel Corporation +Copyright (c) 2005 - 2008, Intel Corporation All rights reserved. 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 @@ -252,7 +252,11 @@ typedef int64_t intn_t; // For symbol name in GNU assembly code, an extra "_" is necessary // #if __GNUC__ - #define ASM_PFX(name) _##name + #if defined(linux) + #define ASM_PFX(name) name + #else + #define ASM_PFX(name) _##name + #endif #endif #endif diff --git a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib_Edk2.inf b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib_Edk2.inf index 14e9e6b71c..529f4923a0 100644 --- a/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib_Edk2.inf +++ b/EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/EfiCommonLib_Edk2.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2004 - 2007, Intel Corporation +# Copyright (c) 2004 - 2008, Intel Corporation # All rights reserved. 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,12 +85,20 @@ COMPONENT_TYPE = LIBRARY Math.c [sources.x64] - x64/EfiCopyMemRep1.asm - x64/EfiSetMemRep4.asm - x64/EfiZeroMemRep4.asm -# x64/EfiCopyMem.asm -# x64/EfiSetMem.asm -# x64/EfiZeroMem.asm + x64/EfiCopyMemRep1.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/EfiSetMemRep4.asm | INTEL + x64/EfiZeroMemRep4.asm | INTEL +# x64/EfiCopyMem.asm | INTEL +# x64/EfiSetMem.asm | INTEL +# x64/EfiZeroMem.asm | INTEL + Math.c [includes.common] diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/FindFv.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/FindFv.c index cbfad238bc..99b4b1cb21 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/FindFv.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/FindFv.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2007, Intel Corporation +Copyright (c) 2006 - 2008, Intel Corporation All rights reserved. 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 @@ -134,7 +134,7 @@ Returns: // Status = (*PeiServices)->GetHobList ( PeiServices, - &HobStart.Raw + (VOID **) &HobStart.Raw ); if (EFI_ERROR (Status)) { diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Hob/Hob.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Hob/Hob.c index 9e608288e7..1e9627fb44 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Hob/Hob.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Hob/Hob.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2007, Intel Corporation +Copyright (c) 2004 - 2008, Intel Corporation All rights reserved. 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 @@ -62,7 +62,7 @@ Returns: PeiServices, EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_MODULE), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; @@ -125,7 +125,7 @@ Returns: PeiServices, EFI_HOB_TYPE_RESOURCE_DESCRIPTOR, sizeof (EFI_HOB_RESOURCE_DESCRIPTOR), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; @@ -223,7 +223,7 @@ Returns: PeiServices, Guid, DataLength, - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { @@ -276,7 +276,7 @@ Returns: PeiServices, EFI_HOB_TYPE_FV, sizeof (EFI_HOB_FIRMWARE_VOLUME), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; @@ -325,7 +325,7 @@ Returns: PeiServices, EFI_HOB_TYPE_CPU, sizeof (EFI_HOB_CPU), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; @@ -378,7 +378,7 @@ Returns: PeiServices, EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_STACK), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; @@ -436,7 +436,7 @@ Returns: PeiServices, EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION_BSP_STORE), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; @@ -496,7 +496,7 @@ Returns: PeiServices, EFI_HOB_TYPE_MEMORY_ALLOCATION, sizeof (EFI_HOB_MEMORY_ALLOCATION), - &Hob + (VOID **) &Hob ); if (EFI_ERROR (Status)) { return Status; diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.c index 269eb8a13d..86fbbb1ecd 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2007, Intel Corporation +Copyright (c) 2004 - 2008, Intel Corporation All rights reserved. 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 @@ -234,9 +234,9 @@ Returns: ASSERT_PEI_ERROR (PeiServices, Status); Status = PciCfg2->Modify ( - PeiServices, + (CONST EFI_PEI_SERVICES **) PeiServices, PciCfg2, - Width, + (EFI_PEI_PCI_CFG_PPI_WIDTH) Width, Address, &SetBits, &ClearBits diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Perf.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Perf.c index acae16dde2..8cf18e5436 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Perf.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Perf.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2005, Intel Corporation +Copyright (c) 2004 - 2008, Intel Corporation All rights reserved. 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 @@ -114,7 +114,7 @@ Returns: sizeof(PEI_PERFORMANCE_MEASURE_LOG_ENTRY)) + sizeof(EFI_PEI_PPI_DESCRIPTOR) ), - &Hob + (VOID **) &Hob ); ASSERT_PEI_ERROR(PeiServices, Status); diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/ia32/Processor.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/ia32/Processor.c index 4010db25a2..cdad731731 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/ia32/Processor.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/ia32/Processor.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2005, Intel Corporation +Copyright (c) 2004 - 2008, Intel Corporation All rights reserved. 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 @@ -29,14 +29,14 @@ EFI_STATUS EFIAPI TransferControlSetJump ( IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, - IN EFI_JUMP_BUFFER *Jump + IN VOID *Jump ); EFI_STATUS EFIAPI TransferControlLongJump ( IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, - IN EFI_JUMP_BUFFER *Jump + IN VOID *Jump ); EFI_STATUS diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/x64/Processor.c b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/x64/Processor.c index 63cf8486c0..bc6ef0070d 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/x64/Processor.c +++ b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/x64/Processor.c @@ -1,6 +1,6 @@ /*++ -Copyright 2005, Intel Corporation +Copyright 2005 - 2008, Intel Corporation All rights reserved. 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 @@ -30,14 +30,14 @@ EFI_STATUS EFIAPI TransferControlSetJump ( IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, - IN EFI_JUMP_BUFFER *Jump + IN VOID *Jump ); EFI_STATUS EFIAPI TransferControlLongJump ( IN EFI_PEI_TRANSFER_CONTROL_PROTOCOL *This, - IN EFI_JUMP_BUFFER *Jump + IN VOID *Jump ); EFI_STATUS diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf index 66132b6939..61087eb742 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2004 - 2007, Intel Corporation +# Copyright (c) 2004 - 2008, Intel Corporation # All rights reserved. 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 @@ -37,6 +37,7 @@ COMPONENT_TYPE = LIBRARY ia32/Lock.c ia32/PlatformIoLib.c ia32/Fvb.c + ia32/CpuFlushCache.c [sources.x64] x64/RuntimeLib.c diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib_Edk2.inf b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib_Edk2.inf index 40e3867f7b..6b9a526ab9 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib_Edk2.inf +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib_Edk2.inf @@ -1,6 +1,6 @@ #/*++ # -# Copyright (c) 2004 - 2007, Intel Corporation +# Copyright (c) 2004 - 2008, Intel Corporation # All rights reserved. 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 @@ -37,6 +37,8 @@ COMPONENT_TYPE = LIBRARY ia32/Lock.c ia32/PlatformIoLib.c ia32/Fvb.c + ia32/CpuFlushCache.c | MSFT + ia32/CpuFlushCache.asm | INTEL [sources.x64] x64/RuntimeLib.c diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/GetImage.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/GetImage.c index 990acffac1..a48b9a4f14 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/GetImage.c +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/GetImage.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2006 - 2007, Intel Corporation +Copyright (c) 2006 - 2008, Intel Corporation All rights reserved. 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 @@ -140,7 +140,7 @@ GetImageEx ( Status = gBS->HandleProtocol ( ImageHandle, &gEfiLoadedImageProtocolGuid, - &LoadedImage + (VOID **) &LoadedImage ); if (EFI_ERROR (Status)) { return Status; @@ -152,7 +152,7 @@ GetImageEx ( #else &gEfiFirmwareVolume2ProtocolGuid, #endif - &ImageFv + (VOID **) &ImageFv ); if (!EFI_ERROR (Status)) { Status = GetImageFromFv (ImageFv, NameGuid, SectionType, Buffer, Size); diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.asm b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.asm new file mode 100644 index 0000000000..ade53d6116 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.asm @@ -0,0 +1,62 @@ +;/*++ +; +;Copyright (c) 2008, Intel Corporation +;All rights reserved. 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 + ; +;THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +;WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +; +;Module Name: +; + ;CpuFlushCache.c +; +;Abstract: +; + ;Cpu Flush Cache Function. +; +;--*/ +;--------------------------------------------------------------------------- + .586p + .model flat,C + .code + +;--------------------------------------------------------------------------- +; +;// +;// Cache Flush Routine. +;// +;EFI_STATUS +;EfiCpuFlushCache ( + ;IN EFI_PHYSICAL_ADDRESS Start, +; IN UINT64 Length + ;) +;/*++ +; +;Routine Description: +; + ;Flush cache with specified range. +; +;Arguments: +; + ;Start - Start address +; Length - Length in bytes +; +;Returns: +; + ;Status code +; + ;EFI_SUCCESS - success +; +;--*/ +EfiCpuFlushCache PROC + wbinvd + xor eax, eax + ret +EfiCpuFlushCache ENDP + + END + + \ No newline at end of file diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.c new file mode 100644 index 0000000000..852ce0ddd3 --- /dev/null +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.c @@ -0,0 +1,55 @@ +/*++ + +Copyright (c) 2008, Intel Corporation +All rights reserved. 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 + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Module Name: + + CpuFlushCache.c + +Abstract: + + Cpu Flush Cache Function. + +--*/ +#include "Tiano.h" +#include "EfiRuntimeLib.h" + +// +// Cache Flush Routine. +// +EFI_STATUS +EfiCpuFlushCache ( + IN EFI_PHYSICAL_ADDRESS Start, + IN UINT64 Length + ) +/*++ + +Routine Description: + + Flush cache with specified range. + +Arguments: + + Start - Start address + Length - Length in bytes + +Returns: + + Status code + + EFI_SUCCESS - success + +--*/ +{ + __asm { + wbinvd + } + return EFI_SUCCESS; +} diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c index b8e4c7d6f7..b1643b169b 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2007, Intel Corporation +Copyright (c) 2004 - 2008, Intel Corporation All rights reserved. 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 @@ -215,7 +215,7 @@ Returns: // We check Runtime here, because it has no reason to register // a boot time FVB protocol. // - Status = gBS->HandleProtocol (Handle, &gEfiFirmwareVolumeBlockProtocolGuid, &Fvb); + Status = gBS->HandleProtocol (Handle, &gEfiFirmwareVolumeBlockProtocolGuid, (VOID **) &Fvb); ASSERT_EFI_ERROR (Status); if (IsMemoryRuntime (Fvb)) { // @@ -228,7 +228,7 @@ Returns: mFvbEntry[UpdateIndex].Fvb = Fvb; mFvbEntry[UpdateIndex].FvbExtension = NULL; - Status = gBS->HandleProtocol (Handle, &gEfiFvbExtensionProtocolGuid, &FvbExtension); + Status = gBS->HandleProtocol (Handle, &gEfiFvbExtensionProtocolGuid, (VOID **) &FvbExtension); if ((Status == EFI_SUCCESS) && IsMemoryRuntime (FvbExtension)) { mFvbEntry[UpdateIndex].FvbExtension = FvbExtension; } diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/RuntimeLib.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/RuntimeLib.c index 8ea1cf0648..2367e10759 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/RuntimeLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/RuntimeLib.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2004 - 2006, Intel Corporation +Copyright (c) 2004 - 2008, Intel Corporation All rights reserved. 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 @@ -281,7 +281,7 @@ Returns: } #endif - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &gCpuIo); + Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &gCpuIo); if (EFI_ERROR (Status)) { gCpuIo = NULL; } @@ -412,7 +412,7 @@ Returns: } #endif - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &gCpuIo); + Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &gCpuIo); if (EFI_ERROR (Status)) { gCpuIo = NULL; } @@ -817,35 +817,3 @@ Returns: #endif return Status; } -// -// Cache Flush Routine. -// -EFI_STATUS -EfiCpuFlushCache ( - IN EFI_PHYSICAL_ADDRESS Start, - IN UINT64 Length - ) -/*++ - -Routine Description: - - Flush cache with specified range. - -Arguments: - - Start - Start address - Length - Length in bytes - -Returns: - - Status code - - EFI_SUCCESS - success - ---*/ -{ - __asm { - wbinvd - } - return EFI_SUCCESS; -} diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/Fvb.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/Fvb.c index d8cdbbab22..15073dc419 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/Fvb.c +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/Fvb.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2007, Intel Corporation +Copyright (c) 2005 - 2008, Intel Corporation All rights reserved. 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 @@ -215,7 +215,7 @@ Returns: // We check Runtime here, because it has no reason to register // a boot time FVB protocol. // - Status = gBS->HandleProtocol (Handle, &gEfiFirmwareVolumeBlockProtocolGuid, &Fvb); + Status = gBS->HandleProtocol (Handle, &gEfiFirmwareVolumeBlockProtocolGuid, (VOID **) &Fvb); ASSERT_EFI_ERROR (Status); if (IsMemoryRuntime (Fvb)) { // @@ -228,7 +228,7 @@ Returns: mFvbEntry[UpdateIndex].Fvb = Fvb; mFvbEntry[UpdateIndex].FvbExtension = NULL; - Status = gBS->HandleProtocol (Handle, &gEfiFvbExtensionProtocolGuid, &FvbExtension); + Status = gBS->HandleProtocol (Handle, &gEfiFvbExtensionProtocolGuid, (VOID **) &FvbExtension); if ((Status == EFI_SUCCESS) && IsMemoryRuntime (FvbExtension)) { mFvbEntry[UpdateIndex].FvbExtension = FvbExtension; } diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c index be993c30a5..ad653507cb 100644 --- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c +++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2005 - 2006, Intel Corporation +Copyright (c) 2005 - 2008, Intel Corporation All rights reserved. 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 @@ -281,7 +281,7 @@ Returns: } #endif - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &gCpuIo); + Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &gCpuIo); if (EFI_ERROR (Status)) { gCpuIo = NULL; } @@ -412,7 +412,7 @@ Returns: } #endif - Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, &gCpuIo); + Status = gBS->LocateProtocol (&gEfiCpuIoProtocolGuid, NULL, (VOID **) &gCpuIo); if (EFI_ERROR (Status)) { gCpuIo = NULL; } diff --git a/EdkCompatibilityPkg/Foundation/Protocol/Dpc/Dpc.h b/EdkCompatibilityPkg/Foundation/Protocol/Dpc/Dpc.h index 315b997711..3f1d068ab1 100644 --- a/EdkCompatibilityPkg/Foundation/Protocol/Dpc/Dpc.h +++ b/EdkCompatibilityPkg/Foundation/Protocol/Dpc/Dpc.h @@ -1,6 +1,6 @@ /*++ -Copyright (c) 2007, Intel Corporation +Copyright (c) 2007 - 2008, Intel Corporation All rights reserved. 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 @@ -96,7 +96,7 @@ EFI_STATUS // // DPC Protocol structure // -typedef struct _EFI_DPC_PROTOCOL { +struct _EFI_DPC_PROTOCOL { EFI_DPC_QUEUE_DPC QueueDpc; EFI_DPC_DISPATCH_DPC DispatchDpc; }; -- 2.39.2