Correct comments.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5617 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
klu2 2008-08-08 02:17:45 +00:00
parent dc857d5641
commit 1527399381
4 changed files with 65 additions and 45 deletions

View File

@ -144,6 +144,9 @@ PeiFileHandleToVolume (
@param FileName File name @param FileName File name
@param SearchType Filter to find only files of this type. @param SearchType Filter to find only files of this type.
Type EFI_FV_FILETYPE_ALL causes no filtering to be done. Type EFI_FV_FILETYPE_ALL causes no filtering to be done.
Type PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE is an FFS type
extension used for PeiFindFileEx. It indicates current
Ffs searching is for all PEIMs can be dispatched by PeiCore.
@param FileHandle This parameter must point to a valid FFS volume. @param FileHandle This parameter must point to a valid FFS volume.
@param AprioriFile Pointer to AprioriFile image in this FV if has @param AprioriFile Pointer to AprioriFile image in this FV if has
@ -651,13 +654,13 @@ PeiFvFindNextVolume (
Given the input VolumeHandle, search for the next matching name file. Given the input VolumeHandle, search for the next matching name file.
@param FileName - File name to search. @param FileName File name to search.
@param VolumeHandle - The current FV to search. @param VolumeHandle The current FV to search.
@param FileHandle - Pointer to the file matching name in VolumeHandle. @param FileHandle Pointer to the file matching name in VolumeHandle.
- NULL if file not found NULL if file not found
@return EFI_STATUS
@retval EFI_NOT_FOUND No files matching the search criteria were found
@retval EFI_SUCCESS Success to search given file
**/ **/
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI

View File

@ -502,12 +502,13 @@ PeiLoadImage (
/** /**
Initialize image service that install PeiLoadFilePpi.
Install Pei Load File PPI. @param PrivateData Pointer to PeiCore's private data structure PEI_CORE_INSTANCE.
@param OldCoreData Pointer to Old PeiCore's private data.
If NULL, PeiCore is entered at first time, stack/heap in temporary memory.
@param PrivateData - Pointer to PEI_CORE_INSTANCE. If not NULL, PeiCore is entered at second time, stack/heap has been moved
@param OldCoreData - Pointer to PEI_CORE_INSTANCE. to permenent memory.
**/ **/
VOID VOID

View File

@ -1,7 +1,7 @@
/** @file /** @file
Definition of Pei Core Structures and Services Definition of Pei Core Structures and Services
Copyright (c) 2006 - 2007, Intel Corporation Copyright (c) 2006 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -47,6 +47,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#include <Guid/FirmwareFileSystem2.h> #include <Guid/FirmwareFileSystem2.h>
#include <Guid/AprioriFileName.h> #include <Guid/AprioriFileName.h>
///
/// It is an FFS type extension used for PeiFindFileEx. It indicates current
/// Ffs searching is for all PEIMs can be dispatched by PeiCore.
///
#define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE 0xff #define PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE 0xff
/// ///
@ -162,9 +166,23 @@ typedef struct{
#define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \ #define PEI_CORE_INSTANCE_FROM_PS_THIS(a) \
CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE) CR(a, PEI_CORE_INSTANCE, PS, PEI_CORE_HANDLE_SIGNATURE)
/**
Function Pointer type for PeiCore function.
@param SecCoreData Points to a data structure containing information about the PEI core's operating
environment, such as the size and location of temporary RAM, the stack location and
the BFV location.
@param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core.
An empty PPI list consists of a single descriptor with the end-tag
EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST. As part of its initialization
phase, the PEI Foundation will add these SEC-hosted PPIs to its PPI database such
that both the PEI Foundation and any modules can leverage the associated service
calls and/or code in these early PPIs
@param Data Pointer to old core data that is used to initialize the
core's data areas.
**/
typedef typedef
EFI_STATUS EFI_STATUS
(EFIAPI *PEI_CORE_ENTRY_POINT)( (EFIAPI *PEICORE_FUNCTION_POINTER)(
IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData, IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData,
IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList, IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList,
IN PEI_CORE_INSTANCE *OldCoreData IN PEI_CORE_INSTANCE *OldCoreData
@ -174,7 +192,7 @@ EFI_STATUS
/// Union of temporarily used function pointers (to save stack space) /// Union of temporarily used function pointers (to save stack space)
/// ///
typedef union { typedef union {
PEI_CORE_ENTRY_POINT PeiCore; PEICORE_FUNCTION_POINTER PeiCore;
EFI_PEIM_ENTRY_POINT2 PeimEntry; EFI_PEIM_ENTRY_POINT2 PeimEntry;
EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry; EFI_PEIM_NOTIFY_ENTRY_POINT PeimNotifyEntry;
EFI_DXE_IPL_PPI *DxeIpl; EFI_DXE_IPL_PPI *DxeIpl;
@ -183,8 +201,6 @@ typedef union {
VOID *Raw; VOID *Raw;
} PEI_CORE_TEMP_POINTERS; } PEI_CORE_TEMP_POINTERS;
typedef struct { typedef struct {
CONST EFI_SEC_PEI_HAND_OFF *SecCoreData; CONST EFI_SEC_PEI_HAND_OFF *SecCoreData;
EFI_PEI_PPI_DESCRIPTOR *PpiList; EFI_PEI_PPI_DESCRIPTOR *PpiList;
@ -336,9 +352,10 @@ InitializePpiServices (
/** /**
Migrate the Hob list from the CAR stack to PEI installed memory. Convert Ppi description and PpiData pointer in heap after temporary memory
is migrated to permenent memory.
@param PeiServices The PEI core services table. @param PrivateData PeiCore's private data structure
@param OldCheckingBottom The old checking bottom. @param OldCheckingBottom The old checking bottom.
@param OldCheckingTop The old checking top. @param OldCheckingTop The old checking top.
@param Fixup The address difference between @param Fixup The address difference between
@ -358,13 +375,13 @@ ConvertPpiPointers (
Install PPI services. Install PPI services.
@param PeiServices - Pointer to the PEI Service Table @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
@param PpiList - Pointer to a list of PEI PPI Descriptors. @param PpiList Pointer to ppi array that want to be installed.
@retval EFI_SUCCESS - if all PPIs in PpiList are successfully installed. @retval EFI_SUCCESS if all PPIs in PpiList are successfully installed.
@retval EFI_INVALID_PARAMETER - if PpiList is NULL pointer @retval EFI_INVALID_PARAMETER if PpiList is NULL pointer
@retval EFI_INVALID_PARAMETER - if any PPI in PpiList is not valid @retval EFI_INVALID_PARAMETER if any PPI in PpiList is not valid
@retval EFI_OUT_OF_RESOURCES - if there is no more memory resource to install PPI @retval EFI_OUT_OF_RESOURCES if there is no more memory resource to install PPI
**/ **/
EFI_STATUS EFI_STATUS
@ -653,8 +670,8 @@ PeiCoreBuildHobHandoffInfoTable (
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
@param SearchType Filter to find only files of this type. @param SearchType Filter to find only files of this type.
Type EFI_FV_FILETYPE_ALL causes no filtering to be done. Type EFI_FV_FILETYPE_ALL causes no filtering to be done.
@param VolumeHandle Pointer to the FV header of the volume to search. @param FwVolHeader Pointer to the FV header of the volume to search.
@param FileHandle Pointer to the current file from which to begin searching. @param FileHeader Pointer to the current file from which to begin searching.
This pointer will be updated upon return to reflect the file found. This pointer will be updated upon return to reflect the file found.
@retval EFI_NOT_FOUND No files matching the search criteria were found @retval EFI_NOT_FOUND No files matching the search criteria were found
@retval EFI_SUCCESS Success to find next file in given volume @retval EFI_SUCCESS Success to find next file in given volume
@ -674,10 +691,9 @@ PeiFfsFindNextFile (
Given the input file pointer, search for the next matching section in the Given the input file pointer, search for the next matching section in the
FFS volume. FFS volume.
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
@param SectionType Filter to find only sections of this type. @param SectionType Filter to find only sections of this type.
@param FileHandle Pointer to the current file to search. @param FfsFileHeader Pointer to the current file to search.
@param SectionData Pointer to the Section matching SectionType in FfsFileHeader. @param SectionData Pointer to the Section matching SectionType in FfsFileHeader.
NULL if section not found NULL if section not found
@ -700,7 +716,7 @@ PeiFfsFindSectionData (
@param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
@param Instance Instance of FV to find @param Instance Instance of FV to find
@param VolumeHandle Pointer to found Volume. @param FwVolHeader Pointer to found Volume.
@retval EFI_INVALID_PARAMETER FwVolHeader is NULL @retval EFI_INVALID_PARAMETER FwVolHeader is NULL
@retval EFI_SUCCESS Firmware volume instance successfully found. @retval EFI_SUCCESS Firmware volume instance successfully found.
@ -722,7 +738,6 @@ PeiFvFindNextVolume (
Initialize the memory services. Initialize the memory services.
@param PrivateData PeiCore's private data structure @param PrivateData PeiCore's private data structure
@param SecCoreData Points to a data structure containing information about the PEI core's operating @param SecCoreData Points to a data structure containing information about the PEI core's operating
environment, such as the size and location of temporary RAM, the stack location and environment, such as the size and location of temporary RAM, the stack location and
@ -921,13 +936,13 @@ FirmwareVolmeInfoPpiNotifyCallback (
Given the input VolumeHandle, search for the next matching name file. Given the input VolumeHandle, search for the next matching name file.
@param FileName File name to search. @param FileName File name to search.
@param VolumeHandle The current FV to search. @param VolumeHandle The current FV to search.
@param FileHandle Pointer to the file matching name in VolumeHandle. @param FileHandle Pointer to the file matching name in VolumeHandle.
NULL if file not found NULL if file not found
@return EFI_STATUS @retval EFI_NOT_FOUND No files matching the search criteria were found
@retval EFI_SUCCESS Success to search given file
**/ **/
EFI_STATUS EFI_STATUS
@ -1023,12 +1038,13 @@ PeiFindFileEx (
; ;
/** /**
Initialize image service that install PeiLoadFilePpi.
Install Pei Load File PPI. @param PrivateData Pointer to PeiCore's private data structure PEI_CORE_INSTANCE.
@param OldCoreData Pointer to Old PeiCore's private data.
If NULL, PeiCore is entered at first time, stack/heap in temporary memory.
@param PrivateData Pointer to PEI_CORE_INSTANCE. If not NULL, PeiCore is entered at second time, stack/heap has been moved
@param OldCoreData Pointer to PEI_CORE_INSTANCE. to permenent memory.
**/ **/
VOID VOID

View File

@ -102,7 +102,7 @@ PeiCore (
PEI_CORE_INSTANCE *OldCoreData; PEI_CORE_INSTANCE *OldCoreData;
EFI_PEI_CPU_IO_PPI *CpuIo; EFI_PEI_CPU_IO_PPI *CpuIo;
EFI_PEI_PCI_CFG2_PPI *PciCfg; EFI_PEI_PCI_CFG2_PPI *PciCfg;
PEI_CORE_ENTRY_POINT ShadowedPeiCore; PEICORE_FUNCTION_POINTER ShadowedPeiCore;
mTick = 0; mTick = 0;
OldCoreData = (PEI_CORE_INSTANCE *) Data; OldCoreData = (PEI_CORE_INSTANCE *) Data;
@ -122,7 +122,7 @@ PeiCore (
// just jump to PeiCore in memory here. // just jump to PeiCore in memory here.
// //
if (OldCoreData != NULL) { if (OldCoreData != NULL) {
ShadowedPeiCore = (PEI_CORE_ENTRY_POINT) (UINTN) OldCoreData->ShadowedPeiCore; ShadowedPeiCore = (PEICORE_FUNCTION_POINTER) (UINTN) OldCoreData->ShadowedPeiCore;
if (ShadowedPeiCore != NULL) { if (ShadowedPeiCore != NULL) {
OldCoreData->ShadowedPeiCore = NULL; OldCoreData->ShadowedPeiCore = NULL;
ShadowedPeiCore ( ShadowedPeiCore (