V2 Epia report
Eric W. Biederman
ebiederman at lnxi.com
Thu Oct 9 13:27:00 CEST 2003
ron minnich <rminnich at lanl.gov> writes:
> On 8 Oct 2003, Eric W. Biederman wrote:
> > The current device resource assignment code should cope with static
> > resource assignments, so hopefully it should be a matter of plugging
> > hard codes into the device tree.
> no, greg and I will be talking to you about this. There is a problem with
> that code, which I have alluded to, in that you can not (in the current
> system) do device assignments etc. before pci enumeration, and it is
> essential that you be able to do that.
I had forgotten we do not have the ability to hard code resources
assignments from the static tree in a generic way. I can do this
in read_resources and friends and it has always been my intention
to support it. Given that it does not yet exist it makes my
suggestion a lot more work than I intended. Ultimately I still
think it is a good idea though.
Ron without specific examples to talk through I cannot have
this conversation. I believe think we have unspoken assumptions
on how things should work, and without a mechanism to draw
those assumptions out I don't see how we will make much
The example with IDE does not have time constraints
on when resources are assigned, so it does not illustrate
to me what the problem you see is.
One of my assumptions is that the resource assignment code needs
global information. So everything needs to wind up on the device
> > Although looking at that code there is another issue. You are using
> > dev_find_device in vt8231.c inappropriately. dev_find_device should
> > be virtually unnecessary in the freebios2 tree. Except when you are
> > very carefully using dev_find_device will fail to handle multiple
> > instances of a device. This is a very bad example to set when
> > doing things properly causes everything to work transparently.
> legacy code. Has to get fixed.
Ok. We have some agreement.
> Examples of proper usage welcomed.
The 8111 code does a fairly good job. The basic difference
is when you fill in the proper method the dynamic code passes you the
device so you don't need to go find it.
> Although this actually points out a
> problem with the dynamic tree: it handles complex cases well, simple cases
Except for the very specific case of static resources which are not
yet fully supported, I don't see that.
> All I want to do is get into that device BEFORE pci enumeration
> and set some default values. You can't do that in the current scheme.
- The static device tree is BEFORE pci enumeration.
- read_resources can return a static value that the resource
assignment code is not allowed to change.
So I do not see the specific problem you are seeing.
More information about the coreboot