[OpenBIOS] Adding new device in the middle of device-tree

Mark Cave-Ayland mark.cave-ayland at ilande.co.uk
Mon Jun 5 20:06:23 CEST 2017

On 03/06/17 14:09, BALATON Zoltan wrote:

> The only reason is that I don't know how to do that. All I know is to
> make USB work correctly we need to add a device-tree node for the
> /pci at f0000000 bus (which can be empty but has to exist at least
> minimally) and this has to come before the existing /pci at f2000000 (so
> adding it by patching the device tree does not work unless we can put
> this node at the beginning which I could not figure out how to do in
> Forth). How this node is added is not important and I also don't know if
> the incorrect bus number causes any problem other than some warnings.
> Where is the host bridge structure that you refer to above and should be
> turned into an array? I think at least ob_pci_init needs to be changed
> but I have no idea how so I'd need some more guidance.

It's the pci_arch_t structure used for each architecture as defined in
include/drivers/pci.h. What you need to do is split out the PCI-specific
fields and alter the struct to hold an array of these fields, and then
update ob_pci_init() to optionally initialise more than one PCI host bridge.



More information about the OpenBIOS mailing list