All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] SMM BIOS on Dell i8100
@ 2001-11-05  9:03 Stephane Jourdois
  2001-11-05 16:03 ` Jeff Garzik
       [not found] ` <20011105130954.A24310@joshua.mesa.nl>
  0 siblings, 2 replies; 24+ messages in thread
From: Stephane Jourdois @ 2001-11-05  9:03 UTC (permalink / raw)
  To: Massimo Dal Zotto; +Cc: LKLM

[-- Attachment #1: Type: text/plain, Size: 4196 bytes --]

Hello,

First, a very big thanx to Massimo for this great piece of code :-)
I've been trying to catch those events with no sucess for weeks.

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.

You should also replace your printk("string") with printk(KERN_INFO "string")


PS : Massimo, which version of setmixer do you use ? mine doesn't
support {+|-}val syntax... (debian sid, setmixer 27DEC94-4)

Thanks,



--- /home/kwisatz/i8kutils-1.1/i8k.c	Fri Nov  2 16:02:24 2001
+++ drivers/char/i8k.c	Mon Nov  5 01:06:31 2001
@@ -1,5 +1,5 @@
 /*
- * i8k.c -- Linux driver for accessing the SMM BIOS on Dell I8000 laptops
+ * i8k.c -- Linux driver for accessing the SMM BIOS on Dell I8x00 laptops
  *
  * Copyright (C) 2001  Massimo Dal Zotto <dz@debian.org>
  *
@@ -25,7 +25,7 @@
 #include <linux/i8k.h>
=20
 #define I8K_VERSION		"1.1 02/11/2001"
-#define I8K_BIOS_SIGNATURE	"Dell System Inspiron 8000"
+#define I8K_BIOS_SIGNATURE	"Dell System Inspiron 8"
 #define I8K_BIOS_SIGNATURE_ADDR 0x000ec000
 #define I8K_BIOS_VERSION_OFFSET	32
=20
@@ -40,10 +40,10 @@
 #define I8K_FAN_MULT		30
 #define I8K_MAX_TEMP		127
=20
-#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
=20
 #define I8K_POWER_AC		0x05
 #define I8K_POWER_BATTERY	0x01
@@ -56,10 +56,10 @@
 int force =3D 0;
=20
 MODULE_AUTHOR("Massimo Dal Zotto (dz@debian.org)");
-MODULE_DESCRIPTION("Driver for accessing the SMM BIOS on Dell I8000 laptop=
s");
+MODULE_DESCRIPTION("Driver for accessing the SMM BIOS on Dell I8x00 laptop=
s");
 MODULE_LICENSE("GPL");
 MODULE_PARM(force, "i");
-MODULE_PARM_DESC(force, "Force loading without checking for an Inspiron 80=
00");
+MODULE_PARM_DESC(force, "Force loading without checking for an Inspiron 8x=
00");
=20
 static ssize_t i8k_read(struct file *, char *, size_t, loff_t *);
 static int i8k_ioctl(struct inode *, struct file *, unsigned int,
@@ -157,7 +157,7 @@
 	return rc;
     }
=20
-    switch ((regs.eax & 0xff00) >> 8) {
+    switch ((regs.eax & 0x0700) >> 8) {
     case I8K_FN_UP:
 	return I8K_VOL_UP;
     case I8K_FN_DOWN:
@@ -439,7 +439,7 @@
 }
=20
 /*
- * Probe for the presence of an Inspiron I8000.
+ * Probe for the presence of an Inspiron I8x00.
  */
 static int i8k_probe(void)
 {
@@ -458,8 +458,9 @@
 	    printk("i8k: ioremap failed\n");
 	    return -ENODEV;
 	}
-	if (strncmp(buff,I8K_BIOS_SIGNATURE,sizeof(I8K_BIOS_SIGNATURE)) !=3D 0) {
-	    printk("i8k: Inspiron 8000 BIOS signature not found\n");
+	if (strncmp(buff,I8K_BIOS_SIGNATURE,sizeof(I8K_BIOS_SIGNATURE) - 1) !=3D =
0) {
+	    // -1 because we don't wan't to check for \0 at the end
+	    printk("i8k: Inspiron 8x00 BIOS signature not found\n");
 	    iounmap(buff);
 	    return -ENODEV;
 	}
@@ -475,7 +476,7 @@
 	}
 	for (p=3Dbuff; (p-buff)<(0x00100000-0x000c0000); p+=3D16) {
 	    if (strncmp(p,I8K_BIOS_SIGNATURE,sizeof(I8K_BIOS_SIGNATURE))=3D=3D0) {
-		printk("i8k: Inspiron 8000 BIOS signature found at %08x\n",
+		printk("i8k: Inspiron 8x00 BIOS signature found at %08x\n",
 		       0x000c0000+(p-buff));
 		break;
 	    }
@@ -518,7 +519,7 @@
 {
     struct proc_dir_entry *proc_i8k;
=20
-    /* Are we running on an Inspiron 8000 laptop? */
+    /* Are we running on an Inspiron 8x00 laptop? */
     if (i8k_probe() !=3D 0) {
 	return -ENODEV;
     }
@@ -532,7 +533,7 @@
     SET_MODULE_OWNER(proc_i8k);
=20
     printk(KERN_INFO
-	   "Inspiron 8000 SMM driver v%s Massimo Dal Zotto (dz@debian.org)\n",
+	   "Inspiron 8x00 SMM driver v%s Massimo Dal Zotto (dz@debian.org)\n",
 	   I8K_VERSION);
=20
     return 0;


-- 
 ///  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    ///

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

^ permalink raw reply	[flat|nested] 24+ messages in thread
* Re: [PATCH] SMM BIOS on Dell i8100
@ 2001-11-08 18:14 Massimo Dal Zotto
  2001-11-09 12:34 ` Stephane Jourdois
  0 siblings, 1 reply; 24+ messages in thread
From: Massimo Dal Zotto @ 2001-11-08 18:14 UTC (permalink / raw)
  To: Linux Kernel; +Cc: stephane

Hi,

I have released version 1.4 of my package with a new kernel module and
some enhancements to the i8kmon utility.

It should now work on more Dell laptops (Inspiron and Latitude) and report
correctly the bios version and machine id. If it doesn't load try forcing
it with:

    insmod ./i8k.o force=1

Please test the new version and send me a report. Don't forget to include
the following information:

    laptop model
    bios version
    driver version
    i8kmon version
    kernel messages while loading the driver
    output of "cat /proc/i8k"

and a detailed description of any problem you have found.

-- 
Massimo Dal Zotto

+----------------------------------------------------------------------+
|  Massimo Dal Zotto               email: massimo.dalzotto@libero.it   |
|  Via Marconi, 141                phone: ++39-461534251               |
|  38057 Pergine Valsugana (TN)      www: http://www.cs.unitn.it/~dz/  |
|  Italy                                  http://www.debian.org/~dz/   |
|  gpg:   2DB65596  3CED BDC6 4F23 BEDA F489 2445 147F 1AEA 2DB6 5596  |
+----------------------------------------------------------------------+

^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <12948.1005329220@redhat.com>]

end of thread, other threads:[~2001-11-09 18:58 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-11-05  9:03 [PATCH] SMM BIOS on Dell i8100 Stephane Jourdois
2001-11-05 16:03 ` Jeff Garzik
2001-11-05 16:35   ` Stephane Jourdois
2001-11-05 23:17   ` Juri Haberland
2001-11-06 12:24     ` Stephane Jourdois
2001-11-06 16:45     ` Massimo Dal Zotto
2001-11-06 17:09       ` Juri Haberland
2001-11-06 22:46       ` Marcel J.E. Mol
2001-11-07  9:44       ` Stephane Jourdois
2001-11-07 10:01         ` Marcel J.E. Mol
2001-11-07 10:13           ` Stephane Jourdois
2001-11-07 14:21             ` Massimo Dal Zotto
2001-11-07 10:27         ` Massimo Dal Zotto
2001-11-07 10:29       ` David Woodhouse
     [not found] ` <20011105130954.A24310@joshua.mesa.nl>
2001-11-05 17:01   ` Stephane Jourdois
2001-11-05 17:20     ` Marcel J.E. Mol
2001-11-05 17:37       ` Stephane Jourdois
2001-11-05 21:52         ` Marcel J.E. Mol
2001-11-05 19:00     ` Georg Nikodym
2001-11-06 13:58       ` Stephane Jourdois
  -- strict thread matches above, loose matches on Subject: below --
2001-11-08 18:14 Massimo Dal Zotto
2001-11-09 12:34 ` Stephane Jourdois
2001-11-09 14:57   ` Massimo Dal Zotto
     [not found] <12948.1005329220@redhat.com>
2001-11-09 18:57 ` Massimo Dal Zotto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.