Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Jun 2006 20:22:57 -0400
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        Nate Lawson <nate@root.org>
Cc:        freebsd-acpi@FreeBSD.org
Subject:   Re: Machine did not reboot
Message-ID:  <200606062022.59336.jkim@FreeBSD.org>
In-Reply-To: <200606061941.06244.jkim@FreeBSD.org>
References:  <1182686709.20060605133201@akavia.ru> <44844D7E.50909@root.org> <200606061941.06244.jkim@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Boundary-00=_jxhhE/+KQrMaT0M
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On Tuesday 06 June 2006 07:41 pm, Jung-uk Kim wrote:
> On Monday 05 June 2006 11:27 am, Nate Lawson wrote:
> > Alexander Logvinov wrote:
> > > Hello.
> > >
> > > I had FreeBSD 5.4. After entering 'shutdown -r now' the system
> > > hanged on: 'Shutting down ACPI'
> > > 'Rebooting'
> > > but did not reboot.
> > > Upgraded to 6.1, it didn't help.
> > > hw.acpi.disable_on_poweroff="1" has no effect. What should I
> > > do?
> > >
> > > Motherboard: Chaintech 7VJL with latest BIOS.
> >
> > Try the reset_register method.  I have MFC'd the patch to
> > RELENG_6 so you can cvsup, recompile your acpi.ko, and test.
>
> Nate,
>
> RB_AUTOBOOT is defined as 0 in sys/reboot.h.  I don't think this
> test will ever work:
>
> 	if ((howto & RB_AUTOBOOT) != 0 && AcpiGbl_FADT->ResetRegSup) {

It's little radical but what do you think about the attached patch?  I 
don't think we have to call AcpiTerminate() to reboot at all.  In 
fact, I have a box which does not reboot.  Writing ACPI_DISABLE to 
SMI_CMD hangs the system and it does not support RESET_REG. :-(  If I 
don't call AcpiTerminate(), everything's fine.

Thanks,

Jung-uk Kim

--Boundary-00=_jxhhE/+KQrMaT0M
Content-Type: text/plain;
  charset="iso-8859-1";
  name="acpi_shutdown.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="acpi_shutdown.diff"

--- sys/dev/acpica/acpi.c	6 Jun 2006 18:30:38 -0000
+++ sys/dev/acpica/acpi.c	7 Jun 2006 00:12:12 -0000
@@ -240,6 +240,12 @@
 SYSCTL_INT(_debug_acpi, OID_AUTO, do_powerstate, CTLFLAG_RW,
     &acpi_do_powerstate, 1, "Turn off devices when suspending.");
 
+/* Terminate ACPI when shutting down. */
+static int acpi_shutdown_terminate = 1;
+TUNABLE_INT("debug.acpi.shutdown_terminate", &acpi_shutdown_terminate);
+SYSCTL_INT(_debug_acpi, OID_AUTO, shutdown_terminate, CTLFLAG_RW,
+    &acpi_shutdown_terminate, 1, "Terminate ACPI when shutting down.");
+
 /* Allow users to override quirks. */
 TUNABLE_INT("debug.acpi.quirks", &acpi_quirks);
 
@@ -1645,7 +1651,12 @@
 	    DELAY(1000000);
 	    printf("ACPI power-off failed - timeout\n");
 	}
-    } else if ((howto & RB_AUTOBOOT) != 0 && AcpiGbl_FADT->ResetRegSup) {
+    } else if ((howto & RB_HALT) != 0) {
+	if (panicstr == NULL && acpi_shutdown_terminate) {
+	    printf("Shutting down ACPI\n");
+	    AcpiTerminate();
+	}
+    } else if (AcpiGbl_FADT->ResetRegSup) {
 	status = AcpiHwLowLevelWrite(
 	    AcpiGbl_FADT->ResetRegister.RegisterBitWidth,
 	    AcpiGbl_FADT->ResetValue, &AcpiGbl_FADT->ResetRegister);
@@ -1655,9 +1666,6 @@
 	    DELAY(1000000);
 	    printf("ACPI reset failed - timeout\n");
 	}
-    } else if (panicstr == NULL) {
-	printf("Shutting down ACPI\n");
-	AcpiTerminate();
     }
 }
 

--Boundary-00=_jxhhE/+KQrMaT0M--



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