]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Include/Ppi/SecPlatformInformation.h
Formalize comments for Protocols and PPIs.
[mirror_edk2.git] / MdePkg / Include / Ppi / SecPlatformInformation.h
CommitLineData
5879b875 1/** @file\r
2 This file declares Sec Platform Information PPI.\r
3\r
d7132512
LG
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
7 location of the Boot Firmware Volume (BFV).\r
8\r
9 Copyright (c) 2006 - 2008, Intel Corporation \r
5879b875 10 All rights reserved. This program and the accompanying materials \r
11 are licensed and made available under the terms and conditions of the BSD License \r
12 which accompanies this distribution. The full text of the license may be found at \r
13 http://opensource.org/licenses/bsd-license.php \r
14\r
15 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
16 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
17\r
5879b875 18 @par Revision Reference:\r
19 This PPI is defined in PI.\r
20 Version 1.00.\r
21\r
22**/\r
23\r
24#ifndef __SEC_PLATFORM_INFORMATION_PPI_H__\r
25#define __SEC_PLATFORM_INFORMATION_PPI_H__\r
26\r
27#define EFI_SEC_PLATFORM_INFORMATION_GUID \\r
28 { \\r
29 0x6f8c2b35, 0xfef4, 0x448d, {0x82, 0x56, 0xe1, 0x1b, 0x19, 0xd6, 0x10, 0x77 } \\r
30 }\r
31\r
32typedef struct _EFI_SEC_PLATFORM_INFORMATION_PPI EFI_SEC_PLATFORM_INFORMATION_PPI;\r
33\r
34\r
06889842 35///\r
36/// EFI_HEALTH_FLAGS\r
37/// Contains information generated by microcode, hardware, and/or the Itanium\r
38/// processor PAL code about the state of the processor upon reset.\r
39///\r
5879b875 40typedef union {\r
41 struct {\r
13c38031 42 ///\r
43 /// A 2-bit field indicating self-test state after reset.\r
44 ///\r
5879b875 45 UINT32 Status : 2;\r
13c38031 46 ///\r
47 /// A 1-bit field indicating whether testing has occurred.\r
48 /// If this field is zero, the processor has not been tested,\r
49 /// and no further fields in the self-test State parameter are valid.\r
50 ///\r
5879b875 51 UINT32 Tested : 1;\r
13c38031 52 ///\r
53 /// Reserved 13 bits.\r
54 ///\r
5879b875 55 UINT32 Reserved1 :13;\r
13c38031 56 ///\r
57 /// A 1-bit field. If set to 1, indicates that virtual\r
58 /// memory features are not available.\r
59 ///\r
5879b875 60 UINT32 VirtualMemoryUnavailable : 1;\r
13c38031 61 ///\r
62 /// A 1-bit field. If set to 1, indicates that IA-32 execution\r
63 /// is not available.\r
64 ///\r
5879b875 65 UINT32 Ia32ExecutionUnavailable : 1;\r
13c38031 66 ///\r
67 /// A 1-bit field. If set to 1, indicates that the floating\r
68 /// point unit is not available.\r
69 ///\r
5879b875 70 UINT32 FloatingPointUnavailable : 1;\r
13c38031 71 ///\r
72 /// A 1-bit field. If set to 1, indicates miscellaneous\r
73 /// functional failure other than vm, ia, or fp.\r
74 /// The test status field provides additional information on\r
75 /// test failures when the State field returns a value of\r
76 /// performance restricted or functionally restricted.\r
77 /// The value returned is implementation dependent.\r
78 ///\r
5879b875 79 UINT32 MiscFeaturesUnavailable : 1;\r
13c38031 80 ///\r
81 /// Reserved 12 bits.\r
82 ///\r
5879b875 83 UINT32 Reserved2 :12;\r
84 } Bits;\r
85 UINT32 Uint32;\r
86} EFI_HEALTH_FLAGS;\r
87\r
d936a70c 88#define NORMAL_BOOT_CALL 0x0\r
89#define RECOVERY_CHECK_CALL 0x3\r
90\r
91typedef struct {\r
92 UINT8 BootPhase;\r
93 UINT8 FWStatus;\r
94 UINT16 Reserved1;\r
95 UINT32 Reserved2;\r
96\r
97 UINT16 ProcId;\r
98 UINT16 Reserved3;\r
99 UINT8 IdMask;\r
100 UINT8 EidMask;\r
101 UINT16 Reserved4;\r
102\r
103 UINT64 PalCallAddress;\r
104 UINT64 PalSpecialAddress;\r
105 UINT64 SelfTestStatus;\r
106 UINT64 SelfTestControl;\r
107 UINT64 MemoryBufferRequired;\r
108\r
109} IPF_HANDOFF_STATUS;\r
110\r
13c38031 111///\r
112/// EFI_SEC_PLATFORM_INFORMATION_RECORD\r
113///\r
5879b875 114typedef struct {\r
13c38031 115 ///\r
116 /// Contains information generated by microcode, hardware,\r
117 /// and/or the Itanium processor PAL code about the state\r
118 /// of the processor upon reset.\r
119 ///\r
5879b875 120 EFI_HEALTH_FLAGS HealthFlags;\r
121} EFI_SEC_PLATFORM_INFORMATION_RECORD;\r
122\r
123\r
124\r
125/**\r
126 This interface conveys state information out of the Security (SEC) phase into PEI.\r
127\r
13c38031 128 This service is published by the SEC phase. The SEC phase handoff has an optional\r
129 EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed from SEC into the\r
130 PEI Foundation. As such, if the platform supports the built-in self test (BIST) on IA-32 Intel\r
131 architecture or the PAL-A handoff state for Itanium architecture, this information is encapsulated\r
132 into the data structure abstracted by this service. This information is collected for the boot-strap\r
133 processor (BSP) on IA-32, and for Itanium architecture, it is available on all processors that execute\r
134 the PEI Foundation.\r
135\r
5879b875 136 @param PeiServices Pointer to the PEI Services Table.\r
137 @param StructureSize Pointer to the variable describing size of the input buffer.\r
138 @param PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.\r
139\r
13c38031 140 @retval EFI_SUCCESS The data was successfully returned.\r
141 @retval EFI_BUFFER_TOO_SMALL The buffer was too small.\r
5879b875 142\r
143**/\r
144typedef\r
145EFI_STATUS\r
8b13229b 146(EFIAPI *EFI_SEC_PLATFORM_INFORMATION)(\r
00edb218
A
147 IN CONST EFI_PEI_SERVICES **PeiServices,\r
148 IN OUT UINT64 *StructureSize,\r
149 OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord\r
5879b875 150);\r
151\r
152\r
13c38031 153///\r
154/// This service abstracts platform-specific information. It is necessary \r
155/// to convey this information to the PEI Foundation so that it can \r
156/// discover where to begin dispatching PEIMs.\r
157///\r
5879b875 158struct _EFI_SEC_PLATFORM_INFORMATION_PPI {\r
159 EFI_SEC_PLATFORM_INFORMATION PlatformInformation;\r
160};\r
161\r
162\r
163extern EFI_GUID gEfiSecPlatformInformationPpiGuid;\r
164\r
165#endif\r