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