From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ml01.01.org (Postfix) with ESMTP id 51BCD1A1DF3 for ; Tue, 9 Aug 2016 22:19:45 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 09 Aug 2016 22:19:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,498,1464678000"; d="scan'208";a="1038404138" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 09 Aug 2016 22:19:12 -0700 Received: from fmsmsx117.amr.corp.intel.com (10.18.116.17) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 9 Aug 2016 22:19:11 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx117.amr.corp.intel.com (10.18.116.17) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 9 Aug 2016 22:19:11 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.8]) by shsmsx102.ccr.corp.intel.com ([169.254.2.147]) with mapi id 14.03.0248.002; Wed, 10 Aug 2016 13:19:09 +0800 From: "Tian, Feng" To: Shaveta Leekha , Linaro UEFI Mailman List , "edk2-devel@lists.01.org" CC: "Tian, Feng" Thread-Topic: SATA AHCI issue Thread-Index: AdHdlQoTkMMxDwLeSvqGPu7iPmB3BgAAz1fgAAJ5bNAE7gJn8AAC2RPgAAHeECAAHhfkUAAKpG/QAAELvtAAABEXsAAHc0VwACURGyA= Date: Wed, 10 Aug 2016 05:19:09 +0000 Message-ID: <7F1BAD85ADEA444D97065A60D2E97EE538821D8C@SHSMSX101.ccr.corp.intel.com> References: <7F1BAD85ADEA444D97065A60D2E97EE538817A7E@SHSMSX101.ccr.corp.intel.com> <7F1BAD85ADEA444D97065A60D2E97EE5388217A4@SHSMSX101.ccr.corp.intel.com> <7F1BAD85ADEA444D97065A60D2E97EE538821A38@SHSMSX101.ccr.corp.intel.com> In-Reply-To: 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 Subject: Re: SATA AHCI issue X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2016 05:19:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable PRD entries are organized like AHCI spec Figure 13 said. Thanks Feng -----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com]=20 Sent: Tuesday, August 9, 2016 7:40 PM To: Tian, Feng ; Linaro UEFI Mailman List ; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue Hi Feng, Yes, I am using Tftp to get the file on HDD. Have tried only one HardDisk, will try SATA disk from other vendors also, t= o get to the root cause. Will also try copying data from SATA to SATA. Are PRD entries aligned in EDK2 code base? (I mean they are aligned on whic= h boundary? 16 Byte? 4KB?) Best Regards, Shaveta -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Tian= , Feng Sent: Tuesday, August 09, 2016 1:38 PM To: Shaveta Leekha ; Linaro UEFI Mailman List ; edk2-devel@lists.01.org Cc: Tian, Feng Subject: Re: [edk2] SATA AHCI issue Hi, Shaveta I saw you are using TFTP cmd to do the test? Did you ever test copying file= from usb stick to the SATA HDD? I just copied a 70M file from usb to SATA and from SATA to SATA. It works w= ell. Does this issue happen at all of your HDDs or only one specific brand model= ? Do you have other helpful info for us to narrow down? Thanks Feng -----Original Message----- From: Shaveta Leekha [mailto:shaveta.leekha@nxp.com]=20 Sent: Tuesday, August 9, 2016 4:03 PM To: Tian, Feng ; Linaro UEFI Mailman List ; edk2-devel@lists.01.org Subject: RE: SATA AHCI issue Hi Feng, Complete stack is: MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxe.inf MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf FatPkg/FatPei/FatPei.inf FatPkg/EnhancedFatDxe/Fat.inf Best Regards, Shaveta -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shav= eta Leekha Sent: Tuesday, August 09, 2016 1:07 PM To: Tian, Feng ; Linaro UEFI Mailman List ; edk2-devel@lists.01.org Subject: Re: [edk2] SATA AHCI issue Hi Feng, Yes for 30MB file, multiple PRD entries would have been created. But I able to write file only upto 4MB size. The protocol stack I am using is: Generic AtaBusDxe driver use EfiAtaPassThruProtocol Generic AtaAtapiPassThr= u driver consumes "EfiIdeControllerInitProtocol" and produces "EfiAtaPassTh= ruProtocol" which is consumed by generic AtaBusDxe driver Platform-specific= SATA driver that produces "EfiIdeControllerInitProtocol I am writing SATA HDD at File level. HDD is formatted with FAT32 which is identified as FileSytem by FATPKG. Snippet of writing onto SATA HDD Filesystem is pasted below. Thanks and Regards, Shaveta UEFI Interactive Shell v2.1 EDK II UEFI v2.50 (LS2080a RDB board EFI Jul 25 2016 00:00:33, 0x00000000) Mapping= table FS0: Alias(s):F6a0a:;BLK0: PciRoot(0x0)/Pci(0x0,0x0)/Sata(0x0,0x0,0x0) Shell>FS0: FS0:\> tftp 192.168.3.161 test2 test Downloading the file 'test2' [=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D>] 0 Kb -----Original Message----- From: Tian, Feng [mailto:feng.tian@intel.com] Sent: Tuesday, August 09, 2016 8:30 AM To: Shaveta Leekha ; Linaro UEFI Mailman List ; edk2-devel@lists.01.org Cc: Tian, Feng Subject: RE: SATA AHCI issue Hi, Shaveta No, we will create multiple PRDs if the transfer length is larger than 4M. = each PRD could represent a 4M transfer request and the maximum number of PR= D for each command is 65535. How do you access the HDD? At block level or file level? It happens at all = HDDs or only one specific brand model? Thanks Feng -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shav= eta Leekha Sent: Monday, August 8, 2016 8:07 PM To: Linaro UEFI Mailman List ; edk2-devel@lis= ts.01.org Subject: Re: [edk2] SATA AHCI issue Hi, As per the spec and the code in "AhciMode.c" // According to AHCI 1.3 spec, a PRDT entry can point to a maximum 4MB da= ta block. Does it mean, only one PRD entry is getting transferred successfully? But as the data I am writing onto SATA HDD is 30MB big, what about the rest= of PRDs? What could be went here? Thanks and Regards, Shaveta -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Shav= eta Leekha Sent: Monday, August 08, 2016 5:24 PM To: Linaro UEFI Mailman List ; edk2-devel@lis= ts.01.org Subject: [edk2] SATA AHCI issue Hi, I am facing one Timeout issue while writing big file over my SATA HDD. It in the code of "AhciDmaTransfer " from file AhciMode.c // // Wait for command compelte // FisBaseAddr =3D (UINTN)AhciRegisters->AhciRFis + Port * sizeof (EFI_AHCI_= RECEIVED_FIS); Offset =3D FisBaseAddr + EFI_AHCI_D2H_FIS_OFFSET; Status =3D AhciWaitMemSet ( Offset, EFI_AHCI_FIS_TYPE_MASK, EFI_AHCI_FIS_REGISTER_D2H, This MemSet check fails, what = could be the issue? Timeout ); TimeOut occur while checking FIS_REGISTER_D2H. Any idea about this time out issue? Can it be "Due to un-aligned PRD? Are there multiple PRDs created or single= PRD?" As I am able to write maximum 4MB file on SATA HDD, file above 4MB size fai= led by giving TIMEOUT_ERROR. Thanks and Regards, Shaveta _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel