Resource base 0x1xy for AMD K8 northbridge.
ollie at lanl.gov
Wed Nov 24 11:39:00 CET 2004
On Wed, 2004-11-24 at 02:01, Eric W. Biederman wrote:
> Li-Ta Lo <ollie at lanl.gov> writes:
> > Eric,
> > Why you add 0x100 to the resource base register for AMDK8 Function 1, in
> > find_mem|io_pair()?
> As a general convention I name the resources as the address in the configuration
> space. The k8 distributes functionality across it's pci configuration space,
> which makes it atypical in a number of respects.
> In this case the bridges are all in function 0, but the bars for those
> bridges are actually in function 1. Since I am reporting those resources
> on function 0 I add 0x100 to indicate that those resources are really
> in function 1. Which is simple and keeps me safe from most conflicts.
> It looks like I am also playing with the low address bits to distinguish
> which link I am actually dealing with.
> Does that make sense?
It's fine but please add a comment in the .c or .h file. It is confusing
since the 0x100 and low order bit value in pretty artifitial. Nobody is
going to understant the code by just reading the AMD data sheet.
> The resource->index is arbitrary but I try to keep to a convention where
> looking at it you can tell which configuration register you are dealing
More information about the coreboot