[edk2] [PATCH] EmbeddedPkg/MmcDxe: Add alignment for ECSD data

Jun Nie posted 1 patch 7 years, 6 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
EmbeddedPkg/Universal/MmcDxe/Mmc.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[edk2] [PATCH] EmbeddedPkg/MmcDxe: Add alignment for ECSD data
Posted by Jun Nie 7 years, 6 months ago
Add alignment for ECSD data for DMA access. Otherwise
the data is corrupted on Sanechips platform.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 EmbeddedPkg/Universal/MmcDxe/Mmc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
index 8a7d5a3..ca1a9d5 100644
--- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h
+++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
@@ -319,7 +319,7 @@ typedef struct  {
   OCR       OCRData;
   CID       CIDData;
   CSD       CSDData;
-  ECSD      ECSDData;                         // MMC V4 extended card specific
+  ECSD      ECSDData __attribute__((aligned(8)));  // MMC V4 extended card specific
 } CARD_INFO;
 
 typedef struct _MMC_HOST_INSTANCE {
-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] EmbeddedPkg/MmcDxe: Add alignment for ECSD data
Posted by Haojian Zhuang 7 years, 6 months ago
On 2017/6/8 16:18, Jun Nie wrote:
> Add alignment for ECSD data for DMA access. Otherwise
> the data is corrupted on Sanechips platform.
> 
> Contributed-under: TianoCore Contribution Agreement 1.0
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> ---
>   EmbeddedPkg/Universal/MmcDxe/Mmc.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
> index 8a7d5a3..ca1a9d5 100644
> --- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h
> +++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
> @@ -319,7 +319,7 @@ typedef struct  {
>     OCR       OCRData;
>     CID       CIDData;
>     CSD       CSDData;
> -  ECSD      ECSDData;                         // MMC V4 extended card specific
> +  ECSD      ECSDData __attribute__((aligned(8)));  // MMC V4 extended card specific
>   } CARD_INFO;
>   
>   typedef struct _MMC_HOST_INSTANCE {
> 

Acked-by: Haojian Zhuang <haojian.zhuang@linaro.org>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel