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