diff options
author | Wei, Gang <gang.wei@intel.com> | 2012-01-11 10:34:45 +0100 |
---|---|---|
committer | Wei, Gang <gang.wei@intel.com> | 2012-01-11 10:34:45 +0100 |
commit | 8254d9de116ba2346f489a529208a531a461c723 (patch) | |
tree | 1efe39dc30544451a479514690b1cb30ca094997 /xen/arch/x86/tboot.c | |
parent | e31a66a2b81d1a3d7db829b603865586d44d6216 (diff) | |
download | xen-8254d9de116ba2346f489a529208a531a461c723.tar.gz xen-8254d9de116ba2346f489a529208a531a461c723.tar.bz2 xen-8254d9de116ba2346f489a529208a531a461c723.zip |
x86: add a new SMP bring up way for tboot case
From: Wei, Gang <gang.wei@intel.com>
tboot may be trying to put APs waiting in MWAIT loops before launching
Xen. Xen could check the new flag field in v6 tboot shared page for the
hint. If TB_FLAG_AP_WAKE_SUPPORT bit in flag field is set, Xen BSP have
to write the monitored memory(g_tboot_shared->ap_wake_trigger) to bring
APs out of MWAIT loops. The sipi vector should be written in
g_tboot_shared->ap_wake_addr before waking up APs.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Shane Wang <shane.wang@intel.com>
Signed-off-by: Gang Wei <gang.wei@intel.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/tboot.c')
-rw-r--r-- | xen/arch/x86/tboot.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xen/arch/x86/tboot.c b/xen/arch/x86/tboot.c index 69b6523da7..52d5fa20aa 100644 --- a/xen/arch/x86/tboot.c +++ b/xen/arch/x86/tboot.c @@ -123,6 +123,8 @@ void __init tboot_probe(void) printk(" shutdown_entry: 0x%08x\n", tboot_shared->shutdown_entry); printk(" tboot_base: 0x%08x\n", tboot_shared->tboot_base); printk(" tboot_size: 0x%x\n", tboot_shared->tboot_size); + if ( tboot_shared->version >= 6 ) + printk(" flags: 0x%08x\n", tboot_shared->flags); /* these will be needed by tboot_protect_mem_regions() and/or tboot_parse_dmar_table(), so get them now */ @@ -529,6 +531,18 @@ void tboot_s3_error(int error) panic("Memory integrity was lost on resume (%d)\n", error); } +int tboot_wake_ap(int apicid, unsigned long sipi_vec) +{ + if ( g_tboot_shared->version >= 6 && + (g_tboot_shared->flags & TB_FLAG_AP_WAKE_SUPPORT) ) + { + g_tboot_shared->ap_wake_addr = sipi_vec; + g_tboot_shared->ap_wake_trigger = apicid; + return 0; + } + return 1; +} + /* * Local variables: * mode: C |