Skip to contentSkip to conversation

ACPI: Add reboot mechanism

PATCH In review Aaron Durbin 6 participants 12 messages Jul 16, 2007 – Jul 27, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: Add reboot mechanism

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

---

drivers/acpi/Makefile +1 -1
index d4336f1..c9906a5 100644
@@ -21,7 +21,7 @@ obj-$(CONFIG_X86)		+= blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y				+= osl.o utils.o \
+obj-y				+= osl.o utils.o reboot.o \
 				   dispatcher/ events/ executer/ hardware/ \
 				   namespace/ parser/ resources/ tables/ \
 				   utilities/
drivers/acpi/reboot.c new file +45 -0

45 lines not on this page · raw message

include/acpi/reboot.h new file +10 -0
new file mode 100644
index 0000000..1d8da79
@@ -0,0 +1,10 @@
+#ifndef __ACPI_REBOOT_H
+#define __ACPI_REBOOT_H
+
+#ifdef CONFIG_ACPI
+extern void acpi_reboot(void);
+#else
+#define acpi_reboot()
+#endif
+
+#endif
#1 lore raw
Quoted 10 lines · Aaron Durbin

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

---

drivers/acpi/Makefile +0 -0
index d4336f1..c9906a5 100644

drivers/acpi/Makefile obj-$(CONFIG_X86) += blacklist.o · line 24

Quoted 5 lines
drivers/acpi/Makefile +1 -1
@@ -21,7 +21,7 @@ obj-$(CONFIG_X86)		+= blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y				+= osl.o utils.o \
+obj-y				+= osl.o utils.o reboot.o \

a one function C file? Can you just stick it in one of the other files instead?

Greetings,
Arjan van de Ven

#2 lore raw
Quoted 6 lines · Arjan van de Ven
Quoted 5 lines · Aaron Durbin

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

---

Quoted 14 lines

drivers/acpi/Makefile obj-$(CONFIG_X86) += blacklist.o · line 24

Quoted 10 lines
drivers/acpi/Makefile +1 -1
index d4336f1..c9906a5 100644
@@ -21,7 +21,7 @@ obj-$(CONFIG_X86)           += blacklist.o
 #
 # ACPI Core Subsystem (Interpreter)
 #
-obj-y                                += osl.o utils.o \
+obj-y                                += osl.o utils.o reboot.o \

a one function C file? Can you just stick it in one of the other files instead?

I originally did not do this because I didn't know the proper place. Any suggestions where you would want this?

-Aaron

#3 lore raw
In reply to Aaron Durbin
Quoted 3 lines · Aaron Durbin

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

We could have another command for 'reboot' kernel command line.

Thanks,
Shaohua

#5 lore raw
In reply to Aaron Durbin
Quoted 2 lines · On Monday 16 July 2007 20:00:19 Aaron Durbin wrote:

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

Why? I had such a patch at some point as experiment, but it never helped actually fix a box.

-Andi

#6 lore raw
Quoted 7 lines · Andi Kleen
Quoted 2 lines · On Monday 16 July 2007 20:00:19 Aaron Durbin wrote:

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

Why? I had such a patch at some point as experiment, but it never helped actually fix a box.

system without superio, should still have SMI to simulate one keyboard controller. So the key board reset still works.

YH

#7 lore raw
Quoted 10 lines · Yinghai Lu
Quoted 7 lines · Andi Kleen
Quoted 2 lines · On Monday 16 July 2007 20:00:19 Aaron Durbin wrote:

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

Why? I had such a patch at some point as experiment, but it never helped actually fix a box.

system without superio, should still have SMI to simulate one keyboard controller. So the key board reset still works.

This is true if SMIs are still flowing, and the SMI handler correctly handles the reset properly. I have seen cases where the SMI handler is broken which causes the system to perpetually hang. Utilizing the exposed reset mechanism in ACPI should reset the system every time. However, if the reset fails it will fall back to the keyboard controller.

-Aaron

#8 lore raw
Quoted 3 lines · On Tuesday 17 July 2007 17:08:19 Aaron Durbin wrote:

This is true if SMIs are still flowing, and the SMI handler correctly handles the reset properly. I have seen cases where the SMI handler is broken which causes the system to perpetually hang.

Ah, that is the rationale that was missing in the first mail ... Ok that makes some sense. Is it a common issue?

-Andi

#9 lore raw
Quoted 9 lines · Andi Kleen
Quoted 3 lines · On Tuesday 17 July 2007 17:08:19 Aaron Durbin wrote:

This is true if SMIs are still flowing, and the SMI handler correctly handles the reset properly. I have seen cases where the SMI handler is broken which causes the system to perpetually hang.

Ah, that is the rationale that was missing in the first mail ... Ok that makes some sense. Is it a common issue?

I am not sure in how common it is, but I have access to some machines around here that are displaying this issue.

-Aaron

#10 lore raw
In reply to Andi Kleen
Quoted 6 lines · Andi Kleen
Quoted 2 lines · On Monday 16 July 2007 20:00:19 Aaron Durbin wrote:

Add the ability to reset the machine using the RESET_REG in ACPI's FADT table.

Why? I had such a patch at some point as experiment, but it never helped actually fix a box.

I have a box here that it fixes, but I also don't see what it hurts. How much are you against the patch? If the keyboard controller won't work and there are issues using the triple fault, but if the RESET_REG is setup properly it will definitely reboot the machine as intended with no ill side effects.

-Aaron

#11 lore raw
Quoted 4 lines · Aaron Durbin
Quoted 3 lines · Andi Kleen
Quoted 2 lines · On Monday 16 July 2007 20:00:19 Aaron Durbin wrote:

Add the ability to reset the machine using the

Quoted 8 lines
Quoted 5 lines

RESET_REG in ACPI's FADT table.

Why? I had such a patch at some point as experiment, but it never
helped actually fix a box.

I have a box here that it fixes, but I also don't see what it hurts. How much

What machine is it?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html