EmbeddedPkg/MmcDxe: Align the ExtCSD buffer
ExtCSD structure may be read via DMA. So align it to page to avoid data corruption. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
@@ -171,6 +171,9 @@ EFI_STATUS DestroyMmcHostInstance (
|
||||
if (MmcHostInstance->BlockIo.Media) {
|
||||
FreePool(MmcHostInstance->BlockIo.Media);
|
||||
}
|
||||
if (MmcHostInstance->CardInfo.ECSDData) {
|
||||
FreePages (MmcHostInstance->CardInfo.ECSDData, EFI_SIZE_TO_PAGES (sizeof (ECSD)));
|
||||
}
|
||||
FreePool (MmcHostInstance);
|
||||
|
||||
return Status;
|
||||
|
Reference in New Issue
Block a user