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
// 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
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