]>
Commit | Line | Data |
---|---|---|
342470a6 RN |
1 | /** @file\r |
2 | EFI Reset Notification Protocol as defined in UEFI 2.7.\r | |
3 | This protocol provides services to register for a notification when ResetSystem is called.\r | |
4 | \r | |
5 | Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials are licensed and made available under\r | |
7 | the terms and conditions of the BSD License that accompanies this distribution.\r | |
8 | The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php.\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | @par Revision Reference:\r | |
15 | This Protocol is introduced in UEFI Specification 2.7\r | |
16 | \r | |
17 | **/\r | |
18 | \r | |
19 | #ifndef __EFI_RESET_NOTIFICATION_H__\r | |
20 | #define __EFI_RESET_NOTIFICATION_H__\r | |
21 | \r | |
22 | #define EFI_RESET_NOTIFICATION_PROTOCOL_GUID \\r | |
23 | { 0x9da34ae0, 0xeaf9, 0x4bbf, { 0x8e, 0xc3, 0xfd, 0x60, 0x22, 0x6c, 0x44, 0xbe } }\r | |
24 | \r | |
25 | typedef struct _EFI_RESET_NOTIFICATION_PROTOCOL EFI_RESET_NOTIFICATION_PROTOCOL;\r | |
26 | \r | |
27 | /**\r | |
28 | Register a notification function to be called when ResetSystem() is called.\r | |
29 | \r | |
30 | The RegisterResetNotify() function registers a notification function that is called when\r | |
31 | ResetSystem()is called and prior to completing the reset of the platform.\r | |
32 | The registered functions must not perform a platform reset themselves. These\r | |
33 | notifications are intended only for the notification of components which may need some\r | |
34 | special-purpose maintenance prior to the platform resetting.\r | |
35 | The list of registered reset notification functions are processed if ResetSystem()is called\r | |
36 | before ExitBootServices(). The list of registered reset notification functions is ignored if\r | |
37 | ResetSystem()is called after ExitBootServices().\r | |
38 | \r | |
39 | @param[in] This A pointer to the EFI_RESET_NOTIFICATION_PROTOCOL instance.\r | |
40 | @param[in] ResetFunction Points to the function to be called when a ResetSystem() is executed.\r | |
41 | \r | |
42 | @retval EFI_SUCCESS The reset notification function was successfully registered.\r | |
43 | @retval EFI_INVALID_PARAMETER ResetFunction is NULL.\r | |
44 | @retval EFI_OUT_OF_RESOURCES There are not enough resources available to register the reset notification function.\r | |
45 | @retval EFI_ALREADY_STARTED The reset notification function specified by ResetFunction has already been registered.\r | |
46 | \r | |
47 | **/\r | |
48 | typedef\r | |
49 | EFI_STATUS\r | |
50 | (EFIAPI *EFI_REGISTER_RESET_NOTIFY) (\r | |
51 | IN EFI_RESET_NOTIFICATION_PROTOCOL *This,\r | |
52 | IN EFI_RESET_SYSTEM ResetFunction\r | |
53 | );\r | |
54 | \r | |
55 | /**\r | |
56 | Unregister a notification function.\r | |
57 | \r | |
58 | The UnregisterResetNotify() function removes the previously registered\r | |
59 | notification using RegisterResetNotify().\r | |
60 | \r | |
61 | @param[in] This A pointer to the EFI_RESET_NOTIFICATION_PROTOCOL instance.\r | |
62 | @param[in] ResetFunction The pointer to the ResetFunction being unregistered.\r | |
63 | \r | |
64 | @retval EFI_SUCCESS The reset notification function was unregistered.\r | |
65 | @retval EFI_INVALID_PARAMETER ResetFunction is NULL.\r | |
66 | @retval EFI_INVALID_PARAMETER The reset notification function specified by ResetFunction was not previously\r | |
67 | registered using RegisterResetNotify().\r | |
68 | \r | |
69 | **/\r | |
70 | typedef\r | |
71 | EFI_STATUS\r | |
72 | (EFIAPI *EFI_UNREGISTER_RESET_NOTIFY) (\r | |
73 | IN EFI_RESET_NOTIFICATION_PROTOCOL *This,\r | |
74 | IN EFI_RESET_SYSTEM ResetFunction\r | |
75 | );\r | |
76 | \r | |
77 | typedef struct _EFI_RESET_NOTIFICATION_PROTOCOL {\r | |
78 | EFI_REGISTER_RESET_NOTIFY RegisterResetNotify;\r | |
fcccba37 | 79 | EFI_UNREGISTER_RESET_NOTIFY UnregisterResetNotify;\r |
342470a6 RN |
80 | } EFI_RESET_NOTIFICATION_PROTOCOL;\r |
81 | \r | |
82 | \r | |
83 | extern EFI_GUID gEfiResetNotificationProtocolGuid;\r | |
84 | \r | |
85 | #endif\r | |
86 | \r |