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 LakeportX64Pkg (S3) and Nt32Pkg

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3769 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
qwang12 2007-09-04 06:09:28 +00:00
parent ccdeb61742
commit 507b36ca9e
9 changed files with 22 additions and 22 deletions

View File

@ -23,7 +23,7 @@
#include <Protocol/OEMBadging.h>
#include <Protocol/ConsoleControl.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/FirmwareVolume.h>
#include <Protocol/FirmwareVolume2.h>
#include <Protocol/UgaDraw.h>
#include <Protocol/HiiFramework.h>

View File

@ -56,14 +56,14 @@ Returns:
EFI_STATUS Status;
UINTN FvProtocolCount;
EFI_HANDLE *FvHandles;
EFI_FIRMWARE_VOLUME_PROTOCOL *Fv;
EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
UINTN Index;
UINT32 AuthenticationStatus;
Status = gBS->LocateHandleBuffer (
ByProtocol,
&gEfiFirmwareVolumeProtocolGuid,
&gEfiFirmwareVolume2ProtocolGuid,
NULL,
&FvProtocolCount,
&FvHandles
@ -75,7 +75,7 @@ Returns:
for (Index = 0; Index < FvProtocolCount; Index++) {
Status = gBS->HandleProtocol (
FvHandles[Index],
&gEfiFirmwareVolumeProtocolGuid,
&gEfiFirmwareVolume2ProtocolGuid,
(VOID **) &Fv
);

View File

@ -55,6 +55,6 @@
gEfiGraphicsOutputProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiUgaDrawProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiConsoleControlProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiFirmwareVolumeProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiOEMBadgingProtocolGuid # PROTOCOL ALWAYS_CONSUMED

View File

@ -64,9 +64,9 @@ InternalReportStatusCode (
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
)
{
EFI_PEI_SERVICES **PeiServices;
CONST EFI_PEI_SERVICES **PeiServices;
PeiServices = GetPeiServicesTablePointer ();
PeiServices = (CONST EFI_PEI_SERVICES **) GetPeiServicesTablePointer ();
return (*PeiServices)->ReportStatusCode (
PeiServices,
Type,

View File

@ -290,10 +290,10 @@ PeimInitializePciCfg (
}
if (!FeaturePcdGet (PcdPciCfgDisable)) {
Status = (**PeiServices).InstallPpi (PeiServices, &gPciCfgPpiList);
Status = (**PeiServices).InstallPpi ((CONST EFI_PEI_SERVICES **)PeiServices, &gPciCfgPpiList);
}
if (!FeaturePcdGet (PcdPciCfg2Disable)) {
Status = (**PeiServices).InstallPpi (PeiServices, &gPciCfg2PpiList);
Status = (**PeiServices).InstallPpi ((CONST EFI_PEI_SERVICES **)PeiServices, &gPciCfg2PpiList);
}
return Status;

View File

@ -60,12 +60,12 @@ EFI_PEI_PPI_DESCRIPTOR mStatusCodePpiDescriptor = {
EFI_STATUS
EFIAPI
ReportDispatcher (
IN EFI_PEI_SERVICES **PeiServices,
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId OPTIONAL,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
IN CONST EFI_GUID *CallerId OPTIONAL,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
{
if (FeaturePcdGet (PcdStatusCodeUseSerial)) {
@ -89,8 +89,8 @@ ReportDispatcher (
CodeType,
Value,
Instance,
CallerId,
Data
(EFI_GUID *)CallerId,
(EFI_STATUS_CODE_DATA *)Data
);
}

View File

@ -71,8 +71,8 @@ SerialStatusCodeReportWorker (
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
IN CONST EFI_GUID *CallerId,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
);
@ -147,12 +147,12 @@ MemoryStatusCodeReportWorker (
EFI_STATUS
EFIAPI
ReportDispatcher (
IN EFI_PEI_SERVICES **PeiServices,
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_STATUS_CODE_TYPE Type,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId OPTIONAL,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
IN CONST EFI_GUID *CallerId OPTIONAL,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
);
#endif

View File

@ -51,8 +51,8 @@ SerialStatusCodeReportWorker (
IN EFI_STATUS_CODE_TYPE CodeType,
IN EFI_STATUS_CODE_VALUE Value,
IN UINT32 Instance,
IN EFI_GUID *CallerId,
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
IN CONST EFI_GUID *CallerId,
IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
{
CHAR8 *Filename;

View File

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