From nobody Wed May 1 09:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503257632725150.27620421383017; Sun, 20 Aug 2017 12:33:52 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0989A21D18254; Sun, 20 Aug 2017 12:31:18 -0700 (PDT) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 63F2C21D2E634 for ; Sun, 20 Aug 2017 12:31:16 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B1ED620A76; Sun, 20 Aug 2017 15:33:46 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 20 Aug 2017 15:33:46 -0400 Received: from localhost.localdomain (c-71-226-23-158.hsd1.fl.comcast.net [71.226.23.158]) by mail.messagingengine.com (Postfix) with ESMTPA id 22B5A24233; Sun, 20 Aug 2017 15:33:46 -0400 (EDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=miv+aIEn9+4iuCG+xYeufra+GIqE3cpG4w1zmqZeU Xk=; b=awa+sOtU3GytzzFSUccdG2GKM0x8QhykMW9JqkS+xTWHJbX2OXOb0/r7n o6bvmSR9981KPEO+EieCvRv6LM9qY8TFaF63JFy+ZkYFLE9b/O1b7FuA8U+BV6sK QTcIU72S4JN/CAxK2WIB8XNTbu57IJ4Pdjxj/8/BN+Rg9n9DhFiKRWxEXhP8/wBr Rc1YCyyqXo9N//jX7VRUBXl1okoKNzUH3KrfhqGBandNcgyMsMTYzlFd1ifwYy1a K56NVbgCTiopFldFzfDwT9wANb49vUMBD0mY/t5ICXVtfM7tikfHnimp/Mkq34ah 2flQQDPGZfO3VzVv0Y40iQAw0n5Ng== X-ME-Sender: X-Sasl-enc: LqwMryM6bFGXOAE+kxSQica1rXtScy6rUu/HY+I7b01p 1503257626 From: Alan Ott To: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Sun, 20 Aug 2017 15:33:33 -0400 Message-Id: <20170820193335.21471-2-alan@softiron.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170820193335.21471-1-alan@softiron.com> References: <20170820193335.21471-1-alan@softiron.com> Subject: [edk2] [PATCH v2 edk2-platforms 1/3] Silicon/AMD/Styx: Make PcdSataPortMode 32 bits 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: , Cc: Alan Ott , edk2-devel@lists.01.org, linaro-uefi@lists.linaro.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Extra bits are needed to accomodate all 14 SATA ports Signed-off-by: Alan Ott Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Ard Biesheuvel --- Silicon/AMD/Styx/AmdStyx.dec | 2 +- Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Silicon/AMD/Styx/AmdStyx.dec b/Silicon/AMD/Styx/AmdStyx.dec index ddd5bf4..c6eebe6 100644 --- a/Silicon/AMD/Styx/AmdStyx.dec +++ b/Silicon/AMD/Styx/AmdStyx.dec @@ -54,7 +54,7 @@ gAmdStyxTokenSpaceGuid.PcdSata0CtrlAxiSlvPort|0xE0300000|UINT32|0x000200= 00 gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8|UINT8|0x00020001 gAmdStyxTokenSpaceGuid.PcdSataPi|0xFF|UINT32|0x00020002 - gAmdStyxTokenSpaceGuid.PcdSataPortMode|0|UINT16|0x00020003 + gAmdStyxTokenSpaceGuid.PcdSataPortMode|0|UINT32|0x00020003 gAmdStyxTokenSpaceGuid.PcdSataPortMpsp|TRUE|BOOLEAN|0x00020004 gAmdStyxTokenSpaceGuid.PcdSataSmpsSupport|FALSE|BOOLEAN|0x00020005 gAmdStyxTokenSpaceGuid.PcdSataSssSupport|TRUE|BOOLEAN|0x00020006 diff --git a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c = b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c index 1958d91..78c6819 100644 --- a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c +++ b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c @@ -110,8 +110,8 @@ InitializeSataController ( SataChPerSerdes =3D FixedPcdGet8 (PcdSataNumChPerSerdes); =20 for (PortNum =3D 0; PortNum < SataPortCount; PortNum +=3D SataChPerSerde= s) { - EvenPort =3D (UINT32)(FixedPcdGet16 (PcdSataPortMode) >> (PortNum * 2)= ) & 3; - OddPort =3D (UINT32)(FixedPcdGet16 (PcdSataPortMode) >> ((PortNum+1) *= 2)) & 3; + EvenPort =3D (UINT32)(FixedPcdGet32 (PcdSataPortMode) >> (PortNum * 2)= ) & 3; + OddPort =3D (UINT32)(FixedPcdGet32 (PcdSataPortMode) >> ((PortNum+1) *= 2)) & 3; SataPhyInit ((StartPort + PortNum) / SataChPerSerdes, EvenPort, OddPor= t); } =20 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed May 1 09:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503257635222677.2610250354317; Sun, 20 Aug 2017 12:33:55 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 465B621D49108; Sun, 20 Aug 2017 12:31:18 -0700 (PDT) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 DB0A321D2E649 for ; Sun, 20 Aug 2017 12:31:16 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3F6FB20A80; Sun, 20 Aug 2017 15:33:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 20 Aug 2017 15:33:47 -0400 Received: from localhost.localdomain (c-71-226-23-158.hsd1.fl.comcast.net [71.226.23.158]) by mail.messagingengine.com (Postfix) with ESMTPA id AA38C24775; Sun, 20 Aug 2017 15:33:46 -0400 (EDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=6UAKEk04NQ4PplQH61k9S/UofZ/nV44m/3uxRfGmL Ko=; b=mqaZwXqbElLNIyDLJf5mSfmNy0eiDUv6tDi/KFVdkwJw+d88eQuFKEcF0 OukuuTlMToUVVBFSS1nsGGn9tDy5QsJWefNsfbuNwuO5lp4ALFQXnQIPbvnudFpI X9NkxTpMuyV1DOds2BtSagju1a0oMhuJCDTKMPvynuWToGDbxzQagZFfYNimeTm9 HCEKGYch4EXRhcRhmBsmuUJqZrkH+TUMssgoC5IFmeYBvoQWCfnrTqukMMq/cfmu Fll+i/itT+p2l9hFY8ryNnlQUCAIvdWzvwf0Op6Eh99S0JyWDUk7C5GOMHbrOO9s fNJUZV3t405mdDomZuQqpvvW/UWYw== X-ME-Sender: X-Sasl-enc: LqwcojAlY0KOKBMrhgqXlsG1rXtScy6rUu/HY+I7b01p 1503257626 From: Alan Ott To: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Sun, 20 Aug 2017 15:33:34 -0400 Message-Id: <20170820193335.21471-3-alan@softiron.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170820193335.21471-1-alan@softiron.com> References: <20170820193335.21471-1-alan@softiron.com> Subject: [edk2] [PATCH v2 edk2-platforms 2/3] Silicon/AMD/Styx: Use PcdSataPortMode properly for two controllers 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: , Cc: Alan Ott , edk2-devel@lists.01.org, linaro-uefi@lists.linaro.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The previous implementation used only the lower bits for both the first and second SATA controller, when the upper bits should have been used for the second SATA controller. Also ASSERT that SataChPerSerdes is 2, because the even/odd logic doesn't work if it's not. Signed-off-by: Alan Ott Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Ard Biesheuvel --- Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c = b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c index 78c6819..ea49cae 100644 --- a/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c +++ b/Silicon/AMD/Styx/Drivers/StyxSataPlatformDxe/InitController.c @@ -109,10 +109,15 @@ InitializeSataController ( =20 SataChPerSerdes =3D FixedPcdGet8 (PcdSataNumChPerSerdes); =20 - for (PortNum =3D 0; PortNum < SataPortCount; PortNum +=3D SataChPerSerde= s) { + // + // SataChPerSerdes must be 2 for the Even/Odd logic in the loop below + // + ASSERT(SataChPerSerdes =3D=3D 2); + + for (PortNum =3D StartPort; PortNum < SataPortCount + StartPort; PortNum= +=3D SataChPerSerdes) { EvenPort =3D (UINT32)(FixedPcdGet32 (PcdSataPortMode) >> (PortNum * 2)= ) & 3; OddPort =3D (UINT32)(FixedPcdGet32 (PcdSataPortMode) >> ((PortNum+1) *= 2)) & 3; - SataPhyInit ((StartPort + PortNum) / SataChPerSerdes, EvenPort, OddPor= t); + SataPhyInit (PortNum / SataChPerSerdes, EvenPort, OddPort); } =20 // --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Wed May 1 09:42:13 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503257637704140.1339861348547; Sun, 20 Aug 2017 12:33:57 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 7E08121D1824C; Sun, 20 Aug 2017 12:31:20 -0700 (PDT) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 6E8CE21D1824C for ; Sun, 20 Aug 2017 12:31:17 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C707E20A90; Sun, 20 Aug 2017 15:33:47 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Sun, 20 Aug 2017 15:33:47 -0400 Received: from localhost.localdomain (c-71-226-23-158.hsd1.fl.comcast.net [71.226.23.158]) by mail.messagingengine.com (Postfix) with ESMTPA id 36DCF24233; Sun, 20 Aug 2017 15:33:47 -0400 (EDT) X-Original-To: edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=JmREatgrIPE424LRDIWF78ZQpQs7Y1wBSC6yzzKIF fU=; b=Sa8YGfinDZx3Y8JLhSeICB4J9fmRyvrkPDu7F/hMNgQHrGViK+Bj+YAQ2 p1RZgKVn/4kCRbauK7GZAS9dyRCc3hBU+CXxEXXeZ9zdyXxdFpM+MUgYM8W696Ri cv6X09WGo/CPFtcnBHGTsqAqRbvGqlgrqDZd8ozjk4MjEE7eixEeIThYLwjyKrp8 plf5Qq7JG83cRRxLj5eirZnUZC4wo6C5OwNr23ByJT3xd3HJp+rD+u9YY5S7jmrk H5Kwx+hXvC1DEkNqY91se9JrPdPZ8c8ut5Cv1qstFIGxQy8sOIqSB8fIMicrf4Vs mY9OZgPHLfI1kWi+4NYeSVW0QHLRw== X-ME-Sender: X-Sasl-enc: 0iOQT7mJF5QmAd18Wfmr1LnPpBC6oYwOdXx9ATOQL/qT 1503257627 From: Alan Ott To: leif.lindholm@linaro.org, ard.biesheuvel@linaro.org Date: Sun, 20 Aug 2017 15:33:35 -0400 Message-Id: <20170820193335.21471-4-alan@softiron.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170820193335.21471-1-alan@softiron.com> References: <20170820193335.21471-1-alan@softiron.com> Subject: [edk2] [PATCH v2 edk2-platforms 3/3] Platform/AMD/OverdriveBoard: Re-enable the second SATA Controller 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: , Cc: Alan Ott , edk2-devel@lists.01.org, linaro-uefi@lists.linaro.org MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The comment indicating that only the first SATA controller is operational on SoftIron-branded OverDrive 3000 boards is incorrect. Re-enable the second SATA controller. Signed-off-by: Alan Ott Contributed-under: TianoCore Contribution Agreement 1.0 Reviewed-by: Ard Biesheuvel --- Platform/AMD/OverdriveBoard/OverdriveBoard.dsc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc b/Platform/AMD/= OverdriveBoard/OverdriveBoard.dsc index f256ffb..2881de3 100644 --- a/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc +++ b/Platform/AMD/OverdriveBoard/OverdriveBoard.dsc @@ -409,14 +409,10 @@ DEFINE DO_FLASHER =3D FALSE gArmTokenSpaceGuid.PcdGicDistributorBase|0xE1110000 gArmTokenSpaceGuid.PcdGicInterruptInterfaceBase|0xE112F000 =20 - # - # AMD's B1 based Overdrive has 14 SATA ports across 2 controllers. Howev= er, - # it appears that Softiron's Overdrive 3000, which is also B1 based, does - # not have the second SATA controller enabled, and any attempts to use it - # will crash the firmware. So use the first controller only. - # + # SATA Ports gAmdStyxTokenSpaceGuid.PcdSata0PortCount|8 - gAmdStyxTokenSpaceGuid.PcdSataPortMode|0xffff + gAmdStyxTokenSpaceGuid.PcdSata1PortCount|6 + gAmdStyxTokenSpaceGuid.PcdSataPortMode|0x0fffffff =20 # PCIe Support gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0xF0000000 --=20 2.9.3 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel