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