]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFspWrapperPkg/Include/Library/FspPlatformInfoLib.h
IntelFspWrapperPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFspWrapperPkg / Include / Library / FspPlatformInfoLib.h
1 /** @file
2 Provide FSP platform information related function.
3
4 Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __FSP_PLATFORM_INFO_LIB_H__
10 #define __FSP_PLATFORM_INFO_LIB_H__
11
12 /**
13 Get current boot mode.
14
15 @note At this point, memory is ready, PeiServices are NOT available to use.
16 Platform can get some data from chipset register.
17
18 @return BootMode current boot mode.
19 **/
20 UINT32
21 EFIAPI
22 GetBootMode (
23 VOID
24 );
25
26 /**
27 Get NVS buffer parameter.
28
29 @note At this point, memory is NOT ready, PeiServices are available to use.
30
31 @return NvsBuffer NVS buffer parameter.
32 **/
33 VOID *
34 EFIAPI
35 GetNvsBuffer (
36 VOID
37 );
38
39 /**
40 Get UPD region size.
41
42 @note At this point, memory is NOT ready, PeiServices are available to use.
43
44 @return UPD region size.
45 **/
46 UINT32
47 EFIAPI
48 GetUpdRegionSize (
49 VOID
50 );
51
52 /**
53 This function overrides the default configurations in the UPD data region.
54
55 @param[in,out] FspUpdRgnPtr A pointer to the UPD data region data strcture.
56
57 @return FspUpdRgnPtr A pointer to the UPD data region data strcture.
58 **/
59 VOID *
60 EFIAPI
61 UpdateFspUpdConfigs (
62 IN OUT VOID *FspUpdRgnPtr
63 );
64
65 /**
66 Get BootLoader Tolum size.
67
68 @note At this point, memory is NOT ready, PeiServices are available to use.
69
70 @return BootLoader Tolum size.
71 **/
72 UINT32
73 EFIAPI
74 GetBootLoaderTolumSize (
75 VOID
76 );
77
78 /**
79 Get TempRamExit parameter.
80
81 @note At this point, memory is ready, PeiServices are available to use.
82
83 @return TempRamExit parameter.
84 **/
85 VOID *
86 EFIAPI
87 GetTempRamExitParam (
88 VOID
89 );
90
91 /**
92 Get FspSiliconInit parameter.
93
94 @note At this point, memory is ready, PeiServices are available to use.
95
96 @return FspSiliconInit parameter.
97 **/
98 VOID *
99 EFIAPI
100 GetFspSiliconInitParam (
101 VOID
102 );
103
104 /**
105 Get S3 PEI memory information.
106
107 @note At this point, memory is ready, and PeiServices are available to use.
108 Platform can get some data from SMRAM directly.
109
110 @param[out] S3PeiMemSize PEI memory size to be installed in S3 phase.
111 @param[out] S3PeiMemBase PEI memory base to be installed in S3 phase.
112
113 @return If S3 PEI memory information is got successfully.
114 **/
115 EFI_STATUS
116 EFIAPI
117 GetS3MemoryInfo (
118 OUT UINT64 *S3PeiMemSize,
119 OUT EFI_PHYSICAL_ADDRESS *S3PeiMemBase
120 );
121
122 /**
123 Get stack information according to boot mode.
124
125 @note If BootMode is BOOT_ON_S3_RESUME or BOOT_ON_FLASH_UPDATE,
126 this stack should be in some reserved memory space.
127
128 @note If FspInitDone is TRUE, memory is ready, but no PeiServices there.
129 Platform can get some data from SMRAM directly.
130 @note If FspInitDone is FALSE, memory is NOT ready, but PeiServices are available to use.
131 Platform can get some data from variable via VariablePpi.
132
133 @param[in] BootMode Current boot mode.
134 @param[in] FspInitDone If FspInit is called.
135 @param[out] StackSize Stack size to be used in PEI phase.
136 @param[out] StackBase Stack base to be used in PEI phase.
137
138 @return If Stack information is got successfully.
139 **/
140 EFI_STATUS
141 EFIAPI
142 GetStackInfo (
143 IN UINT32 BootMode,
144 IN BOOLEAN FspInitDone,
145 OUT UINT64 *StackSize,
146 OUT EFI_PHYSICAL_ADDRESS *StackBase
147 );
148
149 #endif