]>
Commit | Line | Data |
---|---|---|
1921695e MK |
1 | /** @file\r |
2 | Master header file for SecCore.\r | |
3 | \r | |
863c738c | 4 | Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r |
1921695e MK |
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 _SEC_CORE_H_\r | |
16 | #define _SEC_CORE_H_\r | |
17 | \r | |
18 | #include <PiPei.h>\r | |
19 | \r | |
20 | #include <Ppi/SecPlatformInformation.h>\r | |
863c738c | 21 | #include <Ppi/SecPlatformInformation2.h>\r |
1921695e MK |
22 | #include <Ppi/TemporaryRamDone.h>\r |
23 | \r | |
24 | #include <Library/BaseLib.h>\r | |
25 | #include <Library/DebugLib.h>\r | |
26 | #include <Library/PcdLib.h>\r | |
27 | #include <Library/BaseMemoryLib.h>\r | |
28 | #include <Library/PlatformSecLib.h>\r | |
29 | #include <Library/UefiCpuLib.h>\r | |
30 | #include <Library/PeCoffGetEntryPointLib.h>\r | |
31 | #include <Library/PeCoffExtraActionLib.h>\r | |
32 | #include <Library/DebugAgentLib.h>\r | |
33 | #include <Library/CpuExceptionHandlerLib.h>\r | |
34 | #include <Library/ReportStatusCodeLib.h>\r | |
863c738c JF |
35 | #include <Library/PeiServicesTablePointerLib.h>\r |
36 | #include <Library/HobLib.h>\r | |
37 | #include <Library/PeiServicesLib.h>\r | |
1921695e MK |
38 | \r |
39 | #define SEC_IDT_ENTRY_COUNT 34\r | |
40 | \r | |
41 | typedef struct _SEC_IDT_TABLE {\r | |
42 | //\r | |
43 | // Reserved 8 bytes preceding IDT to store EFI_PEI_SERVICES**, since IDT base\r | |
44 | // address should be 8-byte alignment.\r | |
45 | // Note: For IA32, only the 4 bytes immediately preceding IDT is used to store\r | |
46 | // EFI_PEI_SERVICES**\r | |
47 | //\r | |
48 | UINT64 PeiService;\r | |
49 | UINT64 IdtTable[SEC_IDT_ENTRY_COUNT];\r | |
50 | } SEC_IDT_TABLE;\r | |
51 | \r | |
52 | /**\r | |
53 | TemporaryRamDone() disables the use of Temporary RAM. If present, this service is invoked\r | |
54 | by the PEI Foundation after the EFI_PEI_PERMANANT_MEMORY_INSTALLED_PPI is installed.\r | |
55 | \r | |
56 | @retval EFI_SUCCESS Use of Temporary RAM was disabled.\r | |
57 | @retval EFI_INVALID_PARAMETER Temporary RAM could not be disabled.\r | |
58 | \r | |
59 | **/\r | |
60 | EFI_STATUS\r | |
61 | EFIAPI\r | |
62 | SecTemporaryRamDone (\r | |
63 | VOID\r | |
64 | );\r | |
65 | \r | |
66 | /**\r | |
67 | Entry point to the C language phase of SEC. After the SEC assembly\r | |
68 | code has initialized some temporary memory and set up the stack,\r | |
69 | the control is transferred to this function.\r | |
70 | \r | |
71 | @param SizeOfRam Size of the temporary memory available for use.\r | |
72 | @param TempRamBase Base address of temporary ram\r | |
73 | @param BootFirmwareVolume Base address of the Boot Firmware Volume.\r | |
74 | **/\r | |
75 | VOID\r | |
76 | EFIAPI\r | |
77 | SecStartup (\r | |
78 | IN UINT32 SizeOfRam,\r | |
79 | IN UINT32 TempRamBase,\r | |
80 | IN VOID *BootFirmwareVolume\r | |
81 | );\r | |
82 | \r | |
83 | /**\r | |
84 | Find and return Pei Core entry point.\r | |
85 | \r | |
86 | It also find SEC and PEI Core file debug information. It will report them if\r | |
87 | remote debug is enabled.\r | |
88 | \r | |
89 | @param BootFirmwareVolumePtr Point to the boot firmware volume.\r | |
90 | @param PeiCoreEntryPoint Point to the PEI core entry point.\r | |
91 | \r | |
92 | **/\r | |
93 | VOID\r | |
94 | EFIAPI\r | |
95 | FindAndReportEntryPoints (\r | |
96 | IN EFI_FIRMWARE_VOLUME_HEADER *BootFirmwareVolumePtr,\r | |
97 | OUT EFI_PEI_CORE_ENTRY_POINT *PeiCoreEntryPoint\r | |
98 | );\r | |
99 | \r | |
100 | /**\r | |
101 | Auto-generated function that calls the library constructors for all of the module's\r | |
102 | dependent libraries. This function must be called by the SEC Core once a stack has\r | |
103 | been established.\r | |
104 | \r | |
105 | **/\r | |
106 | VOID\r | |
107 | EFIAPI\r | |
108 | ProcessLibraryConstructorList (\r | |
109 | VOID\r | |
110 | );\r | |
111 | \r | |
112 | #endif\r |