Aaron Durbin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/35946 )
Change subject: driver/thunderbolt: Driver for allocating hotplug resources ......................................................................
Patch Set 1:
(3 comments)
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... File src/drivers/thunderbolt/thunderbolt.c:
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... PS1, Line 51: resource->flags |= IORESOURCE_IO;
In order for the hot-plugging of devices and busses to work, we need to reserve MMIO and IO space fo […]
I understand the requirements in order to set up a pci topology. However, my question was bout the assumptions that are being made about the OS or program running after coreboot. This patch is assuming a static allocation is sufficient when it's definitely not going to be correct 100% of the time.
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... PS1, Line 73: pciexp_scan_bridge(dev);
haven't looked very closely at the code, but what does happen if there are devices already connected […]
That's assuming thunderbolt links are already provisioned and pcie tunneling is happening. Otherwise one couldn't see the devices on the other side of the link.
https://review.coreboot.org/c/coreboot/+/35946/1/src/drivers/thunderbolt/thu... PS1, Line 80: slot = alloc_dev(dev->link_list, &slot_path);
IIRC the 256MiB was what the vendor firmware does; not sure if this is mandated by the TB spec. 256MiB prefetchable MMIO space sounds reasonable to me; 256MiB non-prefetchable MMIO sounds rather big to me though (and the non-prefetchable can't be mapped above 4G)
What are you basing your assumptions on? Video cards and small BARs on a nic?