Re: [RFC][PATCH 2.6.13-rc6] add Dell Systems Management Base Driver (dcdbas) with sysfs support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 228, 08 16, 2005 at 01:36:19AM -0400, [email protected] wrote:
> 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?

What about dmi_check_system() ?

-- 
Andrey Panin		| Linux and UNIX system administrator
[email protected]		| PGP key: wwwkeys.pgp.net

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux