]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Move SmmLib from IntelFrameworkPkg to MdePkg because this library is useful to both...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 27 Jan 2010 22:59:52 +0000 (22:59 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 27 Jan 2010 22:59:52 +0000 (22:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9840 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Include/Library/SmmLib.h [new file with mode: 0644]
MdePkg/Library/SmmLibNull/SmmLibNull.c [new file with mode: 0644]
MdePkg/Library/SmmLibNull/SmmLibNull.inf [new file with mode: 0644]
MdePkg/MdePkg.dsc

diff --git a/MdePkg/Include/Library/SmmLib.h b/MdePkg/Include/Library/SmmLib.h
new file mode 100644 (file)
index 0000000..32372ed
--- /dev/null
@@ -0,0 +1,89 @@
+/** @file\r
+  Library class name: SmmLib\r
+  \r
+  SMM Library Services that abstracts both S/W SMI generation and detection. \r
+\r
+  Copyright (c) 2007 - 2010, 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
+\r
+#ifndef __SMM_LIB_H__\r
+#define __SMM_LIB_H__\r
+\r
+\r
+/**\r
+  Triggers an SMI at boot time.  \r
+\r
+  This function triggers a software SMM interrupt at boot time.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+TriggerBootServiceSoftwareSmi (\r
+  VOID\r
+  );\r
+\r
+\r
+/**\r
+  Triggers an SMI at run time.  \r
+\r
+  This function triggers a software SMM interrupt at run time.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+TriggerRuntimeSoftwareSmi (\r
+  VOID\r
+  );\r
+\r
+\r
+/**\r
+  Test if a boot time software SMI happened.  \r
+\r
+  This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and\r
+  it was triggered at boot time, it returns TRUE. Otherwise, it returns FALSE.\r
+\r
+  @retval TRUE   A software SMI triggered at boot time happened.\r
+  @retval FLASE  No software SMI happened, or the software SMI was triggered at run time.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsBootServiceSoftwareSmi (\r
+  VOID\r
+  );\r
+\r
+\r
+/**\r
+  Test if a run time software SMI happened.  \r
+\r
+  This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and\r
+  it was triggered at run time, it returns TRUE. Otherwise, it returns FALSE.\r
+\r
+  @retval TRUE   A software SMI triggered at run time happened.\r
+  @retval FLASE  No software SMI happened or the software SMI was triggered at boot time.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsRuntimeSoftwareSmi (\r
+  VOID\r
+  );\r
+\r
+/**\r
+  Clear APM SMI Status Bit; Set the EOS bit. \r
+  \r
+**/\r
+VOID\r
+EFIAPI\r
+ClearSmi (\r
+  VOID\r
+  );\r
+#endif\r
diff --git a/MdePkg/Library/SmmLibNull/SmmLibNull.c b/MdePkg/Library/SmmLibNull/SmmLibNull.c
new file mode 100644 (file)
index 0000000..26d12e2
--- /dev/null
@@ -0,0 +1,101 @@
+/** @file\r
+  NULL instance of SMM Library.\r
+\r
+  Copyright (c) 2009 - 2010, Intel Corporation<BR>\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
+\r
+#include <Base.h>\r
+#include <Library/SmmLib.h>\r
+\r
+/**\r
+  Triggers an SMI at boot time.  \r
+\r
+  This function triggers a software SMM interrupt at boot time.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+TriggerBootServiceSoftwareSmi (\r
+  VOID\r
+  )\r
+{\r
+  return;\r
+}\r
+\r
+\r
+/**\r
+  Triggers an SMI at run time.  \r
+\r
+  This function triggers a software SMM interrupt at run time.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+TriggerRuntimeSoftwareSmi (\r
+  VOID\r
+  )\r
+{\r
+  return;\r
+}\r
+\r
+\r
+\r
+/**\r
+  Test if a boot time software SMI happened.  \r
+\r
+  This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and\r
+  it was triggered at boot time, it returns TRUE. Otherwise, it returns FALSE.\r
+\r
+  @retval TRUE   A software SMI triggered at boot time happened.\r
+  @retval FLASE  No software SMI happened or the software SMI was triggered at run time.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsBootServiceSoftwareSmi (\r
+  VOID\r
+  )\r
+{\r
+  return FALSE;\r
+}\r
+\r
+\r
+/**\r
+  Test if a run time software SMI happened.  \r
+\r
+  This function tests if a software SMM interrupt happened. If a software SMM interrupt happened and\r
+  it was triggered at run time, it returns TRUE. Otherwise, it returns FALSE.\r
+\r
+  @retval TRUE   A software SMI triggered at run time happened.\r
+  @retval FLASE  No software SMI happened or the software SMI was triggered at boot time.\r
+\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+IsRuntimeSoftwareSmi (\r
+  VOID\r
+  )\r
+{\r
+  return FALSE;\r
+}\r
+\r
+/**\r
+  Clear APM SMI Status Bit; Set the EOS bit. \r
+  \r
+**/\r
+VOID\r
+EFIAPI\r
+ClearSmi (\r
+  VOID\r
+  )\r
+{\r
+  return;\r
+}\r
diff --git a/MdePkg/Library/SmmLibNull/SmmLibNull.inf b/MdePkg/Library/SmmLibNull/SmmLibNull.inf
new file mode 100644 (file)
index 0000000..8b6fb38
--- /dev/null
@@ -0,0 +1,36 @@
+#/** @file\r
+# NULL instance of SMM Library.\r
+#\r
+#  Copyright (c) 2009 - 2010, 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                      = SmmLibNull\r
+  FILE_GUID                      = DDADFC93-FBC5-4389-B20F-EC99E4A6AE52\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = SmmLib\r
+\r
+#\r
+# The following information is for reference only and not required by the build tools.\r
+#\r
+#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
+#\r
+\r
+[Sources]\r
+  SmmLibNull.c\r
+  \r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+\r
index 30298803d93f151674d1fb6e043f0849c25db224..d7b40797d109ad5f6f92a8d39b3e52426d0c56c9 100644 (file)
@@ -1,7 +1,7 @@
 #/** @file\r
 # EFI/PI MdePkg Package\r
 #\r
-# Copyright (c) 2007 - 2009, Intel Corporation<BR>\r
+# Copyright (c) 2007 - 2010, Intel Corporation<BR>\r
 # Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\r
 #\r
 #  All rights reserved. This program and the accompanying materials\r
   MdePkg/Library/UefiUsbLib/UefiUsbLib.inf\r
   MdePkg/Library/UefiPciLibPciRootBridgeIo/UefiPciLibPciRootBridgeIo.inf\r
   MdePkg/Library/UefiPciSegmentLibPciRootBridgeIo/UefiPciSegmentLibPciRootBridgeIo.inf\r
+  MdePkg/Library/SmmLibNull/SmmLibNull.inf\r
 \r
 [Components.IA32, Components.X64]\r
   MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf\r