* barebox qemu-malta pci problem
@ 2015-04-01 21:54 Antony Pavlov
2015-04-02 8:57 ` Lucas Stach
0 siblings, 1 reply; 2+ messages in thread
From: Antony Pavlov @ 2015-04-01 21:54 UTC (permalink / raw)
To: Lucas Stach; +Cc: barebox
Hi!
It looks like qemu-malta barebox pci support is broken since
commit b8a1bb1dd215770670108fe5b0de0e5e137bf8fd
Author: Lucas Stach <dev@lynxeye.de>
Date: Sat Oct 4 19:40:12 2014 +0200
pci: defer device registration until after bridge setup
Otherwise the drivers for a device may probe before the
devices parent bridge is fully configured, which leads
to errors when accessing the BARs.
How to reproduce the problem:
$ cd barebox.git
$ export ARCH=mips
$ export CROSS_COMPILE=<your favorite mips cross-compiler prefix>
# first let's see working state
$ git checkout b8a1bb1dd215770670108fe5b0de0e5e137bf8fd^
$ make qemu-malta_defconfig && make clean && make
$ qemu-system-mips -nodefaults -M malta -m 256 -nographic -serial stdio -monitor null -bios barebox-flash-image -net nic,model=rtl8139
...
barebox:/ devinfo
...
`-- i2c
`-- pci
`-- pci0
`-- pci1
`-- pci2
`-- pci3
`-- pci4
`-- eth0
`-- miibus0
`-- fs
<stop qemu emulation (ctrl-c)>
# devinfo shows eth0 device on pci4. good.
# now let's see broken state
$ git checkout b8a1bb1dd215770670108fe5b0de0e5e137bf8fd
$ make qemu-malta_defconfig && make clean && make
$ qemu-system-mips -nodefaults -M malta -m 256 -nographic -serial stdio -monitor null -bios barebox-flash-image -net nic,model=rtl8139
...
barebox:/ devinfo
...
`-- i2c
`-- pci
`-- fs
# As you can see there is no pci devices on pci bus.
--
Best regards,
Antony Pavlov
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: barebox qemu-malta pci problem
2015-04-01 21:54 barebox qemu-malta pci problem Antony Pavlov
@ 2015-04-02 8:57 ` Lucas Stach
0 siblings, 0 replies; 2+ messages in thread
From: Lucas Stach @ 2015-04-02 8:57 UTC (permalink / raw)
To: Antony Pavlov; +Cc: barebox
Am Donnerstag, den 02.04.2015, 00:54 +0300 schrieb Antony Pavlov:
> Hi!
>
> It looks like qemu-malta barebox pci support is broken since
>
> commit b8a1bb1dd215770670108fe5b0de0e5e137bf8fd
> Author: Lucas Stach <dev@lynxeye.de>
> Date: Sat Oct 4 19:40:12 2014 +0200
>
> pci: defer device registration until after bridge setup
>
> Otherwise the drivers for a device may probe before the
> devices parent bridge is fully configured, which leads
> to errors when accessing the BARs.
>
Thanks for the report and the detailed reproducer. I'll have a look at
this.
Regards,
Lucas
> How to reproduce the problem:
>
> $ cd barebox.git
> $ export ARCH=mips
> $ export CROSS_COMPILE=<your favorite mips cross-compiler prefix>
>
> # first let's see working state
>
> $ git checkout b8a1bb1dd215770670108fe5b0de0e5e137bf8fd^
> $ make qemu-malta_defconfig && make clean && make
> $ qemu-system-mips -nodefaults -M malta -m 256 -nographic -serial stdio -monitor null -bios barebox-flash-image -net nic,model=rtl8139
>
> ...
>
> barebox:/ devinfo
>
> ...
>
> `-- i2c
> `-- pci
> `-- pci0
> `-- pci1
> `-- pci2
> `-- pci3
> `-- pci4
> `-- eth0
> `-- miibus0
> `-- fs
>
> <stop qemu emulation (ctrl-c)>
>
> # devinfo shows eth0 device on pci4. good.
> # now let's see broken state
>
> $ git checkout b8a1bb1dd215770670108fe5b0de0e5e137bf8fd
> $ make qemu-malta_defconfig && make clean && make
> $ qemu-system-mips -nodefaults -M malta -m 256 -nographic -serial stdio -monitor null -bios barebox-flash-image -net nic,model=rtl8139
>
> ...
>
> barebox:/ devinfo
>
> ...
>
> `-- i2c
> `-- pci
> `-- fs
>
> # As you can see there is no pci devices on pci bus.
>
> --
> Best regards,
> Antony Pavlov
--
Pengutronix e.K. | Lucas Stach |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-02 8:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01 21:54 barebox qemu-malta pci problem Antony Pavlov
2015-04-02 8:57 ` Lucas Stach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox