]> git.proxmox.com Git - mirror_edk2.git/commitdiff
edk2/MdePkg/Library/BaseLib/BaseLib.inf:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 20 Aug 2008 22:19:25 +0000 (22:19 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 20 Aug 2008 22:19:25 +0000 (22:19 +0000)
edk2/MdePkg/Library/BaseLib/Ipf/AsmCpuMisc.s:
* Add GCC IPF implementation of CpuBreakpoint, MemoryFence,
  DisableInterrupts, EnableInterrupts, and EnableDisableInterrupts.
  (Thanks Vara!)

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5701 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/BaseLib.inf
MdePkg/Library/BaseLib/Ipf/AsmCpuMisc.s [new file with mode: 0644]

index b474857eee322348752636843f376b6d6865b869..fd724f606bfedf5c8f1a1b3d8a5ebb651b94b902 100644 (file)
   ChkStkGcc.c  | GCC \r
 \r
 [Sources.IPF]\r
+  Ipf/AsmCpuMisc.s\r
   Ipf/AccessGp.s\r
   Ipf/ReadCpuid.s\r
   Ipf/ExecFc.s\r
diff --git a/MdePkg/Library/BaseLib/Ipf/AsmCpuMisc.s b/MdePkg/Library/BaseLib/Ipf/AsmCpuMisc.s
new file mode 100644 (file)
index 0000000..83de3ec
--- /dev/null
@@ -0,0 +1,79 @@
+/// @file\r
+///   Contains an implementation of CallPalProcStacked 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 CpuBreakpoint\r
+.type CpuBreakpoint, @function\r
+\r
+CpuBreakpoint::\r
+        break.i 0;;\r
+        br.ret.dpnt    b0;;\r
+\r
+.endp CpuBreakpoint\r
+\r
+.proc MemoryFence\r
+.type MemoryFence, @function\r
+\r
+MemoryFence::\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 MemoryFence\r
+\r
+.proc DisableInterrupts\r
+.type DisableInterrupts, @function\r
+\r
+DisableInterrupts::\r
+         rsm                   0x4000\r
+         srlz.d;;\r
+         br.ret.dpnt    b0;;\r
+\r
+.endp DisableInterrupts\r
+\r
+.proc EnableInterrupts\r
+.type EnableInterrupts, @function\r
+\r
+EnableInterrupts::\r
+      ssm                      0x4000\r
+      srlz.d;;\r
+      br.ret.dpnt    b0;;\r
+\r
+.endp EnableInterrupts\r
+\r
+.proc EnableDisableInterrupts\r
+.type EnableDisableInterrupts, @function\r
+\r
+EnableDisableInterrupts::\r
+         ssm                   0x4000\r
+         srlz.d;;\r
+         srlz.i;;\r
+         rsm                   0x4000\r
+         srlz.d;;\r
+\r
+         br.ret.dpnt    b0;;\r
+\r
+.endp EnableDisableInterrupts\r
+\r