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