Re: [PATCH] SMM BIOS on Dell i8100

From: Stephane Jourdois (stephane@tuxfinder.org)
Date: Mon Nov 05 2001 - 11:35:43 EST


On Mon, Nov 05, 2001 at 11:03:53AM -0500, Jeff Garzik wrote:
> Stephane Jourdois wrote:
> > I've got a Dell Inspiron 8100, which seems to differ slightly from
> > i8000. Here is a patch that fixes that. Please do not hesitate to ask me
> > to test some new code or anything on my laptop.
> Has this been tested in I8000? You are changing a lot of magic numbers
> in the code, and noone but you/Massimo know whether that is ok or not...

I presume it works.
Let me explain why while looking at parts of my patch :

-#define I8K_FN_NONE 0x08
-#define I8K_FN_UP 0x09
-#define I8K_FN_DOWN 0x0a
-#define I8K_FN_MUTE 0x0c
+#define I8K_FN_NONE 0x00
+#define I8K_FN_UP 0x01
+#define I8K_FN_DOWN 0x02
+#define I8K_FN_MUTE 0x04

In fact, i8100 returns respectively 1, 2 and 4.
i8100 returns 0x09, 0x0a, and 0x0c (see Massimo's code).

Then we can take the 4 lighter bits, and test them without testing
the 4 greater bits which value are 0x08 on i8000 and 0x00 on i8100.

hence :
- switch ((regs.eax & 0xff00) >> 8) {
+ switch ((regs.eax & 0x0700) >> 8) {

a different version (which I didn't choose), would be to keep Massimo's
defines, and test (((regs.eax | 0x0800 ) & 0xff00) >> 8). But that's
more operations, then not the better solution :-)

As the drivers disks provided by Dell (windows drivers of course) are
the same which works on i8000 and i8100, I suppose that they test only
the 4 lighter bits here

Of course, as Massismo's told me a few hours ago, this is a beta version
of this code, and it supports at least Massimo's i8000 and now my i8100.
We should wait a few days for feed-back from lklm readers, then
Massimo's intents are to implement a more modular code. That's a good
intent, isn't it ? :-)

Anyway, you'll agree with me that 2 laptops is better than one :-)

Thanks for your answer.
Stéphane.

-- 
 ///  Stephane Jourdois        	/"\  ASCII RIBBON CAMPAIGN \\\
(((    Ingénieur développement 	\ /    AGAINST HTML MAIL    )))
 \\\   6, av. de la Belle Image	 X                         ///
  \\\  94440 Marolles en Brie  	/ \    +33 6 8643 3085    ///


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Nov 07 2001 - 21:00:26 EST