diff options
-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) {
|