]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h
MdeModulePkg/ResetSystem: Implement ResetNotification protocol
[mirror_edk2.git] / MdeModulePkg / Universal / ResetSystemRuntimeDxe / ResetSystem.h
index 37afa5b369e3de503a6e1a9feb82e33083afe49a..73e657d4e0ce1352f32cde68fd992844534fb5eb 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -19,6 +19,7 @@
 #include <PiDxe.h>\r
 \r
 #include <Protocol/Reset.h>\r
+#include <Protocol/ResetNotification.h>\r
 #include <Guid/CapsuleVendor.h>\r
 \r
 #include <Library/BaseLib.h>\r
 #include <Library/UefiRuntimeLib.h>\r
 #include <Library/UefiRuntimeServicesTableLib.h>\r
 #include <Library/ResetSystemLib.h>\r
+#include <Library/ReportStatusCodeLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+\r
+typedef struct {\r
+  UINT32                   Signature;\r
+  LIST_ENTRY               Link;\r
+  EFI_RESET_SYSTEM         ResetNotify;\r
+} RESET_NOTIFY_ENTRY;\r
+#define RESET_NOTIFY_ENTRY_SIGNATURE    SIGNATURE_32('r', 's', 't', 'n')\r
+#define RESET_NOTIFY_ENTRY_FROM_LINK(a) CR (a, RESET_NOTIFY_ENTRY, Link, RESET_NOTIFY_ENTRY_SIGNATURE)\r
+\r
+typedef struct {\r
+  UINT32                          Signature;\r
+  EFI_RESET_NOTIFICATION_PROTOCOL ResetNotification;\r
+  LIST_ENTRY                      ResetNotifies;\r
+} RESET_NOTIFICATION_INSTANCE;\r
+#define RESET_NOTIFICATION_INSTANCE_SIGNATURE    SIGNATURE_32('r', 's', 't', 'i')\r
+#define RESET_NOTIFICATION_INSTANCE_FROM_THIS(a) \\r
+  CR (a, RESET_NOTIFICATION_INSTANCE, ResetNotification, RESET_NOTIFICATION_INSTANCE_SIGNATURE)\r
 \r
 /**\r
   The driver's entry point.\r
@@ -70,15 +90,4 @@ ResetSystem (
   IN VOID             *ResetData OPTIONAL\r
   );\r
 \r
-/**\r
-  Reset system for capsule update.\r
-\r
-  @param[in] CapsuleDataPtr  Pointer to the capsule block descriptors.\r
-                            \r
-**/\r
-VOID\r
-CapsuleReset (\r
-  IN UINTN  CapsuleDataPtr\r
-  );\r
-\r
 #endif\r