Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/41431 )
Change subject: src/northbridge/amd/agesa: add resources during read_resources() ......................................................................
Patch Set 2:
Patch Set 2:
Patch Set 2:
(2 comments)
Is this still needed? Sorry if it fell into oblivion.
This was my dirty hack to get a v4 resource allocator working for these AMD boards. Maybe it could be used as the base for a new attempt, but I'm not sure if I can pull this out by myself (to be honest I barely understand this code)
You can check Intel northbridges as an example.
read_resources should inform the allocator of the resources it has to take into account when allocating, e.g. MMIO or I/O ranges, which could be dynamically allocated (PCI BARs) or are fixed at a specific address (MCHBAR, DMIBAR, EPBAR; they are configurable but we hardcode the base addresses).
Then, the allocator does its thing.
set_resources then writes the allocator results into the hardware registers. For fixed resources, this is a no-op.