]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFspPkg/FspSecCore/SecFsp.h
IntelFsp2Pkg/SplitFspBin.py: Support rebasing 1.x binary.
[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
16a16ea6 4 SPDX-License-Identifier: BSD-2-Clause-Patent\r
c8ec22a2
JY
5\r
6**/\r
7\r
8#ifndef _SEC_FSP_H_\r
9#define _SEC_FSPE_H_\r
10\r
11#include <PiPei.h>\r
b2344187 12#include <FspApi.h>\r
c8ec22a2
JY
13#include <Library/PcdLib.h>\r
14#include <Library/BaseLib.h>\r
15#include <Library/DebugLib.h>\r
16#include <Library/SerialPortLib.h>\r
17#include <Library/BaseMemoryLib.h>\r
18#include <Library/FspCommonLib.h>\r
b2344187 19#include <Library/FspSecPlatformLib.h>\r
c8ec22a2
JY
20\r
21#define FSP_MCUD_SIGNATURE SIGNATURE_32 ('M', 'C', 'U', 'D')\r
22#define FSP_PER0_SIGNATURE SIGNATURE_32 ('P', 'E', 'R', '0')\r
23\r
24/**\r
25\r
26 Calculate the FSP IDT gate descriptor.\r
27\r
28 @param[in] IdtEntryTemplate IDT gate descriptor template.\r
29\r
30 @return FSP specific IDT gate descriptor.\r
31\r
32**/\r
33UINT64\r
34FspGetExceptionHandler(\r
35 IN UINT64 IdtEntryTemplate\r
36 );\r
37\r
38/**\r
39\r
40 Initialize the FSP global data region.\r
41 It needs to be done as soon as possible after the stack is setup.\r
42\r
43 @param[in,out] PeiFspData Pointer of the FSP global data.\r
9da59186 44 @param[in] BootLoaderStack BootLoader stack.\r
d5fb1edf 45 @param[in] ApiIdx The index of the FSP API.\r
c8ec22a2
JY
46\r
47**/\r
48VOID\r
49FspGlobalDataInit (\r
50 IN OUT FSP_GLOBAL_DATA *PeiFspData,\r
9da59186 51 IN UINT32 BootLoaderStack,\r
d5fb1edf 52 IN UINT8 ApiIdx\r
c8ec22a2
JY
53 );\r
54\r
55\r
56/**\r
57\r
58 Adjust the FSP data pointers after the stack is migrated to memory.\r
59\r
60 @param[in] OffsetGap The offset gap between the old stack and the new stack.\r
61\r
62**/\r
63VOID\r
64FspDataPointerFixUp (\r
65 IN UINT32 OffsetGap\r
66 );\r
67\r
68\r
69/**\r
70 This interface returns the base address of FSP binary.\r
71\r
72 @return FSP binary base address.\r
73\r
74**/\r
75UINT32\r
76EFIAPI\r
16b7e82c
JY
77AsmGetFspBaseAddress (\r
78 VOID\r
79 );\r
80\r
81/**\r
82 This interface gets FspInfoHeader pointer\r
83\r
84 @return FSP binary base address.\r
85\r
86**/\r
87UINT32\r
88EFIAPI\r
89AsmGetFspInfoHeader (\r
c8ec22a2
JY
90 VOID\r
91 );\r
92\r
93/**\r
94 This function gets the FSP UPD region offset in flash.\r
95\r
96 @return the offset of the UPD region.\r
97\r
98**/\r
99UINT32\r
100EFIAPI\r
101GetFspUpdRegionOffset (\r
102 VOID\r
103 );\r
104\r
105#endif\r