summaryrefslogtreecommitdiffstats
path: root/init/main.c
diff options
context:
space:
mode:
authorJoseph Cihula <joseph.cihula@intel.com>2009-07-01 04:31:02 +0200
committerH. Peter Anvin <hpa@zytor.com>2009-07-21 20:49:31 +0200
commit840c2baf2d4cdf35ecc3b7fcbba7740f97de30a4 (patch)
treee20e6d3809dbab60507ccb71dac74a4f02d4330f /init/main.c
parentx86, intel_txt: Intel TXT boot support (diff)
downloadlinux-840c2baf2d4cdf35ecc3b7fcbba7740f97de30a4.tar.xz
linux-840c2baf2d4cdf35ecc3b7fcbba7740f97de30a4.zip
x86, intel_txt: Intel TXT reboot/halt shutdown support
Support for graceful handling of kernel reboots after an Intel(R) TXT launch. Without this patch, attempting to reboot or halt the system will cause the TXT hardware to lock memory upon system restart because the secrets-in-memory flag that was set on launch was never cleared. This will in turn cause BIOS to execute a TXT Authenticated Code Module (ACM) that will scrub all of memory and then unlock it. Depending on the amount of memory in the system and its type, this may take some time. This patch creates a 1:1 address mapping to the tboot module and then calls back into tboot so that it may properly and securely clean up system state and clear the secrets-in-memory flag. When it has completed these steps, the tboot module will reboot or halt the system. arch/x86/kernel/reboot.c | 8 ++++++++ init/main.c | 3 +++ 2 files changed, 11 insertions(+) Signed-off-by: Joseph Cihula <joseph.cihula@intel.com> Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to '')
-rw-r--r--init/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index 2c5ade79eb81..56ada27c4f47 100644
--- a/init/main.c
+++ b/init/main.c
@@ -73,6 +73,7 @@
#include <asm/io.h>
#include <asm/bugs.h>
#include <asm/setup.h>
+#include <asm/tboot.h>
#include <asm/sections.h>
#include <asm/cacheflush.h>
@@ -715,6 +716,8 @@ asmlinkage void __init start_kernel(void)
ftrace_init();
+ tboot_create_trampoline();
+
/* Do the rest non-__init'ed, we're now alive */
rest_init();
}