2017-06-12 23:53 GMT+08:00 Leif Lindholm <leif.lindh...@linaro.org>:
> On Mon, Jun 12, 2017 at 09:59:28AM +0800, Jun Nie wrote:
>> Add alignment for ECSD data for DMA access. Otherwise
>> the data is corrupted on Sanechips platform.
>
> I never did see a reply to my proposed solution, and the below is not
> it. Can you explain why you prefer this one?
>
> /
>     Leif

Sorry, just see your email because that thread is not highlighted for
new email in gmail for unknown reason.
I have concern that "UINT64 VENDOR_SPECIFIC_FIELD[8]" cannot secure
the ECSD alignment because it is not the first member. Changing the
first member to "UINT64 RESERVED_1[2]" shall secure the alignment. But
I preferred Pad method. It is more readable if all ECSD member are
UINT8 type. It is also more clear to add alignment info in CARD_INFO,
just before ECSD member.
I do not get point of Andrew, maybe he share the same concern.

Jun

>
>> Contributed-under: TianoCore Contribution Agreement 1.0
>> Signed-off-by: Jun Nie <jun....@linaro.org>
>> ---
>>  EmbeddedPkg/Universal/MmcDxe/Mmc.h | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h 
>> b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
>> index 8a7d5a3..6e3ab17 100644
>> --- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h
>> +++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
>> @@ -319,6 +319,7 @@ typedef struct  {
>>    OCR       OCRData;
>>    CID       CIDData;
>>    CSD       CSDData;
>> +  UINT64    Pad;                              // For 8 bytes alignment of 
>> ECSDData
>>    ECSD      ECSDData;                         // MMC V4 extended card 
>> specific
>>  } CARD_INFO;
>>
>> --
>> 1.9.1
>>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to