]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Ppi/SmmControl.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Ppi / SmmControl.h
1 /** @file
2 EFI SMM Control PPI definition.
3
4 This PPI is used to initiate SMI/PMI activations. This protocol could be published by either:
5 - A processor driver to abstract the SMI/PMI IPI
6 - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an
7 Intel chipset
8 Because of the possibility of performing SMI or PMI IPI transactions, the ability to generate this
9 event from a platform chipset agent is an optional capability for both IA-32 and Itanium-based
10 systems.
11
12 Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
13
14 SPDX-License-Identifier: BSD-2-Clause-Patent
15
16 **/
17
18 #ifndef _SMM_CONTROL_PPI_H_
19 #define _SMM_CONTROL_PPI_H_
20
21 #define PEI_SMM_CONTROL_PPI_GUID \
22 { 0x61c68702, 0x4d7e, 0x4f43, 0x8d, 0xef, 0xa7, 0x43, 0x5, 0xce, 0x74, 0xc5 }
23
24 typedef struct _PEI_SMM_CONTROL_PPI PEI_SMM_CONTROL_PPI;
25
26 /**
27 Invokes SMI activation from either the preboot or runtime environment.
28
29 @param PeiServices General purpose services available to every PEIM.
30 @param This The PEI_SMM_CONTROL_PPI instance.
31 @param ArgumentBuffer The optional sized data to pass into the protocol activation.
32 @param ArgumentBufferSize The optional size of the data.
33 @param Periodic An optional mechanism to periodically repeat activation.
34 @param ActivationInterval An optional parameter to repeat at this period one
35 time or, if the Periodic Boolean is set, periodically.
36
37 @retval EFI_SUCCESS The SMI/PMI has been engendered.
38 @retval EFI_DEVICE_ERROR The timing is unsupported.
39 @retval EFI_INVALID_PARAMETER The activation period is unsupported.
40 @retval EFI_NOT_STARTED The SMM base service has not been initialized.
41
42 **/
43 typedef
44 EFI_STATUS
45 (EFIAPI *PEI_SMM_ACTIVATE)(
46 IN EFI_PEI_SERVICES **PeiServices,
47 IN PEI_SMM_CONTROL_PPI *This,
48 IN OUT INT8 *ArgumentBuffer OPTIONAL,
49 IN OUT UINTN *ArgumentBufferSize OPTIONAL,
50 IN BOOLEAN Periodic OPTIONAL,
51 IN UINTN ActivationInterval OPTIONAL
52 );
53
54 /**
55 Clears any system state that was created in response to the Active call.
56
57 @param PeiServices General purpose services available to every PEIM.
58 @param This The PEI_SMM_CONTROL_PPI instance.
59 @param Periodic Optional parameter to repeat at this period one
60 time or, if the Periodic Boolean is set, periodically.
61
62 @retval EFI_SUCCESS The SMI/PMI has been engendered.
63 @retval EFI_DEVICE_ERROR The source could not be cleared.
64 @retval EFI_INVALID_PARAMETER The service did not support the Periodic input argument.
65
66 **/
67 typedef
68 EFI_STATUS
69 (EFIAPI *PEI_SMM_DEACTIVATE)(
70 IN EFI_PEI_SERVICES **PeiServices,
71 IN PEI_SMM_CONTROL_PPI *This,
72 IN BOOLEAN Periodic OPTIONAL
73 );
74
75 ///
76 /// PEI SMM Control PPI is used to initiate SMI/PMI activations. This protocol could be published by either:
77 /// - A processor driver to abstract the SMI/PMI IPI
78 /// - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an
79 /// Intel chipset
80 ///
81 struct _PEI_SMM_CONTROL_PPI {
82 PEI_SMM_ACTIVATE Trigger;
83 PEI_SMM_DEACTIVATE Clear;
84 };
85
86 extern EFI_GUID gPeiSmmControlPpiGuid;
87
88 #endif