I guess the reason why current code doesn't cover all devices is that it assumes all devices can be scanned through recursive function call starting from bus 0 (a single tree structure). However, when there are multiple root complexes, there are more than one tree. So one has to explicitly jump to the next root node and search its tree.
--
Jilong Kuang Ph.D. C.Sci. | Samsung Research America - Silicon Valley (SRA-SV)
Senior Research Engineer, Computer Science Lab
t: 408-544-2705 c: 951-318-2995
jilong.kuang@...60...
Please consider the environment before printing this email.
This message is intended only for the named recipient(s) above and may contain confidential or privileged information or protected attorney work product. If you are not the intended recipient, any review, dissemination, distribution or copying is strictly prohibited. If you have received this message in error, please immediately notify the sender and delete this message and its attachments from your computer and dispose of all other copies or printouts. Thank you.
-----Original Message-----
From: Alexander Boettcher [mailto:alexander.boettcher@...1...]
Sent: Monday, June 17, 2013 1:29 AM
To: Genode OS Framework Mailing List
Subject: Re: Pci driver can not handle multiple root complex system
On 12.06.2013 19:16, Jilong Kuang - SISA wrote:
> In my opinion, a simple fix is to remove the two lines in _find_next()
> function in pci_session_component.h
>
> If (!bus_valid(bus))
> Continue;
Sure, however we would like to know why the pci driver doesn't find the device you are looking for.
>
> Another way is to scan all buses/devices/functions at the first call of bus_valid(). A simple three level loop will do.
The initial scan is done early when pci_drv comes up ~ line 396 in file pci_session_component.h [0].
So, does something happen to the hardware in your setup that a new scan will result in other results ? If yes, can you please explain.
If yes, you may delay the first scan to a later point, by removing the explicit call in line 397 to bus_valid. Without this call the bus_valid function should be triggered as soon as the first pci client connects to the pci driver and looks for a device (calling implicitly _find_next).
Cheers,
Alex.
[0]
https://github.com/genodelabs/genode/blob/master/os/src/drivers/pci/pci_sess...
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Genode-main mailing list
Genode-main@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/genode-main