]> git.proxmox.com Git - mirror_edk2.git/commitdiff
1) Add in EcpEfiBreakPoint and EcpMemoryFence which will be defined as EFI_BREAKPOINT...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 2 Dec 2008 14:35:15 +0000 (14:35 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 2 Dec 2008 14:35:15 +0000 (14:35 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6806 6f19259b-4bc3-4df7-8a09-765794883524

EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib_Edk2.inf [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Ipf/AsmCpuMisc.s [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiDriverLib.h
EdkCompatibilityPkg/Foundation/Library/Dxe/Include/EfiRuntimeLib.h
EdkCompatibilityPkg/Foundation/Library/Pei/Include/PeiLib.h
EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/AsmCpuMisc.s [new file with mode: 0644]
EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/PeiLib_Edk2.inf
EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/EfiRuntimeLib_Edk2.inf
EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/AsmCpuMisc.s [new file with mode: 0644]

diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib_Edk2.inf b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/EfiDriverLib_Edk2.inf
new file mode 100644 (file)
index 0000000..556bd5b
--- /dev/null
@@ -0,0 +1,93 @@
+#/*++\r
+#\r
+# Copyright (c) 2004 - 2006, Intel Corporation                                                         \r
+# All rights reserved. This program and the accompanying materials                          \r
+# are licensed and made available under the terms and conditions of the BSD License         \r
+# which accompanies this distribution.  The full text of the license may be found at        \r
+# http://opensource.org/licenses/bsd-license.php                                            \r
+#                                                                                           \r
+# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+# \r
+#  Module Name:\r
+#\r
+#   EfiDriverLib.inf\r
+#\r
+#  Abstract:\r
+#\r
+#    Component description file for the EFI driver library.\r
+#\r
+#--*/\r
+\r
+[defines]\r
+BASE_NAME       = EfiDriverLib\r
+COMPONENT_TYPE  = LIBRARY\r
+\r
+[sources.common]\r
+  Debug.c\r
+  DevicePath.c\r
+  EfiDriverLib.c\r
+  DxeDriverLib.c\r
+  EfiGetConfigTable.c\r
+  EfiDriverModelLib.c\r
+  Event.c\r
+  Handle.c\r
+  LibGlobalSt.c\r
+  LibGlobalDs.c\r
+  LibGlobalErrorLevel.c\r
+  Lock.c\r
+  EfiLibAllocate.c\r
+  Perf.c\r
+  ReportStatusCode.c\r
+  GetImage.c\r
+\r
+  ../Hob/Hob.c\r
+\r
+[sources.ia32]\r
+  Ia32/PerformancePrimitives.c\r
+\r
+[sources.x64]\r
+  X64/PerformancePrimitives.c\r
+\r
+[sources.ipf]\r
+  Ipf/PerformancePrimitives.s\r
+  #\r
+  # Only for CYGWINGCC IPF tool chain, EFI_BREAKPOINT and MEMORY_FENCE\r
+  # is defined as two functions EcpEfiBreakPoint and EcpMemoryFence.\r
+  #\r
+  Ipf/AsmCpuMisc.s | GCC\r
+\r
+[sources.ebc]\r
+  Ebc/PerformancePrimitives.c\r
+\r
+[includes.common]\r
+  $(EDK_SOURCE)/Foundation\r
+  $(EDK_SOURCE)/Foundation/Framework\r
+  $(EDK_SOURCE)/Foundation/Efi\r
+  $(EDK_SOURCE)/Foundation/Include\r
+  $(EDK_SOURCE)/Foundation/Efi/Include\r
+  $(EDK_SOURCE)/Foundation/Framework/Include\r
+  $(EDK_SOURCE)/Foundation/Include/IndustryStandard\r
+  $(EDK_SOURCE)/Foundation/Core/Dxe\r
+  $(EDK_SOURCE)/Foundation/Library/Dxe/Include\r
+  $(EDK_SOURCE)/Foundation/Cpu/Pentium/Include\r
+\r
+[libraries.common]\r
+  EdkGuidLib\r
+  EdkProtocolLib\r
+  EdkFrameworkProtocolLib\r
+  EfiGuidLib\r
+  EfiProtocolLib\r
+  ArchProtocolLib\r
+  EfiCommonLib\r
+\r
+[libraries.ia32]\r
+  CpuIA32Lib\r
+\r
+[libraries.x64]\r
+  CpuIA32Lib\r
+\r
+[libraries.ipf]\r
+  CpuIA64Lib\r
+\r
+[nmake.common]\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Ipf/AsmCpuMisc.s b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/Ipf/AsmCpuMisc.s
new file mode 100644 (file)
index 0000000..fbb1988
--- /dev/null
@@ -0,0 +1,44 @@
+/// @file\r
+///   Contains an implementation of EcpEfiBreakPoint and EcpMemoryFence on Itanium-based\r
+///   architecture.\r
+///\r
+/// Copyright (c) 2008, Intel Corporation\r
+/// All rights reserved. This program and the accompanying materials\r
+/// are licensed and made available under the terms and conditions of the BSD License\r
+/// which accompanies this distribution.  The full text of the license may be found at\r
+/// http://opensource.org/licenses/bsd-license.php\r
+///\r
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+///\r
+/// Module Name:  AsmCpuMisc.s\r
+///\r
+///\r
+\r
+\r
+.text\r
+.proc EcpEfiBreakPoint\r
+.type EcpEfiBreakPoint, @function\r
+\r
+EcpEfiBreakPoint::\r
+        break.i 0;;\r
+        br.ret.dpnt    b0;;\r
+\r
+.endp EcpEfiBreakPoint\r
+\r
+.proc EcpMemoryFence\r
+.type EcpMemoryFence, @function\r
+\r
+EcpMemoryFence::\r
+        mf;;    // memory access ordering\r
+\r
+        // do we need the mf.a also here?\r
+        mf.a    // wait for any IO to complete?\r
+        \r
+        // not sure if we need serialization here, just put it, in case...\r
+        \r
+        srlz.d;;\r
+        srlz.i;;\r
+        \r
+        br.ret.dpnt    b0;;\r
+.endp EcpMemoryFence
\ No newline at end of file
index 67110fff7814fe452fc4e65bbe5e71a48f1e043a..1cdcc13c20632fe47cee50b92e7d177aad81a623 100644 (file)
@@ -47,6 +47,60 @@ Abstract:
 \r
 #include EFI_PROTOCOL_DEFINITION (DebugMask)\r
 \r
+#if defined(__GNUC__) && defined(ECP_CPU_IPF)\r
+\r
+VOID\r
+EFIAPI\r
+EcpEfiBreakPoint (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Generates a breakpoint on the CPU.\r
+\r
+  Generates a breakpoint on the CPU. The breakpoint must be implemented such\r
+  that code can resume normal execution after the breakpoint.\r
+\r
+Arguments:\r
+\r
+  VOID\r
+\r
+Returns: \r
+\r
+  VOID\r
+\r
+--*/\r
+;\r
+\r
+VOID\r
+EFIAPI\r
+EcpMemoryFence (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Used to serialize load and store operations.\r
+\r
+  All loads and stores that proceed calls to this function are guaranteed to be\r
+  globally visible when this function returns.\r
+\r
+Arguments:\r
+\r
+  VOID\r
+\r
+Returns: \r
+\r
+  VOID\r
+\r
+--*/\r
+;\r
+\r
+#endif\r
+\r
 typedef struct {\r
   CHAR8   *Language;\r
   CHAR16  *UnicodeString;\r
index 042a7f85fd94711585f66c62c6bd5a8174e1faf0..ef47929196f8b79a0a7ed0ba3370248f694124e2 100644 (file)
@@ -54,6 +54,60 @@ extern EFI_DXE_SERVICES   *gDS;
 extern UINTN              gRtErrorLevel;\r
 extern FVB_ENTRY          *mFvbEntry;\r
 \r
+#if defined(__GNUC__) && defined(ECP_CPU_IPF)\r
+\r
+VOID\r
+EFIAPI\r
+EcpEfiBreakPoint (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Generates a breakpoint on the CPU.\r
+\r
+  Generates a breakpoint on the CPU. The breakpoint must be implemented such\r
+  that code can resume normal execution after the breakpoint.\r
+\r
+Arguments:\r
+\r
+  VOID\r
+\r
+Returns: \r
+\r
+  VOID\r
+\r
+--*/\r
+;\r
+\r
+VOID\r
+EFIAPI\r
+EcpMemoryFence (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Used to serialize load and store operations.\r
+\r
+  All loads and stores that proceed calls to this function are guaranteed to be\r
+  globally visible when this function returns.\r
+\r
+Arguments:\r
+\r
+  VOID\r
+\r
+Returns: \r
+\r
+  VOID\r
+\r
+--*/\r
+;\r
+\r
+#endif\r
+\r
 VOID\r
 EFIAPI\r
 EfiRuntimeLibFvbVirtualNotifyEvent (\r
index 24090b65d479c2be355573400e48ca18348d0835..9202f0318b5d0d35c90a24f59b7146b74100c858 100644 (file)
@@ -31,6 +31,60 @@ Abstract:
 #include EFI_GUID_DEFINITION (PeiPeCoffLoader)\r
 #include EFI_PPI_DEFINITION (FindFv)\r
 \r
+#if defined(__GNUC__) && defined(ECP_CPU_IPF)\r
+\r
+VOID\r
+EFIAPI\r
+EcpEfiBreakPoint (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Generates a breakpoint on the CPU.\r
+\r
+  Generates a breakpoint on the CPU. The breakpoint must be implemented such\r
+  that code can resume normal execution after the breakpoint.\r
+\r
+Arguments:\r
+\r
+  VOID\r
+\r
+Returns: \r
+\r
+  VOID\r
+\r
+--*/\r
+;\r
+\r
+VOID\r
+EFIAPI\r
+EcpMemoryFence (\r
+  VOID\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+  Used to serialize load and store operations.\r
+\r
+  All loads and stores that proceed calls to this function are guaranteed to be\r
+  globally visible when this function returns.\r
+\r
+Arguments:\r
+\r
+  VOID\r
+\r
+Returns: \r
+\r
+  VOID\r
+\r
+--*/\r
+;\r
+\r
+#endif\r
+\r
 \r
 #if (PI_SPECIFICATION_VERSION >= 0x00010000)\r
 \r
diff --git a/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/AsmCpuMisc.s b/EdkCompatibilityPkg/Foundation/Library/Pei/PeiLib/Ipf/AsmCpuMisc.s
new file mode 100644 (file)
index 0000000..fbb1988
--- /dev/null
@@ -0,0 +1,44 @@
+/// @file\r
+///   Contains an implementation of EcpEfiBreakPoint and EcpMemoryFence on Itanium-based\r
+///   architecture.\r
+///\r
+/// Copyright (c) 2008, Intel Corporation\r
+/// All rights reserved. This program and the accompanying materials\r
+/// are licensed and made available under the terms and conditions of the BSD License\r
+/// which accompanies this distribution.  The full text of the license may be found at\r
+/// http://opensource.org/licenses/bsd-license.php\r
+///\r
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+///\r
+/// Module Name:  AsmCpuMisc.s\r
+///\r
+///\r
+\r
+\r
+.text\r
+.proc EcpEfiBreakPoint\r
+.type EcpEfiBreakPoint, @function\r
+\r
+EcpEfiBreakPoint::\r
+        break.i 0;;\r
+        br.ret.dpnt    b0;;\r
+\r
+.endp EcpEfiBreakPoint\r
+\r
+.proc EcpMemoryFence\r
+.type EcpMemoryFence, @function\r
+\r
+EcpMemoryFence::\r
+        mf;;    // memory access ordering\r
+\r
+        // do we need the mf.a also here?\r
+        mf.a    // wait for any IO to complete?\r
+        \r
+        // not sure if we need serialization here, just put it, in case...\r
+        \r
+        srlz.d;;\r
+        srlz.i;;\r
+        \r
+        br.ret.dpnt    b0;;\r
+.endp EcpMemoryFence
\ No newline at end of file
index da349ffc8e09403fb518fac386454b481c29073e..62e60740d31e4593de6215d45a8f3451df8a0c68 100644 (file)
@@ -83,6 +83,11 @@ COMPONENT_TYPE    = LIBRARY
   Ipf/Ia_64Gen.h\r
   Ipf/HwAccess.s\r
   Ipf/PeiServicePointer.c\r
+  #\r
+  # Only for CYGWINGCC IPF tool chain, EFI_BREAKPOINT and MEMORY_FENCE\r
+  # is defined as two functions EcpEfiBreakPoint and EcpMemoryFence.\r
+  #\r
+  Ipf/AsmCpuMisc.s | GCC\r
   \r
   \r
 [libraries.common]\r
index ff7abdaf27b1063eaaba7d366c121e44ebb49f08..632373815a1bdf1e4575d8a8e28d72ca2abed6a7 100644 (file)
@@ -57,6 +57,11 @@ COMPONENT_TYPE  = LIBRARY
   Ipf/Fvb.c\r
   Ipf/EsalLib.s\r
   Ipf/IpfCpuCache.s\r
+  #\r
+  # Only for CYGWINGCC IPF tool chain, EFI_BREAKPOINT and MEMORY_FENCE\r
+  # is defined as two functions EcpEfiBreakPoint and EcpMemoryFence.\r
+  #\r
+  Ipf/AsmCpuMisc.s | GCC\r
 \r
 [sources.ebc]\r
   Ebc/RuntimeLib.c\r
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/AsmCpuMisc.s b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ipf/AsmCpuMisc.s
new file mode 100644 (file)
index 0000000..fbb1988
--- /dev/null
@@ -0,0 +1,44 @@
+/// @file\r
+///   Contains an implementation of EcpEfiBreakPoint and EcpMemoryFence on Itanium-based\r
+///   architecture.\r
+///\r
+/// Copyright (c) 2008, Intel Corporation\r
+/// All rights reserved. This program and the accompanying materials\r
+/// are licensed and made available under the terms and conditions of the BSD License\r
+/// which accompanies this distribution.  The full text of the license may be found at\r
+/// http://opensource.org/licenses/bsd-license.php\r
+///\r
+/// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+/// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+///\r
+/// Module Name:  AsmCpuMisc.s\r
+///\r
+///\r
+\r
+\r
+.text\r
+.proc EcpEfiBreakPoint\r
+.type EcpEfiBreakPoint, @function\r
+\r
+EcpEfiBreakPoint::\r
+        break.i 0;;\r
+        br.ret.dpnt    b0;;\r
+\r
+.endp EcpEfiBreakPoint\r
+\r
+.proc EcpMemoryFence\r
+.type EcpMemoryFence, @function\r
+\r
+EcpMemoryFence::\r
+        mf;;    // memory access ordering\r
+\r
+        // do we need the mf.a also here?\r
+        mf.a    // wait for any IO to complete?\r
+        \r
+        // not sure if we need serialization here, just put it, in case...\r
+        \r
+        srlz.d;;\r
+        srlz.i;;\r
+        \r
+        br.ret.dpnt    b0;;\r
+.endp EcpMemoryFence
\ No newline at end of file