diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-16 14:45:03 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-06-16 14:45:03 +0000 |
commit | 6326ee4e470d7b5e44a409c249e475a20f5182d9 (patch) | |
tree | 6a4dcb964fe6b4f7bcaca30e953266381b6fd96f /EdkModulePkg | |
parent | c965d3aff4a2a72d027bad99f96dd6ce639215ad (diff) | |
download | edk2-6326ee4e470d7b5e44a409c249e475a20f5182d9.tar.gz edk2-6326ee4e470d7b5e44a409c249e475a20f5182d9.tar.bz2 edk2-6326ee4e470d7b5e44a409c249e475a20f5182d9.zip |
Fix DxeIpl module bugs: DxeCoreFileName should be from the Dxe Core ffs file that contain DxeCore Pe Data.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@543 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg')
-rw-r--r-- | EdkModulePkg/Core/DxeIplPeim/DxeIpl.h | 6 | ||||
-rw-r--r-- | EdkModulePkg/Core/DxeIplPeim/DxeLoad.c | 21 | ||||
-rw-r--r-- | EdkModulePkg/Core/DxeIplPeim/DxeLoadX64.c | 21 |
3 files changed, 31 insertions, 17 deletions
diff --git a/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h b/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h index bc50666df6..5e35042861 100644 --- a/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h +++ b/EdkModulePkg/Core/DxeIplPeim/DxeIpl.h @@ -102,9 +102,9 @@ DxeLoadCore ( EFI_STATUS
PeiProcessFile (
- IN UINT16 SectionType,
- IN EFI_FFS_FILE_HEADER *FfsFileHeader,
- OUT VOID **Pe32Data
+ IN UINT16 SectionType,
+ IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,
+ OUT VOID **Pe32Data
);
EFI_STATUS
diff --git a/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c b/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c index 7800841275..4492376462 100644 --- a/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/EdkModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -470,12 +470,12 @@ Returns: &FfsFileHeader
);
if (!EFI_ERROR (Status)) {
- CopyMem (FileName, &FfsFileHeader->Name, sizeof (EFI_GUID));
Status = PeiProcessFile (
SectionType,
- FfsFileHeader,
+ &FfsFileHeader,
Pe32Data
);
+ CopyMem (FileName, &FfsFileHeader->Name, sizeof (EFI_GUID));
return Status;
}
Hob.Raw = GET_NEXT_HOB (Hob);
@@ -683,7 +683,7 @@ Returns: //
Status = PeiProcessFile (
EFI_SECTION_PE32,
- FfsHeader,
+ &FfsHeader,
&Pe32Data
);
@@ -706,9 +706,9 @@ Returns: EFI_STATUS
PeiProcessFile (
- IN UINT16 SectionType,
- IN EFI_FFS_FILE_HEADER *FfsFileHeader,
- OUT VOID **Pe32Data
+ IN UINT16 SectionType,
+ IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,
+ OUT VOID **Pe32Data
)
/*++
@@ -756,6 +756,9 @@ Returns: EFI_GUID TempGuid;
EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
EFI_COMPRESSION_SECTION *CompressionSection;
+ EFI_FFS_FILE_HEADER *FfsFileHeader;
+
+ FfsFileHeader = *RealFfsFileHeader;
Status = PeiServicesFfsFindSectionData (
EFI_SECTION_COMPRESSION,
@@ -950,7 +953,11 @@ Returns: return EFI_NOT_FOUND;
}
- return PeiProcessFile (SectionType, FfsFileHeader, Pe32Data);
+ //
+ // Reture the FfsHeader that contain Pe32Data.
+ //
+ *RealFfsFileHeader = FfsFileHeader;
+ return PeiProcessFile (SectionType, RealFfsFileHeader, Pe32Data);
}
}
//
diff --git a/EdkModulePkg/Core/DxeIplPeim/DxeLoadX64.c b/EdkModulePkg/Core/DxeIplPeim/DxeLoadX64.c index 451d239eb6..cbb7595dac 100644 --- a/EdkModulePkg/Core/DxeIplPeim/DxeLoadX64.c +++ b/EdkModulePkg/Core/DxeIplPeim/DxeLoadX64.c @@ -445,12 +445,12 @@ Returns: &FfsFileHeader
);
if (!EFI_ERROR (Status)) {
- CopyMem (FileName, &FfsFileHeader->Name, sizeof (EFI_GUID));
Status = PeiProcessFile (
SectionType,
- FfsFileHeader,
+ &FfsFileHeader,
Pe32Data
);
+ CopyMem (FileName, &FfsFileHeader->Name, sizeof (EFI_GUID));
return Status;
}
Hob.Raw = GET_NEXT_HOB (Hob);
@@ -662,7 +662,7 @@ Returns: //
Status = PeiProcessFile (
EFI_SECTION_PE32,
- FfsHeader,
+ &FfsHeader,
&Pe32Data
);
@@ -686,9 +686,9 @@ Returns: EFI_STATUS
PeiProcessFile (
- IN UINT16 SectionType,
- IN EFI_FFS_FILE_HEADER *FfsFileHeader,
- OUT VOID **Pe32Data
+ IN UINT16 SectionType,
+ IN OUT EFI_FFS_FILE_HEADER **RealFfsFileHeader,
+ OUT VOID **Pe32Data
)
/*++
@@ -736,6 +736,9 @@ Returns: EFI_GUID TempGuid;
EFI_FIRMWARE_VOLUME_HEADER *FvHeader;
EFI_COMPRESSION_SECTION *CompressionSection;
+ EFI_FFS_FILE_HEADER *FfsFileHeader;
+
+ FfsFileHeader = *RealFfsFileHeader;
Status = PeiServicesFfsFindSectionData (
EFI_SECTION_COMPRESSION,
@@ -930,7 +933,11 @@ Returns: return EFI_NOT_FOUND;
}
- return PeiProcessFile (SectionType, FfsFileHeader, Pe32Data);
+ //
+ // Reture the FfsHeader that contain Pe32Data.
+ //
+ *RealFfsFileHeader = FfsFileHeader;
+ return PeiProcessFile (SectionType, RealFfsFileHeader, Pe32Data);
}
}
//
|