From owner-acpi-jp@jp.freebsd.org  Tue Feb  6 08:27:08 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id IAA73626;
	Tue, 6 Feb 2001 08:27:08 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from selene.cps.intel.com (selene.cps.intel.com [192.198.165.10])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id IAA73621
	for <acpi-jp@jp.freebsd.org>; Tue, 6 Feb 2001 08:27:06 +0900 (JST)
	(envelope-from andrew.grover@intel.com)
Received: from SMTP (fmsmsxvs04-1.fm.intel.com [132.233.42.204])
	by selene.cps.intel.com (8.9.1a+p1/8.9.1/d: relay.m4,v 1.33 2000/11/21 19:27:27 smothers Exp $) with SMTP id PAA29027
	for <acpi-jp@jp.freebsd.org>; Mon, 5 Feb 2001 15:26:29 -0800 (PST)
Received: from fmsmsx27.FM.INTEL.COM ([132.233.48.27]) by 132.233.48.204
  (Norton AntiVirus for Internet Email Gateways 1.0) ;
  Mon, 05 Feb 2001 23:26:28 0000 (GMT)
Received: by fmsmsx27.fm.intel.com with Internet Mail Service (5.5.2650.21)
	id <DRV8ZF2S>; Mon, 5 Feb 2001 15:26:27 -0800
Message-ID: <4148FEAAD879D311AC5700A0C969E8905DE643@orsmsx35.jf.intel.com>
From: "Grover, Andrew" <andrew.grover@intel.com>
To: "'Takanori Watanabe'" <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
Cc: acpi-jp@jp.freebsd.org
Date: Mon, 5 Feb 2001 15:26:24 -0800 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Content-Type: text/plain;
	charset="iso-8859-1"
Reply-To: acpi-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: acpi-jp 1051
Subject: [acpi-jp 1051] RE: Some problem in resource handle part.
Errors-To: owner-acpi-jp@jp.freebsd.org
Sender: owner-acpi-jp@jp.freebsd.org
X-Originator: andrew.grover@intel.com

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?)

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.

What do you think?

Regards -- Andy

> 1. Is this structure correct?
> 
> typedef struct
> {
>     UINT32                      ProducerConsumer;
>     UINT32                      EdgeLevel;
>     UINT32                      ActiveHighLow;
>     UINT32                      SharedExclusive;
>     UINT32                      NumberOfInterrupts;
>     UINT32                      Interrupts[1];
>     UINT32                      ResourceSourceIndex;
>     UINT32                      ResourceSourceStringLength;
>     NATIVE_CHAR                 ResourceSource[1];
> 
> } EXTENDED_IRQ_RESOURCE;
> 
> I think it is wrong.As far as I read, size of both Interrupt member 
> and Resource Source member are variable.If ResourceSource exists
> Interrupts array will smash it!

[snip]

> 2.Shouldn't it be more liberal for size of resource stream?
> There are some cases that the resource stream buffer does not 
> end with end tag resource.For example,If there is  AML that 
> is generated from 
> following ASL
> 
> OperationRegion(SREG,SystemIo,0x3f2,2)
> Field(SREG,ByteAcc,NoLock,Preserve){
> 	SMRQ,8
> }
> OperationRegion(SDAT,SystemMemory,0x3fff000,0x80)
> Field(SDAT,ByteAcc, NoLock,Preserve){
> 	CMD,8
> 	DID,8
> 	RESB,1000
> }
> 
> Device(DEV0){
> 	Method(_PRS){
> 		Store(0,DID)
> 		Store(0,CMD)
> 		Store(0,SMRQ)
> 		Return(RESB)
> 	}
> 	Method(_CRS){
> 		Store(0,DID)
> 		Store(1,CMD)
> 		Store(0,SMRQ)
> 		Return(RESB)
> 	}
> }
> Device(DEV1){
> 	Method(_PRS){
> 		Store(1,DID)
> 		Store(0,CMD)
> 		Store(0,SMRQ)
> 		Return(RESB)
> 	}
> 	Method(_CRS){
> 		Store(1,DID)
> 		Store(1,CMD)
> 		Store(0,SMRQ)
> 		Return(RESB)
> 	}
> }
> 
> and SMRQ access generates SMI and process DID and CMD field then 
> return result in SMRQ buffer.
> In this case The RESB size is always 125 bytes long,but resource
> stream is not always 125 and I do not find resource stream buffer
> always have to be just same length as resource stream itself in
> the spac.(If there is such description, please show me.)

