ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h @ 11221:7c9d7fc3dce5

[HVM] Fix SMBIOS entry point copy destination.
Spotted by Xiaowei Yang <xiaowei.yang@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@localhost.localdomain
date Sat Aug 19 12:06:36 2006 +0100 (2006-08-19)
parents 2b37b17cca09
children 44caba9460af
line source
1 /**
2 * machine_specific_* - Hooks for machine specific setup.
3 *
4 * Description:
5 * This is included late in kernel/setup.c so that it can make
6 * use of all of the static functions.
7 **/
9 #include <xen/interface/callback.h>
11 extern void hypervisor_callback(void);
12 extern void failsafe_callback(void);
13 extern void nmi(void);
15 static void __init machine_specific_arch_setup(void)
16 {
17 int ret;
18 struct callback_register event = {
19 .type = CALLBACKTYPE_event,
20 .address = (unsigned long) hypervisor_callback,
21 };
22 struct callback_register failsafe = {
23 .type = CALLBACKTYPE_failsafe,
24 .address = (unsigned long)failsafe_callback,
25 };
26 struct callback_register syscall = {
27 .type = CALLBACKTYPE_syscall,
28 .address = (unsigned long)system_call,
29 };
30 #ifdef CONFIG_X86_LOCAL_APIC
31 struct callback_register nmi_cb = {
32 .type = CALLBACKTYPE_nmi,
33 .address = (unsigned long)nmi,
34 };
35 #endif
37 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &event);
38 if (ret == 0)
39 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &failsafe);
40 if (ret == 0)
41 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &syscall);
42 if (ret == -ENOSYS)
43 ret = HYPERVISOR_set_callbacks(
44 event.address,
45 failsafe.address,
46 syscall.address);
47 BUG_ON(ret);
49 #ifdef CONFIG_X86_LOCAL_APIC
50 ret = HYPERVISOR_callback_op(CALLBACKOP_register, &nmi_cb);
51 if (ret == -ENOSYS) {
52 struct xennmi_callback cb;
54 cb.handler_address = nmi_cb.address;
55 HYPERVISOR_nmi_op(XENNMI_register_callback, &cb);
56 }
57 #endif
58 }