]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/SmmReportStatusCodeHandler.h
Remove some non-ascii code in header file and fix some minor typos in comments.
[mirror_edk2.git] / MdePkg / Include / Protocol / SmmReportStatusCodeHandler.h
1 /** @file
2 This protocol provides registering and unregistering services to status code consumers while in DXE SMM.
3
4 Copyright (c) 2007 - 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__
16 #define __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__
17
18 #define EFI_SMM_RSC_HANDLER_PROTOCOL_GUID \
19 { \
20 0x2ff29fa7, 0x5e80, 0x4ed9, 0xb3, 0x80, 0x1, 0x7d, 0x3c, 0x55,
21 0x4f, 0xf4
22 }
23
24 typedef
25 EFI_STATUS
26 (EFIAPI *EFI_SMM_RSC_HANDLER_CALLBACK)(
27 IN EFI_STATUS_CODE_TYPE CodeType,
28 IN EFI_STATUS_CODE_VALUE Value,
29 IN UINT32 Instance,
30 IN EFI_GUID *CallerId,
31 IN EFI_STATUS_CODE_DATA *Data
32 );
33
34 /**
35 Register the callback function for ReportStatusCode() notification.
36
37 When this function is called the function pointer is added to an internal list and any future calls to
38 ReportStatusCode() will be forwarded to the Callback function.
39
40 @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when
41 a call to ReportStatusCode() occurs.
42
43 @retval EFI_SUCCESS Function was successfully registered.
44 @retval EFI_INVALID_PARAMETER The callback function was NULL.
45 @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be
46 registered.
47 @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again.
48 **/
49 typedef
50 EFI_STATUS
51 (EFIAPI *EFI_SMM_RSC_HANDLER_REGISTER)(
52 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback
53 );
54
55 /**
56 Remove a previously registered callback function from the notification list.
57
58 A callback function must be unregistered before it is deallocated. It is important that any registered
59 callbacks that are not runtime complaint be unregistered when ExitBootServices() is called.
60
61 @param[in] Callback A pointer to a function of type EFI_SMM_RSC_HANDLER_CALLBACK that is to be
62 unregistered.
63
64 @retval EFI_SUCCESS The function was successfully unregistered.
65 @retval EFI_INVALID_PARAMETER The callback function was NULL.
66 @retval EFI_NOT_FOUND The callback function was not found to be unregistered.
67
68 **/
69 typedef
70 EFI_STATUS
71 (EFIAPI *EFI_SMM_RSC_HANDLER_UNREGISTER) (
72 IN EFI_SMM_RSC_HANDLER_CALLBACK Callback
73 );
74
75 typedef struct _EFI_SMM_RSC_HANDLER_PROTOCOL {
76 EFI_SMM_RSC_HANDLER_REGISTER Register;
77 SMM_RSC_HANDLER_UNREGISTER Unregister;
78 } EFI_SMM_RSC_HANDLER_PROTOCOL;
79
80 extern gEfiSmmRscHandlerProtocolGuid;
81
82 #endif // __SMM_REPORT_STATUS_CODE_HANDLER_PROTOCOL_H__