]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFspWrapperPkg/Include/Library/FspPlatformInfoLib.h
Update IntelFspWrapperPkg according to FSP1.1.
[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
d8043ce9
JY
71/**\r
72 Get TempRamExit parameter.\r
73\r
74 @note At this point, memory is ready, PeiServices are available to use.\r
75\r
76 @return TempRamExit parameter.\r
77**/\r
78VOID *\r
79EFIAPI\r
80GetTempRamExitParam (\r
81 VOID\r
82 );\r
83\r
84/**\r
85 Get FspSiliconInit parameter.\r
86\r
87 @note At this point, memory is ready, PeiServices are available to use.\r
88\r
89 @return FspSiliconInit parameter.\r
90**/\r
91VOID *\r
92EFIAPI\r
93GetFspSiliconInitParam (\r
94 VOID\r
95 );\r
96\r
a33a2f62
JY
97/**\r
98 Get S3 PEI memory information.\r
99\r
100 @note At this point, memory is ready, and PeiServices are available to use.\r
101 Platform can get some data from SMRAM directly.\r
102\r
103 @param[out] S3PeiMemSize PEI memory size to be installed in S3 phase.\r
104 @param[out] S3PeiMemBase PEI memory base to be installed in S3 phase.\r
105\r
106 @return If S3 PEI memory information is got successfully.\r
107**/\r
108EFI_STATUS\r
109EFIAPI\r
110GetS3MemoryInfo (\r
111 OUT UINT64 *S3PeiMemSize,\r
112 OUT EFI_PHYSICAL_ADDRESS *S3PeiMemBase\r
113 );\r
114\r
115/**\r
116 Get stack information according to boot mode.\r
117\r
118 @note If BootMode is BOOT_ON_S3_RESUME or BOOT_ON_FLASH_UPDATE,\r
119 this stack should be in some reserved memory space.\r
120\r
121 @note If FspInitDone is TRUE, memory is ready, but no PeiServices there.\r
122 Platform can get some data from SMRAM directly.\r
123 @note If FspInitDone is FALSE, memory is NOT ready, but PeiServices are available to use.\r
124 Platform can get some data from variable via VariablePpi.\r
125\r
126 @param[in] BootMode Current boot mode.\r
127 @param[in] FspInitDone If FspInit is called.\r
128 @param[out] StackSize Stack size to be used in PEI phase.\r
129 @param[out] StackBase Stack base to be used in PEI phase.\r
130\r
131 @return If Stack information is got successfully.\r
132**/\r
133EFI_STATUS\r
134EFIAPI\r
135GetStackInfo (\r
136 IN UINT32 BootMode,\r
137 IN BOOLEAN FspInitDone,\r
138 OUT UINT64 *StackSize,\r
139 OUT EFI_PHYSICAL_ADDRESS *StackBase\r
140 );\r
141\r
142#endif\r