summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-04 06:12:48 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2007-09-04 06:12:48 +0000
commit0c2b5da80e9551286cd02a92d91090290ae2d816 (patch)
tree950f10a499282ae6cb59638e2caaa31187ba2173 /MdeModulePkg
parent1c280088ec83160a5f190b3d0ba796b224ee23b3 (diff)
downloadedk2-platforms-0c2b5da80e9551286cd02a92d91090290ae2d816.tar.xz
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c20
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.h4
-rw-r--r--MdeModulePkg/Core/Dxe/DxeMain.inf2
-rw-r--r--MdeModulePkg/Core/Dxe/FwVol/FwVol.c19
-rw-r--r--MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c66
-rw-r--r--MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c38
-rw-r--r--MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c8
-rw-r--r--MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c2
-rw-r--r--MdeModulePkg/Core/Dxe/FwVolDriver.h113
-rw-r--r--MdeModulePkg/Core/Dxe/Image/ImageFile.c4
-rw-r--r--MdeModulePkg/Core/DxeIplPeim/DxeLoad.c4
-rw-r--r--MdeModulePkg/Core/Pei/BootMode/BootMode.c8
-rw-r--r--MdeModulePkg/Core/Pei/FwVol/FwVol.c30
-rw-r--r--MdeModulePkg/Core/Pei/Hob/Hob.c4
-rw-r--r--MdeModulePkg/Core/Pei/Memory/MemoryServices.c6
-rw-r--r--MdeModulePkg/Core/Pei/PeiMain.h56
-rw-r--r--MdeModulePkg/Core/Pei/Ppi/Ppi.c40
-rw-r--r--MdeModulePkg/Core/Pei/StatusCode/StatusCode.c12
-rw-r--r--MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTest.c7
-rw-r--r--MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTestPei.inf1
-rw-r--r--MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c2
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.c2
22 files changed, 286 insertions, 162 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
index 3de4edf00c..c7b4cc3e12 100644
--- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
+++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c
@@ -118,7 +118,7 @@ CoreFwVolEventProtocolNotify (
STATIC
EFI_DEVICE_PATH_PROTOCOL *
CoreFvToDevicePath (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv,
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName
);
@@ -126,7 +126,7 @@ CoreFvToDevicePath (
STATIC
EFI_STATUS
CoreAddToDriverList (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv,
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName
);
@@ -134,7 +134,7 @@ CoreAddToDriverList (
STATIC
EFI_STATUS
CoreProcessFvImageFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv,
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName
);
@@ -218,7 +218,7 @@ Returns:
EFI_STATUS Status;
EFI_SECTION_TYPE SectionType;
UINT32 AuthenticationStatus;
- EFI_FIRMWARE_VOLUME_PROTOCOL *Fv;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
Fv = DriverEntry->Fv;
@@ -670,7 +670,7 @@ Returns:
STATIC
EFI_DEVICE_PATH_PROTOCOL *
CoreFvToDevicePath (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv,
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName
)
@@ -727,7 +727,7 @@ Returns:
EFI_STATUS
CoreAddToDriverList (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv,
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName
)
@@ -843,7 +843,7 @@ Returns:
EFI_STATUS
CoreProcessFvImageFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *Fv,
+ IN EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv,
IN EFI_HANDLE FvHandle,
IN EFI_GUID *DriverName
)
@@ -955,7 +955,7 @@ Returns:
EFI_STATUS Status;
EFI_STATUS GetNextFileStatus;
EFI_STATUS SecurityStatus;
- EFI_FIRMWARE_VOLUME_PROTOCOL *Fv;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
EFI_DEVICE_PATH_PROTOCOL *FvDevicePath;
EFI_HANDLE FvHandle;
UINTN BufferSize;
@@ -1011,7 +1011,7 @@ Returns:
FvIsBeingProcesssed (FvHandle);
- Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Fv);
+ Status = CoreHandleProtocol (FvHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Fv);
if (EFI_ERROR (Status)) {
//
// The Handle has a FirmwareVolumeDispatch protocol and should also contiain
@@ -1186,7 +1186,7 @@ Returns:
--*/
{
mFwVolEvent = CoreCreateProtocolNotifyEvent (
- &gEfiFirmwareVolumeProtocolGuid,
+ &gEfiFirmwareVolume2ProtocolGuid,
TPL_CALLBACK,
CoreFwVolEventProtocolNotify,
NULL,
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h
index 1edc84f26f..c5c4f34c49 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.h
+++ b/MdeModulePkg/Core/Dxe/DxeMain.h
@@ -48,7 +48,7 @@ Revision History
#include <Protocol/RealTimeClock.h>
#include <Guid/Apriori.h>
#include <Protocol/WatchdogTimer.h>
-#include <Protocol/FirmwareVolume.h>
+#include <Protocol/FirmwareVolume2.h>
#include <Protocol/MonotonicCounter.h>
#include <Guid/DxeServices.h>
#include <Guid/MemoryAllocationHob.h>
@@ -155,7 +155,7 @@ typedef struct {
EFI_HANDLE FvHandle;
EFI_GUID FileName;
EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
- EFI_FIRMWARE_VOLUME_PROTOCOL *Fv;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
VOID *Depex;
UINTN DepexSize;
diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf
index 6f93147783..3b8519b6db 100644
--- a/MdeModulePkg/Core/Dxe/DxeMain.inf
+++ b/MdeModulePkg/Core/Dxe/DxeMain.inf
@@ -128,7 +128,7 @@
gEfiDriverBindingProtocolGuid # PROTOCOL SOMETIMES_CONSUMED
gEfiFirmwareVolumeBlockProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiFirmwareVolumeDispatchProtocolGuid # PROTOCOL ALWAYS_PRODUCED
- gEfiFirmwareVolumeProtocolGuid # PROTOCOL ALWAYS_PRODUCED
+ gEfiFirmwareVolume2ProtocolGuid # PROTOCOL ALWAYS_PRODUCED
gEfiCpuArchProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiDevicePathProtocolGuid # PROTOCOL ALWAYS_CONSUMED
gEfiLoadedImageProtocolGuid # PROTOCOL ALWAYS_PRODUCED
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
index 98550c96eb..c89dc8c2ed 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
@@ -25,7 +25,7 @@ VOID *gEfiFwVolBlockNotifyReg;
EFI_EVENT gEfiFwVolBlockEvent;
FV_DEVICE mFvDevice = {
- FV_DEVICE_SIGNATURE,
+ FV2_DEVICE_SIGNATURE,
NULL,
NULL,
{
@@ -35,7 +35,10 @@ FV_DEVICE mFvDevice = {
FvReadFileSection,
FvWriteFile,
FvGetNextFile,
- KEYSIZE
+ KEYSIZE,
+ NULL,
+ FvGetVolumeInfo,
+ FvSetVolumeInfo
},
NULL,
NULL,
@@ -389,8 +392,8 @@ NotifyFwVolBlock (
Routine Description:
This notification function is invoked when 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
- the actual initialization of the EFI_FIRMWARE_VOLUME_PROTOCOL is done.
+ EFI_FIRMWARE_VOLUME2_PROTOCOL on the same handle. This is the function where
+ the actual initialization of the EFI_FIRMWARE_VOLUME2_PROTOCOL is done.
Arguments:
Event - The event that occured
@@ -406,7 +409,7 @@ Returns:
EFI_STATUS Status;
UINTN BufferSize;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
- EFI_FIRMWARE_VOLUME_PROTOCOL *Fv;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *Fv;
FV_DEVICE *FvDevice;
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
//
@@ -468,13 +471,13 @@ Returns:
//
// 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)) {
//
// Update Fv to use a new Fvb
//
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
//
@@ -500,7 +503,7 @@ Returns:
//
Status = CoreInstallProtocolInterface (
&Handle,
- &gEfiFirmwareVolumeProtocolGuid,
+ &gEfiFirmwareVolume2ProtocolGuid,
EFI_NATIVE_INTERFACE,
&FvDevice->Fv
);
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
index 4a31a8dcf6..280978ed1a 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolAttrib.c
@@ -24,8 +24,8 @@ Abstract:
EFI_STATUS
EFIAPI
FvGetVolumeAttributes (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- OUT EFI_FV_ATTRIBUTES *Attributes
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ OUT EFI_FV_ATTRIBUTES *Attributes
)
/*++
@@ -76,8 +76,8 @@ Returns:
EFI_STATUS
EFIAPI
FvSetVolumeAttributes (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN OUT EFI_FV_ATTRIBUTES *Attributes
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN OUT EFI_FV_ATTRIBUTES *Attributes
)
/*++
@@ -97,3 +97,61 @@ Returns:
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;
+}
+
+
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
index 313b36e6f7..a477ad488d 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
@@ -70,12 +70,12 @@ FfsAttributes2FvFileAttributes (
EFI_STATUS
EFIAPI
FvGetNextFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN OUT VOID *Key,
- IN OUT EFI_FV_FILETYPE *FileType,
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN OUT VOID *Key,
+ IN OUT EFI_FV_FILETYPE *FileType,
OUT EFI_GUID *NameGuid,
OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
- OUT UINTN *Size
+ OUT UINTN *Size
)
/*++
@@ -140,7 +140,7 @@ Returns:
//
// Check if read operation is enabled
//
- if ((FvAttributes & EFI_FV_READ_STATUS) == 0) {
+ if ((FvAttributes & EFI_FV2_READ_STATUS) == 0) {
return EFI_ACCESS_DENIED;
}
@@ -227,13 +227,13 @@ Returns:
EFI_STATUS
EFIAPI
FvReadFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN EFI_GUID *NameGuid,
- IN OUT VOID **Buffer,
- IN OUT UINTN *BufferSize,
- OUT EFI_FV_FILETYPE *FoundType,
- OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
- OUT UINT32 *AuthenticationStatus
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN CONST EFI_GUID *NameGuid,
+ IN OUT VOID **Buffer,
+ IN OUT UINTN *BufferSize,
+ OUT EFI_FV_FILETYPE *FoundType,
+ OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
+ OUT UINT32 *AuthenticationStatus
)
/*++
@@ -370,13 +370,13 @@ Returns:
EFI_STATUS
EFIAPI
FvReadFileSection (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN EFI_GUID *NameGuid,
- IN EFI_SECTION_TYPE SectionType,
- IN UINTN SectionInstance,
- IN OUT VOID **Buffer,
- IN OUT UINTN *BufferSize,
- OUT UINT32 *AuthenticationStatus
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN CONST EFI_GUID *NameGuid,
+ IN EFI_SECTION_TYPE SectionType,
+ IN UINTN SectionInstance,
+ IN OUT VOID **Buffer,
+ IN OUT UINTN *BufferSize,
+ OUT UINT32 *AuthenticationStatus
)
/*++
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c
index 4368fe534e..bf075dca86 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolWrite.c
@@ -25,10 +25,10 @@ Abstract:
EFI_STATUS
EFIAPI
FvWriteFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN UINT32 NumberOfFiles,
- IN EFI_FV_WRITE_POLICY WritePolicy,
- IN EFI_FV_WRITE_FILE_DATA *FileData
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN UINT32 NumberOfFiles,
+ IN EFI_FV_WRITE_POLICY WritePolicy,
+ IN EFI_FV_WRITE_FILE_DATA *FileData
)
/*++
diff --git a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
index e07eea20f5..e90a10bfdc 100644
--- a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
+++ b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c
@@ -586,7 +586,7 @@ Returns:
//
if (!EFI_ERROR(Status)) {
Ptr = NULL;
- Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolumeProtocolGuid, (VOID **)&Ptr);
+ Status = CoreHandleProtocol (*FVProtocolHandle, &gEfiFirmwareVolume2ProtocolGuid, (VOID **)&Ptr);
if (EFI_ERROR(Status) || (Ptr == NULL)) {
return EFI_VOLUME_CORRUPTED;
}
diff --git a/MdeModulePkg/Core/Dxe/FwVolDriver.h b/MdeModulePkg/Core/Dxe/FwVolDriver.h
index fb4e0d5bb2..fe70090630 100644
--- a/MdeModulePkg/Core/Dxe/FwVolDriver.h
+++ b/MdeModulePkg/Core/Dxe/FwVolDriver.h
@@ -24,6 +24,8 @@ Abstract:
#define __FWVOL_H
+#define FV2_DEVICE_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', '2')
+
//
// Used to track all non-deleted files
//
@@ -38,7 +40,7 @@ typedef struct {
UINTN Signature;
EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL *Fvb;
EFI_HANDLE Handle;
- EFI_FIRMWARE_VOLUME_PROTOCOL Fv;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL Fv;
EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader;
UINT8 *CachedFv;
@@ -51,14 +53,14 @@ typedef struct {
UINT8 ErasePolarity;
} 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
EFIAPI
FvGetVolumeAttributes (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- OUT EFI_FV_ATTRIBUTES *Attributes
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ OUT EFI_FV_ATTRIBUTES *Attributes
)
/*++
@@ -79,8 +81,8 @@ Returns:
EFI_STATUS
EFIAPI
FvSetVolumeAttributes (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN OUT EFI_FV_ATTRIBUTES *Attributes
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN OUT EFI_FV_ATTRIBUTES *Attributes
)
/*++
@@ -100,12 +102,12 @@ Returns:
EFI_STATUS
EFIAPI
FvGetNextFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN OUT VOID *Key,
- IN OUT EFI_FV_FILETYPE *FileType,
- OUT EFI_GUID *NameGuid,
- OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
- OUT UINTN *Size
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN OUT VOID *Key,
+ IN OUT EFI_FV_FILETYPE *FileType,
+ OUT EFI_GUID *NameGuid,
+ OUT EFI_FV_FILE_ATTRIBUTES *Attributes,
+ OUT UINTN *Size
)
/*++
@@ -156,13 +158,13 @@ Returns:
EFI_STATUS
EFIAPI
FvReadFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN EFI_GUID *NameGuid,
- IN OUT VOID **Buffer,
- IN OUT UINTN *BufferSize,
- OUT EFI_FV_FILETYPE *FoundType,
- OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
- OUT UINT32 *AuthenticationStatus
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN CONST EFI_GUID *NameGuid,
+ IN OUT VOID **Buffer,
+ IN OUT UINTN *BufferSize,
+ OUT EFI_FV_FILETYPE *FoundType,
+ OUT EFI_FV_FILE_ATTRIBUTES *FileAttributes,
+ OUT UINT32 *AuthenticationStatus
)
/*++
@@ -207,13 +209,13 @@ Returns:
EFI_STATUS
EFIAPI
FvReadFileSection (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN EFI_GUID *NameGuid,
- IN EFI_SECTION_TYPE SectionType,
- IN UINTN SectionInstance,
- IN OUT VOID **Buffer,
- IN OUT UINTN *BufferSize,
- OUT UINT32 *AuthenticationStatus
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN CONST EFI_GUID *NameGuid,
+ IN EFI_SECTION_TYPE SectionType,
+ IN UINTN SectionInstance,
+ IN OUT VOID **Buffer,
+ IN OUT UINTN *BufferSize,
+ OUT UINT32 *AuthenticationStatus
)
/*++
@@ -248,10 +250,10 @@ FvReadFileSection (
EFI_STATUS
EFIAPI
FvWriteFile (
- IN EFI_FIRMWARE_VOLUME_PROTOCOL *This,
- IN UINT32 NumberOfFiles,
- IN EFI_FV_WRITE_POLICY WritePolicy,
- IN EFI_FV_WRITE_FILE_DATA *FileData
+ IN CONST EFI_FIRMWARE_VOLUME2_PROTOCOL *This,
+ IN UINT32 NumberOfFiles,
+ IN EFI_FV_WRITE_POLICY WritePolicy,
+ 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
diff --git a/MdeModulePkg/Core/Dxe/Image/ImageFile.c b/MdeModulePkg/Core/Dxe/Image/ImageFile.c
index 408688c69f..029f7cf2a7 100644
--- a/MdeModulePkg/Core/Dxe/Image/ImageFile.c
+++ b/MdeModulePkg/Core/Dxe/Image/ImageFile.c
@@ -74,7 +74,7 @@ Returns:
EFI_FILE_HANDLE FileHandle;
EFI_FILE_HANDLE LastHandle;
EFI_LOAD_FILE_PROTOCOL *LoadFile;
- EFI_FIRMWARE_VOLUME_PROTOCOL *FwVol;
+ EFI_FIRMWARE_VOLUME2_PROTOCOL *FwVol;
EFI_SECTION_TYPE SectionType;
UINT8 *Pe32Buffer;
UINTN Pe32BufferSize;
@@ -115,7 +115,7 @@ Returns:
//
FwVolFilePathNode = (MEDIA_FW_VOL_FILEPATH_DEVICE_PATH *)FilePath;
Status = CoreDevicePathToInterface (
- &gEfiFirmwareVolumeProtocolGuid,
+ &gEfiFirmwareVolume2ProtocolGuid,
(EFI_DEVICE_PATH_PROTOCOL **)&FwVolFilePathNode,
(VOID*)&FwVol,
DeviceHandle
diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
index 8d3c29a579..32486a2e75 100644
--- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
+++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c
@@ -377,8 +377,8 @@ Returns:
Status = PeiServicesFfsFindNextFile (
Type,
- FwVolHeader,
- &FfsFileHeader
+ (EFI_PEI_FV_HANDLE) FwVolHeader,
+ (EFI_PEI_FILE_HANDLE*) &FfsFileHeader
);
if (!EFI_ERROR (Status)) {
Status = PeiProcessFile (
diff --git a/MdeModulePkg/Core/Pei/BootMode/BootMode.c b/MdeModulePkg/Core/Pei/BootMode/BootMode.c
index bec0304113..fbfd02f84c 100644
--- a/MdeModulePkg/Core/Pei/BootMode/BootMode.c
+++ b/MdeModulePkg/Core/Pei/BootMode/BootMode.c
@@ -28,8 +28,8 @@ Revision History
EFI_STATUS
EFIAPI
PeiGetBootMode (
- IN EFI_PEI_SERVICES **PeiServices,
- OUT EFI_BOOT_MODE *BootMode
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ OUT EFI_BOOT_MODE *BootMode
)
/*++
@@ -71,8 +71,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiSetBootMode (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_BOOT_MODE BootMode
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN EFI_BOOT_MODE BootMode
)
/*++
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index d144fb85ec..a5065632c3 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -251,9 +251,9 @@ Returns:
EFI_STATUS
EFIAPI
PeiFfsFindSectionData (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_SECTION_TYPE SectionType,
- IN EFI_FFS_FILE_HEADER *FfsFileHeader,
+ IN EFI_PEI_FILE_HANDLE FileHandle,
IN OUT VOID **SectionData
)
/*++
@@ -279,8 +279,10 @@ Returns:
EFI_COMMON_SECTION_HEADER *Section;
UINT32 SectionLength;
UINT32 ParsedLength;
-
+ EFI_FFS_FILE_HEADER *FfsFileHeader;
+ FfsFileHeader = (EFI_FFS_FILE_HEADER *) FileHandle;
+
//
// Size is 24 bits wide so mask upper 8 bits.
// Does not include FfsFileHeader header size
@@ -355,10 +357,10 @@ Returns:
EFI_STATUS
EFIAPI
PeiFfsFindNextFile (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_FV_FILETYPE SearchType,
- IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
- IN OUT EFI_FFS_FILE_HEADER **FileHeader
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN UINT8 SearchType,
+ IN EFI_PEI_FV_HANDLE VolumeHandle,
+ 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 (
SearchType,
FwVolHeader,
@@ -396,9 +404,9 @@ Returns:
EFI_STATUS
EFIAPI
PeiFvFindNextVolume (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
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_PEI_FIND_FV_PPI *FindFvPpi;
UINT8 LocalInstance;
+ EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader;
+ FwVolHeader = (EFI_FIRMWARE_VOLUME_HEADER **) VolumeHandle;
LocalInstance = (UINT8) Instance;
@@ -463,7 +473,7 @@ Returns:
} else {
Status = FindFvPpi->FindFv (
FindFvPpi,
- PeiServices,
+ (EFI_PEI_SERVICES **)PeiServices,
&LocalInstance,
FwVolHeader
);
diff --git a/MdeModulePkg/Core/Pei/Hob/Hob.c b/MdeModulePkg/Core/Pei/Hob/Hob.c
index 9ac672b24d..803a4e05de 100644
--- a/MdeModulePkg/Core/Pei/Hob/Hob.c
+++ b/MdeModulePkg/Core/Pei/Hob/Hob.c
@@ -24,7 +24,7 @@ Abstract:
EFI_STATUS
EFIAPI
PeiGetHobList (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT VOID **HobList
)
/*++
@@ -71,7 +71,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiCreateHob (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINT16 Type,
IN UINT16 Length,
IN OUT VOID **Hob
diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
index e623c01099..431084f83b 100644
--- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
+++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c
@@ -100,7 +100,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiInstallPeiMemory (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength
)
@@ -182,7 +182,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiAllocatePages (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT EFI_PHYSICAL_ADDRESS *Memory
@@ -275,7 +275,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiAllocatePool (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Size,
OUT VOID **Buffer
)
diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h
index e71ae78b04..9e0d7a8530 100644
--- a/MdeModulePkg/Core/Pei/PeiMain.h
+++ b/MdeModulePkg/Core/Pei/PeiMain.h
@@ -462,7 +462,7 @@ Returns:
VOID
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 *NewHandOffHob
)
@@ -486,8 +486,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiInstallPpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_PPI_DESCRIPTOR *PpiList
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
)
/*++
@@ -513,9 +513,9 @@ Returns:
EFI_STATUS
EFIAPI
PeiReInstallPpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,
- IN EFI_PEI_PPI_DESCRIPTOR *NewPpi
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
)
/*++
@@ -542,8 +542,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiLocatePpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_GUID *Guid,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_GUID *Guid,
IN UINTN Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
IN OUT VOID **Ppi
@@ -573,8 +573,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiNotifyPpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
)
/*++
@@ -617,7 +617,7 @@ Returns:
VOID
DispatchNotify (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN NotifyType,
IN INTN InstallStartIndex,
IN INTN InstallStopIndex,
@@ -650,7 +650,7 @@ Returns: None
EFI_STATUS
EFIAPI
PeiGetBootMode (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT EFI_BOOT_MODE *BootMode
)
/*++
@@ -675,7 +675,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiSetBootMode (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_BOOT_MODE BootMode
)
/*++
@@ -772,7 +772,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiGetHobList (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT VOID **HobList
)
/*++
@@ -798,7 +798,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiCreateHob (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINT16 Type,
IN UINT16 Length,
IN OUT VOID **Hob
@@ -858,10 +858,10 @@ Returns:
EFI_STATUS
EFIAPI
PeiFfsFindNextFile (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINT8 SearchType,
- IN EFI_FIRMWARE_VOLUME_HEADER *FwVolHeader,
- IN OUT EFI_FFS_FILE_HEADER **FileHeader
+ IN EFI_PEI_FV_HANDLE FwVolHeader,
+ IN OUT EFI_PEI_FILE_HANDLE *FileHeader
)
/*++
@@ -892,9 +892,9 @@ Returns:
EFI_STATUS
EFIAPI
PeiFfsFindSectionData (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_SECTION_TYPE SectionType,
- IN EFI_FFS_FILE_HEADER *FfsFileHeader,
+ IN EFI_PEI_FILE_HANDLE FfsFileHeader,
IN OUT VOID **SectionData
)
/*++
@@ -920,9 +920,9 @@ Returns:
EFI_STATUS
EFIAPI
PeiFvFindNextVolume (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Instance,
- IN OUT EFI_FIRMWARE_VOLUME_HEADER **FwVolHeader
+ IN OUT EFI_PEI_FV_HANDLE *FwVolHeader
)
/*++
@@ -982,7 +982,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiInstallPeiMemory (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS MemoryBegin,
IN UINT64 MemoryLength
)
@@ -1009,7 +1009,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiAllocatePages (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_MEMORY_TYPE MemoryType,
IN UINTN Pages,
OUT EFI_PHYSICAL_ADDRESS *Memory
@@ -1043,7 +1043,7 @@ Returns:
EFI_STATUS
EFIAPI
PeiAllocatePool (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN Size,
OUT VOID **Buffer
)
@@ -1101,12 +1101,12 @@ Returns:
EFI_STATUS
EFIAPI
PeiReportStatusCode (
- 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,
- IN EFI_STATUS_CODE_DATA *Data OPTIONAL
+ IN CONST EFI_GUID *CallerId,
+ IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
/*++
diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
index c8bea851a5..e429b665a2 100644
--- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c
+++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c
@@ -60,7 +60,7 @@ Returns:
VOID
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 *NewHandOffHob
)
@@ -139,8 +139,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiInstallPpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_PPI_DESCRIPTOR *PpiList
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *PpiList
)
/*++
@@ -202,7 +202,7 @@ Returns:
}
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++;
//
@@ -220,7 +220,7 @@ Returns:
// Dispatch any callback level notifies for newly installed PPIs.
//
DispatchNotify (
- PeiServices,
+ (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
LastCallbackInstall,
PrivateData->PpiData.PpiListEnd,
@@ -236,9 +236,9 @@ Returns:
EFI_STATUS
EFIAPI
PeiReInstallPpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_PPI_DESCRIPTOR *OldPpi,
- IN EFI_PEI_PPI_DESCRIPTOR *NewPpi
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *OldPpi,
+ IN CONST EFI_PEI_PPI_DESCRIPTOR *NewPpi
)
/*++
@@ -292,13 +292,13 @@ Returns:
// Remove the old PPI from the database, add the new one.
//
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.
//
DispatchNotify (
- PeiServices,
+ (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
Index,
Index+1,
@@ -314,8 +314,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiLocatePpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_GUID *Guid,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_GUID *Guid,
IN UINTN Instance,
IN OUT EFI_PEI_PPI_DESCRIPTOR **PpiDescriptor,
IN OUT VOID **Ppi
@@ -389,8 +389,8 @@ Returns:
EFI_STATUS
EFIAPI
PeiNotifyPpi (
- IN EFI_PEI_SERVICES **PeiServices,
- IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
+ IN CONST EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_NOTIFY_DESCRIPTOR *NotifyList
)
/*++
@@ -458,7 +458,7 @@ Returns:
NotifyDispatchCount ++;
}
- PrivateData->PpiData.PpiListPtrs[Index].Notify = NotifyList;
+ PrivateData->PpiData.PpiListPtrs[Index].Notify = (EFI_PEI_NOTIFY_DESCRIPTOR *) NotifyList;
PrivateData->PpiData.NotifyListEnd--;
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.
//
DispatchNotify (
- PeiServices,
+ (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK,
0,
PrivateData->PpiData.PpiListEnd,
@@ -545,7 +545,7 @@ Returns:
while (PrivateData->PpiData.LastDispatchedNotify != PrivateData->PpiData.DispatchListEnd) {
TempValue = PrivateData->PpiData.DispatchListEnd;
DispatchNotify (
- PeiServices,
+ (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
0,
PrivateData->PpiData.LastDispatchedInstall,
@@ -566,7 +566,7 @@ Returns:
while (PrivateData->PpiData.LastDispatchedInstall != PrivateData->PpiData.PpiListEnd) {
TempValue = PrivateData->PpiData.PpiListEnd;
DispatchNotify (
- PeiServices,
+ (CONST EFI_PEI_SERVICES **) PeiServices,
EFI_PEI_PPI_DESCRIPTOR_NOTIFY_DISPATCH,
PrivateData->PpiData.LastDispatchedInstall,
PrivateData->PpiData.PpiListEnd,
@@ -585,7 +585,7 @@ Returns:
VOID
DispatchNotify (
- IN EFI_PEI_SERVICES **PeiServices,
+ IN CONST EFI_PEI_SERVICES **PeiServices,
IN UINTN NotifyType,
IN INTN InstallStartIndex,
IN INTN InstallStopIndex,
@@ -645,7 +645,7 @@ Returns: None
NotifyDescriptor->Notify
));
NotifyDescriptor->Notify (
- PeiServices,
+ (EFI_PEI_SERVICES **)PeiServices,
NotifyDescriptor,
(PrivateData->PpiData.PpiListPtrs[Index2].Ppi)->Ppi
);
diff --git a/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c b/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c
index b9316b6e9e..04a4519844 100644
--- a/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c
+++ b/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c
@@ -26,12 +26,12 @@ Revision History
EFI_STATUS
EFIAPI
PeiReportStatusCode (
- IN EFI_PEI_SERVICES **PeiServices,
- 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_PEI_SERVICES **PeiServices,
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN CONST EFI_GUID *CallerId,
+ IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
)
/*++
diff --git a/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTest.c b/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTest.c
index f1ab82d87a..f51869c773 100644
--- a/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTest.c
+++ b/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTest.c
@@ -20,6 +20,7 @@ Abstract:
--*/
#include <BaseMemoryTest.h>
+#include <Library/PeiServicesLib.h>
static PEI_BASE_MEMORY_TEST_PPI mPeiBaseMemoryTestPpi = { BaseMemoryTest };
@@ -51,11 +52,9 @@ Returns:
--*/
{
- EFI_STATUS Status;
- Status = (**PeiServices).InstallPpi (PeiServices, &PpiListPeiBaseMemoryTest);
-
- return Status;
+ return PeiServicesInstallPpi (&PpiListPeiBaseMemoryTest);
+
}
EFI_STATUS
diff --git a/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTestPei.inf b/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTestPei.inf
index c0b2f87d68..5a410e20c3 100644
--- a/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTestPei.inf
+++ b/MdeModulePkg/Universal/MemoryTest/BaseMemoryTestPei/BaseMemoryTestPei.inf
@@ -39,6 +39,7 @@
ReportStatusCodeLib
PeimEntryPoint
DebugLib
+ PeiServicesLib
[Ppis]
gPeiBaseMemoryTestPpiGuid # PPI ALWAYS_PRODUCED
diff --git a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c
index bf1fb2d887..d0ebe8de62 100644
--- a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c
+++ b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c
@@ -364,7 +364,7 @@ PeimInitializePciCfg (
ASSERT ((**PeiServices).Hdr.Revision >= PEI_SERVICES_REVISION);
(**PeiServices).PciCfg = &gPciCfg2Ppi;
- Status = (**PeiServices).InstallPpi (PeiServices, &gPciCfg2PpiList);
+ Status = (**PeiServices).InstallPpi ((CONST EFI_PEI_SERVICES **)PeiServices, &gPciCfg2PpiList);
return Status;
}
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index ba8a23d67a..7385af7157 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -64,7 +64,7 @@ Returns:
//
// Publish the variable capability to other modules
//
- return (**PeiServices).InstallPpi (PeiServices, &mPpiListVariable);
+ return (**PeiServices).InstallPpi ((CONST EFI_PEI_SERVICES **)PeiServices, &mPpiListVariable);
}