Subrata Banik | 20fe24b | 2021-12-09 02:46:38 +0530 | [diff] [blame] | 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 | SPDX-License-Identifier: BSD-2-Clause-Patent |
| 9 | |
| 10 | @par Revision Reference: |
| 11 | This PPI is introduced from PI Version 1.4. |
| 12 | |
| 13 | **/ |
| 14 | |
| 15 | #ifndef __SEC_PLATFORM_INFORMATION2_PPI_H__ |
| 16 | #define __SEC_PLATFORM_INFORMATION2_PPI_H__ |
| 17 | |
| 18 | #include <Ppi/SecPlatformInformation.h> |
| 19 | |
| 20 | #define EFI_SEC_PLATFORM_INFORMATION2_GUID \ |
| 21 | { \ |
| 22 | 0x9e9f374b, 0x8f16, 0x4230, {0x98, 0x24, 0x58, 0x46, 0xee, 0x76, 0x6a, 0x97 } \ |
| 23 | } |
| 24 | |
| 25 | typedef struct _EFI_SEC_PLATFORM_INFORMATION2_PPI EFI_SEC_PLATFORM_INFORMATION2_PPI; |
| 26 | |
| 27 | /// |
| 28 | /// EFI_SEC_PLATFORM_INFORMATION_CPU. |
| 29 | /// |
| 30 | typedef struct { |
| 31 | UINT32 CpuLocation; |
| 32 | EFI_SEC_PLATFORM_INFORMATION_RECORD InfoRecord; |
| 33 | } EFI_SEC_PLATFORM_INFORMATION_CPU; |
| 34 | |
| 35 | /// |
| 36 | /// EFI_SEC_PLATFORM_INFORMATION_RECORD2. |
| 37 | /// |
| 38 | typedef struct { |
| 39 | /// |
| 40 | /// The CPU location would be the local APIC ID |
| 41 | /// |
| 42 | UINT32 NumberOfCpus; |
| 43 | EFI_SEC_PLATFORM_INFORMATION_CPU CpuInstance[1]; |
| 44 | } EFI_SEC_PLATFORM_INFORMATION_RECORD2; |
| 45 | |
| 46 | /** |
| 47 | This interface conveys state information out of the Security (SEC) phase into PEI. |
| 48 | |
| 49 | This service is published by the SEC phase. |
| 50 | |
| 51 | @param PeiServices The pointer to the PEI Services Table. |
| 52 | @param StructureSize The pointer to the variable describing size of the input buffer. |
| 53 | @param PlatformInformationRecord2 The pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD2. |
| 54 | |
| 55 | @retval EFI_SUCCESS The data was successfully returned. |
| 56 | @retval EFI_BUFFER_TOO_SMALL The buffer was too small. The current buffer size needed to |
| 57 | hold the record is returned in StructureSize. |
| 58 | |
| 59 | **/ |
| 60 | typedef |
| 61 | EFI_STATUS |
| 62 | (EFIAPI *EFI_SEC_PLATFORM_INFORMATION2)( |
| 63 | IN CONST EFI_PEI_SERVICES **PeiServices, |
| 64 | IN OUT UINT64 *StructureSize, |
| 65 | OUT EFI_SEC_PLATFORM_INFORMATION_RECORD2 *PlatformInformationRecord2 |
| 66 | ); |
| 67 | |
| 68 | /// |
| 69 | /// This service abstracts platform-specific information for many CPU's. |
| 70 | /// It is the multi-processor equivalent of PlatformInformation for |
| 71 | /// implementations that synchronize some, if not all CPU's in the SEC phase. |
| 72 | /// |
| 73 | struct _EFI_SEC_PLATFORM_INFORMATION2_PPI { |
| 74 | EFI_SEC_PLATFORM_INFORMATION2 PlatformInformation2; |
| 75 | }; |
| 76 | |
| 77 | extern EFI_GUID gEfiSecPlatformInformation2PpiGuid; |
| 78 | |
| 79 | #endif |