]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatibility/SmmControl2OnSmmControlThunk/SmmControl2OnSmmControlThunk.h
Add 4 Framework/PI SMM thunk drivers. Combined use of these drivers can support usage...
[mirror_edk2.git] / EdkCompatibilityPkg / Compatibility / SmmControl2OnSmmControlThunk / SmmControl2OnSmmControlThunk.h
1 /** @file
2 Include file for SMM Control2 Protocol on SMM Control Protocol Thunk driver.
3
4 Copyright (c) 2009, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 #ifndef _SMM_CONTROL2_ON_SMM_CONTROL_THUNK_H_
16 #define _SMM_CONTROL2_ON_SMM_CONTROL_THUNK_H_
17
18 #include <PiDxe.h>
19 #include <FrameworkSmm.h>
20 #include <Library/DebugLib.h>
21 #include <Library/UefiBootServicesTableLib.h>
22 #include <Library/UefiDriverEntryPoint.h>
23 #include <Library/IoLib.h>
24 #include <Protocol/SmmControl2.h>
25 #include <Protocol/SmmControl.h>
26
27 /**
28 Invokes SMI activation from either the preboot or runtime environment.
29
30 This function generates an SMI.
31
32 @param[in] This The EFI_SMM_CONTROL2_PROTOCOL instance.
33 @param[in,out] CommandPort The value written to the command port.
34 @param[in,out] DataPort The value written to the data port.
35 @param[in] Periodic Optional mechanism to engender a periodic stream.
36 @param[in] ActivationInterval Optional parameter to repeat at this period one
37 time or, if the Periodic Boolean is set, periodically.
38
39 @retval EFI_SUCCESS The SMI/PMI has been engendered.
40 @retval EFI_DEVICE_ERROR The timing is unsupported.
41 @retval EFI_INVALID_PARAMETER The activation period is unsupported.
42 @retval EFI_NOT_STARTED The SMM base service has not been initialized.
43 **/
44 EFI_STATUS
45 EFIAPI
46 SmmControl2Trigger (
47 IN CONST EFI_SMM_CONTROL2_PROTOCOL *This,
48 IN OUT UINT8 *CommandPort OPTIONAL,
49 IN OUT UINT8 *DataPort 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 Trigger() call.
56
57 This function acknowledges and causes the deassertion of the SMI activation source.
58
59 @param[in] This The EFI_SMM_CONTROL2_PROTOCOL instance.
60 @param[in] Periodic Optional parameter to repeat at this period one time
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 EFI_STATUS
67 EFIAPI
68 SmmControl2Clear (
69 IN CONST EFI_SMM_CONTROL2_PROTOCOL *This,
70 IN BOOLEAN Periodic OPTIONAL
71 );
72
73 #endif