diff options
| -rw-r--r-- | arch/x86/kernel/reboot.c | 8 | ||||
| -rw-r--r-- | init/main.c | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index d2d1ce8170f..9de01c5d979 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
| @@ -24,6 +24,8 @@ | |||
| 24 | # include <asm/iommu.h> | 24 | # include <asm/iommu.h> |
| 25 | #endif | 25 | #endif |
| 26 | 26 | ||
| 27 | #include <asm/tboot.h> | ||
| 28 | |||
| 27 | /* | 29 | /* |
| 28 | * Power off function, if any | 30 | * Power off function, if any |
| 29 | */ | 31 | */ |
| @@ -460,6 +462,8 @@ static void native_machine_emergency_restart(void) | |||
| 460 | if (reboot_emergency) | 462 | if (reboot_emergency) |
| 461 | emergency_vmx_disable_all(); | 463 | emergency_vmx_disable_all(); |
| 462 | 464 | ||
| 465 | tboot_shutdown(TB_SHUTDOWN_REBOOT); | ||
| 466 | |||
| 463 | /* Tell the BIOS if we want cold or warm reboot */ | 467 | /* Tell the BIOS if we want cold or warm reboot */ |
| 464 | *((unsigned short *)__va(0x472)) = reboot_mode; | 468 | *((unsigned short *)__va(0x472)) = reboot_mode; |
| 465 | 469 | ||
| @@ -586,6 +590,8 @@ static void native_machine_halt(void) | |||
| 586 | /* stop other cpus and apics */ | 590 | /* stop other cpus and apics */ |
| 587 | machine_shutdown(); | 591 | machine_shutdown(); |
| 588 | 592 | ||
| 593 | tboot_shutdown(TB_SHUTDOWN_HALT); | ||
| 594 | |||
| 589 | /* stop this cpu */ | 595 | /* stop this cpu */ |
| 590 | stop_this_cpu(NULL); | 596 | stop_this_cpu(NULL); |
| 591 | } | 597 | } |
| @@ -597,6 +603,8 @@ static void native_machine_power_off(void) | |||
| 597 | machine_shutdown(); | 603 | machine_shutdown(); |
| 598 | pm_power_off(); | 604 | pm_power_off(); |
| 599 | } | 605 | } |
| 606 | /* a fallback in case there is no PM info available */ | ||
| 607 | tboot_shutdown(TB_SHUTDOWN_HALT); | ||
| 600 | } | 608 | } |
| 601 | 609 | ||
| 602 | struct machine_ops machine_ops = { | 610 | struct machine_ops machine_ops = { |
diff --git a/init/main.c b/init/main.c index 2c5ade79eb8..56ada27c4f4 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -73,6 +73,7 @@ | |||
| 73 | #include <asm/io.h> | 73 | #include <asm/io.h> |
| 74 | #include <asm/bugs.h> | 74 | #include <asm/bugs.h> |
| 75 | #include <asm/setup.h> | 75 | #include <asm/setup.h> |
| 76 | #include <asm/tboot.h> | ||
| 76 | #include <asm/sections.h> | 77 | #include <asm/sections.h> |
| 77 | #include <asm/cacheflush.h> | 78 | #include <asm/cacheflush.h> |
| 78 | 79 | ||
| @@ -715,6 +716,8 @@ asmlinkage void __init start_kernel(void) | |||
| 715 | 716 | ||
| 716 | ftrace_init(); | 717 | ftrace_init(); |
| 717 | 718 | ||
| 719 | tboot_create_trampoline(); | ||
| 720 | |||
| 718 | /* Do the rest non-__init'ed, we're now alive */ | 721 | /* Do the rest non-__init'ed, we're now alive */ |
| 719 | rest_init(); | 722 | rest_init(); |
| 720 | } | 723 | } |
