e3aad9b3 |
1 | /** @file\r |
2 | EFI SMM Control2 Protocol as defined in the PI 1.2 specification.\r |
3 | \r |
4 | This protocol is used initiate synchronous SMI activations. This protocol could be published by a\r |
5 | processor driver to abstract the SMI IPI or a driver which abstracts the ASIC that is supporting the\r |
6 | APM port. Because of the possibility of performing SMI IPI transactions, the ability to generate this \r |
7 | event from a platform chipset agent is an optional capability for both IA-32 and x64-based systems.\r |
8 | \r |
9 | The EFI_SMM_CONTROL2_PROTOCOL is produced by a runtime driver. It provides an \r |
10 | abstraction of the platform hardware that generates an SMI. There are often I/O ports that, when \r |
11 | accessed, will generate the SMI. Also, the hardware optionally supports the periodic generation of \r |
12 | these signals.\r |
13 | \r |
14 | Copyright (c) 2009, Intel Corporation \r |
15 | All rights reserved. This program and the accompanying materials \r |
16 | are licensed and made available under the terms and conditions of the BSD License \r |
17 | which accompanies this distribution. The full text of the license may be found at \r |
18 | http://opensource.org/licenses/bsd-license.php \r |
19 | \r |
20 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r |
21 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r |
22 | \r |
23 | **/\r |
24 | \r |
25 | #ifndef _SMM_CONTROL2_H_\r |
26 | #define _SMM_CONTROL2_H_\r |
27 | \r |
28 | #include <PiDxe.h>\r |
29 | \r |
a2bb197e |
30 | ///\r |
31 | /// Note:\r |
32 | /// To avoid name conflict between PI and Framework SMM spec, the following names defined\r |
33 | /// in PI 1.2 SMM spec are renamed. These renamings are not yet in a public PI spec and errta.\r |
34 | ///\r |
35 | /// EFI_SMM_ACTIVATE -> EFI_SMM_ACTIVATE2\r |
36 | /// EFI_SMM_DEACTIVATE -> EFI_SMM_DEACTIVATE2\r |
37 | ///\r |
38 | \r |
e3aad9b3 |
39 | #define EFI_SMM_CONTROL2_PROTOCOL_GUID \\r |
40 | { \\r |
41 | 0x843dc720, 0xab1e, 0x42cb, {0x93, 0x57, 0x8a, 0x0, 0x78, 0xf3, 0x56, 0x1b} \\r |
42 | }\r |
43 | \r |
44 | typedef struct _EFI_SMM_CONTROL2_PROTOCOL EFI_SMM_CONTROL2_PROTOCOL;\r |
45 | typedef UINTN EFI_SMM_PERIOD;\r |
46 | \r |
47 | /**\r |
48 | Invokes SMI activation from either the preboot or runtime environment.\r |
49 | \r |
50 | This function generates an SMI.\r |
51 | \r |
52 | @param[in] This The EFI_SMM_CONTROL2_PROTOCOL instance.\r |
53 | @param[in,out] CommandPort The value written to the command port.\r |
54 | @param[in,out] DataPort The value written to the data port.\r |
55 | @param[in] Periodic Optional mechanism to engender a periodic stream.\r |
56 | @param[in] ActivationInterval Optional parameter to repeat at this period one\r |
57 | time or, if the Periodic Boolean is set, periodically.\r |
58 | \r |
59 | @retval EFI_SUCCESS The SMI/PMI has been engendered.\r |
60 | @retval EFI_DEVICE_ERROR The timing is unsupported.\r |
61 | @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r |
62 | @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r |
63 | **/\r |
64 | typedef\r |
65 | EFI_STATUS\r |
a2bb197e |
66 | (EFIAPI *EFI_SMM_ACTIVATE2)(\r |
e3aad9b3 |
67 | IN CONST EFI_SMM_CONTROL2_PROTOCOL *This,\r |
68 | IN OUT UINT8 *CommandPort OPTIONAL,\r |
69 | IN OUT UINT8 *DataPort OPTIONAL,\r |
70 | IN BOOLEAN Periodic OPTIONAL,\r |
71 | IN UINTN ActivationInterval OPTIONAL\r |
72 | );\r |
73 | \r |
74 | /**\r |
75 | Clears any system state that was created in response to the Trigger() call.\r |
76 | \r |
77 | This function acknowledges and causes the deassertion of the SMI activation source.\r |
78 | \r |
79 | @param[in] This The EFI_SMM_CONTROL2_PROTOCOL instance.\r |
80 | @param[in] Periodic Optional parameter to repeat at this period one time\r |
81 | \r |
82 | @retval EFI_SUCCESS The SMI/PMI has been engendered.\r |
83 | @retval EFI_DEVICE_ERROR The source could not be cleared.\r |
84 | @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r |
85 | **/\r |
86 | typedef\r |
87 | EFI_STATUS\r |
a2bb197e |
88 | (EFIAPI *EFI_SMM_DEACTIVATE2)(\r |
e3aad9b3 |
89 | IN CONST EFI_SMM_CONTROL2_PROTOCOL *This,\r |
90 | IN BOOLEAN Periodic OPTIONAL\r |
91 | );\r |
92 | \r |
93 | ///\r |
94 | /// The EFI_SMM_CONTROL2_PROTOCOL is produced by a runtime driver. It provides an \r |
95 | /// abstraction of the platform hardware that generates an SMI. There are often I/O ports that, when \r |
96 | /// accessed, will generate the SMI. Also, the hardware optionally supports the periodic generation of \r |
97 | /// these signals.\r |
98 | ///\r |
99 | struct _EFI_SMM_CONTROL2_PROTOCOL {\r |
a2bb197e |
100 | EFI_SMM_ACTIVATE2 Trigger;\r |
101 | EFI_SMM_DEACTIVATE2 Clear;\r |
e3aad9b3 |
102 | ///\r |
103 | /// Minimum interval at which the platform can set the period. A maximum is not \r |
104 | /// specified in that the SMM infrastructure code can emulate a maximum interval that is \r |
105 | /// greater than the hardware capabilities by using software emulation in the SMM \r |
106 | /// infrastructure code.\r |
107 | ///\r |
108 | EFI_SMM_PERIOD MinimumTriggerPeriod;\r |
109 | };\r |
110 | \r |
111 | extern EFI_GUID gEfiSmmControl2ProtocolGuid;\r |
112 | \r |
113 | #endif\r |
114 | \r |