From owner-acpi-jp@jp.freebsd.org  Tue Feb  6 09:40:14 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id JAA76685;
	Tue, 6 Feb 2001 09:40:14 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from shidahara1.planet.sci.kobe-u.ac.jp (shidahara1.planet.sci.kobe-u.ac.jp [133.30.50.200])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id JAA76680
	for <acpi-jp@jp.freebsd.org>; Tue, 6 Feb 2001 09:40:13 +0900 (JST)
	(envelope-from takawata@shidahara1.planet.sci.kobe-u.ac.jp)
Received: from shidahara1.planet.sci.kobe-u.ac.jp (localhost [127.0.0.1])
	by shidahara1.planet.sci.kobe-u.ac.jp (8.9.3/8.9.3) with ESMTP id JAA60732;
	Tue, 6 Feb 2001 09:41:59 +0900 (JST)
	(envelope-from takawata@shidahara1.planet.sci.kobe-u.ac.jp)
Message-Id: <200102060041.JAA60732@shidahara1.planet.sci.kobe-u.ac.jp>
To: andrew.grover@intel.com
Cc: acpi-jp@jp.freebsd.org
In-reply-to: Your message of "Mon, 05 Feb 2001 15:26:24 PST."
             <4148FEAAD879D311AC5700A0C969E8905DE643@orsmsx35.jf.intel.com>
Date: Tue, 06 Feb 2001 09:41:59 +0900
From: Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 1052
Subject: [acpi-jp 1052] Re: Some problem in resource handle part.
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: takawata@shidahara1.planet.sci.kobe-u.ac.jp

In message <4148FEAAD879D311AC5700A0C969E8905DE643@orsmsx35.jf.intel.com>, "Gro
ver, Andrew" $B$5$s$$$o$/(B:
>1. OK, we will fix it.
>2. Well, first, the spec makes it sound like all resources must have an end
>tag, so if a system doesn't then it's noncompliant. (What's the point of an
>end tag if some people don't use it?)

In the case I mentioned, EndTag exists but not located at the end of buffer.
Resource stream is smaller than the buffer reserved,like this.
{0x22,0x0,0x10,0x79,0x0,0x0,0x0,0x0,0x0.....}
  ^IrqTag        ^EndTag  ^----Untouched data follows.
This case may occur the example I wrote.

>
>Second, I think we handle this case. In AcpiRsByteStreamToList() we loop,
>consuming the resource data:
>
>    while (BytesParsed < ByteStreamBufferLength &&
>            FALSE == EndTagProcessed)
>
>So, even with no end tag, we exit the loop at the end of the buffer.

Yes, this is correct.But I want to say is the case I mentioned above.
To fix this,change
in AcpiRsByteStreamToList()@rslist.c

	if(!(ByteStreamBufferLength == ByteParsed) ||
		(TRUE != EndTagProcessed))

to
	if(TRUE != EndTagProcessed)

and 
in AcpiRsCalculateListLength()@rscalc.c
add 
	ByteStreamBufferLength = ByteParsed;
at
       case END_TAG:
to stop calculation loop.

Thanks.

Takanori Watanabe
<a href="http://www.planet.sci.kobe-u.ac.jp/~takawata/key.html">
Public Key</a>
Key fingerprint =  2C 51 E2 78 2C E1 C5 2D  0F F1 20 A3 11 3A 62 2A 
