Merge the PI enabling works from the branch

First round of PI enabling work:
1) PiPeiCis changes (CONST, EFI_PEI_FILE_HANDLE.. etc)
2) Make use of FirmwareVolume 2 protocol.
3) Verified for Nt32Pkg and real platform for S3.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3773 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2007-09-04 06:12:48 +00:00
parent 1c280088ec
commit 0c2b5da80e
22 changed files with 286 additions and 162 deletions

View File

@ -118,7 +118,7 @@ CoreFwVolEventProtocolNotify (
STATIC STATIC
EFI_DEVICE_PATH_PROTOCOL * EFI_DEVICE_PATH_PROTOCOL *
CoreFvToDevicePath ( CoreFvToDevicePath (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle, IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName IN EFI_GUID *DriverName
); );
@ -126,7 +126,7 @@ CoreFvToDevicePath (
STATIC STATIC
EFI_STATUS EFI_STATUS
CoreAddToDriverList ( CoreAddToDriverList (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle, IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName IN EFI_GUID *DriverName
); );
@ -134,7 +134,7 @@ CoreAddToDriverList (
STATIC STATIC
EFI_STATUS EFI_STATUS
CoreProcessFvImageFile ( CoreProcessFvImageFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle, IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName IN EFI_GUID *DriverName
); );
@ -218,7 +218,7 @@ Returns:
EFI_STATUS Status; EFI_STATUS Status;
EFI_SECTION_TYPE SectionType; EFI_SECTION_TYPE SectionType;
UINT32 AuthenticationStatus; UINT32 AuthenticationStatus;
EFI_FIRMWARE_VOLUME_PROTOCOL *Fv; EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
Fv = DriverEntry->Fv; Fv = DriverEntry->Fv;
@ -670,7 +670,7 @@ Returns:
STATIC STATIC
EFI_DEVICE_PATH_PROTOCOL * EFI_DEVICE_PATH_PROTOCOL *
CoreFvToDevicePath ( CoreFvToDevicePath (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle, IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName IN EFI_GUID *DriverName
) )
@ -727,7 +727,7 @@ Returns:
EFI_STATUS EFI_STATUS
CoreAddToDriverList ( CoreAddToDriverList (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle, IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName IN EFI_GUID *DriverName
) )
@ -843,7 +843,7 @@ Returns:
EFI_STATUS EFI_STATUS
CoreProcessFvImageFile ( CoreProcessFvImageFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv, IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle, IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName IN EFI_GUID *DriverName
) )
@ -955,7 +955,7 @@ Returns:
EFI_STATUS Status; EFI_STATUS Status;
EFI_STATUS GetNextFileStatus; EFI_STATUS GetNextFileStatus;
EFI_STATUS SecurityStatus; EFI_STATUS SecurityStatus;
EFI_FIRMWARE_VOLUME_PROTOCOL *Fv; EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
EFI_DEVICE_PATH_PROTOCOL *FvDevicePath; EFI_DEVICE_PATH_PROTOCOL *FvDevicePath;
EFI_HANDLE FvHandle; EFI_HANDLE FvHandle;
UINTN BufferSize; UINTN BufferSize;
@ -1011,7 +1011,7 @@ Returns:
FvIsBeingProcesssed (FvHandle); FvIsBeingProcesssed (FvHandle);
Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Fv); Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Fv);
if (EFI_ERROR (Status)) { if (EFI_ERROR (Status)) {
// //
// The Handle has a FirmwareVolumeDispatch protocol and should also contiain // The Handle has a FirmwareVolumeDispatch protocol and should also contiain
@ -1186,7 +1186,7 @@ Returns:
--*/ --*/
{ {
mFwVolEvent = CoreCreateProtocolNotifyEvent ( mFwVolEvent = CoreCreateProtocolNotifyEvent (
&gEfiFirmwareVolumeProtocolGuid, &gEfiFirmwareVolume2ProtocolGuid,
TPL_CALLBACK, TPL_CALLBACK,
CoreFwVolEventProtocolNotify, CoreFwVolEventProtocolNotify,
NULL, NULL,

View File

@ -48,7 +48,7 @@ Revision History
#include <Protocol/RealTimeClock.h> #include <Protocol/RealTimeClock.h>
#include <Guid/Apriori.h> #include <Guid/Apriori.h>
#include <Protocol/WatchdogTimer.h> #include <Protocol/WatchdogTimer.h>
#include <Protocol/FirmwareVolume.h> #include <Protocol/FirmwareVolume2.h>
#include <Protocol/MonotonicCounter.h> #include <Protocol/MonotonicCounter.h>
#include <Guid/DxeServices.h> #include <Guid/DxeServices.h>
#include <Guid/MemoryAllocationHob.h> #include <Guid/MemoryAllocationHob.h>
@ -155,7 +155,7 @@ typedef struct {
EFI_HANDLE FvHandle; EFI_HANDLE FvHandle;
EFI_GUID FileName; EFI_GUID FileName;
EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath; EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
EFI_FIRMWARE_VOLUME_PROTOCOL *Fv; EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
VOID *Depex; VOID *Depex;
UINTN DepexSize; UINTN DepexSize;

View File

@ -128,7 +128,7 @@
gEfiDriverBindingProtocolGuid # PROTOCOL SOMETIMES_CONSUMED gEfiDriverBindingProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gEfiFirmwareVolumeBlockProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiFirmwareVolumeBlockProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiFirmwareVolumeDispatchProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiFirmwareVolumeDispatchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiFirmwareVolumeProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiCpuArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiCpuArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_PRODUCED gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_PRODUCED

View File

@ -25,7 +25,7 @@ VOID *gEfiFwVolBlockNotifyReg;
EFI_EVENT gEfiFwVolBlockEvent; EFI_EVENT gEfiFwVolBlockEvent;
FV_DEVICE mFvDevice = { FV_DEVICE mFvDevice = {
FV_DEVICE_SIGNATURE, FV2_DEVICE_SIGNATURE,
NULL, NULL,
NULL, NULL,
{ {
@ -35,7 +35,10 @@ FV_DEVICE mFvDevice = {
FvReadFileSection, FvReadFileSection,
FvWriteFile, FvWriteFile,
FvGetNextFile, FvGetNextFile,
KEYSIZE KEYSIZE,
NULL,
FvGetVolumeInfo,
FvSetVolumeInfo
}, },
NULL, NULL,
NULL, NULL,
@ -389,8 +392,8 @@ NotifyFwVolBlock (
Routine Description: Routine Description:
This notification function is invoked when an instance of the This notification function is invoked when an instance of the
EFI_FW_VOLUME_BLOCK_PROTOCOL is produced. It layers an instance of the EFI_FW_VOLUME_BLOCK_PROTOCOL is produced. It layers an instance of the
EFI_FIRMWARE_VOLUME_PROTOCOL on the same handle. This is the function where EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle. This is the function where
the actual initialization of the EFI_FIRMWARE_VOLUME_PROTOCOL is done. the actual initialization of the EFI_FIRMWARE_VOLUME2_PROTOCOL is done.
Arguments: Arguments:
Event - The event that occured Event - The event that occured
@ -406,7 +409,7 @@ Returns:
EFI_STATUS Status; EFI_STATUS Status;
UINTN BufferSize; UINTN BufferSize;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb; EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
EFI_FIRMWARE_VOLUME_PROTOCOL *Fv; EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
FV_DEVICE *FvDevice; FV_DEVICE *FvDevice;
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
// //
@ -468,13 +471,13 @@ Returns:
// //
// Check if there is an FV protocol already installed in that handle // Check if there is an FV protocol already installed in that handle
// //
Status = CoreHandleProtocol (Handle, &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Fv); Status = CoreHandleProtocol (Handle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Fv);
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
// //
// Update Fv to use a new Fvb // Update Fv to use a new Fvb
// //
FvDevice = _CR (Fv, FV_DEVICE, Fv); FvDevice = _CR (Fv, FV_DEVICE, Fv);
if (FvDevice->Signature == FV_DEVICE_SIGNATURE) { if (FvDevice->Signature == FV2_DEVICE_SIGNATURE) {
// //
// Only write into our device structure if it's our device structure // Only write into our device structure if it's our device structure
// //
@ -500,7 +503,7 @@ Returns:
// //
Status = CoreInstallProtocolInterface ( Status = CoreInstallProtocolInterface (
&Handle, &Handle,
&gEfiFirmwareVolumeProtocolGuid, &gEfiFirmwareVolume2ProtocolGuid,
EFI_NATIVE_INTERFACE, EFI_NATIVE_INTERFACE,
&FvDevice->Fv &FvDevice->Fv
); );

View File

@ -24,7 +24,7 @@ Abstract:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvGetVolumeAttributes ( FvGetVolumeAttributes (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
OUT EFI_FV_ATTRIBUTES *Attributes OUT EFI_FV_ATTRIBUTES *Attributes
) )
/*++ /*++
@ -76,7 +76,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvSetVolumeAttributes ( FvSetVolumeAttributes (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN OUT EFI_FV_ATTRIBUTES *Attributes IN OUT EFI_FV_ATTRIBUTES *Attributes
) )
/*++ /*++
@ -97,3 +97,61 @@ Returns:
return EFI_UNSUPPORTED; return EFI_UNSUPPORTED;
} }
EFI_STATUS
EFIAPI
FvGetVolumeInfo (
IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN CONST EFI_GUID *InformationType,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
/*++
Routine Description:
Return information of type InformationType for the requested firmware
volume.
Arguments:
This - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.
InformationType - InformationType for requested.
BufferSize - On input, size of Buffer.On output, the amount of
data returned in Buffer.
Buffer - A poniter to the data buffer to return.
Returns:
EFI_SUCCESS - Successfully got volume Information.
--*/
{
return EFI_UNSUPPORTED;
}
EFI_STATUS
EFIAPI
FvSetVolumeInfo (
IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN CONST EFI_GUID *InformationType,
IN UINTN BufferSize,
IN CONST VOID *Buffer
)
/*++
Routine Description:
Set information of type InformationType for the requested firmware
volume.
Arguments:
This - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.
InformationType - InformationType for requested.
BufferSize - On input, size of Buffer.On output, the amount of
data returned in Buffer.
Buffer - A poniter to the data buffer to return.
Returns:
EFI_SUCCESS - Successfully set volume Information.
--*/
{
return EFI_UNSUPPORTED;
}

View File

@ -70,7 +70,7 @@ FfsAttributes2FvFileAttributes (
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvGetNextFile ( FvGetNextFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN OUT VOID *Key, IN OUT VOID *Key,
IN OUT EFI_FV_FILETYPE *FileType, IN OUT EFI_FV_FILETYPE *FileType,
OUT EFI_GUID *NameGuid, OUT EFI_GUID *NameGuid,
@ -140,7 +140,7 @@ Returns:
// //
// Check if read operation is enabled // Check if read operation is enabled
// //
if ((FvAttributes & EFI_FV_READ_STATUS) == 0) { if ((FvAttributes & EFI_FV2_READ_STATUS) == 0) {
return EFI_ACCESS_DENIED; return EFI_ACCESS_DENIED;
} }
@ -227,8 +227,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvReadFile ( FvReadFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN EFI_GUID *NameGuid, IN CONST EFI_GUID *NameGuid,
IN OUT VOID **Buffer, IN OUT VOID **Buffer,
IN OUT UINTN *BufferSize, IN OUT UINTN *BufferSize,
OUT EFI_FV_FILETYPE *FoundType, OUT EFI_FV_FILETYPE *FoundType,
@ -370,8 +370,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvReadFileSection ( FvReadFileSection (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN EFI_GUID *NameGuid, IN CONST EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType, IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance, IN UINTN SectionInstance,
IN OUT VOID **Buffer, IN OUT VOID **Buffer,

View File

@ -25,7 +25,7 @@ Abstract:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvWriteFile ( FvWriteFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN UINT32 NumberOfFiles, IN UINT32 NumberOfFiles,
IN EFI_FV_WRITE_POLICY WritePolicy, IN EFI_FV_WRITE_POLICY WritePolicy,
IN EFI_FV_WRITE_FILE_DATA *FileData IN EFI_FV_WRITE_FILE_DATA *FileData

View File

@ -586,7 +586,7 @@ Returns:
// //
if (!EFI_ERROR(Status)) { if (!EFI_ERROR(Status)) {
Ptr = NULL; Ptr = NULL;
Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Ptr); Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Ptr);
if (EFI_ERROR(Status) || (Ptr == NULL)) { if (EFI_ERROR(Status) || (Ptr == NULL)) {
return EFI_VOLUME_CORRUPTED; return EFI_VOLUME_CORRUPTED;
} }

View File

@ -24,6 +24,8 @@ Abstract:
#define __FWVOL_H #define __FWVOL_H
#define FV2_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', '2')
// //
// Used to track all non-deleted files // Used to track all non-deleted files
// //
@ -38,7 +40,7 @@ typedef struct {
UINTN Signature; UINTN Signature;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb; EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
EFI_HANDLE Handle; EFI_HANDLE Handle;
EFI_FIRMWARE_VOLUME_PROTOCOL Fv; EFI_FIRMWARE_VOLUME2_PROTOCOL Fv;
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader; EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
UINT8 *CachedFv; UINT8 *CachedFv;
@ -51,13 +53,13 @@ typedef struct {
UINT8 ErasePolarity; UINT8 ErasePolarity;
} FV_DEVICE; } FV_DEVICE;
#define FV_DEVICE_FROM_THIS(a) CR(a, FV_DEVICE, Fv, FV_DEVICE_SIGNATURE) #define FV_DEVICE_FROM_THIS(a) CR(a, FV_DEVICE, Fv, FV2_DEVICE_SIGNATURE)
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvGetVolumeAttributes ( FvGetVolumeAttributes (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
OUT EFI_FV_ATTRIBUTES *Attributes OUT EFI_FV_ATTRIBUTES *Attributes
) )
/*++ /*++
@ -79,7 +81,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvSetVolumeAttributes ( FvSetVolumeAttributes (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN OUT EFI_FV_ATTRIBUTES *Attributes IN OUT EFI_FV_ATTRIBUTES *Attributes
) )
/*++ /*++
@ -100,7 +102,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvGetNextFile ( FvGetNextFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN OUT VOID *Key, IN OUT VOID *Key,
IN OUT EFI_FV_FILETYPE *FileType, IN OUT EFI_FV_FILETYPE *FileType,
OUT EFI_GUID *NameGuid, OUT EFI_GUID *NameGuid,
@ -156,8 +158,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvReadFile ( FvReadFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN EFI_GUID *NameGuid, IN CONST EFI_GUID *NameGuid,
IN OUT VOID **Buffer, IN OUT VOID **Buffer,
IN OUT UINTN *BufferSize, IN OUT UINTN *BufferSize,
OUT EFI_FV_FILETYPE *FoundType, OUT EFI_FV_FILETYPE *FoundType,
@ -207,8 +209,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvReadFileSection ( FvReadFileSection (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN EFI_GUID *NameGuid, IN CONST EFI_GUID *NameGuid,
IN EFI_SECTION_TYPE SectionType, IN EFI_SECTION_TYPE SectionType,
IN UINTN SectionInstance, IN UINTN SectionInstance,
IN OUT VOID **Buffer, IN OUT VOID **Buffer,
@ -248,7 +250,7 @@ FvReadFileSection (
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
FvWriteFile ( FvWriteFile (
IN EFI_FIRMWARE_VOLUME_PROTOCOL *This, IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN UINT32 NumberOfFiles, IN UINT32 NumberOfFiles,
IN EFI_FV_WRITE_POLICY WritePolicy, IN EFI_FV_WRITE_POLICY WritePolicy,
IN EFI_FV_WRITE_FILE_DATA *FileData IN EFI_FV_WRITE_FILE_DATA *FileData
@ -278,7 +280,58 @@ FvWriteFile (
--*/ --*/
; ;
EFI_STATUS
EFIAPI
FvGetVolumeInfo (
IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN CONST EFI_GUID *InformationType,
IN OUT UINTN *BufferSize,
OUT VOID *Buffer
)
/*++
Routine Description:
Return information of type InformationType for the requested firmware
volume.
Arguments:
This - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.
InformationType - InformationType for requested.
BufferSize - On input, size of Buffer.On output, the amount of
data returned in Buffer.
Buffer - A poniter to the data buffer to return.
Returns:
EFI_SUCCESS - Successfully got volume Information.
--*/
;
EFI_STATUS
EFIAPI
FvSetVolumeInfo (
IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
IN CONST EFI_GUID *InformationType,
IN UINTN BufferSize,
IN CONST VOID *Buffer
)
/*++
Routine Description:
Set information of type InformationType for the requested firmware
volume.
Arguments:
This - Pointer to EFI_FIRMWARE_VOLUME2_PROTOCOL.
InformationType - InformationType for requested.
BufferSize - On input, size of Buffer.On output, the amount of
data returned in Buffer.
Buffer - A poniter to the data buffer to return.
Returns:
EFI_SUCCESS - Successfully set volume Information.
--*/
;
// //
//Internal functions //Internal functions

View File

@ -74,7 +74,7 @@ Returns:
EFI_FILE_HANDLE FileHandle; EFI_FILE_HANDLE FileHandle;
EFI_FILE_HANDLE LastHandle; EFI_FILE_HANDLE LastHandle;
EFI_LOAD_FILE_PROTOCOL *LoadFile; EFI_LOAD_FILE_PROTOCOL *LoadFile;
EFI_FIRMWARE_VOLUME_PROTOCOL *FwVol; EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
EFI_SECTION_TYPE SectionType; EFI_SECTION_TYPE SectionType;
UINT8 *Pe32Buffer; UINT8 *Pe32Buffer;
UINTN Pe32BufferSize; UINTN Pe32BufferSize;
@ -115,7 +115,7 @@ Returns:
// //
FwVolFilePathNode = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)FilePath; FwVolFilePathNode = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)FilePath;
Status = CoreDevicePathToInterface ( Status = CoreDevicePathToInterface (
&gEfiFirmwareVolumeProtocolGuid, &gEfiFirmwareVolume2ProtocolGuid,
(EFI_DEVICE_PATH_PROTOCOL **)&FwVolFilePathNode, (EFI_DEVICE_PATH_PROTOCOL **)&FwVolFilePathNode,
(VOID*)&FwVol, (VOID*)&FwVol,
DeviceHandle DeviceHandle

View File

@ -377,8 +377,8 @@ Returns:
Status = PeiServicesFfsFindNextFile ( Status = PeiServicesFfsFindNextFile (
Type, Type,
FwVolHeader, (EFI_PEI_FV_HANDLE) FwVolHeader,
&FfsFileHeader (EFI_PEI_FILE_HANDLE*) &FfsFileHeader
); );
if (!EFI_ERROR (Status)) { if (!EFI_ERROR (Status)) {
Status = PeiProcessFile ( Status = PeiProcessFile (

View File

@ -28,7 +28,7 @@ Revision History
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetBootMode ( PeiGetBootMode (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
OUT EFI_BOOT_MODE *BootMode OUT EFI_BOOT_MODE *BootMode
) )
/*++ /*++
@ -71,7 +71,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiSetBootMode ( PeiSetBootMode (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_BOOT_MODE BootMode IN EFI_BOOT_MODE BootMode
) )
/*++ /*++

View File

@ -251,9 +251,9 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiFfsFindSectionData ( PeiFfsFindSectionData (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_SECTION_TYPE SectionType, IN EFI_SECTION_TYPE SectionType,
IN EFI_FFS_FILE_HEADER *FfsFileHeader, IN EFI_PEI_FILE_HANDLE FileHandle,
IN OUT VOID **SectionData IN OUT VOID **SectionData
) )
/*++ /*++
@ -279,7 +279,9 @@ Returns:
EFI_COMMON_SECTION_HEADER *Section; EFI_COMMON_SECTION_HEADER *Section;
UINT32 SectionLength; UINT32 SectionLength;
UINT32 ParsedLength; UINT32 ParsedLength;
EFI_FFS_FILE_HEADER *FfsFileHeader;
FfsFileHeader = (EFI_FFS_FILE_HEADER *) FileHandle;
// //
// Size is 24 bits wide so mask upper 8 bits. // Size is 24 bits wide so mask upper 8 bits.
@ -355,10 +357,10 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiFfsFindNextFile ( PeiFfsFindNextFile (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_FV_FILETYPE SearchType, IN UINT8 SearchType,
IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader, IN EFI_PEI_FV_HANDLE VolumeHandle,
IN OUT EFI_FFS_FILE_HEADER **FileHeader IN OUT EFI_PEI_FILE_HANDLE *FileHandle
) )
/*++ /*++
@ -385,6 +387,12 @@ Returns:
--*/ --*/
{ {
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
EFI_FFS_FILE_HEADER **FileHeader;
FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER *)VolumeHandle;
FileHeader = (EFI_FFS_FILE_HEADER **) FileHandle;
return PeiFfsFindNextFileEx ( return PeiFfsFindNextFileEx (
SearchType, SearchType,
FwVolHeader, FwVolHeader,
@ -396,9 +404,9 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiFvFindNextVolume ( PeiFvFindNextVolume (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Instance, IN UINTN Instance,
IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader IN OUT EFI_PEI_FV_HANDLE *VolumeHandle
) )
/*++ /*++
@ -429,7 +437,9 @@ Returns:
EFI_STATUS Status; EFI_STATUS Status;
EFI_PEI_FIND_FV_PPI *FindFvPpi; EFI_PEI_FIND_FV_PPI *FindFvPpi;
UINT8 LocalInstance; UINT8 LocalInstance;
EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader;
FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER **) VolumeHandle;
LocalInstance = (UINT8) Instance; LocalInstance = (UINT8) Instance;
@ -463,7 +473,7 @@ Returns:
} else { } else {
Status = FindFvPpi->FindFv ( Status = FindFvPpi->FindFv (
FindFvPpi, FindFvPpi,
PeiServices, (EFI_PEI_SERVICES **)PeiServices,
&LocalInstance, &LocalInstance,
FwVolHeader FwVolHeader
); );

View File

@ -24,7 +24,7 @@ Abstract:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetHobList ( PeiGetHobList (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT VOID **HobList IN OUT VOID **HobList
) )
/*++ /*++
@ -71,7 +71,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiCreateHob ( PeiCreateHob (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINT16 Type, IN UINT16 Type,
IN UINT16 Length, IN UINT16 Length,
IN OUT VOID **Hob IN OUT VOID **Hob

View File

@ -100,7 +100,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiInstallPeiMemory ( PeiInstallPeiMemory (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN EFI_PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength IN UINT64 MemoryLength
) )
@ -182,7 +182,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiAllocatePages ( PeiAllocatePages (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_MEMORY_TYPE MemoryType, IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages, IN UINTN Pages,
OUT EFI_PHYSICAL_ADDRESS *Memory OUT EFI_PHYSICAL_ADDRESS *Memory
@ -275,7 +275,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiAllocatePool ( PeiAllocatePool (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Size, IN UINTN Size,
OUT VOID **Buffer OUT VOID **Buffer
) )

View File

@ -462,7 +462,7 @@ Returns:
VOID VOID
ConvertPpiPointers ( ConvertPpiPointers (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_HOB_HANDOFF_INFO_TABLE *OldHandOffHob, IN EFI_HOB_HANDOFF_INFO_TABLE *OldHandOffHob,
IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob
) )
@ -486,8 +486,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiInstallPpi ( PeiInstallPpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_PPI_DESCRIPTOR *PpiList IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
) )
/*++ /*++
@ -513,9 +513,9 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiReInstallPpi ( PeiReInstallPpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
IN EFI_PEI_PPI_DESCRIPTOR *NewPpi IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
) )
/*++ /*++
@ -542,8 +542,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiLocatePpi ( PeiLocatePpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_GUID *Guid, IN CONST EFI_GUID *Guid,
IN UINTN Instance, IN UINTN Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
IN OUT VOID **Ppi IN OUT VOID **Ppi
@ -573,8 +573,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiNotifyPpi ( PeiNotifyPpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
) )
/*++ /*++
@ -617,7 +617,7 @@ Returns:
VOID VOID
DispatchNotify ( DispatchNotify (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN NotifyType, IN UINTN NotifyType,
IN INTN InstallStartIndex, IN INTN InstallStartIndex,
IN INTN InstallStopIndex, IN INTN InstallStopIndex,
@ -650,7 +650,7 @@ Returns: None
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetBootMode ( PeiGetBootMode (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT EFI_BOOT_MODE *BootMode IN OUT EFI_BOOT_MODE *BootMode
) )
/*++ /*++
@ -675,7 +675,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiSetBootMode ( PeiSetBootMode (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_BOOT_MODE BootMode IN EFI_BOOT_MODE BootMode
) )
/*++ /*++
@ -772,7 +772,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiGetHobList ( PeiGetHobList (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT VOID **HobList IN OUT VOID **HobList
) )
/*++ /*++
@ -798,7 +798,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiCreateHob ( PeiCreateHob (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINT16 Type, IN UINT16 Type,
IN UINT16 Length, IN UINT16 Length,
IN OUT VOID **Hob IN OUT VOID **Hob
@ -858,10 +858,10 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiFfsFindNextFile ( PeiFfsFindNextFile (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINT8 SearchType, IN UINT8 SearchType,
IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader, IN EFI_PEI_FV_HANDLE FwVolHeader,
IN OUT EFI_FFS_FILE_HEADER **FileHeader IN OUT EFI_PEI_FILE_HANDLE *FileHeader
) )
/*++ /*++
@ -892,9 +892,9 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiFfsFindSectionData ( PeiFfsFindSectionData (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_SECTION_TYPE SectionType, IN EFI_SECTION_TYPE SectionType,
IN EFI_FFS_FILE_HEADER *FfsFileHeader, IN EFI_PEI_FILE_HANDLE FfsFileHeader,
IN OUT VOID **SectionData IN OUT VOID **SectionData
) )
/*++ /*++
@ -920,9 +920,9 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiFvFindNextVolume ( PeiFvFindNextVolume (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Instance, IN UINTN Instance,
IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader IN OUT EFI_PEI_FV_HANDLE *FwVolHeader
) )
/*++ /*++
@ -982,7 +982,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiInstallPeiMemory ( PeiInstallPeiMemory (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS MemoryBegin, IN EFI_PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength IN UINT64 MemoryLength
) )
@ -1009,7 +1009,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiAllocatePages ( PeiAllocatePages (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_MEMORY_TYPE MemoryType, IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages, IN UINTN Pages,
OUT EFI_PHYSICAL_ADDRESS *Memory OUT EFI_PHYSICAL_ADDRESS *Memory
@ -1043,7 +1043,7 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiAllocatePool ( PeiAllocatePool (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Size, IN UINTN Size,
OUT VOID **Buffer OUT VOID **Buffer
) )
@ -1101,12 +1101,12 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiReportStatusCode ( PeiReportStatusCode (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_STATUS_CODE_TYPE CodeType, IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value, IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance, IN UINT32 Instance,
IN EFI_GUID *CallerId, IN CONST EFI_GUID *CallerId,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
) )
/*++ /*++

View File

@ -60,7 +60,7 @@ Returns:
VOID VOID
ConvertPpiPointers ( ConvertPpiPointers (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_HOB_HANDOFF_INFO_TABLE *OldHandOffHob, IN EFI_HOB_HANDOFF_INFO_TABLE *OldHandOffHob,
IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob IN EFI_HOB_HANDOFF_INFO_TABLE *NewHandOffHob
) )
@ -139,8 +139,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiInstallPpi ( PeiInstallPpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_PPI_DESCRIPTOR *PpiList IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
) )
/*++ /*++
@ -202,7 +202,7 @@ Returns:
} }
DEBUG((EFI_D_INFO, "Install PPI: %g\n", PpiList->Guid)); DEBUG((EFI_D_INFO, "Install PPI: %g\n", PpiList->Guid));
PrivateData->PpiData.PpiListPtrs[Index].Ppi = PpiList; PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR*) PpiList;
PrivateData->PpiData.PpiListEnd++; PrivateData->PpiData.PpiListEnd++;
// //
@ -220,7 +220,7 @@ Returns:
// Dispatch any callback level notifies for newly installed PPIs. // Dispatch any callback level notifies for newly installed PPIs.
// //
DispatchNotify ( DispatchNotify (
PeiServices, (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
LastCallbackInstall, LastCallbackInstall,
PrivateData->PpiData.PpiListEnd, PrivateData->PpiData.PpiListEnd,
@ -236,9 +236,9 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiReInstallPpi ( PeiReInstallPpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_PPI_DESCRIPTOR *OldPpi, IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
IN EFI_PEI_PPI_DESCRIPTOR *NewPpi IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
) )
/*++ /*++
@ -292,13 +292,13 @@ Returns:
// Remove the old PPI from the database, add the new one. // Remove the old PPI from the database, add the new one.
// //
DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid)); DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid));
PrivateData->PpiData.PpiListPtrs[Index].Ppi = NewPpi; PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR *) NewPpi;
// //
// Dispatch any callback level notifies for the newly installed PPI. // Dispatch any callback level notifies for the newly installed PPI.
// //
DispatchNotify ( DispatchNotify (
PeiServices, (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
Index, Index,
Index+1, Index+1,
@ -314,8 +314,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiLocatePpi ( PeiLocatePpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_GUID *Guid, IN CONST EFI_GUID *Guid,
IN UINTN Instance, IN UINTN Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor, IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
IN OUT VOID **Ppi IN OUT VOID **Ppi
@ -389,8 +389,8 @@ Returns:
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiNotifyPpi ( PeiNotifyPpi (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
) )
/*++ /*++
@ -458,7 +458,7 @@ Returns:
NotifyDispatchCount ++; NotifyDispatchCount ++;
} }
PrivateData->PpiData.PpiListPtrs[Index].Notify = NotifyList; PrivateData->PpiData.PpiListPtrs[Index].Notify = (EFI_PEI_NOTIFY_DESCRIPTOR *) NotifyList;
PrivateData->PpiData.NotifyListEnd--; PrivateData->PpiData.NotifyListEnd--;
DEBUG((EFI_D_INFO, "Register PPI Notify: %g\n", NotifyList->Guid)); DEBUG((EFI_D_INFO, "Register PPI Notify: %g\n", NotifyList->Guid));
@ -496,7 +496,7 @@ Returns:
// Dispatch any callback level notifies for all previously installed PPIs. // Dispatch any callback level notifies for all previously installed PPIs.
// //
DispatchNotify ( DispatchNotify (
PeiServices, (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
0, 0,
PrivateData->PpiData.PpiListEnd, PrivateData->PpiData.PpiListEnd,
@ -545,7 +545,7 @@ Returns:
while (PrivateData->PpiData.LastDispatchedNotify != PrivateData->PpiData.DispatchListEnd) { while (PrivateData->PpiData.LastDispatchedNotify != PrivateData->PpiData.DispatchListEnd) {
TempValue = PrivateData->PpiData.DispatchListEnd; TempValue = PrivateData->PpiData.DispatchListEnd;
DispatchNotify ( DispatchNotify (
PeiServices, (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
0, 0,
PrivateData->PpiData.LastDispatchedInstall, PrivateData->PpiData.LastDispatchedInstall,
@ -566,7 +566,7 @@ Returns:
while (PrivateData->PpiData.LastDispatchedInstall != PrivateData->PpiData.PpiListEnd) { while (PrivateData->PpiData.LastDispatchedInstall != PrivateData->PpiData.PpiListEnd) {
TempValue = PrivateData->PpiData.PpiListEnd; TempValue = PrivateData->PpiData.PpiListEnd;
DispatchNotify ( DispatchNotify (
PeiServices, (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH, EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
PrivateData->PpiData.LastDispatchedInstall, PrivateData->PpiData.LastDispatchedInstall,
PrivateData->PpiData.PpiListEnd, PrivateData->PpiData.PpiListEnd,
@ -585,7 +585,7 @@ Returns:
VOID VOID
DispatchNotify ( DispatchNotify (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN NotifyType, IN UINTN NotifyType,
IN INTN InstallStartIndex, IN INTN InstallStartIndex,
IN INTN InstallStopIndex, IN INTN InstallStopIndex,
@ -645,7 +645,7 @@ Returns: None
NotifyDescriptor->Notify NotifyDescriptor->Notify
)); ));
NotifyDescriptor->Notify ( NotifyDescriptor->Notify (
PeiServices, (EFI_PEI_SERVICES **)PeiServices,
NotifyDescriptor, NotifyDescriptor,
(PrivateData->PpiData.PpiListPtrs[Index2].Ppi)->Ppi (PrivateData->PpiData.PpiListPtrs[Index2].Ppi)->Ppi
); );

View File

@ -26,12 +26,12 @@ Revision History
EFI_STATUS EFI_STATUS
EFIAPI EFIAPI
PeiReportStatusCode ( PeiReportStatusCode (
IN EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_STATUS_CODE_TYPE CodeType, IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value, IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance, IN UINT32 Instance,
IN EFI_GUID *CallerId, IN CONST EFI_GUID *CallerId,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
) )
/*++ /*++

View File

@ -20,6 +20,7 @@ Abstract:
--*/ --*/
#include <BaseMemoryTest.h> #include <BaseMemoryTest.h>
#include <Library/PeiServicesLib.h>
static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest }; static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest };
@ -51,11 +52,9 @@ Returns:
--*/ --*/
{ {
EFI_STATUS Status;
Status = (**PeiServices).InstallPpi (PeiServices, &PpiListPeiBaseMemoryTest); return PeiServicesInstallPpi (&PpiListPeiBaseMemoryTest);
return Status;
} }
EFI_STATUS EFI_STATUS

View File

@ -39,6 +39,7 @@
ReportStatusCodeLib ReportStatusCodeLib
PeimEntryPoint PeimEntryPoint
DebugLib DebugLib
PeiServicesLib
[Ppis] [Ppis]
gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED

View File

@ -364,7 +364,7 @@ PeimInitializePciCfg (
ASSERT ((**PeiServices).Hdr.Revision >= PEI_SERVICES_REVISION); ASSERT ((**PeiServices).Hdr.Revision >= PEI_SERVICES_REVISION);
(**PeiServices).PciCfg = &gPciCfg2Ppi; (**PeiServices).PciCfg = &gPciCfg2Ppi;
Status = (**PeiServices).InstallPpi (PeiServices, &gPciCfg2PpiList); Status = (**PeiServices).InstallPpi ((CONST EFI_PEI_SERVICES **)PeiServices, &gPciCfg2PpiList);
return Status; return Status;
} }

View File

@ -64,7 +64,7 @@ Returns:
// //
// Publish the variable capability to other modules // Publish the variable capability to other modules
// //
return (**PeiServices).InstallPpi (PeiServices, &mPpiListVariable); return (**PeiServices).InstallPpi ((CONST EFI_PEI_SERVICES **)PeiServices, &mPpiListVariable);
} }