Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41466 )
Change subject: device: Enable resource allocation above 4G boundary with allocator v4 ......................................................................
Patch Set 4:
Patch Set 4:
Patch Set 4:
Is there a particular reason not to move all prefmem resources above 4G?
I don't think it is correct to assume that all components using these device resources support resources being above 4G boundary. Hence, the mainboard/device driver is given a choice to decide when/if it wants to allocate a resource allocation above 4G.
Sorry, that came out wrong. I meant to _default_ to put them above 4G. We already have an opt-out mechanism for it, the `.limit`. There is one reason, why I wouldn't default to always rely on the limit: chipset-integrated devices sometimes allow UC MMIO resources above 4G. We should avoid that.
The idea came along with the thought of resource assignment from top to bottom (stealing from the end of the last memrange): If we'd always do that, we wouldn't even need a quirk (IORESOURCE_ ABOVE_4G). We could simply default to the upper-most possible placement and then opt out by constraining the domain resource or individual resource's `.limit`.
I don't think this is a domain decision to restrict the allocation. From a domain standpoint, it allows allocation from anywhere between 0 -> max addressable memory.
For the very simple domains we handle currently, yes.
It is upto the device driver and/or mainboard to determine for itself whether it wants the allocation to happen above 4G or not. A mainboard can have a mix of devices which require prefmem to be allocated above(e.g. USB4) and below (e.g. graphics) 4G. Hence, this flag is essential.
An opt-out or opt-in is essential, yet another flag is not.