]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c
MdeModule cleanup for PI:
[mirror_edk2.git] / MdeModulePkg / Core / Dxe / FwVol / FwVolRead.c
index 59df02e11d1cb33506908c0331184e2025c7fd73..becc19e9993fe29a104b8a38e86954f6232b2e4b 100644 (file)
@@ -413,7 +413,6 @@ FvReadFileSection (
   EFI_FV_FILE_ATTRIBUTES            FileAttributes;\r
   UINTN                             FileSize;\r
   UINT8                             *FileBuffer;\r
-  EFI_SECTION_EXTRACTION_PROTOCOL   *Sep;\r
   FFS_FILE_LIST_ENTRY               *FfsEntry;\r
  \r
   if (NULL == NameGuid || Buffer == NULL) {\r
@@ -456,17 +455,7 @@ FvReadFileSection (
   // Use FfsEntry to cache Section Extraction Protocol Inforomation\r
   //\r
   if (FfsEntry->StreamHandle == 0) {\r
-    //\r
-    // Located the protocol\r
-    //\r
-    Status = CoreLocateProtocol (&gEfiSectionExtractionProtocolGuid, NULL, (VOID **)&Sep);\r
-    //\r
-    // Section Extraction Protocol is part of Dxe Core so this should never fail\r
-    //\r
-    ASSERT_EFI_ERROR (Status);\r
-\r
-    Status = Sep->OpenSectionStream (\r
-                    Sep,\r
+    Status = OpenSectionStream (\r
                     FileSize,\r
                     FileBuffer,\r
                     &FfsEntry->StreamHandle\r
@@ -474,28 +463,20 @@ FvReadFileSection (
     if (EFI_ERROR (Status)) {\r
       goto Done;\r
     }\r
-\r
-    FfsEntry->Sep = Sep;\r
-  } else {\r
-    //\r
-    // Get cached copy of Sep\r
-    //\r
-    Sep = FfsEntry->Sep;\r
   }\r
 \r
   //\r
   // If SectionType == 0 We need the whole section stream\r
   //\r
-  Status = Sep->GetSection (\r
-                  Sep,\r
-                            FfsEntry->StreamHandle,\r
-                            (SectionType == 0) ? NULL : &SectionType,\r
-                            NULL,\r
-                            (SectionType == 0) ? 0 : SectionInstance,\r
-                            Buffer,\r
-                            BufferSize,\r
-                            AuthenticationStatus\r
-                            );\r
+  Status = GetSection (\r
+             FfsEntry->StreamHandle,\r
+             (SectionType == 0) ? NULL : &SectionType,\r
+             NULL,\r
+             (SectionType == 0) ? 0 : SectionInstance,\r
+             Buffer,\r
+             BufferSize,\r
+             AuthenticationStatus\r
+             );\r
 \r
   //\r
   // Close of stream defered to close of FfsHeader list to allow SEP to cache data\r