From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0631.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1e::631]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E67881A1DF3 for ; Tue, 9 Aug 2016 04:40:29 -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=+iZDu/0PrAbX74gLehbUrXMgLT2ChiwbRWkhYLet/Ws=; b=rzew+HoIGAgnfLEfbejri0JZ2lLqyu1B4/x7mt1aqQfhQbZP4MKleS6NVbP2Ge+fKeUvhnX7uqWRy7STHe99qVmQo+rjd7QfiyoXhO3wEiex0MnxxqPGLNKiT2Sxww8Urscxn75gn0WQ59PbVFAPbQGxdhCCD79Yz1UJMwTNN+c= Received: from VI1PR0401MB2000.eurprd04.prod.outlook.com (10.166.141.16) by VI1PR0401MB1998.eurprd04.prod.outlook.com (10.166.141.14) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.557.8; Tue, 9 Aug 2016 11:40:25 +0000 Received: from VI1PR0401MB2000.eurprd04.prod.outlook.com ([10.166.141.16]) by VI1PR0401MB2000.eurprd04.prod.outlook.com ([10.166.141.16]) with mapi id 15.01.0557.009; Tue, 9 Aug 2016 11:40:25 +0000 From: Shaveta Leekha To: "Tian, Feng" , Linaro UEFI Mailman List , "edk2-devel@lists.01.org" Thread-Topic: SATA AHCI issue Thread-Index: AdHdlQoTkMMxDwLeSvqGPu7iPmB3BgAAz1fgAAJ5bNAE7gJn8AAC2RPgAAHeECAAHhfkUAAKpG/QAAELvtAAABEXsAAHc0Vw Date: Tue, 9 Aug 2016 11:40:25 +0000 Message-ID: References: <7F1BAD85ADEA444D97065A60D2E97EE538817A7E@SHSMSX101.ccr.corp.intel.com> <7F1BAD85ADEA444D97065A60D2E97EE5388217A4@SHSMSX101.ccr.corp.intel.com> <7F1BAD85ADEA444D97065A60D2E97EE538821A38@SHSMSX101.ccr.corp.intel.com> In-Reply-To: <7F1BAD85ADEA444D97065A60D2E97EE538821A38@SHSMSX101.ccr.corp.intel.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shaveta.leekha@nxp.com; x-originating-ip: [192.88.169.1] x-ms-office365-filtering-correlation-id: d362bd68-5135-416f-efe2-08d3c049f45b x-microsoft-exchange-diagnostics: 1; VI1PR0401MB1998; 6:ncIxUp27gSd3TUa0PZPUayzH4XnggD+Z7xUpkzUELq1T0Wm5TKgfgSxjcxEPk5woYaQ06p92nD+GqGuDR8Ya87JPE63PnqK4m3YKe9uIneW5FFfvBn1fmYCsxXWYYDQ7yOojL2wmtNao4GJZBJfgDEdtRupajQAB64OLSi5cUYHIvtAza9Mdq/vpcLmMwGbFq4iCjk/ICs9qyzJLVvS6GenKVPN36lXLGRApCnwVYd10rUqk9eOFMfple2Fev4aHDb6hODC7ayizuys5ywFG2GRChv6w91cQhjtNe5vsPFMe+6VgHG/+x/IU/2hZnSOlPIQvbfnSsp1LU5C7zNvoaA==; 5:O6Yel7l9798KNFWaOfRyds0S5f9tI6IbddTmoOh/h/rGzY9AT6mYpw32MbpejQA8KXFMvFdmYdoUJxygIObKoIfAzTCpIoiiVeUbcOxUnMf9DmHDtOjsZYtYCtSuyWw6jxb9npk8iNhOB2dFSaJEvw==; 24:gOIEYUmlGmGP/Es+X8/x8iFCrze8e29UcXwfGUQAFQ6mJ7DagRihEI7n0WE3UZlmSeGTnzufB2D9MqRK3ir5eHcrO2GjDZgnYEKnEyQ07gk=; 7:ueerHDwZV611luMuHG1Jsb4MPgFcGrmfdQ5ttixll3bfx0Q02MO6eVEU5eeoDhGYClfuSxRDExJGL8uDZ6UCBn1HM0KqfddGKBQf3yDK44lnReWsyqyOgguJTmvL+TZjF1PBDuUnTDu4EXSu4VTksMifDN/XjFqPL23b3FwByOAkzabUZC3yYkWXAocIJykrI6Qfk1d16f7lOQ7syV0mRy2BlrOZhONKodqiM/k9e99+ES/rbCMpygP4SFbLNTkW x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR0401MB1998; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(162533806227266)(1553240931313)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:VI1PR0401MB1998; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0401MB1998; x-forefront-prvs: 0029F17A3F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(199003)(377454003)(13464003)(189002)(2900100001)(7846002)(2950100001)(19580405001)(19580395003)(7736002)(7696003)(122556002)(92566002)(6116002)(76576001)(77096005)(33656002)(102836003)(3846002)(2906002)(106356001)(11100500001)(5001770100001)(93886004)(66066001)(87936001)(74316002)(586003)(15975445007)(54356999)(76176999)(105586002)(50986999)(3660700001)(9686002)(8676002)(10400500002)(189998001)(2501003)(8936002)(107886002)(575784001)(305945005)(3480700004)(86362001)(3280700002)(101416001)(81156014)(81166006)(68736007)(5002640100001)(97736004)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0401MB1998; H:VI1PR0401MB2000.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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: 09 Aug 2016 11:40:25.3245 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB1998 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: Tue, 09 Aug 2016 11:40:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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