Comment out
// resource->limit = info->mask | (step - 1);
In pnp_get_ioresource
Will make it works right.
Regards
YH
-----Original Message----- From: YhLu Sent: Tuesday, October 26, 2004 1:12 PM To: ebiederman@lnxi.com Cc: Ronald G. Minnich; linuxbios@clustermatic.org Subject: RE: S2885
You are right, after I comment out the superio section in Config.lb. it allocate correct io range for device in amd8111 PCI bridge.
Regards
YH
-----Original Message----- From: ebiederman@lnxi.com [mailto:ebiederman@lnxi.com] Sent: Tuesday, October 26, 2004 12:52 PM To: YhLu Cc: Ronald G. Minnich; linuxbios@clustermatic.org Subject: Re: S2885
YhLu YhLu@tyan.com writes:
Eric,
I find the device on amd8111 pci io allocation get werid. Please check
6:b.0
and 6:c.0 io allocation. It comes from 0x0000, instead of 0x1000.
Agreed this is a bug.
Currently the code updates the limit on bridges if all of the devices behind the bridge cannot use that limit. In theory that works great in practice however it barely works.
With I/O devices typically the problem is typically superio chips with a limit of 0xfff.
It works well before you add set_subsystem.
set_subsystem has been there since somewhere the start of the merge. Although all of the methods for the amd8111 and amd8131 were not.
I suspect this has more to do with the updated pnp device code, which now correctly computes the limit address. And thus messes up the computation logic for everything else. At least if the resource is not set statically.
If this is what I think it is, except for hard coding the superio resources I don't see a quick fix in the works.
Eric _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
YhLu YhLu@tyan.com writes:
That part of the code is correct. Fixing that exposed the problem.
The chunk of code out of device.c:compute_allocate_resource() that clamps the limit is below.
If you notice it currently ignores anything that is IORESOURCE_FIXED. So if you hard code the problem resource in Config.lb the symptoms will go away.
This is not a good long term solution, but it does work for now. This is a general problem with taking resource limits into account and compute_allocate_resource() needs an overhaul to do that properly. I will get to that as soon as I get back to getting 64bit resource handling properly and making it generic. So it should not be delayed too long.
/* Do NOT I repeat do not ignore resources which have zero size. * If they need to be ignored dev->read_resources should not even * return them. Some resources must be set even when they have * no size. PCI bridge resources are a good example of this. */
/* Propogate the resource alignment to the bridge register */ if (resource->align > bridge->align) { bridge->align = resource->align; }
/* Make certain we are dealing with a good minimum size */ size = resource->size; align = resource->align; if (align < min_align) { align = min_align; } if (resource->flags & IORESOURCE_FIXED) { continue; } /* Propogate the resource limit to the bridge register */ if (bridge->limit > resource->limit) { bridge->limit = resource->limit; } /* Artificially deny limits between DEVICE_MEM_HIGH and 0xffffffff */ if ((bridge->limit > DEVICE_MEM_HIGH) && (bridge->limit <= 0xffffffff)) { bridge->limit = DEVICE_MEM_HIGH; }
Eric