diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-04 06:12:48 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-09-04 06:12:48 +0000 |
commit | 0c2b5da80e9551286cd02a92d91090290ae2d816 (patch) | |
tree | 950f10a499282ae6cb59638e2caaa31187ba2173 /MdeModulePkg/Core/Dxe/FwVol/FwVol.c | |
parent | 1c280088ec83160a5f190b3d0ba796b224ee23b3 (diff) | |
download | edk2-0c2b5da80e9551286cd02a92d91090290ae2d816.zip edk2-0c2b5da80e9551286cd02a92d91090290ae2d816.tar.gz edk2-0c2b5da80e9551286cd02a92d91090290ae2d816.tar.bz2 |
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/Core/Dxe/FwVol/FwVol.c')
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index 98550c9..c89dc8c 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
);
|