• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   This file declares Sec Platform Information2 PPI.
3 
4   This service is the primary handoff state into the PEI Foundation.
5   This service abstracts platform-specific information for many CPU's.
6 
7 Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
8 This program and the accompanying materials are licensed and made available under
9 the terms and conditions of the BSD License that accompanies this distribution.
10 The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php.
12 
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 
16   @par Revision Reference:
17   This PPI is introduced from PI Version 1.4.
18 
19 **/
20 
21 #ifndef __SEC_PLATFORM_INFORMATION2_PPI_H__
22 #define __SEC_PLATFORM_INFORMATION2_PPI_H__
23 
24 #include <Ppi/SecPlatformInformation.h>
25 
26 #define EFI_SEC_PLATFORM_INFORMATION2_GUID \
27   { \
28     0x9e9f374b, 0x8f16, 0x4230, {0x98, 0x24, 0x58, 0x46, 0xee, 0x76, 0x6a, 0x97 } \
29   }
30 
31 typedef struct _EFI_SEC_PLATFORM_INFORMATION2_PPI EFI_SEC_PLATFORM_INFORMATION2_PPI;
32 
33 ///
34 /// EFI_SEC_PLATFORM_INFORMATION_CPU.
35 ///
36 typedef struct {
37   UINT32                               CpuLocation;
38   EFI_SEC_PLATFORM_INFORMATION_RECORD  InfoRecord;
39 } EFI_SEC_PLATFORM_INFORMATION_CPU;
40 
41 ///
42 /// EFI_SEC_PLATFORM_INFORMATION_RECORD2.
43 ///
44 typedef struct {
45   ///
46   /// The CPU location would be the local APIC ID
47   ///
48   UINT32                               NumberOfCpus;
49   EFI_SEC_PLATFORM_INFORMATION_CPU     CpuInstance[1];
50 } EFI_SEC_PLATFORM_INFORMATION_RECORD2;
51 
52 /**
53   This interface conveys state information out of the Security (SEC) phase into PEI.
54 
55   This service is published by the SEC phase.
56 
57   @param  PeiServices                The pointer to the PEI Services Table.
58   @param  StructureSize              The pointer to the variable describing size of the input buffer.
59   @param  PlatformInformationRecord2 The pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD2.
60 
61   @retval EFI_SUCCESS                The data was successfully returned.
62   @retval EFI_BUFFER_TOO_SMALL       The buffer was too small. The current buffer size needed to
63                                      hold the record is returned in StructureSize.
64 
65 **/
66 typedef
67 EFI_STATUS
68 (EFIAPI *EFI_SEC_PLATFORM_INFORMATION2)(
69   IN CONST  EFI_PEI_SERVICES                     **PeiServices,
70   IN OUT    UINT64                               *StructureSize,
71   OUT       EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2
72 );
73 
74 ///
75 /// This service abstracts platform-specific information for many CPU's.
76 /// It is the multi-processor equivalent of PlatformInformation for
77 /// implementations that synchronize some, if not all CPU's in the SEC phase.
78 ///
79 struct _EFI_SEC_PLATFORM_INFORMATION2_PPI {
80   EFI_SEC_PLATFORM_INFORMATION2  PlatformInformation2;
81 };
82 
83 extern EFI_GUID gEfiSecPlatformInformation2PpiGuid;
84 
85 #endif
86