]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/SecPlatformInformation.h
MdeModulePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Include / Ppi / SecPlatformInformation.h
CommitLineData
5879b875 1/** @file\r
2 This file declares Sec Platform Information PPI.\r
3\r
1c8e0459
JF
4 This service is the primary handoff state into the PEI Foundation.\r
5 The Security (SEC) component creates the early, transitory memory\r
6 environment and also encapsulates knowledge of at least the\r
d7132512
LG
7 location of the Boot Firmware Volume (BFV).\r
8\r
1c8e0459 9Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
9344f092 10SPDX-License-Identifier: BSD-2-Clause-Patent\r
5879b875 11\r
5879b875 12 @par Revision Reference:\r
0047820e 13 This PPI is introduced in PI Version 1.0.\r
5879b875 14\r
15**/\r
16\r
17#ifndef __SEC_PLATFORM_INFORMATION_PPI_H__\r
18#define __SEC_PLATFORM_INFORMATION_PPI_H__\r
19\r
1c8e0459
JF
20#include <Pi/PiPeiCis.h>\r
21\r
5879b875 22#define EFI_SEC_PLATFORM_INFORMATION_GUID \\r
23 { \\r
24 0x6f8c2b35, 0xfef4, 0x448d, {0x82, 0x56, 0xe1, 0x1b, 0x19, 0xd6, 0x10, 0x77 } \\r
25 }\r
26\r
27typedef struct _EFI_SEC_PLATFORM_INFORMATION_PPI EFI_SEC_PLATFORM_INFORMATION_PPI;\r
28\r
29\r
06889842 30///\r
31/// EFI_HEALTH_FLAGS\r
32/// Contains information generated by microcode, hardware, and/or the Itanium\r
33/// processor PAL code about the state of the processor upon reset.\r
34///\r
5879b875 35typedef union {\r
36 struct {\r
13c38031 37 ///\r
38 /// A 2-bit field indicating self-test state after reset.\r
39 ///\r
5879b875 40 UINT32 Status : 2;\r
13c38031 41 ///\r
42 /// A 1-bit field indicating whether testing has occurred.\r
43 /// If this field is zero, the processor has not been tested,\r
44 /// and no further fields in the self-test State parameter are valid.\r
45 ///\r
5879b875 46 UINT32 Tested : 1;\r
13c38031 47 ///\r
48 /// Reserved 13 bits.\r
49 ///\r
5879b875 50 UINT32 Reserved1 :13;\r
13c38031 51 ///\r
af2dc6a7 52 /// A 1-bit field. If set to 1, this indicates that virtual\r
13c38031 53 /// memory features are not available.\r
54 ///\r
5879b875 55 UINT32 VirtualMemoryUnavailable : 1;\r
13c38031 56 ///\r
af2dc6a7 57 /// A 1-bit field. If set to 1, this indicates that IA-32 execution\r
13c38031 58 /// is not available.\r
59 ///\r
5879b875 60 UINT32 Ia32ExecutionUnavailable : 1;\r
13c38031 61 ///\r
af2dc6a7 62 /// A 1-bit field. If set to 1, this indicates that the floating\r
13c38031 63 /// point unit is not available.\r
64 ///\r
5879b875 65 UINT32 FloatingPointUnavailable : 1;\r
13c38031 66 ///\r
af2dc6a7 67 /// A 1-bit field. If set to 1, this indicates miscellaneous\r
13c38031 68 /// functional failure other than vm, ia, or fp.\r
69 /// The test status field provides additional information on\r
70 /// test failures when the State field returns a value of\r
71 /// performance restricted or functionally restricted.\r
72 /// The value returned is implementation dependent.\r
73 ///\r
5879b875 74 UINT32 MiscFeaturesUnavailable : 1;\r
13c38031 75 ///\r
76 /// Reserved 12 bits.\r
77 ///\r
5879b875 78 UINT32 Reserved2 :12;\r
79 } Bits;\r
80 UINT32 Uint32;\r
81} EFI_HEALTH_FLAGS;\r
82\r
d936a70c 83#define NORMAL_BOOT_CALL 0x0\r
84#define RECOVERY_CHECK_CALL 0x3\r
85\r
53f32495 86typedef EFI_HEALTH_FLAGS X64_HANDOFF_STATUS;\r
87typedef EFI_HEALTH_FLAGS IA32_HANDOFF_STATUS;\r
88///\r
89/// The hand-off status structure for Itanium architecture.\r
90///\r
d936a70c 91typedef struct {\r
53f32495 92 ///\r
93 /// SALE_ENTRY state : 3 = Recovery_Check\r
94 /// and 0 = RESET or Normal_Boot phase.\r
95 ///\r
d936a70c 96 UINT8 BootPhase;\r
53f32495 97 ///\r
98 /// Firmware status on entry to SALE.\r
99 ///\r
d936a70c 100 UINT8 FWStatus;\r
101 UINT16 Reserved1;\r
102 UINT32 Reserved2;\r
53f32495 103 ///\r
104 /// Geographically significant unique processor ID assigned by PAL.\r
105 ///\r
d936a70c 106 UINT16 ProcId;\r
107 UINT16 Reserved3;\r
108 UINT8 IdMask;\r
109 UINT8 EidMask;\r
110 UINT16 Reserved4;\r
53f32495 111 ///\r
af2dc6a7 112 /// Address to make PAL calls.\r
53f32495 113 ///\r
d936a70c 114 UINT64 PalCallAddress;\r
53f32495 115 ///\r
116 /// If the entry state is RECOVERY_CHECK, this contains the PAL_RESET\r
117 /// return address, and if entry state is RESET, this contains\r
118 /// address for PAL_authentication call.\r
119 ///\r
d936a70c 120 UINT64 PalSpecialAddress;\r
53f32495 121 ///\r
af2dc6a7 122 /// GR35 from PALE_EXIT state.\r
53f32495 123 ///\r
d936a70c 124 UINT64 SelfTestStatus;\r
53f32495 125 ///\r
126 /// GR37 from PALE_EXIT state.\r
127 ///\r
d936a70c 128 UINT64 SelfTestControl;\r
129 UINT64 MemoryBufferRequired;\r
53f32495 130} ITANIUM_HANDOFF_STATUS;\r
d936a70c 131\r
13c38031 132///\r
af2dc6a7 133/// EFI_SEC_PLATFORM_INFORMATION_RECORD.\r
13c38031 134///\r
53f32495 135typedef union {\r
136 IA32_HANDOFF_STATUS IA32HealthFlags;\r
137 X64_HANDOFF_STATUS x64HealthFlags;\r
138 ITANIUM_HANDOFF_STATUS ItaniumHealthFlags;\r
5879b875 139} EFI_SEC_PLATFORM_INFORMATION_RECORD;\r
140\r
5879b875 141/**\r
142 This interface conveys state information out of the Security (SEC) phase into PEI.\r
143\r
13c38031 144 This service is published by the SEC phase. The SEC phase handoff has an optional\r
145 EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed from SEC into the\r
146 PEI Foundation. As such, if the platform supports the built-in self test (BIST) on IA-32 Intel\r
147 architecture or the PAL-A handoff state for Itanium architecture, this information is encapsulated\r
148 into the data structure abstracted by this service. This information is collected for the boot-strap\r
af2dc6a7 149 processor (BSP) on IA-32. For Itanium architecture, it is available on all processors that execute\r
13c38031 150 the PEI Foundation.\r
151\r
af2dc6a7 152 @param PeiServices The pointer to the PEI Services Table.\r
153 @param StructureSize The pointer to the variable describing size of the input buffer.\r
154 @param PlatformInformationRecord The pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.\r
5879b875 155\r
13c38031 156 @retval EFI_SUCCESS The data was successfully returned.\r
53f32495 157 @retval EFI_BUFFER_TOO_SMALL The buffer was too small. The current buffer size needed to\r
158 hold the record is returned in StructureSize.\r
5879b875 159\r
160**/\r
161typedef\r
162EFI_STATUS\r
8b13229b 163(EFIAPI *EFI_SEC_PLATFORM_INFORMATION)(\r
00edb218
A
164 IN CONST EFI_PEI_SERVICES **PeiServices,\r
165 IN OUT UINT64 *StructureSize,\r
166 OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord\r
5879b875 167);\r
168\r
169\r
13c38031 170///\r
1c8e0459
JF
171/// This service abstracts platform-specific information. It is necessary\r
172/// to convey this information to the PEI Foundation so that it can\r
13c38031 173/// discover where to begin dispatching PEIMs.\r
174///\r
5879b875 175struct _EFI_SEC_PLATFORM_INFORMATION_PPI {\r
176 EFI_SEC_PLATFORM_INFORMATION PlatformInformation;\r
177};\r
178\r
179\r
180extern EFI_GUID gEfiSecPlatformInformationPpiGuid;\r
181\r
182#endif\r