]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add BasePalLibNull
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Nov 2008 08:52:29 +0000 (08:52 +0000)
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 13 Nov 2008 08:52:29 +0000 (08:52 +0000)
It originates from BasePalCallLibNull

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

MdePkg/Library/BasePalLibNull/BasePalLibNull.inf [new file with mode: 0644]
MdePkg/Library/BasePalLibNull/PalCall.c [new file with mode: 0644]

diff --git a/MdePkg/Library/BasePalLibNull/BasePalLibNull.inf b/MdePkg/Library/BasePalLibNull/BasePalLibNull.inf
new file mode 100644 (file)
index 0000000..ba8bf8a
--- /dev/null
@@ -0,0 +1,40 @@
+#/** @file\r
+# Null instance of PAL Library with empty functions.\r
+#\r
+# Copyright (c) 2007 - 2008, Intel Corporation.\r
+#\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
+#  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
+#\r
+#**/\r
+\r
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = BasePalCallLibNull\r
+  FILE_GUID                      = 632D5625-B73D-43b8-AF30-8D225D96168E\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = PalCallLib \r
+  EDK_RELEASE_VERSION            = 0x00020000\r
+\r
+\r
+#\r
+#  VALID_ARCHITECTURES           = IPF\r
+#\r
+\r
+[Sources.common]\r
+  PalCall.c\r
+\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+\r
+\r
+[LibraryClasses]\r
+  DebugLib\r
+\r
diff --git a/MdePkg/Library/BasePalLibNull/PalCall.c b/MdePkg/Library/BasePalLibNull/PalCall.c
new file mode 100644 (file)
index 0000000..e13711a
--- /dev/null
@@ -0,0 +1,48 @@
+/** @file\r
+  \r
+  Template and Sample instance of PalCallLib.\r
+  \r
+  Copyright (c) 2006 - 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
+**/\r
+#include <Base.h>\r
+#include <Library/PalLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+/**\r
+  Makes a PAL procedure call.\r
+\r
+  This is a wrapper function to make a PAL procedure call.\r
+  This is just a template as simple instance. It does not\r
+  make real PAL call. It directly reports error if called.\r
+\r
+  @param  Index  The PAL procedure Index number.\r
+  @param  Arg2   The 2nd parameter for PAL procedure calls.\r
+  @param  Arg3   The 3rd parameter for PAL procedure calls.\r
+  @param  Arg4   The 4th parameter for PAL procedure calls.\r
+\r
+  @return Structure returned from the PAL Call procedure, including the status and return value.\r
+\r
+**/\r
+PAL_CALL_RETURN\r
+EFIAPI\r
+PalCall (\r
+  IN UINT64                  Index,\r
+  IN UINT64                  Arg2,\r
+  IN UINT64                  Arg3,\r
+  IN UINT64                  Arg4\r
+  )\r
+{\r
+  PAL_CALL_RETURN Ret;\r
+\r
+  Ret.Status = (UINT64) -1;\r
+  ASSERT (!RETURN_ERROR (RETURN_UNSUPPORTED));\r
+  return Ret;\r
+}\r