Home | History | Annotate | Download | only in Ppi
      1 /** @file
      2   Defines the interface to convey performance information from SEC phase to PEI.
      3 
      4 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
      5 
      6 This program and the accompanying materials
      7 are licensed and made available under the terms and conditions
      8 of the BSD License which accompanies this distribution.  The
      9 full text of the license may be found at
     10 http://opensource.org/licenses/bsd-license.php
     11 
     12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     14 
     15 **/
     16 
     17 #ifndef _PEI_SEC_PERFORMANCE_PPI_H_
     18 #define _PEI_SEC_PERFORMANCE_PPI_H_
     19 
     20 #define PEI_SEC_PERFORMANCE_PPI_GUID \
     21   { \
     22     0x0ecc666b, 0x4662, 0x47f9, {0x9d, 0xd5, 0xd0, 0x96, 0xff, 0x7d, 0xa4, 0x9e } \
     23   }
     24 
     25 typedef struct _PEI_SEC_PERFORMANCE_PPI PEI_SEC_PERFORMANCE_PPI;
     26 
     27 ///
     28 /// Performance data collected in SEC phase.
     29 ///
     30 typedef struct {
     31   UINT64         ResetEnd; ///< Timer value logged at the beginning of firmware image execution, in unit of nanosecond.
     32 } FIRMWARE_SEC_PERFORMANCE;
     33 
     34 /**
     35   This interface conveys performance information out of the Security (SEC) phase into PEI.
     36 
     37   This service is published by the SEC phase. The SEC phase handoff has an optional
     38   EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed from SEC into the
     39   PEI Foundation. As such, if the platform supports collecting performance data in SEC,
     40   this information is encapsulated into the data structure abstracted by this service.
     41   This information is collected for the boot-strap processor (BSP) on IA-32.
     42 
     43   @param[in]  PeiServices  The pointer to the PEI Services Table.
     44   @param[in]  This         The pointer to this instance of the PEI_SEC_PERFORMANCE_PPI.
     45   @param[out] Performance  The pointer to performance data collected in SEC phase.
     46 
     47   @retval EFI_SUCCESS      The performance data was successfully returned.
     48 
     49 **/
     50 typedef
     51 EFI_STATUS
     52 (EFIAPI *GET_SEC_PERFORMANCE) (
     53   IN CONST EFI_PEI_SERVICES          **PeiServices,
     54   IN       PEI_SEC_PERFORMANCE_PPI   *This,
     55   OUT      FIRMWARE_SEC_PERFORMANCE  *Performance
     56   );
     57 
     58 ///
     59 /// This PPI provides function to get performance data collected in SEC phase.
     60 ///
     61 struct _PEI_SEC_PERFORMANCE_PPI {
     62   GET_SEC_PERFORMANCE         GetPerformance;
     63 };
     64 
     65 extern EFI_GUID gPeiSecPerformancePpiGuid;
     66 
     67 #endif
     68