Minor code enhancement.
[mirror_edk2.git] / IntelFrameworkPkg / Include / Protocol / SmmStatusCode.h
CommitLineData
b59768ca 1/** @file\r
2 Provides the parent dispatch service for a given SMI source generator.\r
3 The EFI_SMM_ICHN_DISPATCH_PROTOCOL provides the ability to install child handlers for\r
4 the given event types.\r
5\r
6 Copyright (c) 2008 - 2009, Intel Corporation\r
7 All rights reserved. This program and the accompanying materials\r
8 are licensed and made available under the terms and conditions of the BSD License\r
9 which accompanies this distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11\r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14\r
b59768ca 15 @par Revision Reference:\r
16 This Protocol is defined in Framework of EFI SMM Core Interface Spec\r
17 Version 0.9.\r
18\r
19**/\r
20\r
21#ifndef _EFI_SMM_ICHN_DISPATCH_H_\r
22#define _EFI_SMM_ICHN_DISPATCH_H_\r
23\r
b59768ca 24//\r
25// Global ID for the Smm Status code Protocol\r
26//\r
27#define EFI_SMM_STATUS_CODE_PROTOCOL_GUID \\r
28 { \\r
29 0x6afd2b77, 0x98c1, 0x4acd, {0xa6, 0xf9, 0x8a, 0x94, 0x39, 0xde, 0xf, 0xb1 } \\r
30 }\r
31\r
32typedef struct _EFI_SMM_STATUS_CODE_PROTOCOL EFI_SMM_STATUS_CODE_PROTOCOL;\r
33\r
34\r
35/**\r
36 Unregister a child SMI source dispatch function with a parent SMM driver\r
37\r
38 @param This Points to this instance of the EFI_SMM_STATUS_CODE_PROTOCOL.\r
39 @param CodeType Indicates the type of status code being reported.\r
40 @param Value Describes the current status of a hardware or software entity. \r
41 This status includes information about the class and subclass \r
42 that is used to classify the entity, as well as an operation. \r
43 For progress codes, the operation is the current activity. For \r
44 error codes, it is the exception. For debug codes, it is not defined \r
45 at this time.\r
46 @param Instance The enumeration of a hardware or software entity within the system. \r
47 A system may contain multiple entities that match a class/subclass pairing. \r
48 @param CallerId This optional parameter may be used to identify the caller. This parameter \r
49 allows the status code driver to apply different rules to different callers.\r
50 @param Data This optional parameter may be used to pass additional data.\r
51 \r
52 \r
53 @retval EFI_SUCCESS The function completed successfully.\r
54 @retval EFI_DEVICE_ERROR The function should not be completed due to a device error.\r
55\r
56**/\r
57typedef\r
58EFI_STATUS\r
e7be5d90 59(EFIAPI *EFI_SMM_REPORT_STATUS_CODE)(\r
b59768ca 60 IN EFI_SMM_STATUS_CODE_PROTOCOL *This,\r
61 IN EFI_STATUS_CODE_TYPE CodeType,\r
62 IN EFI_STATUS_CODE_VALUE Value, \r
63 IN UINT32 Instance,\r
64 IN EFI_GUID *CallerId,\r
65 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
66);\r
67\r
68\r
69/**\r
70 The EFI_SMM_STATUS_CODE_PROTOCOL provides the basic status code services while in SMRAM.\r
71 **/\r
72struct _EFI_SMM_STATUS_CODE_PROTOCOL {\r
73 EFI_SMM_REPORT_STATUS_CODE ReportStatusCode; ///< Allows for the SMM agent to produce a status code output.\r
74};\r
75\r
76extern EFI_GUID gEfiSmmStatusCodeProtocolGuid;\r
77\r
78#endif\r