From owner-freebsd-bugs@FreeBSD.ORG Tue Mar 28 21:21:30 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 409D616A5B0 for ; Tue, 28 Mar 2006 21:21:30 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB3B243E34 for ; Tue, 28 Mar 2006 21:20:40 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k2SLKJ9K018984 for ; Tue, 28 Mar 2006 21:20:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k2SLKJZS018983; Tue, 28 Mar 2006 21:20:19 GMT (envelope-from gnats) Date: Tue, 28 Mar 2006 21:20:19 GMT Message-Id: <200603282120.k2SLKJZS018983@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: "Devon H. O'Dell" Cc: Subject: Re: kern/94939: [acpi] [patch] reboot(8) fails on IBM / Intel blades X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: "Devon H. O'Dell" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Mar 2006 21:21:30 -0000 The following reply was made to PR kern/94939; it has been noted by GNATS. From: "Devon H. O'Dell" To: "John Baldwin" Cc: "Nate Lawson" , bug-followup@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 : > 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 <>< 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--