/root/src/xen/xen/include/asm/x86_64/elf.h
Line | Count | Source (jump to first uncovered line) |
1 | | #ifndef __X86_64_ELF_H__ |
2 | | #define __X86_64_ELF_H__ |
3 | | |
4 | | typedef struct { |
5 | | unsigned long r15; |
6 | | unsigned long r14; |
7 | | unsigned long r13; |
8 | | unsigned long r12; |
9 | | unsigned long rbp; |
10 | | unsigned long rbx; |
11 | | unsigned long r11; |
12 | | unsigned long r10; |
13 | | unsigned long r9; |
14 | | unsigned long r8; |
15 | | unsigned long rax; |
16 | | unsigned long rcx; |
17 | | unsigned long rdx; |
18 | | unsigned long rsi; |
19 | | unsigned long rdi; |
20 | | unsigned long orig_rax; |
21 | | unsigned long rip; |
22 | | unsigned long cs; |
23 | | unsigned long rflags; |
24 | | unsigned long rsp; |
25 | | unsigned long ss; |
26 | | unsigned long thread_fs; |
27 | | unsigned long thread_gs; |
28 | | unsigned long ds; |
29 | | unsigned long es; |
30 | | unsigned long fs; |
31 | | unsigned long gs; |
32 | | } ELF_Gregset; |
33 | | |
34 | | static inline void elf_core_save_regs(ELF_Gregset *core_regs, |
35 | | crash_xen_core_t *xen_core_regs) |
36 | 0 | { |
37 | 0 | unsigned long tmp; |
38 | 0 |
|
39 | 0 | asm volatile("movq %%r15,%0" : "=m"(core_regs->r15)); |
40 | 0 | asm volatile("movq %%r14,%0" : "=m"(core_regs->r14)); |
41 | 0 | asm volatile("movq %%r13,%0" : "=m"(core_regs->r13)); |
42 | 0 | asm volatile("movq %%r12,%0" : "=m"(core_regs->r12)); |
43 | 0 | asm volatile("movq %%rbp,%0" : "=m"(core_regs->rbp)); |
44 | 0 | asm volatile("movq %%rbx,%0" : "=m"(core_regs->rbx)); |
45 | 0 | asm volatile("movq %%r11,%0" : "=m"(core_regs->r11)); |
46 | 0 | asm volatile("movq %%r10,%0" : "=m"(core_regs->r10)); |
47 | 0 | asm volatile("movq %%r9,%0" : "=m"(core_regs->r9)); |
48 | 0 | asm volatile("movq %%r8,%0" : "=m"(core_regs->r8)); |
49 | 0 | asm volatile("movq %%rax,%0" : "=m"(core_regs->rax)); |
50 | 0 | asm volatile("movq %%rcx,%0" : "=m"(core_regs->rcx)); |
51 | 0 | asm volatile("movq %%rdx,%0" : "=m"(core_regs->rdx)); |
52 | 0 | asm volatile("movq %%rsi,%0" : "=m"(core_regs->rsi)); |
53 | 0 | asm volatile("movq %%rdi,%0" : "=m"(core_regs->rdi)); |
54 | 0 | /* orig_rax not filled in for now */ |
55 | 0 | core_regs->rip = (unsigned long)elf_core_save_regs; |
56 | 0 | asm volatile("movl %%cs, %%eax;" :"=a"(core_regs->cs)); |
57 | 0 | asm volatile("pushfq; popq %0" :"=m"(core_regs->rflags)); |
58 | 0 | asm volatile("movq %%rsp,%0" : "=m"(core_regs->rsp)); |
59 | 0 | asm volatile("movl %%ss, %%eax;" :"=a"(core_regs->ss)); |
60 | 0 | /* thread_fs not filled in for now */ |
61 | 0 | /* thread_gs not filled in for now */ |
62 | 0 | asm volatile("movl %%ds, %%eax;" :"=a"(core_regs->ds)); |
63 | 0 | asm volatile("movl %%es, %%eax;" :"=a"(core_regs->es)); |
64 | 0 | asm volatile("movl %%fs, %%eax;" :"=a"(core_regs->fs)); |
65 | 0 | asm volatile("movl %%gs, %%eax;" :"=a"(core_regs->gs)); |
66 | 0 |
|
67 | 0 | asm volatile("mov %%cr0, %0" : "=r" (tmp) : ); |
68 | 0 | xen_core_regs->cr0 = tmp; |
69 | 0 |
|
70 | 0 | asm volatile("mov %%cr2, %0" : "=r" (tmp) : ); |
71 | 0 | xen_core_regs->cr2 = tmp; |
72 | 0 |
|
73 | 0 | asm volatile("mov %%cr3, %0" : "=r" (tmp) : ); |
74 | 0 | xen_core_regs->cr3 = tmp; |
75 | 0 |
|
76 | 0 | asm volatile("mov %%cr4, %0" : "=r" (tmp) : ); |
77 | 0 | xen_core_regs->cr4 = tmp; |
78 | 0 | } Unexecuted instantiation: kexec.c:elf_core_save_regs Unexecuted instantiation: kimage.c:elf_core_save_regs Unexecuted instantiation: shutdown.c:elf_core_save_regs Unexecuted instantiation: console.c:elf_core_save_regs Unexecuted instantiation: ns16550.c:elf_core_save_regs Unexecuted instantiation: ehci-dbgp.c:elf_core_save_regs Unexecuted instantiation: io.c:elf_core_save_regs Unexecuted instantiation: iommu.c:elf_core_save_regs Unexecuted instantiation: dmar.c:elf_core_save_regs Unexecuted instantiation: utils.c:elf_core_save_regs Unexecuted instantiation: qinval.c:elf_core_save_regs Unexecuted instantiation: intremap.c:elf_core_save_regs Unexecuted instantiation: quirks.c:elf_core_save_regs Unexecuted instantiation: vtd.c:elf_core_save_regs Unexecuted instantiation: ats.c:elf_core_save_regs Unexecuted instantiation: iommu_init.c:elf_core_save_regs Unexecuted instantiation: pci_amd_iommu.c:elf_core_save_regs Unexecuted instantiation: iommu_intr.c:elf_core_save_regs Unexecuted instantiation: erst.c:elf_core_save_regs Unexecuted instantiation: apei-io.c:elf_core_save_regs Unexecuted instantiation: apic.c:elf_core_save_regs Unexecuted instantiation: crash.c:elf_core_save_regs Unexecuted instantiation: i8259.c:elf_core_save_regs Unexecuted instantiation: io_apic.c:elf_core_save_regs Unexecuted instantiation: msi.c:elf_core_save_regs Unexecuted instantiation: irq.c:elf_core_save_regs Unexecuted instantiation: machine_kexec.c:elf_core_save_regs Unexecuted instantiation: mm.c:elf_core_save_regs Unexecuted instantiation: mpparse.c:elf_core_save_regs Unexecuted instantiation: nmi.c:elf_core_save_regs Unexecuted instantiation: physdev.c:elf_core_save_regs Unexecuted instantiation: platform_hypercall.c:elf_core_save_regs Unexecuted instantiation: setup.c:elf_core_save_regs Unexecuted instantiation: smp.c:elf_core_save_regs Unexecuted instantiation: smpboot.c:elf_core_save_regs Unexecuted instantiation: time.c:elf_core_save_regs Unexecuted instantiation: traps.c:elf_core_save_regs Unexecuted instantiation: tboot.c:elf_core_save_regs Unexecuted instantiation: hpet.c:elf_core_save_regs Unexecuted instantiation: lib.c:elf_core_save_regs Unexecuted instantiation: power.c:elf_core_save_regs Unexecuted instantiation: cpu_idle.c:elf_core_save_regs Unexecuted instantiation: amd.c:elf_core_save_regs Unexecuted instantiation: common.c:elf_core_save_regs Unexecuted instantiation: intel.c:elf_core_save_regs Unexecuted instantiation: vpmu.c:elf_core_save_regs Unexecuted instantiation: vpmu_amd.c:elf_core_save_regs Unexecuted instantiation: vpmu_intel.c:elf_core_save_regs Unexecuted instantiation: mce.c:elf_core_save_regs Unexecuted instantiation: mce_intel.c:elf_core_save_regs Unexecuted instantiation: bigsmp.c:elf_core_save_regs Unexecuted instantiation: x2apic.c:elf_core_save_regs Unexecuted instantiation: default.c:elf_core_save_regs Unexecuted instantiation: delivery.c:elf_core_save_regs Unexecuted instantiation: probe.c:elf_core_save_regs Unexecuted instantiation: hvm.c:elf_core_save_regs Unexecuted instantiation: vioapic.c:elf_core_save_regs Unexecuted instantiation: viridian.c:elf_core_save_regs Unexecuted instantiation: vlapic.c:elf_core_save_regs Unexecuted instantiation: vmsi.c:elf_core_save_regs Unexecuted instantiation: vpt.c:elf_core_save_regs Unexecuted instantiation: svm.c:elf_core_save_regs Unexecuted instantiation: vmcs.c:elf_core_save_regs Unexecuted instantiation: vmx.c:elf_core_save_regs Unexecuted instantiation: nmi_int.c:elf_core_save_regs Unexecuted instantiation: op_model_p4.c:elf_core_save_regs Unexecuted instantiation: op_model_ppro.c:elf_core_save_regs Unexecuted instantiation: op_model_athlon.c:elf_core_save_regs Unexecuted instantiation: emul-gate-op.c:elf_core_save_regs Unexecuted instantiation: emul-inv-op.c:elf_core_save_regs Unexecuted instantiation: emul-priv-op.c:elf_core_save_regs Unexecuted instantiation: acpi_mmcfg.c:elf_core_save_regs |
79 | | |
80 | | #endif /* __X86_64_ELF_H__ */ |
81 | | |
82 | | /* |
83 | | * Local variables: |
84 | | * mode: C |
85 | | * c-file-style: "BSD" |
86 | | * c-basic-offset: 4 |
87 | | * tab-width: 4 |
88 | | * indent-tabs-mode: nil |
89 | | * End: |
90 | | */ |