Home | History | Annotate | Download | only in SmmControl2OnSmmControlThunk
      1 /** @file
      2   Include file for SMM Control2 Protocol on SMM Control Protocol Thunk driver.
      3 
      4   Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
      5   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 
     21 #include <Protocol/SmmControl2.h>
     22 #include <Protocol/SmmControl.h>
     23 
     24 #include <Guid/EventGroup.h>
     25 
     26 #include <Library/DebugLib.h>
     27 #include <Library/UefiBootServicesTableLib.h>
     28 #include <Library/UefiDriverEntryPoint.h>
     29 #include <Library/UefiRuntimeLib.h>
     30 #include <Library/IoLib.h>
     31 
     32 /**
     33   Invokes SMI activation from either the preboot or runtime environment.
     34 
     35   This function generates an SMI.
     36 
     37   @param[in]     This                The EFI_SMM_CONTROL2_PROTOCOL instance.
     38   @param[in, out] CommandPort         The value written to the command port.
     39   @param[in, out] DataPort            The value written to the data port.
     40   @param[in]     Periodic            Optional mechanism to engender a periodic stream.
     41   @param[in]     ActivationInterval  Optional parameter to repeat at this period one
     42                                      time or, if the Periodic Boolean is set, periodically.
     43 
     44   @retval EFI_SUCCESS            The SMI/PMI has been engendered.
     45   @retval EFI_DEVICE_ERROR       The timing is unsupported.
     46   @retval EFI_INVALID_PARAMETER  The activation period is unsupported.
     47   @retval EFI_INVALID_PARAMETER  The last periodic activation has not been cleared.
     48   @retval EFI_NOT_STARTED        The SMM base service has not been initialized.
     49 **/
     50 EFI_STATUS
     51 EFIAPI
     52 SmmControl2Trigger (
     53   IN CONST EFI_SMM_CONTROL2_PROTOCOL  *This,
     54   IN OUT UINT8                        *CommandPort       OPTIONAL,
     55   IN OUT UINT8                        *DataPort          OPTIONAL,
     56   IN BOOLEAN                          Periodic           OPTIONAL,
     57   IN UINTN                            ActivationInterval OPTIONAL
     58   );
     59 
     60 /**
     61   Clears any system state that was created in response to the Trigger() call.
     62 
     63   This function acknowledges and causes the deassertion of the SMI activation source.
     64 
     65   @param[in] This                The EFI_SMM_CONTROL2_PROTOCOL instance.
     66   @param[in] Periodic            Optional parameter to repeat at this period one time
     67 
     68   @retval EFI_SUCCESS            The SMI/PMI has been engendered.
     69   @retval EFI_DEVICE_ERROR       The source could not be cleared.
     70   @retval EFI_INVALID_PARAMETER  The service did not support the Periodic input argument.
     71 **/
     72 EFI_STATUS
     73 EFIAPI
     74 SmmControl2Clear (
     75   IN CONST EFI_SMM_CONTROL2_PROTOCOL  *This,
     76   IN BOOLEAN                          Periodic OPTIONAL
     77   );
     78 
     79 #endif
     80