All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gailu Singh <gailu96@gmail.com>
To: Andrei Borzenkov <arvidjaar@gmail.com>
Cc: "Bjørn Forsman" <bjorn.forsman@gmail.com>,
	"The development of GNU GRUB" <grub-devel@gnu.org>
Subject: Re: USB3.0 XHCI support on GRUB2
Date: Sun, 5 Mar 2017 20:41:53 +0530	[thread overview]
Message-ID: <CAOifn+2tYtaX4ZE2xDagSOPHXsd+J5miGAPC1SB6bn5SDtGTaQ@mail.gmail.com> (raw)
In-Reply-To: <CAOifn+3Q=fdB1hEk2tceL26rDZm-d3eD-9Ddd9wZeszuTDo51g@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4237 bytes --]

Getting Build error related to include path. Looks like some Makefile
problem

bus/usb/xhci/usb/xhci.c:36:26: fatal error: arch/virtual.h: No such file or
directory
 #include <arch/virtual.h>

On Thu, Mar 2, 2017 at 9:42 AM, Gailu Singh <gailu96@gmail.com> wrote:

> I am not using EFI. I am using coreboot with Intel FSP. Intel confirmed
> that XHCI controller is initialized by FSP and any standard XHCI driver
> should work on top of that.
>
> Problem Details:
>
> Requirement:
> My requirement is to load GRUB2 as payload from coreboot and Load Linux
> using GRUB2 (from USB pen drive and Hard Disk) based on grub menu selection
>
> Problem I am facing:
> 1. GRUB2 does not recognize USB pen drive, so can not boot linux from USB
> pen drive
> 2. GRUB2 does not recognize USB keyboard so not able to select menu entry
>
> Board: Intel Oxbohill CRB (Apollo lake)
>
>
>
> On Thu, Mar 2, 2017 at 9:29 AM, Andrei Borzenkov <arvidjaar@gmail.com>
> wrote:
>
>> 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 <bjorn.forsman@gmail.com>
>> > wrote:
>> >
>> >> On 1 March 2017 at 07:57, Andrei Borzenkov <arvidjaar@gmail.com>
>> 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
>> >>
>> >
>>
>>
>

[-- Attachment #2: Type: text/html, Size: 5907 bytes --]

  reply	other threads:[~2017-03-05 15:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  5:50 USB3.0 XHCI support on GRUB2 Gailu Singh
2017-03-01  6:14 ` Fwd: " Gailu Singh
2017-03-01  6:57   ` Andrei Borzenkov
2017-03-01 10:37     ` Bjørn Forsman
2017-03-02  3:00       ` Gailu Singh
2017-03-02  3:59         ` Andrei Borzenkov
2017-03-02  4:12           ` Gailu Singh
2017-03-05 15:11             ` Gailu Singh [this message]
2017-03-05 15:25               ` Bjørn Forsman
2017-03-05 17:22                 ` Gailu Singh
2017-03-06  9:43                   ` Bjørn Forsman
2017-03-06  9:58                     ` Gailu Singh
2017-04-02 18:05                       ` Gailu Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOifn+2tYtaX4ZE2xDagSOPHXsd+J5miGAPC1SB6bn5SDtGTaQ@mail.gmail.com \
    --to=gailu96@gmail.com \
    --cc=arvidjaar@gmail.com \
    --cc=bjorn.forsman@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.