]> git.proxmox.com Git - mirror_edk2.git/blame - QuarkSocPkg/QuarkNorthCluster/Include/Protocol/SmmIchnDispatch2.h
QuarkSocPkg: Replace BSD License with BSD+Patent License
[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
c9f231d0 9SPDX-License-Identifier: BSD-2-Clause-Patent\r
9b6bbcdb
MK
10\r
11**/\r
12\r
13\r
14#ifndef __SMM_ICHN_DISPATCH2_H__\r
15#define __SMM_ICHN_DISPATCH2_H__\r
16\r
17//\r
18// Share some common definitions with Framework SMM\r
19//\r
20#include <Protocol/SmmIchnDispatch.h>\r
21\r
22#include <PiSmm.h>\r
23\r
24//\r
25// Global ID for the ICH SMI Protocol\r
26//\r
27#define EFI_SMM_ICHN_DISPATCH2_PROTOCOL_GUID \\r
28 { \\r
29 0xadf3a128, 0x416d, 0x4060, {0x8d, 0xdf, 0x30, 0xa1, 0xd7, 0xaa, 0xb6, 0x99 } \\r
30 }\r
31\r
32typedef struct _EFI_SMM_ICHN_DISPATCH2_PROTOCOL EFI_SMM_ICHN_DISPATCH2_PROTOCOL;\r
33\r
34typedef struct {\r
35 EFI_SMM_ICHN_SMI_TYPE Type;\r
36} EFI_SMM_ICHN_REGISTER_CONTEXT;\r
37\r
38//\r
39// Member functions\r
40//\r
41/**\r
42 Register a child SMI source dispatch function with a parent SMM driver\r
43\r
44 @param This Protocol instance pointer.\r
45 @param DispatchFunction Pointer to dispatch function to be invoked for\r
46 this SMI source\r
47 @param RegisterContext Pointer to the dispatch function's context.\r
48 The caller fills this context in before calling\r
49 the register function to indicate to the register\r
50 function the ICHN SMI source for which the dispatch\r
51 function should be invoked.\r
52 @param DispatchHandle Handle generated by the dispatcher to track the\r
53 function instance.\r
54\r
55 @retval EFI_SUCCESS The dispatch function has been successfully\r
56 registered and the SMI source has been enabled.\r
57 @retval EFI_DEVICE_ERROR The driver was unable to enable the SMI source.\r
58 @retval EFI_OUT_OF_RESOURCES Not enough memory (system or SMM) to manage this\r
59 child.\r
60 @retval EFI_INVALID_PARAMETER RegisterContext is invalid. The ICHN input value\r
61 is not within valid range.\r
62\r
63**/\r
64typedef\r
65EFI_STATUS\r
66(EFIAPI *EFI_SMM_ICHN_DISPATCH2_REGISTER) (\r
67 IN CONST EFI_SMM_ICHN_DISPATCH2_PROTOCOL *This,\r
68 IN EFI_SMM_HANDLER_ENTRY_POINT2 DispatchFunction,\r
69 IN OUT EFI_SMM_ICHN_REGISTER_CONTEXT *RegisterContext,\r
70 OUT EFI_HANDLE *DispatchHandle\r
71 );\r
72\r
73/**\r
74 Unregister a child SMI source dispatch function with a parent SMM driver\r
75\r
76 @param This Protocol instance pointer.\r
77 @param DispatchHandle Handle of dispatch function to deregister.\r
78\r
79 @retval EFI_SUCCESS The dispatch function has been successfully\r
80 unregistered and the SMI source has been disabled\r
81 if there are no other registered child dispatch\r
82 functions for this SMI source.\r
83 @retval EFI_INVALID_PARAMETER Handle is invalid.\r
84 @retval other\r
85\r
86**/\r
87typedef\r
88EFI_STATUS\r
89(EFIAPI *EFI_SMM_ICHN_DISPATCH2_UNREGISTER) (\r
90 IN EFI_SMM_ICHN_DISPATCH2_PROTOCOL *This,\r
91 IN EFI_HANDLE DispatchHandle\r
92 );\r
93\r
94//\r
95// Interface structure for the SMM Ich n specific SMI Dispatch Protocol\r
96//\r
97/**\r
98 @par Protocol Description:\r
99 Provides a parent dispatch service for ICH SMI sources.\r
100\r
101 @param Register\r
102 Installs a child service to be dispatched by this protocol.\r
103\r
104 @param UnRegister\r
105 Removes a child service dispatched by this protocol.\r
106\r
107**/\r
108struct _EFI_SMM_ICHN_DISPATCH2_PROTOCOL {\r
109 EFI_SMM_ICHN_DISPATCH2_REGISTER Register;\r
110 EFI_SMM_ICHN_DISPATCH2_UNREGISTER UnRegister;\r
111};\r
112\r
113extern EFI_GUID gEfiSmmIchnDispatch2ProtocolGuid;\r
114\r
115#endif\r