Machine did not reboot

Jung-uk Kim jkim at FreeBSD.org
Tue Jun 6 17:41:21 PDT 2006


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
-------------- next part --------------
--- 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();
     }
 }
 


More information about the freebsd-acpi mailing list