Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Oct 2005 13:58:04 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Mathieu Prevot <mathieu_prevot@yahoo.fr>
Cc:        freebsd-acpi@freebsd.org
Subject:   Re: ACPI errors on amd64 (sempron)
Message-ID:  <200510281358.06083.jhb@freebsd.org>
In-Reply-To: <55E0CA58-AC1E-48E4-A4D0-DDC5829D3690@yahoo.fr>
References:  <971FCB6690CD0E4898387DBF7552B90E0323D7B6@orsmsx403.amr.corp.intel.com> <435928CA.1010305@root.org> <55E0CA58-AC1E-48E4-A4D0-DDC5829D3690@yahoo.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 27 October 2005 05:39 pm, Mathieu Prevot wrote:
> Le 21 oct. 05 =E0 19:43, Nate Lawson a =E9crit :
> > John Baldwin wrote:
> >> On Friday 21 October 2005 02:38 am, Mathieu Prevot wrote:
> >>>> I think that the generation of the OS for Amd64 needs to set this
> >>>> define:
> >>>>
> >>>> #define ACPI_MISALIGNED_TRANSFERS
> >>>>
> >>>> I will look into doing this automatically in the actypes.h header
> >>>
> >>> To confirm, the same output on the same system but with
> >>> 6.0RC1i386GENERIC:
> >>
> >> I think Robert's point is a patch like the following hack would
> >> shut up the warnings:
> >> Index: actypes.h
> >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> >> RCS file: /usr/cvs/src/sys/contrib/dev/acpica/actypes.h,v
> >> retrieving revision 1.1.1.29
> >> diff -u -r1.1.1.29 actypes.h
> >> --- actypes.h   1 Dec 2004 23:13:39 -0000       1.1.1.29
> >> +++ actypes.h   21 Oct 2005 13:52:22 -0000
> >> @@ -194,6 +194,9 @@
> >>  typedef UINT64                          ACPI_SIZE;
> >>  #define ALIGNED_ADDRESS_BOUNDARY        0x00000008      /* No
> >> hardware alignment support in IA64 */
> >> +#ifdef __amd64__
> >> +#define ACPI_MISALIGNED_TRANSFERS
> >> +#endif
> >>  #define ACPI_USE_NATIVE_DIVIDE                          /* Native
> >> 64-bit integer support */
> >>  #define ACPI_MAX_PTR                    ACPI_UINT64_MAX
> >>  #define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
> >> The problem is that currently the actypes.h header assumes that
> >> the only 64-bit platform it runs on is IA-64, but it also runs on
> >> amd64 and amd64 allows for unaligned accesses just like i386.
> >> I'm not sure if ALIGNED_ADDRESS_BOUNDARY should be 0x4 for amd64
> >> either, probably not though.
> >
> > If that works, can you commit it to something off the vendor
> > branch? (Perhaps acfreebsd.h or something?)
> >
> > --
> > Nate
>
> I simply added
>
> #define ACPI_MISALIGNED_TRANSFERS
>
> in /usr/src/sys/amd64/include/acpica_machdep.h so the intel actypes.h
> is preserved.
> Maybe it is simpler than touching the Robert's / Intel's code. Is it
> right ?
> If so, someone have to commit it on the CVS sources. Can you do it
> before the release ?

That's probably a good enough fix for 6.0 for now.  HEAD can just wait for =
the=20
real fix from Intel and the hack can be removed from acpica_machdep.h in 6.=
x=20
after the new Intel code is backported.

=2D-=20
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =3D  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200510281358.06083.jhb>