[coreboot] K8 resource allocation cleanup

Myles Watson mylesgw at gmail.com
Fri Jun 19 05:48:11 CEST 2009

These patches depend on the new resource allocator.  Abuild tested and boot
tested on SimNow, qemu, s2892, and s2895.


introduce fx_devs for the number of nodes
only call get_fx_devs if fx_devs == 0
change i to node_id and ii to i
remove shadowed variables
take out continue statements in loops go to fx_devs


combine find_iopair and find_mempair
return the register number instead of a resource
don't allocate resources until the allocate stage
simplify amdk8_create_vga_resource and move it to read resources
    (It could be moved above read resources, but I was minimizing changes)
allocate resources in amdk8_set_resources

    For each resource:
        See if there's already a resource for that link and node
        Use it if there is
        Otherwise allocate a new one
    Compact resources to get rid of extra ones

in amdk8_domain_read_resources, store the base and limit in the temporary
resources so it's easier to debug.

tolm_test needed to be changed so it didn't find the VGA resource
It could probably be changed to be > 0x100000 since any system should have
of RAM and this is trying to find the bottom of PCI space.

tolm_test should be factored out of all northbridges

In device.c, rename allocate_vga_resource to set_vga_bridge_bits and move it
the beginning of resource allocation.

Signed-off-by: Myles Watson <mylesgw at gmail.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090618/065be11a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: k8_north.diff
Type: text/x-patch
Size: 7793 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090618/065be11a/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: k8_resources.diff
Type: text/x-patch
Size: 8186 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20090618/065be11a/attachment-0001.diff>

More information about the coreboot mailing list