diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-26 09:14:47 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-10-26 09:14:47 +0000 |
commit | 6d9a0f280d49fd1000fa685ee1392f45ff998e69 (patch) | |
tree | 2211c9c2381f1b068a5363f68340e756a6bf7cdd | |
parent | a19ad64bf02e21f93cb716eec54a412cc3ca6e3b (diff) | |
download | edk2-platforms-6d9a0f280d49fd1000fa685ee1392f45ff998e69.tar.xz |
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
-rw-r--r-- | MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c | 3 | ||||
-rw-r--r-- | MdeModulePkg/Core/Pei/FwVol/FwVol.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index 7e6ddce77a..6a18fe909e 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -845,9 +845,12 @@ CoreProcessFvImageFile ( // FvImage should be at its required alignment.
//
FvHeader = (EFI_FIRMWARE_VOLUME_HEADER *) Buffer;
+ //
+ // Get FvHeader alignment
+ //
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) {
FvAlignment = 8;
diff --git a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c index 9b7b166a99..5a3b243af7 100644 --- a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c +++ b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c @@ -450,6 +450,9 @@ ProduceFVBProtocolOnBuffer ( // Get FvHeader alignment
//
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) {
FvAlignment = 8;
}
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 54501f5057..a86e4e5578 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -893,7 +893,7 @@ ProcessFvFile ( 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);
if (FvAlignment < 8) {
|