Messages in this thread Patch in this message | | | Date | Fri, 15 Oct 1999 22:39:03 +0200 | From | Kurt Garloff <> | Subject | APM patch for Acer TM 510 series |
| |
Hi,
find attached a patch to add a kernel parameter apm=acertm5.
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, -- Kurt Garloff <garloff@suse.de> Wuppertal, FRG PGP2 key: See mail header, key servers Linux kernel development SuSE GmbH, Nürnberg, FRG SCSI drivers: tmscsim(DC390), DC395 --- 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=acertm5 works around Acer TravelMate + * 510 series BIOS bug. * * APM 1.1 Reference: * @@ -295,6 +297,7 @@ } apm_bios_entry; static int apm_enabled = 0; static int smp_hack = 0; +static int acertm5 = 0; #ifdef CONFIG_APM_CPU_IDLE static int clock_slowed = 0; #endif @@ -319,7 +322,7 @@ static struct timer_list apm_timer; -static char driver_version[] = "1.9"; /* no spaces */ +static char driver_version[] = "1.9a"; /* no spaces */ #ifdef APM_DEBUG static char * apm_event_name[] = { @@ -1279,6 +1282,8 @@ debug = !invert; if (strncmp(str, "smp-power-off", 13) == 0) smp_hack = !invert; + if (strncmp(str, "acertm5", 7) == 0) + acertm5 = !invert; str = strchr(str, ','); if (str != NULL) str += strspn(str, ", \t"); @@ -1349,7 +1354,13 @@ __va((unsigned long)0x40 << 4)); _set_limit((char *)&gdt[APM_40 >> 3], 4095 - (0x40 << 4)); - apm_bios_entry.offset = apm_bios_info.offset; + if (acertm5 && apm_bios_info.offset > 0xffff) { + apm_bios_entry.offset = 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 = apm_bios_info.offset; apm_bios_entry.segment = 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 @@ AM53C974= [HW,SCSI] - apm= [APM] Automatic Power Management. + apm= [APM] Advanced Power Management. arcrimi= [HW,NET] [unhandled content-type:application/pgp-signature] | |