]> git.proxmox.com Git - mirror_edk2.git/blame - QuarkSocPkg/QuarkNorthCluster/Include/Protocol/SmmIchnDispatch2.h
QuarkSocPkg: Add new package for Quark SoC X1000
[mirror_edk2.git] / QuarkSocPkg / QuarkNorthCluster / Include / Protocol / SmmIchnDispatch2.h
CommitLineData
9b6bbcdb
MK
1/** @file\r
2Intel-only SMM Child Dispatcher Protocol.\r
3\r
4This protocol provides a parent dispatch service for a collection of\r
5chipset-specific SMI source.\r
6\r
7Copyright (c) 2013-2015 Intel Corporation.\r
8\r
9This program and the accompanying materials\r
10are licensed and made available under the terms and conditions of the BSD License\r
11which accompanies this distribution. The full text of the license may be found at\r
12http://opensource.org/licenses/bsd-license.php\r
13\r
14THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16\r
17**/\r
18\r
19\r
20#ifndef __SMM_ICHN_DISPATCH2_H__\r
21#define __SMM_ICHN_DISPATCH2_H__\r
22\r
23//\r
24// Share some common definitions with Framework SMM\r
25//\r
26#include <Protocol/SmmIchnDispatch.h>\r
27\r
28#include <PiSmm.h>\r
29\r
30//\r
31// Global ID for the ICH SMI Protocol\r
32//\r
33#define EFI_SMM_ICHN_DISPATCH2_PROTOCOL_GUID \\r
34 { \\r
35 0xadf3a128, 0x416d, 0x4060, {0x8d, 0xdf, 0x30, 0xa1, 0xd7, 0xaa, 0xb6, 0x99 } \\r
36 }\r
37\r
38typedef struct _EFI_SMM_ICHN_DISPATCH2_PROTOCOL EFI_SMM_ICHN_DISPATCH2_PROTOCOL;\r
39\r
40typedef struct {\r
41 EFI_SMM_ICHN_SMI_TYPE Type;\r
42} EFI_SMM_ICHN_REGISTER_CONTEXT;\r
43\r
44//\r
45// Member functions\r
46//\r
47/**\r
48 Register a child SMI source dispatch function with a parent SMM driver\r
49\r
50 @param This Protocol instance pointer.\r
51 @param DispatchFunction Pointer to dispatch function to be invoked for\r
52 this SMI source\r
53 @param RegisterContext Pointer to the dispatch function's context.\r
54 The caller fills this context in before calling\r
55 the register function to indicate to the register\r
56 function the ICHN SMI source for which the dispatch\r
57 function should be invoked.\r
58 @param DispatchHandle Handle generated by the dispatcher to track the\r
59 function instance.\r
60\r
61 @retval EFI_SUCCESS The dispatch function has been successfully\r
62 registered and the SMI source has been enabled.\r
63 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
64 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
65 child.\r
66 @retval EFI_INVALID_PARAMETER RegisterContext is invalid. The ICHN input value\r
67 is not within valid range.\r
68\r
69**/\r
70typedef\r
71EFI_STATUS\r
72(EFIAPI *EFI_SMM_ICHN_DISPATCH2_REGISTER) (\r
73 IN CONST EFI_SMM_ICHN_DISPATCH2_PROTOCOL *This,\r
74 IN EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction,\r
75 IN OUT EFI_SMM_ICHN_REGISTER_CONTEXT *RegisterContext,\r
76 OUT EFI_HANDLE *DispatchHandle\r
77 );\r
78\r
79/**\r
80 Unregister a child SMI source dispatch function with a parent SMM driver\r
81\r
82 @param This Protocol instance pointer.\r
83 @param DispatchHandle Handle of dispatch function to deregister.\r
84\r
85 @retval EFI_SUCCESS The dispatch function has been successfully\r
86 unregistered and the SMI source has been disabled\r
87 if there are no other registered child dispatch\r
88 functions for this SMI source.\r
89 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
90 @retval other\r
91\r
92**/\r
93typedef\r
94EFI_STATUS\r
95(EFIAPI *EFI_SMM_ICHN_DISPATCH2_UNREGISTER) (\r
96 IN EFI_SMM_ICHN_DISPATCH2_PROTOCOL *This,\r
97 IN EFI_HANDLE DispatchHandle\r
98 );\r
99\r
100//\r
101// Interface structure for the SMM Ich n specific SMI Dispatch Protocol\r
102//\r
103/**\r
104 @par Protocol Description:\r
105 Provides a parent dispatch service for ICH SMI sources.\r
106\r
107 @param Register\r
108 Installs a child service to be dispatched by this protocol.\r
109\r
110 @param UnRegister\r
111 Removes a child service dispatched by this protocol.\r
112\r
113**/\r
114struct _EFI_SMM_ICHN_DISPATCH2_PROTOCOL {\r
115 EFI_SMM_ICHN_DISPATCH2_REGISTER Register;\r
116 EFI_SMM_ICHN_DISPATCH2_UNREGISTER UnRegister;\r
117};\r
118\r
119extern EFI_GUID gEfiSmmIchnDispatch2ProtocolGuid;\r
120\r
121#endif\r