On Mon, 15 Aug 2005 23:58:43 CDT, Michael E Brown said: > No, this is an _EXCELLENT_ reason why _LESS_ of this should be in the > kernel. Why should we have to duplicate a _TON_ of code inside the > kernel to figure out which platform we are on, and then look up in a > table which method to use for that platform? We have a _MUCH_ nicer > programming environment available to us in userspace where we can use > things like libsmbios to look up the platform type, then look in an > easily-updateable text file which smi type to use. In general, plugging > the wrong value here is a no-op.
You'll still need to do some *very* basic checking - there's fairly
scary-looking 'outb' call in callintf_smi() and host_control_smi() that seems
to
be totally too trusting that The Right Thing is located at address
CMOS_BASE_PORT:
+ for (index = PE1300_CMOS_CMD_STRUCT_PTR;
+ index < (PE1300_CMOS_CMD_STRUCT_PTR + 4);
+ index++) {
+ outb(index,
+ (CMOS_BASE_PORT + CMOS_PAGE2_INDEX_PORT_PIIX4));
+ outb(*data++,
+ (CMOS_BASE_PORT + CMOS_PAGE2_DATA_PORT_PIIX4));
+ }
This Dell C840 has an 845, not a PIIX. What just got toasted if this driver
gets called?
Can we have a check that the machine is (a) a Dell and (b) has a PIIX and (c)
the
PIIX has a functional SMI behind it, before we start doing outb() calls?
pgpkgwfdR79iY.pgp
Description: PGP signature

