From owner-acpi-jp@jp.FreeBSD.org Fri Aug  8 06:42:33 2003
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) id h77LgXY03427;
	Fri, 8 Aug 2003 06:42:33 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from mail.gmx.net (mail.gmx.net [213.165.64.20])
	by castle.jp.FreeBSD.org (8.11.6p2+3.4W/8.11.3) with SMTP/inet id h77LgVT03421
	for <acpi-jp@jp.freebsd.org>; Fri, 8 Aug 2003 06:42:32 +0900 (JST)
	(envelope-from andreas.kohn@gmx.net)
Received: (qmail 31846 invoked by uid 65534); 7 Aug 2003 21:42:24 -0000
Received: from unknown (EHLO [172.16.32.190]) (212.204.32.190)
  by mail.gmx.net (mp022) with SMTP; 07 Aug 2003 23:42:24 +0200
From: Andreas Kohn <andreas.kohn@gmx.net>
To: acpi-jp@jp.FreeBSD.org
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-fyEhVVY2trCTS3suB30a"
Message-Id: <1060292539.390.32.camel@klamath.ankon.homeip.net>
Mime-Version: 1.0
X-Mailer: Ximian Evolution 1.4.4 
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Thu, 07 Aug 2003 23:42:19 +0200
X-Sequence: acpi-jp 2559
Subject: [acpi-jp 2559] unsupported _PRS resource entry type; solved, but why?
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: andreas.kohn@gmx.net
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+030802


--=-fyEhVVY2trCTS3suB30a
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hello,

I had some issues making ACPI work on my laptop, and got a lot of=20
---
pcib0: _PRS resource entry has unsupported type 2=20
---
errors. After fiddling around in both kernel sources and the DSDT, I was
able to resolve these issues and make my laptop work with ACPI (yeah!).=20
But, I'm not exactly sure _why_ my changes fixed this, and would like to
know if the following comes from=20
a) bad DSDT
b) bad FreeBSD
c) bad ACPI spec
d) bad weather ;)

The ASL in question looked like this:
-----
Method(_PRS, 0, NotSerialized) {
	return(IPRB);
}
-----
with IPRB defined as
-----
Name(IPRB, ResourceTemplate() {
	StartDependentFnNoPri() {
		IRQ(Level, ActiveLow, Shared) {4,6,7,11,12,14,15}
	}
	EndDependentFn()
})
-----

In the ACPI Spec (2.0b) there is a similar example in section 16.2.4
"ASL Macros for Resource Descriptors":
---
Name(PRS0, ResourceTemplate() {
	StartDependentFn(1,1) {
		IRQ(...)
		/* more resources */
	}
	StartDependentFn(1,1) {
		/* more */
	}
	EndDependentFn()
})
---

In a last trial I rewrote my _PRS method like
---
Method(_PRS, 0, NotSerialized) {
	Return (ResourceTemplate()=20
	{
        	IRQ (Level, ActiveLow, Shared)
	             { 4, 6, 7, 11, 12, 14, 15}
	}
)}
---

That worked, removed all the errors, made FreeBSD assign the correct
interrupts and generally left me a little bit positively surprised =3D)

But the question since then is: Why didn't the original code work?
I fear that this must be something obvious, but I don't see it (mostly
because the sample suggests that the original code should world)

The complete ASL can be found at http://andreas.syndrom23.de/freebsd.html#a=
cpi

Thank you for any ideas!

Regards,
--=20
Andreas Kohn <andreas.kohn@gmx.net>
--=20
Andreas Kohn <andreas.kohn@gmx.net>

--=-fyEhVVY2trCTS3suB30a
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQA/Mse6Yucd7Ow1ygwRApdAAJ9OEsyw8hncxcSEhLm0B8IXx+GCvgCeJXhn
hgeh6rkWBtkxwsw6a9zjnAY=
=Crjl
-----END PGP SIGNATURE-----

--=-fyEhVVY2trCTS3suB30a--

