Update comments on setting >= 8 bytes Fv Alignment.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9372 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2009-10-26 09:14:47 +00:00
parent a19ad64bf0
commit 6d9a0f280d
3 changed files with 8 additions and 2 deletions

View File

@ -845,9 +845,12 @@ CoreProcessFvImageFile (
// FvImage should be at its required alignment. // FvImage should be at its required alignment.
// //
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) Buffer; FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) Buffer;
//
// Get FvHeader alignment
//
FvAlignment = 1 << ((FvHeader->Attributes & EFI_FVB2_ALIGNMENT) >> 16); FvAlignment = 1 << ((FvHeader->Attributes & EFI_FVB2_ALIGNMENT) >> 16);
// //
// FvAlignment must be more than 8 bytes required by FvHeader structure. // FvAlignment must be greater than or equal to 8 bytes of the minimum FFS alignment value.
// //
if (FvAlignment < 8) { if (FvAlignment < 8) {
FvAlignment = 8; FvAlignment = 8;

View File

@ -450,6 +450,9 @@ ProduceFVBProtocolOnBuffer (
// Get FvHeader alignment // Get FvHeader alignment
// //
FvAlignment = 1 << ((FwVolHeader->Attributes & EFI_FVB2_ALIGNMENT) >> 16); FvAlignment = 1 << ((FwVolHeader->Attributes & EFI_FVB2_ALIGNMENT) >> 16);
//
// FvAlignment must be greater than or equal to 8 bytes of the minimum FFS alignment value.
//
if (FvAlignment < 8) { if (FvAlignment < 8) {
FvAlignment = 8; FvAlignment = 8;
} }

View File

@ -893,7 +893,7 @@ ProcessFvFile (
ASSERT_EFI_ERROR (Status); ASSERT_EFI_ERROR (Status);
// //
// FvAlignment must be more than 8 bytes required by FvHeader structure. // FvAlignment must be greater than or equal to 8 bytes of the minimum FFS alignment value.
// //
FvAlignment = 1 << ((FvImageInfo.FvAttributes & EFI_FVB2_ALIGNMENT) >> 16); FvAlignment = 1 << ((FvImageInfo.FvAttributes & EFI_FVB2_ALIGNMENT) >> 16);
if (FvAlignment < 8) { if (FvAlignment < 8) {