Date: Mon, 28 Jun 1999 18:13:51 +0200
From: "[iso-8859-1] Marek Wójtowicz" 
To: linux-laptop@vger.rutgers.edu
Subject: APM DRIVER

    [The following text is in the "iso-8859-1" character set]
    [Your display is set for the "US-ASCII" character set]
    [Some characters may be displayed incorrectly]

Bios of "ACER EXTENSA 501T"
return     apm_bios_info.cseg=0xfbbd and apm_bios_info.offset=0x500000
(this is bad adress)
working is apm_bios_info.cseg=0xfbbd and apm_bios_info.offset=0

I check this patch on 5 computers, and working :-))

P.S. Sorry for my english :-)))

--- apm.c.orig	Fri Jan 15 07:57:25 1999
+++ apm.c	Mon Jun 28 14:36:29 1999
@@ -1349,7 +1349,7 @@
 		 __va((unsigned long)0x40 << 4));
 	_set_limit((char *)&gdt[APM_40 >> 3], 4095 - (0x40 << 4));
 
-	apm_bios_entry.offset = apm_bios_info.offset;
+	apm_bios_entry.offset = apm_bios_info.offset & 0xffff;
 	apm_bios_entry.segment = APM_CS;
 	set_base(gdt[APM_CS >> 3],
 		 __va((unsigned long)apm_bios_info.cseg << 4));

--

  Marek Wójtowicz 
  http://galaxy.uci.agh.edu.pl/~wumarex



Date: Wed, 30 Jun 1999 11:35:14 +0200
From: "[iso-8859-1] Marek Wójtowicz" 
To: linux-laptop@vger.rutgers.edu
Subject: APM

    [The following text is in the "iso-8859-1" character set]
    [Your display is set for the "US-ASCII" character set]
    [Some characters may be displayed incorrectly]

Sorry for previous patch.
This is very stupid patch.
I disassembled BIOS and find very stupid BUG

   ....
4E91		    xor	    eax, eax
4E94		    mov	    ax,	0FBBDh
4E97		    xor	    ebx, ebx
4E9A		    mov	    cx,	0F000h
4E9D		    mov	    dx,	40h
4EA0		    mov	    [ebp+14h], dx
4EA4		    jmp	    short loc_0_4E83
   ....   
4E7A		    mov	    ax,	0F000h
4E7D		    mov	    bx,	4E04h
4E80		    mov	    cx,	40h
4E83 
4E83 loc_0_4E83:
4E83		    mov	    [ebp+1Ch], ax ; if call 4e91 filled
4E87		    mov	    [ebp+10h], bx ; only 2 bytes
4E8B		    mov	    [ebp+18h], cx
4E8F		    clc
4E90		    retn

P.S. Sorry for my english :-))

--

  Marek Wójtowicz 
  http://galaxy.uci.agh.edu.pl/~wumarex