From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mx.groups.io with SMTP id smtpd.web10.11316.1583135510376728422 for ; Sun, 01 Mar 2020 23:51:50 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.120, mailfrom: hao.a.wu@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2020 23:51:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,506,1574150400"; d="scan'208";a="243117491" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 01 Mar 2020 23:51:49 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 1 Mar 2020 23:51:48 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 1 Mar 2020 23:51:33 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.206]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.201]) with mapi id 14.03.0439.000; Mon, 2 Mar 2020 15:51:30 +0800 From: "Wu, Hao A" To: "Albecki, Mateusz" , "devel@edk2.groups.io" CC: Marcin Wojtas , "Gao, Zhichao" , "Gao, Liming" Subject: Re: [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor command processing Thread-Topic: [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor command processing Thread-Index: AQHV7ZLuFgCMrLYm2ket/MSdXCtXC6g08bXQ Date: Mon, 2 Mar 2020 07:51:30 +0000 Message-ID: References: <20200227172526.5876-1-mateusz.albecki@intel.com> In-Reply-To: <20200227172526.5876-1-mateusz.albecki@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: hao.a.wu@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: Albecki, Mateusz > Sent: Friday, February 28, 2020 1:25 AM > To: devel@edk2.groups.io > Cc: Albecki, Mateusz; Wu, Hao A; Marcin Wojtas; Gao, Zhichao; Gao, Liming > Subject: [PATCHv3 0/5] MdeModulePkg/SdMmcPciHcDxe: Refactor > command processing >=20 > This patch series aims to refactor command processing to achieve followin= g >=20 > - Trace the failing TRB packets to see what commands are failing and for > what reasons > - Get the response data even if data transfer timed out to allow easier > debugging > - Fix the PIO mode which is currently completely broken. >=20 > Changes in v2: > - Moved verbose packet prints after the command is finished to capture th= e > successfull command response > - Fixed the debug prints > - PIO data will be moved with width matching the alignment of the block s= ize. > For majority of transfers that means UINT32 width. >=20 > Changes in v3 > - Fixed the memory map in non DMA case(PATCHv3 4/5) >=20 > Tests performed: > - Each patch in the series has passed boot from eMMC with ADMAv3 data > transfer mode > - SDMA based boot has been tested with the full patch series > - PIO based boot has been tested with the full patch series > - PIO based data transfer has been additionally tested by creating and > modyfing a file in EFI shell > - Tested async PIO transfer - results below >=20 > Tests performed v3: > - Booted OS in ADMA mode(V3 64bit) > - Booted OS in PIO mode >=20 > Async test results: > After fixing memory map issue PIO works reliably in both async and sync > cases on all paltforms. >=20 > All tests were performed with eMMC in HS400 @200MHz clock frequency. Tests done on my side: A. Contents on SD card and eMMC device can be successfully accessed (Both A= DMA and PIO mode). B. Aync RW tests pass for SD card and eMMC device (Both ADMA and PIO mode). So for the series, Tested-by: Hao A Wu Reviewed-by: Hao A Wu I will hold and push the series AFTER the upcoming stable tag. Best Regards, Hao Wu >=20 > For easier review & integration patch has been pushed here: > Whole series: > https://github.com/malbecki/edk2/tree/emmc_transfer_refactor >=20 > Cc: Hao A Wu > Cc: Marcin Wojtas > Cc: Zhichao Gao > Cc: Liming Gao >=20 >=20 > Mateusz Albecki (5): > MdeModulePkg/SdMmcPciHcDxe: Enhance driver traces > MdeModulePkg/SdMmcPciHcDxe: Read response on command completion > MdeModulePkg/SdMmcPciHcDxe: Refactor data transfer completion > MdeModulePkg/SdMmcPciHcDxe: Do not map memory for non DMA > transfer > MdeModulePkg/SdMmcPciHcDxe: Fix PIO transfer mode >=20 > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 4 + > MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 609 > ++++++++++++++++----- > 2 files changed, 478 insertions(+), 135 deletions(-) >=20 > -- > 2.14.1.windows.1