From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt0-x234.google.com (mail-qt0-x234.google.com [IPv6:2607:f8b0:400d:c0d::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 200D821A08D8A for ; Mon, 12 Jun 2017 19:13:22 -0700 (PDT) Received: by mail-qt0-x234.google.com with SMTP id u19so152016933qta.3 for ; Mon, 12 Jun 2017 19:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VNLzQwSHFS3DHsMpyF49KDirSgrWFLMpt2iNnpSMTbI=; b=B409lqKGuNdhOhzwktne5YuXc+BZyQKFFWInrAMXJ0C+dWNbTPL741kkwQY6Jj+EjY z+Xrk61Cg1ncLRo+jczdMNpvDXD8E1A7TsGzSoeSTwI+ymt4RfYeMo1SPmhuYW62P/+6 QSKpSoEL6zoHO6FL8WAJfHZd5IU150lolzOGM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=VNLzQwSHFS3DHsMpyF49KDirSgrWFLMpt2iNnpSMTbI=; b=dmpHmLZZ6/j1etCugqxSBsWZH5LKAjLtCpe0lQ7scxhNLp1p10RcBfmbQ7RPpvxbY/ tkxI8BXHVqmrYH0bsOpf9DDb/kvbh1TDuTVGtbVhIZdKEOfwiJTLogb7Xvw0WrYXRseK DSN6lgkROL0VqFiP8UaaFOwve3mMN4NknD0fFOsmWuXRkNlIfULZVndviCqaOKdzojsk ADBE1ZqH1vjRA7JJWpiAVDgonzRjigJViFzO8rlyoA5yfBI4Mt2jdCEMKbVc3fFP21GN 9kK1GWk2s2qV8Y9hLn1fHiCU2TZdJUuciSY+aKBQ34GrmkivESkPVh6PQynJtg07i8L6 ZP5g== X-Gm-Message-State: AODbwcBDURkKn/vIF5iNXFiQpGgUGbD2XArIXj45EvKBaDOqFgAC2sY+ 5zdAUExes3Hy9xKU/SqEKmDxYlM0Eh8F X-Received: by 10.237.35.237 with SMTP id k42mr19871928qtc.125.1497320075303; Mon, 12 Jun 2017 19:14:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.180.135 with HTTP; Mon, 12 Jun 2017 19:14:34 -0700 (PDT) In-Reply-To: <20170612155315.GK26676@bivouac.eciton.net> References: <1497232768-8993-1-git-send-email-jun.nie@linaro.org> <20170612155315.GK26676@bivouac.eciton.net> From: Jun Nie Date: Tue, 13 Jun 2017 10:14:34 +0800 Message-ID: To: Leif Lindholm Cc: Ard Biesheuvel , Haojian Zhuang , edk2-devel@lists.01.org, Shawn Guo , Jason Liu Subject: Re: [PATCH v2] EmbeddedPkg/MmcDxe: Add alignment for ECSD data X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jun 2017 02:13:22 -0000 Content-Type: text/plain; charset="UTF-8" 2017-06-12 23:53 GMT+08:00 Leif Lindholm : > 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 >> --- >> 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 >>