kern/94939: [acpi] [patch] reboot(8) fails on IBM / Intel blades
Devon H. O'Dell
devon.odell at gmail.com
Tue Mar 28 21:21:30 UTC 2006
The following reply was made to PR kern/94939; it has been noted by GNATS.
From: "Devon H. O'Dell" <devon.odell at gmail.com>
To: "John Baldwin" <jhb at freebsd.org>
Cc: "Nate Lawson" <nate at root.org>, bug-followup at freebsd.org
Subject: Re: kern/94939: [acpi] [patch] reboot(8) fails on IBM / Intel blades
Date: Tue, 28 Mar 2006 12:52:56 -0800
------=_Part_3734_24539965.1143579176761
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline
2006/3/28, John Baldwin <jhb at freebsd.org>:
> On Tuesday 28 March 2006 15:21, Devon H. O'Dell wrote:
> > > The patch has some other major problems that should be addressed befo=
re
> > > committing. It should not manually be parsing the GAS and mapping
> > > memory etc. Instead, it should just use AcpiHwLowLevelWrite():
> > >
> > > ACPI_STATUS
> > > AcpiHwLowLevelWrite (
> > > UINT32 Width,
> > > UINT32 Value,
> > > ACPI_GENERIC_ADDRESS *Reg);
> > >
> > > Width should be 8, value should be the reset value in the FADT, and R=
eg
> > > should be the FADT GAS struct.
> >
> > Please see http://www.sitetronics.com/~dodell/acpi2.diff (also
> > attached). This addresses this issue and significantly reduces the
> > size of the diff :)
> >
> > --Devon
>
> Maybe it should use AcpiGbl_FADT->ResetRegister.RegisterBitWidth rather
> than hardcoding 8?
You're right, I should have used that. It will always be 8 as is
stated in the specification, but that's a better idea. I shouldn't
have missed that. Thanks!
http://www.sitetronics.com/~dodell/acpi3.diff -- attached for audit
trail convenience.
--Devon
> --
> John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
> "Power Users Use the Power to Serve" =3D http://www.FreeBSD.org
>
------=_Part_3734_24539965.1143579176761
Content-Type: application/octet-stream; name=acpi3.diff
Content-Transfer-Encoding: 7bit
X-Attachment-Id: 0.1
Content-Disposition: attachment; filename="acpi3.diff"
Index: sys/dev/acpica/acpi.c
===================================================================
RCS file: /home/dodell/cvs/src/sys/dev/acpica/acpi.c,v
retrieving revision 1.219
diff -u -r1.219 acpi.c
--- sys/dev/acpica/acpi.c 7 Nov 2005 21:52:06 -0000 1.219
+++ sys/dev/acpica/acpi.c 28 Mar 2006 20:51:39 -0000
@@ -1636,6 +1636,17 @@
DELAY(1000000);
printf("ACPI power-off failed - timeout\n");
}
+ } else if ((howto & RB_AUTOBOOT) != 0 && AcpiGbl_FADT->ResetRegSup) {
+ status = AcpiHwLowLevelWrite(
+ AcpiGbl_FADT->ResetRegister.RegisterBitWidth,
+ AcpiGbl_FADT->ResetValue, AcpiGbl_FADT->ResetRegister);
+
+ if (ACPI_FAILURE(status)) {
+ printf("ACPI reset failed - %s\n", AcpiFormatException(status));
+ } else {
+ DELAY(1000000);
+ printf("ACPI reset failed - timeout\n");
+ }
} else if (panicstr == NULL) {
printf("Shutting down ACPI\n");
AcpiTerminate();
------=_Part_3734_24539965.1143579176761--
More information about the freebsd-bugs
mailing list