From: Stephane Jourdois <stephane@tuxfinder.org>
To: Massimo Dal Zotto <dz@debian.org>
Cc: LKLM <linux-kernel@vger.kernel.org>
Subject: [PATCH] SMM BIOS on Dell i8100
Date: Mon, 5 Nov 2001 10:03:46 +0100 [thread overview]
Message-ID: <20011105100346.A1511@emeraude.kwisatz.net> (raw)
[-- 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 --]
next reply other threads:[~2001-11-05 9:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-05 9:03 Stephane Jourdois [this message]
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
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011105100346.A1511@emeraude.kwisatz.net \
--to=stephane@tuxfinder.org \
--cc=dz@debian.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®