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