3 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #include <Ppi/SecPlatformInformation.h>
11 #include <Ppi/SecPerformance.h>
12 #include <Ppi/TemporaryRamSupport.h>
14 #include <Library/LocalApicLib.h>
17 This interface conveys state information out of the Security (SEC) phase into PEI.
19 @param PeiServices Pointer to the PEI Services Table.
20 @param StructureSize Pointer to the variable describing size of the input buffer.
21 @param PlatformInformationRecord Pointer to the EFI_SEC_PLATFORM_INFORMATION_RECORD.
23 @retval EFI_SUCCESS The data was successfully returned.
24 @retval EFI_BUFFER_TOO_SMALL The buffer was too small.
29 SecPlatformInformation (
30 IN CONST EFI_PEI_SERVICES
**PeiServices
,
31 IN OUT UINT64
*StructureSize
,
32 OUT EFI_SEC_PLATFORM_INFORMATION_RECORD
*PlatformInformationRecord
36 This interface conveys performance information out of the Security (SEC) phase into PEI.
38 This service is published by the SEC phase. The SEC phase handoff has an optional
39 EFI_PEI_PPI_DESCRIPTOR list as its final argument when control is passed from SEC into the
40 PEI Foundation. As such, if the platform supports collecting performance data in SEC,
41 this information is encapsulated into the data structure abstracted by this service.
42 This information is collected for the boot-strap processor (BSP) on IA-32.
44 @param[in] PeiServices The pointer to the PEI Services Table.
45 @param[in] This The pointer to this instance of the PEI_SEC_PERFORMANCE_PPI.
46 @param[out] Performance The pointer to performance data collected in SEC phase.
48 @retval EFI_SUCCESS The data was successfully returned.
54 IN CONST EFI_PEI_SERVICES
**PeiServices
,
55 IN PEI_SEC_PERFORMANCE_PPI
*This
,
56 OUT FIRMWARE_SEC_PERFORMANCE
*Performance
60 This service of the TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RAM into
63 @param PeiServices Pointer to the PEI Services Table.
64 @param TemporaryMemoryBase Source Address in temporary memory from which the SEC or PEIM will copy the
65 Temporary RAM contents.
66 @param PermanentMemoryBase Destination Address in permanent memory into which the SEC or PEIM will copy the
67 Temporary RAM contents.
68 @param CopySize Amount of memory to migrate from temporary to permanent memory.
70 @retval EFI_SUCCESS The data was successfully returned.
71 @retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize > TemporaryMemoryBase when
72 TemporaryMemoryBase > PermanentMemoryBase.
77 SecTemporaryRamSupport (
78 IN CONST EFI_PEI_SERVICES
**PeiServices
,
79 IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase
,
80 IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase
,
84 EFI_SEC_PLATFORM_INFORMATION_PPI mSecPlatformInformationPpi
= {
85 SecPlatformInformation
88 PEI_SEC_PERFORMANCE_PPI mSecPerformancePpi
= {
92 EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI gSecTemporaryRamSupportPpi
= {
93 SecTemporaryRamSupport
96 EFI_PEI_PPI_DESCRIPTOR mPeiSecPlatformPpi
[] = {
98 EFI_PEI_PPI_DESCRIPTOR_PPI
,
99 &gEfiSecPlatformInformationPpiGuid
,
100 &mSecPlatformInformationPpi
103 EFI_PEI_PPI_DESCRIPTOR_PPI
,
104 &gPeiSecPerformancePpiGuid
,
108 EFI_PEI_PPI_DESCRIPTOR_PPI
| EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST
,
109 &gEfiTemporaryRamSupportPpiGuid
,
110 &gSecTemporaryRamSupportPpi
115 A developer supplied function to perform platform specific operations.
117 It's a developer supplied function to perform any operations appropriate to a
118 given platform. It's invoked just before passing control to PEI core by SEC
119 core. Platform developer may modify the SecCoreData passed to PEI Core.
120 It returns a platform specific PPI list that platform wishes to pass to PEI core.
121 The Generic SEC core module will merge this list to join the final list passed to
124 @param SecCoreData The same parameter as passing to PEI core. It
125 could be overridden by this function.
127 @return The platform specific PPI list to be passed to PEI core or
128 NULL if there is no need of such platform specific PPI list.
131 EFI_PEI_PPI_DESCRIPTOR
*
134 IN OUT EFI_SEC_PEI_HAND_OFF
*SecCoreData
137 EFI_PEI_PPI_DESCRIPTOR
*PpiList
;
139 InitializeApicTimer (0, (UINT32
) -1, TRUE
, 5);
141 PpiList
= &mPeiSecPlatformPpi
[0];