summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32
diff options
context:
space:
mode:
Diffstat (limited to 'EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/ia32')
-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
4 files changed, 123 insertions, 38 deletions
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;
-}