From owner-acpi-jp@jp.freebsd.org  Fri Jan  5 23:11:33 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id XAA78675;
	Fri, 5 Jan 2001 23:11:33 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (daemon@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id XAA78670
	for <acpi-jp@jp.freebsd.org>; Fri, 5 Jan 2001 23:11:33 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	by tasogare.imasy.or.jp (8.11.1+3.4W/3.7W-tasogare/smtpfeed 1.07) with ESMTP id f05EBKk16228;
	Fri, 5 Jan 2001 23:11:20 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
To: acpi-jp@jp.freebsd.org, peter@netplex.com.au
Cc: marc@mbsi.ca, adam@yggdrasil.com,
        takawata@shidahara1.planet.sci.kobe-u.ac.jp, msmith@freebsd.org,
        fudge_factor@hotmail.com, acme@conectiva.com.br
In-Reply-To: <200101030128.f031S9813385@mobile.wemm.org>
References: <20010102141738.A11097@opium.mbsi.ca>
	<200101030128.f031S9813385@mobile.wemm.org>
X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <20010105231115J.iwasaki@jp.FreeBSD.org>
Date: Fri, 05 Jan 2001 23:11:15 +0900
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
X-Dispatcher: imput version 20000228(IM140)
Lines: 77
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 1021
Subject: [acpi-jp 1021] Re: [Acpi] Patch(?): Peter Wemm's Sony Vaio
 ACPI fix simplified and adapted to linux-2.4.0-prerelease 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Hi, A happy new year, folks!

> Marc Boucher wrote:
> > Hi Adam, folks,
> > 
> > Unfortunately this patch didn't fix the hang at initialization
> > (in EC0_BAT1's _STA method) on my Vaio PCG-Z505LS.
> 
> Which version of the patch?  Both?
> 
> For what it is worth, I get hangs if I have 'CPU Speed: Auto' in the bios.
> If I set it to 'CPU Speed: Full' I get reliable boots.  The bios text suggests
> that this switch is non-functional with ACPI enabled, but it certainly
> seems to make an impact here.

I guess this is some sort of timing problem in region space access
sequence as one of the possibilities.  We didn't have this infinite
loop in PHS0 on VAIO machines with old our own AML interpreter which
is very light (and also incomplete).  The old interpreter didn't have
the workaround Peter suggested, was doing read and write back for the
preserve update rule.
# but I'm not 100% sure that PHS0 was executed by old interpreter...

AML interpreter of ACPICA is full spec. implementation and doing a lot
of right things during its execution, however it seems heavier than
ours.
Peter's patch skips unnecessary field reading, IOW, workaround for
speed-up.  This is my impression.

> I usually get hangs in ECO_BAT1's _STA if I boot on 'Auto' speed, but not
> always.  If I power the thing up from cold I usually get a few more SMI calls
> further.  If I start really hot, it sometimes hangs sooner.

Maybe this is also timing problem by CPU speed setting?  I guess some
kind of timeout is occurred in access sequence on Auto speed BIOS
setting.

BTW, I also have another problem here on TOSHIBA PORTEGE 3110CT.  The
system hangs after wakeup from S1 transition.  With old own AML
interpreter after changes on 20 Sep. 2000 (mainly regon space access
tune up), the system doesn't have this problem.  Before this changes I
have the same symptom on this machine, so I'm trying to recall and
figure out what is the difference between them...

The commit log is;

iwasaki     2000/09/19 18:01:32 PDT

  Modified files:
    sys/dev/acpi/aml     aml_common.c aml_common.h aml_evalobj.c 
                         aml_parse.c aml_region.c aml_region.h 
                         aml_store.c 
    usr.sbin/acpi/amldb  region.c 
  Log:
  Improve region I/O sub-routines by re-writing most of low level part
  of AML interpreter.
   - Delete and cleanup a lot of almost duplicated code in kernel/userland.
   - Add new common functions for kernel/userland code.
        aml_adjust_readvalue(), aml_adjust_updatevalue(),
        aml_region_handle_alloc(), aml_region_handle_free() and
        aml_region_io().
   - Add primitive functions for both versions of kernel/userland in order to
     have shared code as much as possible.
        aml_region_read_simple(), aml_region_write_simple(),
        aml_region_prompt_read(), aml_region_prompt_write() and
        aml_region_prompt_update_value().
   - Consider update rule and access type in field flags. Also add a lot of
     definitions for the flags.
   - Fix bugs on bit manipulation for read/write operations.
   - Fix bugs on IndexField I/O part.  Also add workaround for temporary
     object corruption during StoreOp interpretation.

also available at:
http://www.FreeBSD.org/cgi/getmsg.cgi?fetch=549014+551723+/usr/local/www/db/text/2000/cvs-all/20000924.cvs-all


Thanks
