All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
@ 2017-09-25 19:10 luigi burdo
  2017-09-27 11:34 ` Gerd Hoffmann
  0 siblings, 1 reply; 7+ messages in thread
From: luigi burdo @ 2017-09-25 19:10 UTC (permalink / raw)
  To: qemu-ppc, qemu-devel

Hi all,

the last uboot git mainstream gave the opportunity to made usb ehci-pci work and gave to the vm the opportunity to load from

usb pendrive files, configurations, use a use mouse and keyboard.

i build the uboot with qemu-ppce500_defconfig  machine this feature was configured without problem and uboot build without issue.

just adding to the  .config

CONFIG_CMD_USB=y

CONFIG_USB=y

CONFIG_USB_EHCI_HCD=y

CONFIG_USB_EHCI_PCI=y




here the new uboot console working on ppce500 -cpu e5500

U-Boot 2017.09-00322-g1f6049e (Sep 25 2017 - 20:50:48 +0200)


BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.01.00   0x8086     0x24cd     Serial bus controller   0x03
00.02.00   0x8086     0x2922     Mass storage controller 0x06
00.03.00   0x1234     0x1111     Display controller      0x00
00.06.00   0x1af4     0x1000     Network controller      0x00


when i  run the command usb start inside the uboot console:

=> usb start
starting USB...
USB0:   EHCI fail to reset
lowlevel init failed
USB error: all controllers failed lowlevel init


I been meet uboot developers and after one afternoon in drilling inside the code of uboot they assume the issue was come in qemu and not in uboot.


from an uboot dev:
"actually, I tried it yesterday and it seems to be a bug in qemu in case you reset the EHCI controller, it doesn't come out of reset for whatever reason ... so you probably want to talk to the qemu guys, it's when U-Boot sets USBCMD RESET bit and then does handshake, the controller is stuck with reset bit asserted"


i ask if possible to fix it?

here some past&bin of drilling inside uboot

https://pastebin.com/93DRFGcM

https://pastebin.com/g5j2XN6R

https://pastebin.com/KDMCU7C5

https://pastebin.com/ndLtNQxS<https://pastebin.com/i3TkejfT>


Thanks

Luigi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
  2017-09-25 19:10 [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot luigi burdo
@ 2017-09-27 11:34 ` Gerd Hoffmann
  2017-09-27 12:21   ` luigi burdo
  0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2017-09-27 11:34 UTC (permalink / raw)
  To: luigi burdo, qemu-ppc, qemu-devel

  Hi,

> "actually, I tried it yesterday and it seems to be a bug in qemu in
> case you reset the EHCI controller, it doesn't come out of reset for
> whatever reason ... so you probably want to talk to the qemu guys,
> it's when U-Boot sets USBCMD RESET bit and then does handshake, the
> controller is stuck with reset bit asserted"
> 
> 
> i ask if possible to fix it?

Nothing obvious in the ehci reset code.  Needs someone debugging it ...

Is this on a bigendian host?  If so this could be endian bugs in the
ehci emulation.

You could also try xhci or ohci instead, these are known-working on
bigendian hosts (used by ppc64 pseries).

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
  2017-09-27 11:34 ` Gerd Hoffmann
@ 2017-09-27 12:21   ` luigi burdo
  2017-09-28  7:27     ` luigi burdo
  0 siblings, 1 reply; 7+ messages in thread
From: luigi burdo @ 2017-09-27 12:21 UTC (permalink / raw)
  To: Gerd Hoffmann; +Cc: qemu-ppc, qemu-devel

hi Gerd,
yes the host is a big endian but i can test it on an little endian host too and report.
About xhci or ohci the uboot dont recognize it . ehci-pci are the only usb pci board from where uboot on ppce500 vm  can make the load from device or use directly the device attached on  it if cmd reset work for initislize the board.

regards
luigi

Inviato da iPad

> Il giorno 27 set 2017, alle ore 13:34, Gerd Hoffmann <kraxel@redhat.com> ha scritto:
> 
>  Hi,
> 
>> "actually, I tried it yesterday and it seems to be a bug in qemu in
>> case you reset the EHCI controller, it doesn't come out of reset for
>> whatever reason ... so you probably want to talk to the qemu guys,
>> it's when U-Boot sets USBCMD RESET bit and then does handshake, the
>> controller is stuck with reset bit asserted"
>> 
>> 
>> i ask if possible to fix it?
> 
> Nothing obvious in the ehci reset code.  Needs someone debugging it ...
> 
> Is this on a bigendian host?  If so this could be endian bugs in the
> ehci emulation.
> 
> You could also try xhci or ohci instead, these are known-working on
> bigendian hosts (used by ppc64 pseries).
> 
> cheers,
>  Gerd
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
  2017-09-27 12:21   ` luigi burdo
@ 2017-09-28  7:27     ` luigi burdo
  2017-09-28  8:07       ` Gerd Hoffmann
  0 siblings, 1 reply; 7+ messages in thread
From: luigi burdo @ 2017-09-28  7:27 UTC (permalink / raw)
  To: qemu-ppc, qemu-devel; +Cc: Gerd Hoffmann


Hi Gerd,
i had test it yesterday on Little Endian machine host (Apple  Osx Sierra)
the issue is present there too.

Ciao
Luigi


________________________________

hi Gerd,
yes the host is a big endian but i can test it on an little endian host too and report.
About xhci or ohci the uboot dont recognize it . ehci-pci are the only usb pci board from where uboot on ppce500 vm  can make the load from device or use directly the device attached on  it if cmd reset work for initislize the board.


> Il giorno 27 set 2017, alle ore 13:34, Gerd Hoffmann <kraxel@redhat.com> ha scritto:
>
>  Hi,
>
>> "actually, I tried it yesterday and it seems to be a bug in qemu in
>> case you reset the EHCI controller, it doesn't come out of reset for
>> whatever reason ... so you probably want to talk to the qemu guys,
>> it's when U-Boot sets USBCMD RESET bit and then does handshake, the
>> controller is stuck with reset bit asserted"
>>
>>
>> i ask if possible to fix it?
>
> Nothing obvious in the ehci reset code.  Needs someone debugging it ...
>
> Is this on a bigendian host?  If so this could be endian bugs in the
> ehci emulation.
>
> You could also try xhci or ohci instead, these are known-working on
> bigendian hosts (used by ppc64 pseries).
>
> cheers,
>  Gerd
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
  2017-09-28  7:27     ` luigi burdo
@ 2017-09-28  8:07       ` Gerd Hoffmann
  2017-09-28  8:28         ` luigi burdo
  0 siblings, 1 reply; 7+ messages in thread
From: Gerd Hoffmann @ 2017-09-28  8:07 UTC (permalink / raw)
  To: luigi burdo, qemu-ppc, qemu-devel

On Thu, 2017-09-28 at 07:27 +0000, luigi burdo wrote:
> 
> Hi Gerd,
> i had test it yesterday on Little Endian machine host (Apple  Osx
> Sierra)
> the issue is present there too.

How can this be reproduced?

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
  2017-09-28  8:07       ` Gerd Hoffmann
@ 2017-09-28  8:28         ` luigi burdo
  2017-11-14 13:33           ` Gerd Hoffmann
  0 siblings, 1 reply; 7+ messages in thread
From: luigi burdo @ 2017-09-28  8:28 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-ppc, qemu-devel



Hi Gerd,


>How can this be reproduced?


you need to build last uboot with the ehci pci option enabled and the usb command line enabled.

or just download my last e500 uboot build from here https://www.dropbox.com/s/xxlu6ivg3izlqvu/u-boot?dl=0


Run it as:

qemu-system-ppc64 -M ppce500 -cpu e5500 -m 512 -bios (path to the uboot image) -device usb-ehci (or another qemulated ehci pci device)  -serial stdio

you can attach some device on it for your tests


when the machine  run and you have the uboot prompt just do "usb start" and you will see the hang for some second of the machine and after the report from uboot of an error of the ehci.


Ciao
Luigi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot
  2017-09-28  8:28         ` luigi burdo
@ 2017-11-14 13:33           ` Gerd Hoffmann
  0 siblings, 0 replies; 7+ messages in thread
From: Gerd Hoffmann @ 2017-11-14 13:33 UTC (permalink / raw)
  To: luigi burdo; +Cc: qemu-ppc, qemu-devel

> >How can this be reproduced?
> 
> or just download my last e500 uboot build from here https://www.dropbox.com/s/xxlu6ivg3izlqvu/u-boot?dl=0
> 
> qemu-system-ppc64 -M ppce500 -cpu e5500 -m 512 -bios (path to the uboot image) -device usb-ehci (or another qemulated ehci pci device)  -serial stdio
> 
> when the machine  run and you have the uboot prompt just do "usb
> start" and you will see the hang for some second of the machine and
> after the report from uboot of an error of the ehci.

Finally found the time to look at this.  Seems to not be ehci-related at
all.  ehci doesn't see any mmio activity.

>From "info mtree" monitor command:

memory-region: pci bus memory
  0000000000000000-ffffffffffffffff (prio 0, i/o): pci bus memory
    0000000000080000-0000000000080fff (prio 1, i/o): ehci
    0000000c00004000-0000000c00007fff (prio 1, i/o): virtio-pci

memory-region: system
  0000000000000000-ffffffffffffffff (prio 0, i/o): system
    0000000000000000-000000001fffffff (prio 0, ram): mpc8544ds.ram
    0000000c00000000-0000000c1fffffff (prio 0, i/o): alias PCI Outbound Window 1 @pci bus memory 0000000c00000000-0000000c1fffffff

Seems the ehci mmio bar is mapped outside the pci window, so the cpu
can't access it ...

cheers,
  Gerd

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-14 13:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 19:10 [Qemu-devel] ppce500 usb-ehci-pci issue on last uboot luigi burdo
2017-09-27 11:34 ` Gerd Hoffmann
2017-09-27 12:21   ` luigi burdo
2017-09-28  7:27     ` luigi burdo
2017-09-28  8:07       ` Gerd Hoffmann
2017-09-28  8:28         ` luigi burdo
2017-11-14 13:33           ` Gerd Hoffmann

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.