]>
Commit | Line | Data |
---|---|---|
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 | |
787b2f1b | 14 | Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>\r |
9df063a0 | 15 | This program and the accompanying materials \r |
e3aad9b3 | 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 | |
30 | #define EFI_SMM_CONTROL2_PROTOCOL_GUID \\r | |
31 | { \\r | |
32 | 0x843dc720, 0xab1e, 0x42cb, {0x93, 0x57, 0x8a, 0x0, 0x78, 0xf3, 0x56, 0x1b} \\r | |
33 | }\r | |
34 | \r | |
35 | typedef struct _EFI_SMM_CONTROL2_PROTOCOL EFI_SMM_CONTROL2_PROTOCOL;\r | |
36 | typedef UINTN EFI_SMM_PERIOD;\r | |
37 | \r | |
38 | /**\r | |
39 | Invokes SMI activation from either the preboot or runtime environment.\r | |
40 | \r | |
41 | This function generates an SMI.\r | |
42 | \r | |
43 | @param[in] This The EFI_SMM_CONTROL2_PROTOCOL instance.\r | |
44 | @param[in,out] CommandPort The value written to the command port.\r | |
45 | @param[in,out] DataPort The value written to the data port.\r | |
46 | @param[in] Periodic Optional mechanism to engender a periodic stream.\r | |
47 | @param[in] ActivationInterval Optional parameter to repeat at this period one\r | |
48 | time or, if the Periodic Boolean is set, periodically.\r | |
49 | \r | |
50 | @retval EFI_SUCCESS The SMI/PMI has been engendered.\r | |
51 | @retval EFI_DEVICE_ERROR The timing is unsupported.\r | |
52 | @retval EFI_INVALID_PARAMETER The activation period is unsupported.\r | |
787b2f1b | 53 | @retval EFI_INVALID_PARAMETER The last periodic activation has not been cleared. \r |
e3aad9b3 | 54 | @retval EFI_NOT_STARTED The SMM base service has not been initialized.\r |
55 | **/\r | |
56 | typedef\r | |
57 | EFI_STATUS\r | |
a2bb197e | 58 | (EFIAPI *EFI_SMM_ACTIVATE2)(\r |
e3aad9b3 | 59 | IN CONST EFI_SMM_CONTROL2_PROTOCOL *This,\r |
60 | IN OUT UINT8 *CommandPort OPTIONAL,\r | |
61 | IN OUT UINT8 *DataPort OPTIONAL,\r | |
62 | IN BOOLEAN Periodic OPTIONAL,\r | |
63 | IN UINTN ActivationInterval OPTIONAL\r | |
64 | );\r | |
65 | \r | |
66 | /**\r | |
67 | Clears any system state that was created in response to the Trigger() call.\r | |
68 | \r | |
69 | This function acknowledges and causes the deassertion of the SMI activation source.\r | |
70 | \r | |
71 | @param[in] This The EFI_SMM_CONTROL2_PROTOCOL instance.\r | |
72 | @param[in] Periodic Optional parameter to repeat at this period one time\r | |
73 | \r | |
74 | @retval EFI_SUCCESS The SMI/PMI has been engendered.\r | |
75 | @retval EFI_DEVICE_ERROR The source could not be cleared.\r | |
76 | @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.\r | |
77 | **/\r | |
78 | typedef\r | |
79 | EFI_STATUS\r | |
a2bb197e | 80 | (EFIAPI *EFI_SMM_DEACTIVATE2)(\r |
e3aad9b3 | 81 | IN CONST EFI_SMM_CONTROL2_PROTOCOL *This,\r |
82 | IN BOOLEAN Periodic OPTIONAL\r | |
83 | );\r | |
84 | \r | |
85 | ///\r | |
86 | /// The EFI_SMM_CONTROL2_PROTOCOL is produced by a runtime driver. It provides an \r | |
87 | /// abstraction of the platform hardware that generates an SMI. There are often I/O ports that, when \r | |
88 | /// accessed, will generate the SMI. Also, the hardware optionally supports the periodic generation of \r | |
89 | /// these signals.\r | |
90 | ///\r | |
91 | struct _EFI_SMM_CONTROL2_PROTOCOL {\r | |
a2bb197e | 92 | EFI_SMM_ACTIVATE2 Trigger;\r |
93 | EFI_SMM_DEACTIVATE2 Clear;\r | |
e3aad9b3 | 94 | ///\r |
95 | /// Minimum interval at which the platform can set the period. A maximum is not \r | |
96 | /// specified in that the SMM infrastructure code can emulate a maximum interval that is \r | |
97 | /// greater than the hardware capabilities by using software emulation in the SMM \r | |
98 | /// infrastructure code.\r | |
99 | ///\r | |
100 | EFI_SMM_PERIOD MinimumTriggerPeriod;\r | |
101 | };\r | |
102 | \r | |
103 | extern EFI_GUID gEfiSmmControl2ProtocolGuid;\r | |
104 | \r | |
105 | #endif\r | |
106 | \r |