[coreboot] superiotool sometimes skips further SuperIO chips in the system - suggested remedy included
Peter Stuge
peter at stuge.se
Mon Jan 3 23:55:35 CET 2011
Frantisek Rysanek wrote:
> I'd like to offer a bit of my own time to add such a global index of
> "ports occupied" (likely not "devices detected" - see above why).
Great! Please send the patch with Signed-off-by according to the
coreboot development guidelines: (they are short)
http://www.coreboot.org/Development_Guidelines#How_to_contribute
> Would you be interested?
Yes. I suggest using a fixed size array for the ports:
#define MAX_SUPERIOS 10
static unsigned char found_superios = 0;
static unsigned short superio_port[MAX_SUPERIOS];
and when looping over devices, skip already-known ports:
for(each device) {
for(i=0;i<found_superios;i++)
if(cur_device_port == superio_port[i])
goto nextdev;
if(probe(cur_device_port))
superio_port[found_superios++] = cur_device_port;
nextdev:
}
//Peter
More information about the coreboot
mailing list