From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1cjHtd-0000kA-B8 for mharc-grub-devel@gnu.org; Wed, 01 Mar 2017 22:59:17 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50798) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cjHtb-0000k2-Ll for grub-devel@gnu.org; Wed, 01 Mar 2017 22:59:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cjHtY-0002BV-JF for grub-devel@gnu.org; Wed, 01 Mar 2017 22:59:15 -0500 Received: from mail-lf0-x241.google.com ([2a00:1450:4010:c07::241]:35119) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cjHtY-0002AI-C9 for grub-devel@gnu.org; Wed, 01 Mar 2017 22:59:12 -0500 Received: by mail-lf0-x241.google.com with SMTP id z127so4730468lfa.2 for ; Wed, 01 Mar 2017 19:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=isz4P+SHxuIvaCKb6izG3fonIVSyNcCBKGJ30vvNJYw=; b=eW2kkr6VG42AkXwfMTlEWI7kyKjoK2l88yNLKFr0j80xlcrxYq3AMFBC5P4I8U0oa/ 6J0F6mxwYCVGFdTwZVQ1w3ycElsWxopsChr5Tiwz1IGsjwENc0hwJXe63USAFQq+OYY7 tWq09yhQpBkjug6jGYAohVSyDRTloV2+sGPckscaNb6Aj220D8o0VPaNKMSqQbpgvCX1 V8m3K+lWFq4NNjIbraz9+TEfibZRG+eofZ+4gZ0Hw4b7mOcrEymcwYM6bgMAh2KesUAy EGa6PtYsf5Xc8WoDGHgMMbZFEE8udjqQ4PE3lb5uCv+Vdn/TFqLX0MKcFSeDtEugpnwr hUnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=isz4P+SHxuIvaCKb6izG3fonIVSyNcCBKGJ30vvNJYw=; b=awrE/F5pAiv16pevWlYamUfl93ujfRpY+TNUfEZpYVuJWP1fW6Qrsk8a9SfxYACyDv cZFhu1inV98vj5TcLdHfYA8/COhc8NW5W49vZUJtzYlaF/wemfbKM4EGHsqNmAkVsR+F 1rgd9msgCf0gxqLt8fl/NpdN0aQ9biXdgCrCkzHF6+US6nedDjb5gs+Mgt1JQDcPmqKg JlxwARtqTjm0CAbhpBGx4bAuURPV0Riy0DDc44jlOVlvazK2xKJ47PWF+hmGj0kQYztr R/xDLoWohDE+gRRd6687LD+mqeHDmNAd+YDY5LldH8a2U66rfVcavEx8uhxdl9RwFDyq noEw== X-Gm-Message-State: AMke39lqxc7cd6MON9vHMgkIzzjFqPsJvibEyKapH/eoPaMG1k1k5I3NctlmsWKOwvDkBQ== X-Received: by 10.25.125.213 with SMTP id y204mr3786263lfc.161.1488427149536; Wed, 01 Mar 2017 19:59:09 -0800 (PST) Received: from [192.168.1.6] (ppp109-252-90-38.pppoe.spdop.ru. [109.252.90.38]) by smtp.gmail.com with ESMTPSA id 187sm1445444ljf.32.2017.03.01.19.59.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Mar 2017 19:59:08 -0800 (PST) Subject: Re: USB3.0 XHCI support on GRUB2 To: Gailu Singh , =?UTF-8?Q?Bj=c3=b8rn_Forsman?= References: Cc: The development of GNU GRUB From: Andrei Borzenkov Message-ID: Date: Thu, 2 Mar 2017 06:59:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::241 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2017 03:59:16 -0000 02.03.2017 06:00, Gailu Singh пишет: > Thanks for the update. I will try your patches on Apollo lake and report > back the results. Intel strategy seems to be XHCI only option on newer > boards so sooner or later xhci support is required in Grub. Thanks for your > effort to take initiative. > On physical platforms grub normally relies on firmware to access devices. What exact problem do you solve? Why do you need direct xHCI access? What firmware this board has (I presume, EFI)? > On Wed, Mar 1, 2017 at 4:07 PM, Bjørn Forsman > wrote: > >> On 1 March 2017 at 07:57, Andrei Borzenkov wrote: >>> Yes, Bjørn Forsman intended to work on implementation. >> >> So now is apparently a good time to tell you about the status of that >> implementation :-) >> >> >> The good: >> >> I ported the xHCI driver from Coreboot / libpayload to GRUB. In basic >> tests, it works. (I tested a Lenovo G50-80 laptop with Intel Wildcat >> Point-LP USB xHCI controller [8086:9cb1].) >> >> >> The bad: >> >> The code doesn't support HUBs and completely hangs on one xHCI >> controller I tested (Intel NUC6i5SYH Skylake with Sunrise Point-LP >> xHCI USB controller [8086:9d2f]). >> >> The HUB problem is due to GRUB using a different code path for HUBs >> than normal devices. I implemented hooks for "control_transfer" and >> "bulk_transfer" in GRUB USB stack, because that required little >> changes and it made it easy to hook it up with the xHCI driver. But >> when GRUB sees a HUB, it uses the "old" setup_transfer code path which >> isn't implemented in the xHCI driver. >> >> I'm thinking the "hanging" issue (the controller never responds to a >> basic "NOP" command) is a problem with the Coreboot driver itself, or >> more specifically, the lack of a "quirk" handling for this controller. >> But blaming that driver doesn't fix it. >> >> About the implementation. I tried to change as little code as >> possible, both in GRUB and the Coreboot driver, thinking that it'd >> make maintenance easier. My reasoning was (perhaps wrongly?) that >> there is little help to get in the community, and if I reuse enough of >> the Coreboot driver, I can easiliy re-import the driver if/when they >> fix some bugs. This "change as little as possible" policy means that >> now the xHCI driver initializes and tracks some state that also GRUB >> USB stack does. It works but it's not something I think is good enough >> to integrate in mainline GRUB. (That's one of the reasons why I didn't >> tell you about the status earlier. I don't see how to make it "clean" >> enough for mainline. Also, the above issues are sort of blockers in >> themselves.) >> >> >> The ugly :-) >> >> https://github.com/bjornfor/grub/tree/add-coreboot-xhci- >> driver-2nd-attempt-v2 >> >> (I just cleaned up history and rebased on master, so it's less ugly >> than it was a few hours ago.) >> >> Best regards, >> Bjørn Forsman >> >