2 Master header file for SecCore.
4 Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 #include <Ppi/SecPlatformInformation.h>
21 #include <Ppi/SecPlatformInformation2.h>
22 #include <Ppi/TemporaryRamDone.h>
24 #include <Library/BaseLib.h>
25 #include <Library/DebugLib.h>
26 #include <Library/PcdLib.h>
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/PlatformSecLib.h>
29 #include <Library/UefiCpuLib.h>
30 #include <Library/PeCoffGetEntryPointLib.h>
31 #include <Library/PeCoffExtraActionLib.h>
32 #include <Library/DebugAgentLib.h>
33 #include <Library/CpuExceptionHandlerLib.h>
34 #include <Library/ReportStatusCodeLib.h>
35 #include <Library/PeiServicesTablePointerLib.h>
36 #include <Library/HobLib.h>
37 #include <Library/PeiServicesLib.h>
39 #define SEC_IDT_ENTRY_COUNT 34
41 typedef struct _SEC_IDT_TABLE
{
43 // Reserved 8 bytes preceding IDT to store EFI_PEI_SERVICES**, since IDT base
44 // address should be 8-byte alignment.
45 // Note: For IA32, only the 4 bytes immediately preceding IDT is used to store
49 UINT64 IdtTable
[SEC_IDT_ENTRY_COUNT
];
53 TemporaryRamDone() disables the use of Temporary RAM. If present, this service is invoked
54 by the PEI Foundation after the EFI_PEI_PERMANANT_MEMORY_INSTALLED_PPI is installed.
56 @retval EFI_SUCCESS Use of Temporary RAM was disabled.
57 @retval EFI_INVALID_PARAMETER Temporary RAM could not be disabled.
67 Entry point to the C language phase of SEC. After the SEC assembly
68 code has initialized some temporary memory and set up the stack,
69 the control is transferred to this function.
71 @param SizeOfRam Size of the temporary memory available for use.
72 @param TempRamBase Base address of temporary ram
73 @param BootFirmwareVolume Base address of the Boot Firmware Volume.
79 IN UINT32 TempRamBase
,
80 IN VOID
*BootFirmwareVolume
84 Find and return Pei Core entry point.
86 It also find SEC and PEI Core file debug information. It will report them if
87 remote debug is enabled.
89 @param BootFirmwareVolumePtr Point to the boot firmware volume.
90 @param PeiCoreEntryPoint Point to the PEI core entry point.
95 FindAndReportEntryPoints (
96 IN EFI_FIRMWARE_VOLUME_HEADER
*BootFirmwareVolumePtr
,
97 OUT EFI_PEI_CORE_ENTRY_POINT
*PeiCoreEntryPoint
101 Auto-generated function that calls the library constructors for all of the module's
102 dependent libraries. This function must be called by the SEC Core once a stack has
108 ProcessLibraryConstructorList (