diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-12-10 03:47:56 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-12-10 03:47:56 +0000 |
commit | 797a9d6791a7529c20c7b10f2843e9f38ed5a6a5 (patch) | |
tree | 8af8218c32963366e55a3f9757b34f02a8d0b44d /MdeModulePkg/Core/Dxe/FwVol | |
parent | 256a0cc3c2cb522246e8a9555887b8f50705771e (diff) | |
download | edk2-797a9d6791a7529c20c7b10f2843e9f38ed5a6a5.zip edk2-797a9d6791a7529c20c7b10f2843e9f38ed5a6a5.tar.gz edk2-797a9d6791a7529c20c7b10f2843e9f38ed5a6a5.tar.bz2 |
MdeModule cleanup for PI:
1) PeiMain:
- Use PCD for bundle of status code which definitions are put into MdePkg.dec file.
2) DxeMain:
- Use PCD for bundle of status code which definitions are put into MdePkg.dec file.
- Do not produce SectionExtraction protocol which is belong to IntelFramework specification.
- Update many macro for PI specifications.
3) DxeIpl
- Use PCD for bundle of status code which definitions are put into MdePkg.dec file.
4) Add SectionExtractionDxe module (IntelFrameworkModulePkg)
- This module will produce EFI_SECTION_EXTRACTION_PROTOCOL defined in framework specification. If a old platform want to use this protocol, then this platform need dispatch this DXE driver.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4376 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Core/Dxe/FwVol')
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 4 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c | 39 |
2 files changed, 12 insertions, 31 deletions
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index c89dc8c..60c5fa1 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c @@ -151,7 +151,7 @@ Returns: //
// Close stream and free resources from SEP
//
- FfsFileEntry->Sep->CloseSectionStream (FfsFileEntry->Sep, FfsFileEntry->StreamHandle);
+ CloseSectionStream (FfsFileEntry->StreamHandle);
}
CoreFreePool (FfsFileEntry);
@@ -281,7 +281,7 @@ Returns: //
// Scan to check the free space & File list
//
- if (FvbAttributes & EFI_FVB_ERASE_POLARITY) {
+ if (FvbAttributes & EFI_FVB2_ERASE_POLARITY) {
FvDevice->ErasePolarity = 1;
} else {
FvDevice->ErasePolarity = 0;
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c index 59df02e..becc19e 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c @@ -413,7 +413,6 @@ FvReadFileSection ( EFI_FV_FILE_ATTRIBUTES FileAttributes;
UINTN FileSize;
UINT8 *FileBuffer;
- EFI_SECTION_EXTRACTION_PROTOCOL *Sep;
FFS_FILE_LIST_ENTRY *FfsEntry;
if (NULL == NameGuid || Buffer == NULL) {
@@ -456,17 +455,7 @@ FvReadFileSection ( // Use FfsEntry to cache Section Extraction Protocol Inforomation
//
if (FfsEntry->StreamHandle == 0) {
- //
- // Located the protocol
- //
- Status = CoreLocateProtocol (&gEfiSectionExtractionProtocolGuid, NULL, (VOID **)&Sep);
- //
- // Section Extraction Protocol is part of Dxe Core so this should never fail
- //
- ASSERT_EFI_ERROR (Status);
-
- Status = Sep->OpenSectionStream (
- Sep,
+ Status = OpenSectionStream (
FileSize,
FileBuffer,
&FfsEntry->StreamHandle
@@ -474,28 +463,20 @@ FvReadFileSection ( if (EFI_ERROR (Status)) {
goto Done;
}
-
- FfsEntry->Sep = Sep;
- } else {
- //
- // Get cached copy of Sep
- //
- Sep = FfsEntry->Sep;
}
//
// If SectionType == 0 We need the whole section stream
//
- Status = Sep->GetSection (
- Sep,
- FfsEntry->StreamHandle,
- (SectionType == 0) ? NULL : &SectionType,
- NULL,
- (SectionType == 0) ? 0 : SectionInstance,
- Buffer,
- BufferSize,
- AuthenticationStatus
- );
+ Status = GetSection (
+ FfsEntry->StreamHandle,
+ (SectionType == 0) ? NULL : &SectionType,
+ NULL,
+ (SectionType == 0) ? 0 : SectionInstance,
+ Buffer,
+ BufferSize,
+ AuthenticationStatus
+ );
//
// Close of stream defered to close of FfsHeader list to allow SEP to cache data
|