From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20080.outbound.protection.outlook.com [40.107.2.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 90B2921E62BB5 for ; Fri, 1 Sep 2017 02:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=PmNXr6ZJJq988cj21RKNwQZibaKpaDs2P7PMKz0VRLs=; b=tzWudQs1NR50r3LuOTDVYCSDecfEP++wCckeOzoTHCkXydgZOAssua1sd33J32Wyeqjb4lUfoxbRB8FfoeZJLMTapHnBVweZ06PttO4d0EVZloDBxOSNlt4eLIiCq36bHfYkWgQdUECNXiimsoie0+K9al0dwxTyh+G2DA7gRXY= Received: from DB5PR04MB0998.eurprd04.prod.outlook.com (10.161.199.12) by DB5PR04MB1237.eurprd04.prod.outlook.com (10.162.156.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Fri, 1 Sep 2017 09:32:39 +0000 Received: from DB5PR04MB0998.eurprd04.prod.outlook.com ([fe80::b598:82e9:1137:1d56]) by DB5PR04MB0998.eurprd04.prod.outlook.com ([fe80::b598:82e9:1137:1d56%17]) with mapi id 15.20.0013.012; Fri, 1 Sep 2017 09:32:39 +0000 From: Meenakshi Aggarwal To: Jun Nie , Leif Lindholm CC: "edk2-devel@lists.01.org" , Haojian Zhuang Thread-Topic: [edk2] [PATCH 2/2] SD : Updated CMD 6 implememtation. Thread-Index: AQHTIWqJ4QMoYdWOyU+fDBYrDUXGvKKeYEAAgAAr6QCAATm8sA== Date: Fri, 1 Sep 2017 09:32:39 +0000 Message-ID: References: <1504102859-13477-1-git-send-email-meenakshi.aggarwal@nxp.com> <1504102859-13477-2-git-send-email-meenakshi.aggarwal@nxp.com> <20170831120614.zhnmv34s4wuvsub2@bivouac.eciton.net> In-Reply-To: Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=meenakshi.aggarwal@nxp.com; x-originating-ip: [192.88.169.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB5PR04MB1237; 6:hbS+n6HVKqRIHP+54yD/JchdrxAiTLC0o7SEkeVFcyTHL5DlvEN/G5hqi3l6hHAXGIeXIjpquSL208rK4LmXWK/+H/ogHWpl/zY0ormmx13Dlp6stMOlcvMkYdUkLQ3kSZXpeckcgClD68oYeWMQsR4S9tvIVtPPsg9apQ5qiCpR9w3xdaBwdC6//soBpxg/Q1lhUd/8cHEbdazQXfQKIZEsZkzuxrVMMD6CQ8b/VNsaOZfuNJvLL0AHzTyFlNnNPkXg0AUc6hETWw3rbbCT8e7Uw5ZFL8yogxr0tYASnVLTa6BX7QG3lF4hGqjwSIou+7KoedbPi/35Rxh453mOhg==; 5:ZaO90c86T3IIgDOvCIROA2jO7MOKcJoW3dC8BHVSyzQMhblZ1rGSW4ai5/AYlvZWCiarTGM5Q82XFw8ELFgUCidn7JFWvl6nsVqWm5dk79yamsrVHgUA9ao7mrBA+U6sZH/pfiitq2LGK0n6g8neoQ==; 24:h/9o+IYUaVK4V5cZ5Xmsfe2XbkwPZUIP4Sc6A4nAuw2WqfDpF+y6mubT3KRX6OhpN949/zVIW6zIVywTeou+rV/D6EUQMkdeqnDy442IhlY=; 7:zXHGqMvRH6Rty4XJUS78fOfDlON2T/YMMj5bzg0ioX7Yw7Ad2HgDk5QpTqDZiKB2/108RV4+ZN2c3ARBAj2pjchhQP+ibJIr7KHoD7Id1PnVbo/K/c+E4hlzhsSQJFtVxL1xuPfSlQV6KMAzb06wS6AqzI1tsY9gV630k0flatRevWGk4rmY64qB+aGxRb29hhAIERlEET6Xk3ZHVSACBlm1bJBu2s+RQl4JfFIb4eA= x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-correlation-id: 4be14263-3215-4474-b10d-08d4f11c6379 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:DB5PR04MB1237; x-ms-traffictypediagnostic: DB5PR04MB1237: x-exchange-antispam-report-test: UriScan:(131327999870524)(185117386973197)(162533806227266); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(3002001)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123562025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DB5PR04MB1237; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DB5PR04MB1237; x-forefront-prvs: 0417A3FFD2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(39860400002)(377454003)(189002)(199003)(24454002)(13464003)(81166006)(81156014)(66066001)(8676002)(6436002)(93886005)(6506006)(2950100002)(6306002)(9686003)(6246003)(54906002)(8936002)(229853002)(53936002)(33656002)(5250100002)(4326008)(2900100001)(99286003)(189998001)(14454004)(105586002)(55016002)(68736007)(106356001)(5660300001)(15650500001)(54356999)(50986999)(966005)(2906002)(97736004)(7696004)(101416001)(76176999)(478600001)(53546010)(3660700001)(102836003)(3280700002)(6116002)(7736002)(3846002)(575784001)(86362001)(74316002)(305945005)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB1237; H:DB5PR04MB0998.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2017 09:32:39.5130 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB1237 Subject: Re: [PATCH 2/2] SD : Updated CMD 6 implememtation. 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: Fri, 01 Sep 2017 09:30:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 SGkgTGVpZiBhbmQgSnVuLA0KDQoNClRoYW5rcyBmb3IgeW91ciByZXZpZXcuDQoNCg0KTXkgY29t bWVudHMgYXJlIGlubGluZWQuDQoNClJlZ2FyZHMsDQpNZWVuYWtzaGkNCg0KPiAtLS0tLU9yaWdp bmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBKdW4gTmllIFttYWlsdG86anVuLm5pZUBsaW5hcm8u b3JnXQ0KPiBTZW50OiBUaHVyc2RheSwgQXVndXN0IDMxLCAyMDE3IDg6MTMgUE0NCj4gVG86IExl aWYgTGluZGhvbG0gPGxlaWYubGluZGhvbG1AbGluYXJvLm9yZz47IE1lZW5ha3NoaSBBZ2dhcndh bA0KPiA8bWVlbmFrc2hpLmFnZ2Fyd2FsQG54cC5jb20+DQo+IENjOiBlZ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