Travis Geiselbrecht
2f98fbf772
[pci][fdt] do not attempt to configure PCI with 64bit bars on a 32bit system
...
Especially in the case where the 32bit system doesn't have an MMU, avoid
using any high addresses for BARs.
2024-05-09 22:18:19 -07:00
Travis Geiselbrecht
4a97f932fd
[lib][fdtwalk] restructure the fdtwalker helper routines
...
Instead of one large routine that takes a list of optional callbacks,
build some helper routines that do the work that a few platforms have
implemented on their own to share some code between them.
Future enhancements: move some of the helpers out of this library into
the library that implements the thing it's helping with (ie, PCI
bringup, bootstrapping arch specific cores). For now just leave them in
helper.cc which is conditionally compiled.
2024-04-16 23:11:59 -07:00
Travis Geiselbrecht
05540c992a
[lib][fdtwalk] trivially convert to C++
2024-04-16 23:01:31 -07:00
Travis Geiselbrecht
6b7d0ab627
[lib][fdtwalk] add code to skip a cpu if disabled
...
Some RISC-V cpus come up disabled, skip enumerating them.
2023-10-15 14:41:30 -07:00
Travis Geiselbrecht
91d0a5f7d1
[lib][fdtwalk] add routine to find and parse /reserved-memory node
...
Add logic to the riscv virt platform to properly mark off memory
claimed by OpenSBI.
2022-12-17 17:12:35 -08:00
Pedro Falcato
a9a631152f
[fdtwalk] Fix a bug in #address-cells parsing
...
Fixes issue #314
2022-02-13 14:00:22 -08:00
Travis Geiselbrecht
06ab680159
[lib][fdtwalk] add support to return the io/mmio pci aperture as well
...
FDT encodes the range of available mmio and io ports that the PCI bus
can use to map bars. Return this information out of the FDT walker
helper routines to feed into the PCI bus manager in the future.
2022-02-06 19:46:39 -08:00
Travis Geiselbrecht
c9eae714db
[platform][qemu-virt-riscv] pick the PCIE ecam out of FDT and initialize PCI bus
2021-11-12 21:23:09 -08:00
Travis Geiselbrecht
b01f7083eb
[lib][fdtwalk] add a callback hook to pass back pci-express information
...
At the moment only picks out the ECAM aperture and start/end bus
information, but enough to bootstrap the pci bus.
2021-11-12 21:05:40 -08:00
Travis Geiselbrecht
811566f03d
[lib][fdtwalk] spiff up the fdt walker to read #address-cells and #size-cells
...
Will now start to handle properly sized cells for future parsing
efforts.
2020-05-03 14:47:22 -07:00
Travis Geiselbrecht
f1dcdfd7a8
[lib][fdtwalk] move some of the duplicate code to parse flattened device trees into a shared lib
...
Uses a callback structure that various platforms can use to automate
walking through the trees for common nodes.
2020-04-25 18:37:57 -07:00