]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Add Null implementation of the Reset System Library that generated an ASSERT() on...
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 1 Jul 2009 00:03:38 +0000 (00:03 +0000)
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 1 Jul 2009 00:03:38 +0000 (00:03 +0000)
This library can be used as a template to implement a Reset System Library for a specific platform.

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

MdeModulePkg/Include/Library/ResetSystemLib.h
MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c [new file with mode: 0644]
MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf [new file with mode: 0644]
MdeModulePkg/MdeModulePkg.dsc

index 4b67865fa385498f5db0b82b8ed1da94a90c294f..b83bec5836a8aeaa447b84c005b6629cf8548608 100644 (file)
@@ -64,4 +64,5 @@ EFIAPI
 EnterS3WithImmediateWake (\r
   VOID\r
   );\r
+  \r
 #endif\r
diff --git a/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c b/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c
new file mode 100644 (file)
index 0000000..2addfff
--- /dev/null
@@ -0,0 +1,79 @@
+/** @file\r
+  Null Reset System Library instance that only generates ASSERT() conditions.\r
+\r
+  Copyright (c) 2006 - 2009, 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
+\r
+#include <Library/ResetSystemLib.h>\r
+#include <Library/DebugLib.h>\r
+\r
+/**\r
+  This function causes a system-wide reset (cold reset), in which\r
+  all circuitry within the system returns to its initial state. This type of reset \r
+  is asynchronous to system operation and operates without regard to\r
+  cycle boundaries.\r
+\r
+  If this function returns, it means that the system does not support cold reset. \r
+**/\r
+VOID\r
+EFIAPI\r
+ResetCold (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+}\r
+\r
+/**\r
+  This function causes a system-wide initialization (warm reset), in which all processors \r
+  are set to their initial state. Pending cycles are not corrupted.\r
+\r
+  If this function returns, it means that the system does not support warm reset.\r
+**/\r
+VOID\r
+EFIAPI\r
+ResetWarm (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+}\r
+\r
+/**\r
+  This function causes the system to enter a power state equivalent \r
+  to the ACPI G2/S5 or G3 states.\r
+\r
+  If this function returns, it means that the system does not support shut down reset.\r
+**/\r
+VOID\r
+EFIAPI\r
+ResetShutdown (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+}\r
+\r
+/**\r
+  This function causes the system to enter S3 and then wake up immediately.\r
+\r
+  If this function returns, it means that the system does not support S3 feature.\r
+**/\r
+VOID\r
+EFIAPI\r
+EnterS3WithImmediateWake (\r
+  VOID\r
+  )\r
+{\r
+  ASSERT (FALSE);\r
+}\r
diff --git a/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf b/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf
new file mode 100644 (file)
index 0000000..0c8a3e8
--- /dev/null
@@ -0,0 +1,37 @@
+#/** @file\r
+#  Null Reset System Library instance that only generates ASSERT() conditions.\r
+#\r
+#  Copyright (c) 2007 - 2009, 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
+[Defines]\r
+  INF_VERSION                    = 0x00010005\r
+  BASE_NAME                      = BaseResetSystemLibNull\r
+  FILE_GUID                      = 667A8B1C-9C97-4b2a-AE7E-568772FE45F3\r
+  MODULE_TYPE                    = BASE\r
+  VERSION_STRING                 = 1.0\r
+  LIBRARY_CLASS                  = ResetSystemLib\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.common]\r
+  BaseResetSystemLibNull.c\r
+\r
+[Packages]\r
+  MdePkg/MdePkg.dec\r
+  MdeModulePkg/MdeModulePkg.dec\r
+\r
+[LibraryClasses]\r
+  DebugLib\r
index f338a9ac500ba7bc2751ca5c255e2897dd31c43a..66c4cd0b227e3e98809318dca7ce177a98d68536 100644 (file)
   MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.inf\r
   MdeModulePkg/Library/BaseMemoryTestLibNull/BaseMemoryTestLibNull.inf\r
   MdeModulePkg/Library/BaseMemoryTestLib/BaseMemoryTestLib.inf\r
+  MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.inf\r
 \r
   MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf\r
   MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf\r