APM patch for Acer TM 510 series

Kurt Garloff (garloff@suse.de)
Fri, 15 Oct 1999 22:39:03 +0200


--Dzs2zDY0zgkG72+7
Content-Type: multipart/mixed; boundary="UoPmpPX/dBe4BELn"

--UoPmpPX/dBe4BELn
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Hi,

find attached a patch to add a kernel parameter apm=3Dacertm5.

It is a workaround for a bug in the Acer TravelMate 510 series APM BIOS. The
info block offset is returned incorrectly, which is fixed by the apm driver,
if you enable this option.

Regards,
--=20
Kurt Garloff <garloff@suse.de> Wuppertal, FRG
PGP2 key: See mail header, key servers Linux kernel development
SuSE GmbH, N=FCrnberg, FRG SCSI drivers: tmscsim(DC390), DC395

--UoPmpPX/dBe4BELn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="22x-acertm5-apm.diff"
Content-Transfer-Encoding: quoted-printable

--- linux/arch/i386/kernel/apm.c.orig Mon Oct 4 04:21:57 1999
+++ linux/arch/i386/kernel/apm.c Tue Oct 12 10:29:42 1999
@@ -90,6 +90,8 @@
* Use CONFIG_SMP instead of __SMP__
* Ignore BOUNCES for three seconds.
* Stephen Rothwell
+ * 1.9a: (garloff@suse.de): apm=3Dacertm5 works around Acer TravelMate=
=20
+ * 510 series BIOS bug.
*
* APM 1.1 Reference:
*
@@ -295,6 +297,7 @@
} apm_bios_entry;
static int apm_enabled =3D 0;
static int smp_hack =3D 0;
+static int acertm5 =3D 0;
#ifdef CONFIG_APM_CPU_IDLE
static int clock_slowed =3D 0;
#endif
@@ -319,7 +322,7 @@
=20
static struct timer_list apm_timer;
=20
-static char driver_version[] =3D "1.9"; /* no spaces */
+static char driver_version[] =3D "1.9a"; /* no spaces */
=20
#ifdef APM_DEBUG
static char * apm_event_name[] =3D {
@@ -1279,6 +1282,8 @@
debug =3D !invert;
if (strncmp(str, "smp-power-off", 13) =3D=3D 0)
smp_hack =3D !invert;
+ if (strncmp(str, "acertm5", 7) =3D=3D 0)
+ acertm5 =3D !invert;
str =3D strchr(str, ',');
if (str !=3D NULL)
str +=3D strspn(str, ", \t");
@@ -1349,7 +1354,13 @@
__va((unsigned long)0x40 << 4));
_set_limit((char *)&gdt[APM_40 >> 3], 4095 - (0x40 << 4));
=20
- apm_bios_entry.offset =3D apm_bios_info.offset;
+ if (acertm5 && apm_bios_info.offset > 0xffff) {
+ apm_bios_entry.offset =3D apm_bios_info.offset & 0xffff;
+ printk ("APM: Fixed APM BIOS entry offset %lx->%lx (AcerTM51x?)\n",
+ apm_bios_info.offset, apm_bios_entry.offset);
+ }
+ else
+ apm_bios_entry.offset =3D apm_bios_info.offset;
apm_bios_entry.segment =3D APM_CS;
set_base(gdt[APM_CS >> 3],
__va((unsigned long)apm_bios_info.cseg << 4));
--- linux/Documentation/kernel-parameters.txt.orig Tue Jun 8 01:13:07 1999
+++ linux/Documentation/kernel-parameters.txt Tue Oct 12 10:25:40 1999
@@ -64,7 +64,7 @@
=20
AM53C974=3D [HW,SCSI]
=20
- apm=3D [APM] Automatic Power Management.
+ apm=3D [APM] Advanced Power Management.
=20
arcrimi=3D [HW,NET]
=20

--UoPmpPX/dBe4BELn--

--Dzs2zDY0zgkG72+7
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0e (GNU/Linux)
Comment: For info see http://www.gnupg.org

iQCVAwUBOAeQ5haQN/7O/JIVAQFlOwP7BAVscn/m01DJrwtp6AVP+GHriG83Rt1L
RIIXJZ0ej7qeTNa9bQVZ9S9bZKxFaIg9xNvrNCdzuxIiSF3406w6dsXMN7Ef99di
RDmQb/hA0V76H2K/Mq4VVSYwwaZKZ4FT6EMktRmxjWBmFNn4nXfKaQGSlv5md5Km
/vawMzmZf+w=
=DJvb
-----END PGP SIGNATURE-----

--Dzs2zDY0zgkG72+7--

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