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