From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 35FF122280C3E for ; Sun, 7 Jan 2018 21:43:48 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jan 2018 21:48:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,329,1511856000"; d="scan'208";a="191210935" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 07 Jan 2018 21:48:56 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 Jan 2018 21:48:56 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 Jan 2018 21:48:55 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Mon, 8 Jan 2018 13:48:54 +0800 From: "Zeng, Star" To: Meenakshi Aggarwal , "ard.biesheuvel@linaro.org" , "leif.lindholm@linaro.org" , "edk2-devel@lists.01.org" , "Dong, Eric" CC: "Ni, Ruiyu" , "Zeng, Star" Thread-Topic: [edk2] [RFC] SATA : Implemented NXP errata A008402 Thread-Index: AQHTiEGa49/stOPWz0uqNyuQLcNP3KNpd/mA Date: Mon, 8 Jan 2018 05:48:53 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B9F8EE6@shsmsx102.ccr.corp.intel.com> References: <1515410208-14559-1-git-send-email-meenakshi.aggarwal@nxp.com> <1515410208-14559-2-git-send-email-meenakshi.aggarwal@nxp.com> In-Reply-To: <1515410208-14559-2-git-send-email-meenakshi.aggarwal@nxp.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 Subject: Re: [RFC] SATA : Implemented NXP errata A008402 X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jan 2018 05:43:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Do you have a full patch already? Why the PcdPrdtMaxDataLength is defined to 0x3FFFFF, but not 0x400000? Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Meen= akshi Aggarwal Sent: Monday, January 8, 2018 7:17 PM To: ard.biesheuvel@linaro.org; leif.lindholm@linaro.org; edk2-devel@lists.0= 1.org; Zeng, Star ; Dong, Eric Subject: [edk2] [RFC] SATA : Implemented NXP errata A008402 Description: Commands with 4 MB PRD length entries fail if PRD[DBC] is set to the value according to AHCI standard spec. Due to a logic error, 3F_FFFFh is misinterpreted by the device as zero length. Workaround: Set PRD length to 0 when creating a PRD entry for a maximum data transfer size of 4 MB to fix the erratum. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Meenakshi Aggarwal --- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c | 2 +- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf | 1 + MdeModulePkg/MdeModulePkg.dec | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePk= g/Bus/Ata/AtaAtapiPassThru/AhciMode.c index e6de5d6..fb6dc0b 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c @@ -591,7 +591,7 @@ AhciBuildCommand ( if (RemainedData < EFI_AHCI_MAX_DATA_PER_PRDT) { AhciRegisters->AhciCommandTable->PrdtTable[PrdtIndex].AhciPrdtDbc = =3D (UINT32)RemainedData - 1; } else { - AhciRegisters->AhciCommandTable->PrdtTable[PrdtIndex].AhciPrdtDbc = =3D EFI_AHCI_MAX_DATA_PER_PRDT - 1; + AhciRegisters->AhciCommandTable->PrdtTable[PrdtIndex].AhciPrdtDbc = =3D PcdGet32 (PcdPrdtMaxDataLength); } =20 Data64.Uint64 =3D (UINT64)MemAddr; diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf b/M= deModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf index 82d5f7a..8921dd5 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf @@ -70,6 +70,7 @@ =20 [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdAtaSmartEnable ## SOMETIMES_CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdPrdtMaxDataLength =20 # [Event] # EVENT_TYPE_PERIODIC_TIMER ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index 8efad57..b2f9f2b 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -1434,6 +1434,9 @@ # @Prompt Console Output Row of Text Setup gEfiMdeModulePkgTokenSpaceGuid.PcdSetupConOutRow|25|UINT32|0x4000000e =20 + ## This PCD specifies the Maximum data length for a PRD Entry + gEfiMdeModulePkgTokenSpaceGuid.PcdPrdtMaxDataLength|0x3FFFFF|UINT32|0x40= 00000f + [PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx] ## UART clock frequency is for the baud rate configuration. # @Prompt Serial Port Clock Rate. --=20 1.9.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel