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