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