From owner-acpi-jp@jp.freebsd.org  Tue Oct 30 05:11:21 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id FAA36263;
	Tue, 30 Oct 2001 05:11:21 +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 FAA36256;
	Tue, 30 Oct 2001 05:11:20 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwasaki.imasy.or.jp [202.227.24.92])
	(authenticated as iwa with CRAM-MD5)
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare/smtpfeed 1.14) with ESMTP/inet id f9TKBGW54440;
	Tue, 30 Oct 2001 05:11:16 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Date: Tue, 30 Oct 2001 05:11:13 +0900 (JST)
Message-Id: <20011030.051113.112619996.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.freebsd.org, msmith@FreeBSD.org
Cc: jhb@FreeBSD.org, acpi@phobos.fachschaften.tu-muenchen.de,
        iwasaki@jp.FreeBSD.org
From: Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
In-Reply-To: <200110291936.f9TJalP02238@mass.dis.org>
References: <59885C5E3098D511AD690002A5072D3C42D6CC@orsmsx111.jf.intel.com>
	<200110291936.f9TJalP02238@mass.dis.org>
X-Mailer: Mew version 2.0 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: acpi-jp 1404
Subject: [acpi-jp 1404] Re: Libretto L2 
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: iwasaki@jp.freebsd.org

Hi, mike.

> Do the problems only occur with ACPI_DEBUG defined?  It's conceivable 
> that calling FUNCTION_TRACE at this point is an error, as it was in the 
> GetThreadId case.

I'm trying this with acpi.ko module w/o ACPI_DEBUG...

BTW, if we jump to sys/i386/acpica/acpi_wakecode.S (in real mode) from
halfway through this function, does mutex or timer0 get something
strange after we get back to the caller's environment?

static int
getit(void)
{
	int high, low;

	mtx_lock_spin(&clock_lock);

	/* Select timer0 and latch counter value. */
	outb(TIMER_MODE, TIMER_SEL0 | TIMER_LATCH);

	low = inb(TIMER_CNTR0);
	high = inb(TIMER_CNTR0);

	mtx_unlock_spin(&clock_lock);
	return ((high << 8) | low);
}

Thanks
