]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFspPkg/FspSecCore/SecFsp.h
MdeModulePkg/Core: Merge memory map after filtering paging capability
[mirror_edk2.git] / IntelFspPkg / FspSecCore / SecFsp.h
CommitLineData
c8ec22a2
JY
1/** @file\r
2\r
d5fb1edf 3 Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.<BR>\r
c8ec22a2
JY
4 This program and the accompanying materials\r
5 are licensed and made available under the terms and conditions of the BSD License\r
6 which accompanies this distribution. The full text of the license may be found at\r
7 http://opensource.org/licenses/bsd-license.php.\r
8\r
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
11\r
12**/\r
13\r
14#ifndef _SEC_FSP_H_\r
15#define _SEC_FSPE_H_\r
16\r
17#include <PiPei.h>\r
b2344187 18#include <FspApi.h>\r
c8ec22a2
JY
19#include <Library/PcdLib.h>\r
20#include <Library/BaseLib.h>\r
21#include <Library/DebugLib.h>\r
22#include <Library/SerialPortLib.h>\r
23#include <Library/BaseMemoryLib.h>\r
24#include <Library/FspCommonLib.h>\r
b2344187 25#include <Library/FspSecPlatformLib.h>\r
c8ec22a2
JY
26\r
27#define FSP_MCUD_SIGNATURE SIGNATURE_32 ('M', 'C', 'U', 'D')\r
28#define FSP_PER0_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', '0')\r
29\r
30/**\r
31\r
32 Calculate the FSP IDT gate descriptor.\r
33\r
34 @param[in] IdtEntryTemplate IDT gate descriptor template.\r
35\r
36 @return FSP specific IDT gate descriptor.\r
37\r
38**/\r
39UINT64\r
40FspGetExceptionHandler(\r
41 IN UINT64 IdtEntryTemplate\r
42 );\r
43\r
44/**\r
45\r
46 Initialize the FSP global data region.\r
47 It needs to be done as soon as possible after the stack is setup.\r
48\r
49 @param[in,out] PeiFspData Pointer of the FSP global data.\r
9da59186 50 @param[in] BootLoaderStack BootLoader stack.\r
d5fb1edf 51 @param[in] ApiIdx The index of the FSP API.\r
c8ec22a2
JY
52\r
53**/\r
54VOID\r
55FspGlobalDataInit (\r
56 IN OUT FSP_GLOBAL_DATA *PeiFspData,\r
9da59186 57 IN UINT32 BootLoaderStack,\r
d5fb1edf 58 IN UINT8 ApiIdx\r
c8ec22a2
JY
59 );\r
60\r
61\r
62/**\r
63\r
64 Adjust the FSP data pointers after the stack is migrated to memory.\r
65\r
66 @param[in] OffsetGap The offset gap between the old stack and the new stack.\r
67\r
68**/\r
69VOID\r
70FspDataPointerFixUp (\r
71 IN UINT32 OffsetGap\r
72 );\r
73\r
74\r
75/**\r
76 This interface returns the base address of FSP binary.\r
77\r
78 @return FSP binary base address.\r
79\r
80**/\r
81UINT32\r
82EFIAPI\r
16b7e82c
JY
83AsmGetFspBaseAddress (\r
84 VOID\r
85 );\r
86\r
87/**\r
88 This interface gets FspInfoHeader pointer\r
89\r
90 @return FSP binary base address.\r
91\r
92**/\r
93UINT32\r
94EFIAPI\r
95AsmGetFspInfoHeader (\r
c8ec22a2
JY
96 VOID\r
97 );\r
98\r
99/**\r
100 This function gets the FSP UPD region offset in flash.\r
101\r
102 @return the offset of the UPD region.\r
103\r
104**/\r
105UINT32\r
106EFIAPI\r
107GetFspUpdRegionOffset (\r
108 VOID\r
109 );\r
110\r
111#endif\r