|
TianoCore EDK2 master
|
#include <PiPei.h>#include <Library/BaseLib.h>#include <Library/BaseMemoryLib.h>#include <Library/DebugAgentLib.h>#include <Library/DebugLib.h>#include <Library/PcdLib.h>#include <Library/PeCoffLib.h>#include <Library/PeCoffGetEntryPointLib.h>#include <Library/PeCoffExtraActionLib.h>#include <Library/PeiServicesLib.h>#include <Ppi/TemporaryRamSupport.h>Go to the source code of this file.
Variables | |
| STATIC EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI | mTemporaryRamSupportPpi |
| STATIC EFI_PEI_PPI_DESCRIPTOR | mPrivateDispatchTable [] |
Main SEC phase code. Transitions to PEI.
Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SecMain.c.
| STATIC VOID FindAndReportEntryPoints | ( | IN EFI_FIRMWARE_VOLUME_HEADER ** | BootFirmwareVolumePtr, |
| OUT EFI_PEI_CORE_ENTRY_POINT * | PeiCoreEntryPoint | ||
| ) |
| STATIC EFI_STATUS FindFfsFileAndSection | ( | IN EFI_FIRMWARE_VOLUME_HEADER * | Fv, |
| IN EFI_FV_FILETYPE | FileType, | ||
| IN EFI_SECTION_TYPE | SectionType, | ||
| OUT EFI_COMMON_SECTION_HEADER ** | FoundSection | ||
| ) |
Locates a FFS file with the specified file type and a section within that file with the specified section type.
| [in] | Fv | The firmware volume to search |
| [in] | FileType | The file type to locate |
| [in] | SectionType | The section type to locate |
| [out] | FoundSection | The FFS section if found |
| EFI_SUCCESS | The file and section was found |
| EFI_NOT_FOUND | The file and section was not found |
| EFI_VOLUME_CORRUPTED | The firmware volume was corrupted |
| STATIC EFI_STATUS FindFfsSectionInSections | ( | IN VOID * | Sections, |
| IN UINTN | SizeOfSections, | ||
| IN EFI_SECTION_TYPE | SectionType, | ||
| OUT EFI_COMMON_SECTION_HEADER ** | FoundSection | ||
| ) |
Locates a section within a series of sections with the specified section type.
| [in] | Sections | The sections to search |
| [in] | SizeOfSections | Total size of all sections |
| [in] | SectionType | The section type to locate |
| [out] | FoundSection | The FFS section if found |
| EFI_SUCCESS | The file and section was found |
| EFI_NOT_FOUND | The file and section was not found |
| EFI_VOLUME_CORRUPTED | The firmware volume was corrupted |
| STATIC EFI_STATUS FindFfsSectionInstance | ( | IN VOID * | Sections, |
| IN UINTN | SizeOfSections, | ||
| IN EFI_SECTION_TYPE | SectionType, | ||
| IN UINTN | Instance, | ||
| OUT EFI_COMMON_SECTION_HEADER ** | FoundSection | ||
| ) |
Locates a section within a series of sections with the specified section type.
The Instance parameter indicates which instance of the section type to return. (0 is first instance, 1 is second...)
| [in] | Sections | The sections to search |
| [in] | SizeOfSections | Total size of all sections |
| [in] | SectionType | The section type to locate |
| [in] | Instance | The section instance number |
| [out] | FoundSection | The FFS section if found |
| EFI_SUCCESS | The file and section was found |
| EFI_NOT_FOUND | The file and section was not found |
| EFI_VOLUME_CORRUPTED | The firmware volume was corrupted |
| STATIC EFI_STATUS FindPeiCoreImageBaseInFv | ( | IN EFI_FIRMWARE_VOLUME_HEADER * | Fv, |
| OUT EFI_PHYSICAL_ADDRESS * | PeiCoreImageBase | ||
| ) |
Locates the PEI Core entry point address
| [in] | Fv | The firmware volume to search |
| [out] | PeiCoreEntryPoint | The entry point of the PEI Core image |
| EFI_SUCCESS | The file and section was found |
| EFI_NOT_FOUND | The file and section was not found |
| EFI_VOLUME_CORRUPTED | The firmware volume was corrupted |
| VOID EFIAPI SecCoreStartupWithStack | ( | IN EFI_FIRMWARE_VOLUME_HEADER * | BootFv, |
| IN VOID * | TopOfCurrentStack | ||
| ) |
Find the peicore entry point and jump to the entry point to execute.
| [in] | Context | The first input parameter of InitializeDebugAgent(). |
Caller provided function to be invoked at the end of InitializeDebugAgent().
Entry point to the C language phase of SEC. After the SEC assembly code has initialized some temporary memory and set up the stack, the control is transferred to this function.
| [in] | Context | The first input parameter of InitializeDebugAgent(). |
| EFI_STATUS EFIAPI TemporaryRamMigration | ( | IN CONST EFI_PEI_SERVICES ** | PeiServices, |
| IN EFI_PHYSICAL_ADDRESS | TemporaryMemoryBase, | ||
| IN EFI_PHYSICAL_ADDRESS | PermanentMemoryBase, | ||
| IN UINTN | CopySize | ||
| ) |
temporary memory to permanent memory and do stack switching.
| [in] | PeiServices | Pointer to the PEI Services Table. |
| [in] | TemporaryMemoryBase | Temporary Memory Base address. |
| [in] | PermanentMemoryBase | Permanent Memory Base address. |
| [in] | CopySize | The size of memory that needs to be migrated. |
| EFI_SUCCESS | Migration successful. |
| STATIC EFI_PEI_PPI_DESCRIPTOR mPrivateDispatchTable[] |
| STATIC EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI mTemporaryRamSupportPpi |