Subject: Re: ACPI address32 resource support
To: Nicolas Joly <>
From: Quentin Garnier <>
List: current-users
Date: 09/24/2007 12:44:06
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Sep 24, 2007 at 12:17:13PM +0200, Nicolas Joly wrote:
> Hi,
> I recently found that some hpet@acpi devices do not attach correctly
> because of missing ACPI address32 resource support.
> By example, on a Dell Poweredge 860 :
>  hpet0 at acpi0 (HPET, PNP0103-0)
>  hpet0: unable to find mem register resource
> I tracked this to our ACPI resource parsing which do not support
> address32 (=3D DWord Address Space Descriptor).
> sys/dev/acpi/acpi_resource.c:
>                                      "Address32 unimplemented\n"));
>                 break;
> And the device require it:
>     Device(HPET) {
>         Name(_HID, 0x0301d041)
>         Name(_UID, 0x0)
>         Name(_STA, 0xb)
>         Name(_CRS, Buffer(0x1c) {0x87, 0x17, 0x0, 0x0, 0xd, 0x1, 0x0, 0x0=
, 0x0, 0x0, 0x0, 0x0, 0xd0, 0xfe, 0xff, 0x3, 0xd0, 0xfe, 0x0, 0x0, 0x0, 0x0=
, 0x0, 0x4, 0x0, 0x0, 0x79, 0x0
>         /* ResourceTemplate() {
>          0x0000  DWordMemory(ResourceConsumer, PosDecode, MinFixed, MaxFi=
xed, NonCacheable, ReadWrite, 0x0, 0xfed00000, 0xfed003ff, 0x0, 0x400, 121,=
 '', AddressRangeMemory, TypeStatic)
>         } */
>          })
>     }
> The attached patch fix it by addind ACPI address32 resource support
> (fixed size only).
> hpet0 at acpi0 (HPET, PNP0103-0)
> hpet0: mem 0xfed00000-0xfed003ff
> hpet0: Found 64-bits HPET, will only use lowest 32-bits
> timecounter: Timecounter "hpet0" frequency 14318179 Hz quality 2000
> I'd like to to commit it, but want some review from an ACPI guru
> before.

It's mostly fine.  I'd add a check that the device is a consumer of the
resource, and looking at FreeBSD's code, they also check the length is
not zero.  Apart from that it's mostly identical.

Quentin Garnier - -
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.6 (NetBSD)