aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHuang, Ying <ying.huang@intel.com>2008-01-30 13:31:19 +0100
committerIngo Molnar <mingo@elte.hu>2008-01-30 13:31:19 +0100
commitde18c850af701ac9512b7239e88fa45e4c168771 (patch)
tree8b0d27a8e8e1908e4ce8c28fe83cba4c67e7f2f9 /arch
parent5b83683f32b113d07edfb67a33ce389fc624423d (diff)
x86: EFI runtime service support: EFI runtime services
This patch adds support for several EFI runtime services for EFI x86_64 system. The EFI support for emergency_restart is added. Signed-off-by: Chandramouli Narayanan <mouli@linux.intel.com> Signed-off-by: Huang Ying <ying.huang@intel.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/reboot_64.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/x86/kernel/reboot_64.c b/arch/x86/kernel/reboot_64.c
index 307f996a393..d6bdf93ffca 100644
--- a/arch/x86/kernel/reboot_64.c
+++ b/arch/x86/kernel/reboot_64.c
@@ -9,6 +9,7 @@
#include <linux/pm.h>
#include <linux/kdebug.h>
#include <linux/sched.h>
+#include <linux/efi.h>
#include <acpi/reboot.h>
#include <asm/io.h>
#include <asm/delay.h>
@@ -28,20 +29,17 @@ void (*pm_power_off)(void);
EXPORT_SYMBOL(pm_power_off);
static long no_idt[3];
-static enum {
- BOOT_TRIPLE = 't',
- BOOT_KBD = 'k',
- BOOT_ACPI = 'a'
-} reboot_type = BOOT_KBD;
+enum reboot_type reboot_type = BOOT_KBD;
static int reboot_mode = 0;
int reboot_force;
-/* reboot=t[riple] | k[bd] [, [w]arm | [c]old]
+/* reboot=t[riple] | k[bd] | e[fi] [, [w]arm | [c]old]
warm Don't set the cold reboot flag
cold Set the cold reboot flag
triple Force a triple fault (init)
kbd Use the keyboard controller. cold reset (default)
acpi Use the RESET_REG in the FADT
+ efi Use efi reset_system runtime service
force Avoid anything that could hang.
*/
static int __init reboot_setup(char *str)
@@ -60,6 +58,7 @@ static int __init reboot_setup(char *str)
case 'a':
case 'b':
case 'k':
+ case 'e':
reboot_type = *str;
break;
case 'f':
@@ -155,7 +154,14 @@ void machine_emergency_restart(void)
acpi_reboot();
reboot_type = BOOT_KBD;
break;
- }
+
+ case BOOT_EFI:
+ if (efi_enabled)
+ efi.reset_system(reboot_mode ? EFI_RESET_WARM : EFI_RESET_COLD,
+ EFI_SUCCESS, 0, NULL);
+ reboot_type = BOOT_KBD;
+ break;
+ }
}
}