ia64/xen-unstable

view xen/arch/x86/x86_64/asm-offsets.c @ 3780:f368e743fc2e

bitkeeper revision 1.1159.1.568 (420ba33bo4Ly13qI5cHgZttHha5_-g)

Change do_set_callbacks hypercall for x86/64 to not take any selector
values, but to take a syscall_entry point.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Thu Feb 10 18:08:59 2005 +0000 (2005-02-10)
parents 1494093616a3
children 1d13ed9582e0
line source
1 /*
2 * Generate definitions needed by assembly language modules.
3 * This code generates raw asm output which is post-processed
4 * to extract and format the required data.
5 */
7 #include <xen/sched.h>
9 #define DEFINE(_sym, _val) \
10 __asm__ __volatile__ ( "\n->" #_sym " %0 " #_val : : "i" (_val) )
11 #define BLANK() \
12 __asm__ __volatile__ ( "\n->" : : )
13 #define OFFSET(_sym, _str, _mem) \
14 DEFINE(_sym, offsetof(_str, _mem));
16 void __dummy__(void)
17 {
18 OFFSET(XREGS_r15, struct xen_regs, r15);
19 OFFSET(XREGS_r14, struct xen_regs, r14);
20 OFFSET(XREGS_r13, struct xen_regs, r13);
21 OFFSET(XREGS_r12, struct xen_regs, r12);
22 OFFSET(XREGS_rbp, struct xen_regs, rbp);
23 OFFSET(XREGS_rbx, struct xen_regs, rbx);
24 OFFSET(XREGS_r11, struct xen_regs, r11);
25 OFFSET(XREGS_r10, struct xen_regs, r10);
26 OFFSET(XREGS_r9, struct xen_regs, r9);
27 OFFSET(XREGS_r8, struct xen_regs, r8);
28 OFFSET(XREGS_rax, struct xen_regs, rax);
29 OFFSET(XREGS_rcx, struct xen_regs, rcx);
30 OFFSET(XREGS_rdx, struct xen_regs, rdx);
31 OFFSET(XREGS_rsi, struct xen_regs, rsi);
32 OFFSET(XREGS_rdi, struct xen_regs, rdi);
33 OFFSET(XREGS_error_code, struct xen_regs, error_code);
34 OFFSET(XREGS_entry_vector, struct xen_regs, entry_vector);
35 OFFSET(XREGS_rip, struct xen_regs, rip);
36 OFFSET(XREGS_cs, struct xen_regs, cs);
37 OFFSET(XREGS_eflags, struct xen_regs, eflags);
38 OFFSET(XREGS_rsp, struct xen_regs, rsp);
39 OFFSET(XREGS_ss, struct xen_regs, ss);
40 OFFSET(XREGS_kernel_sizeof, struct xen_regs, es);
41 DEFINE(XREGS_user_sizeof, sizeof(struct xen_regs));
42 BLANK();
44 OFFSET(EDOMAIN_processor, struct exec_domain, processor);
45 OFFSET(EDOMAIN_vcpu_info, struct exec_domain, vcpu_info);
46 OFFSET(EDOMAIN_event_addr, struct exec_domain, arch.event_address);
47 OFFSET(EDOMAIN_failsafe_addr, struct exec_domain, arch.failsafe_address);
48 OFFSET(EDOMAIN_syscall_addr, struct exec_domain, arch.syscall_address);
49 OFFSET(EDOMAIN_trap_bounce, struct exec_domain, arch.trap_bounce);
50 OFFSET(EDOMAIN_thread_flags, struct exec_domain, arch.flags);
51 OFFSET(EDOMAIN_kernel_sp, struct exec_domain, arch.kernel_sp);
52 BLANK();
54 OFFSET(VCPUINFO_upcall_pending, vcpu_info_t, evtchn_upcall_pending);
55 OFFSET(VCPUINFO_upcall_mask, vcpu_info_t, evtchn_upcall_mask);
56 BLANK();
58 OFFSET(TRAPBOUNCE_error_code, struct trap_bounce, error_code);
59 OFFSET(TRAPBOUNCE_cr2, struct trap_bounce, cr2);
60 OFFSET(TRAPBOUNCE_flags, struct trap_bounce, flags);
61 OFFSET(TRAPBOUNCE_cs, struct trap_bounce, cs);
62 OFFSET(TRAPBOUNCE_eip, struct trap_bounce, eip);
63 BLANK();
65 OFFSET(MULTICALL_op, multicall_entry_t, op);
66 OFFSET(MULTICALL_arg0, multicall_entry_t, args[0]);
67 OFFSET(MULTICALL_arg1, multicall_entry_t, args[1]);
68 OFFSET(MULTICALL_arg2, multicall_entry_t, args[2]);
69 OFFSET(MULTICALL_arg3, multicall_entry_t, args[3]);
70 OFFSET(MULTICALL_arg4, multicall_entry_t, args[4]);
71 OFFSET(MULTICALL_result, multicall_entry_t, args[5]);
72 }