Home | History | Annotate | Download | only in Ppi
      1 /** @file
      2   EFI SMM Communication PPI definition.
      3 
      4   This Ppi provides a means of communicating between PEIM and SMI
      5   handlers inside of SMM.
      6   This Ppi is produced and consumed only in S3 resume boot path.
      7   It is NOT available in normal boot path.
      8 
      9 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
     10 
     11 This program and the accompanying materials
     12 are licensed and made available under the terms and conditions
     13 of the BSD License which accompanies this distribution.  The
     14 full text of the license may be found at
     15 http://opensource.org/licenses/bsd-license.php
     16 
     17 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     18 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     19 
     20 **/
     21 
     22 
     23 #ifndef _SMM_COMMUNICATION_PPI_H_
     24 #define _SMM_COMMUNICATION_PPI_H_
     25 
     26 #define EFI_PEI_SMM_COMMUNICATION_PPI_GUID \
     27   { \
     28     0xae933e1c, 0xcc47, 0x4e38, { 0x8f, 0xe, 0xe2, 0xf6, 0x1d, 0x26, 0x5, 0xdf } \
     29   }
     30 
     31 typedef struct _EFI_PEI_SMM_COMMUNICATION_PPI  EFI_PEI_SMM_COMMUNICATION_PPI;
     32 
     33 /**
     34   Communicates with a registered handler.
     35 
     36   This function provides a service to send and receive messages from a registered UEFI service.
     37 
     38   @param[in] This                The EFI_PEI_SMM_COMMUNICATION_PPI instance.
     39   @param[in] CommBuffer          A pointer to the buffer to convey into SMRAM.
     40   @param[in] CommSize            The size of the data buffer being passed in.On exit, the size of data
     41                                  being returned. Zero if the handler does not wish to reply with any data.
     42 
     43   @retval EFI_SUCCESS            The message was successfully posted.
     44   @retval EFI_INVALID_PARAMETER  The CommBuffer was NULL.
     45 **/
     46 typedef
     47 EFI_STATUS
     48 (EFIAPI *EFI_PEI_SMM_COMMUNICATE)(
     49   IN CONST EFI_PEI_SMM_COMMUNICATION_PPI   *This,
     50   IN OUT VOID                              *CommBuffer,
     51   IN OUT UINTN                             *CommSize
     52   );
     53 
     54 ///
     55 /// EFI SMM Communication Protocol provides runtime services for communicating
     56 /// between DXE drivers and a registered SMI handler.
     57 ///
     58 struct _EFI_PEI_SMM_COMMUNICATION_PPI {
     59   EFI_PEI_SMM_COMMUNICATE  Communicate;
     60 };
     61 
     62 extern EFI_GUID gEfiPeiSmmCommunicationPpiGuid;
     63 
     64 #endif
     65