summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-23 09:31:51 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-08-23 09:31:51 +0000
commit4b79797eeadc83a9ce1df5efe99d1f1248bbc887 (patch)
treeab5ac86122fc38f66bd1f05158f06e80d1e662fd /EdkCompatibilityPkg/Foundation/Library/RuntimeDxe
parent8e35b68162a77c580917b6f636f84b74dc4aed22 (diff)
downloadedk2-platforms-4b79797eeadc83a9ce1df5efe99d1f1248bbc887.tar.xz
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
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/RuntimeDxe')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib.inf3
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib_Edk2.inf4
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/GetImage.c6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.asm62
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/CpuFlushCache.c55
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/Fvb.c6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32/RuntimeLib.c38
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/Fvb.c6
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/x64/RuntimeLib.c6
9 files changed, 137 insertions, 49 deletions
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;
}