From owner-acpi-jp@jp.freebsd.org  Wed Jul 25 11:13:41 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id LAA66159;
	Wed, 25 Jul 2001 11:13:41 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from TYO201.gate.nec.co.jp (TYO201.gate.nec.co.jp [202.32.8.214])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id LAA66154
	for <acpi-jp@jp.freebsd.org>; Wed, 25 Jul 2001 11:13:41 +0900 (JST)
	(envelope-from sumitani@bd2.hnes.nec.co.jp)
Received: from mailgate4.nec.co.jp ([10.7.69.193])
	by TYO201.gate.nec.co.jp (8.11.3/3.7W01041220) with ESMTP id f6P2D6N01310
	for <acpi-jp@jp.freebsd.org>; Wed, 25 Jul 2001 11:13:07 +0900 (JST)
Received: from mailsv.nec.co.jp (mailgate51.nec.co.jp [10.7.69.190]) by mailgate4.nec.co.jp (8.11.3/3.7W-MAILGATE-NEC) with ESMTP
	id f6P2CqK26943 for <acpi-jp@jp.freebsd.org>; Wed, 25 Jul 2001 11:12:54 +0900 (JST)
Received: from msv1.hnes.nec.co.jp (msv1.hnes.nec.co.jp [10.76.18.17]) by mailsv.nec.co.jp (8.11.3/3.7W-MAILSV-NEC) with ESMTP
	id f6P2Cht18662 for <acpi-jp@jp.freebsd.org>; Wed, 25 Jul 2001 11:12:43 +0900 (JST)
Received: from bd2.hnes.nec.co.jp
	by msv1.hnes.nec.co.jp (8.9.3/3.7Wpl2-HNES) with ESMTP id LAA17046;
	Wed, 25 Jul 2001 11:12:43 +0900 (JST)
Received: from bd2.hnes.nec.co.jp (theophila.bd2.hnes.nec.co.jp [10.76.22.219])
	by bd2.hnes.nec.co.jp (8.9.3/8.9.3) with ESMTP id LAA25635
	for <acpi-jp@jp.freebsd.org>; Wed, 25 Jul 2001 11:11:42 +0900
Message-ID: <3B5E2ADE.A73C17C@bd2.hnes.nec.co.jp>
Date: Wed, 25 Jul 2001 11:11:42 +0900
From: "K.Sumitani" <sumitani@bd2.hnes.nec.co.jp>
X-Mailer: Mozilla 4.75 [ja] (Windows NT 5.0; U)
X-Accept-Language: ja,en
MIME-Version: 1.0
To: acpi-jp@jp.freebsd.org
References: <20010723235103W.iwasaki@jp.FreeBSD.org>
		<200107231507.AAA64725@shidahara1.planet.sci.kobe-u.ac.jp> <20010724003523D.iwasaki@jp.FreeBSD.org>
Content-Type: text/plain; charset=iso-2022-jp
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 1190
Subject: [acpi-jp 1190] Re: wbinvd() required in AcpiEnterSleepState()
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: sumitani@bd2.hnes.nec.co.jp

Mitsuru IWASAKI wrote:
> 
> > >I think we'd better to have new Osd fucntion for this purpose.
> > ># e.g. AcpiOsFlushCaches()
> >
> > wbinvd() is defined in "acgcc.h".(Though that is excluded in FreeBSD,because
> > the definition is conflict with "machine/cpufunc.h" .)
> 
> Yes, I know that and it seems somewhat strange to me.  I don't know whether
> IA64 also have wbinvd instruction.  Do you?

IA64 does not have wbinvd or 'flush entire cache' instruction. Instead, 
there are two firmware procedures; PAL_CACHE_FLUSH and SAL_CACHE_FLUSH.

PAL_CACHE_FLUSH flushes all instruction and/or data caches controlled 
by the processor. It also invalidates caches optionally.

SAL_CACHE_FLUSH flushes and invalidates all instruction and/or data 
caches at all level; both on- and off- processor.

The wbinvd instruction on IA32 roughly corresponds to SAL_CACHE_FLUSH.

IA64 also have write-coalesing buffer but threr is no simple way to 
ensure that flushing is complete. Probably, we must use mf (memory 
fence) instruction and some idle-loops.

A new Osd (?) function will be better.

Koshin Sumitani
