ia64/xen-unstable

view xen/include/asm-ia64/xensystem.h @ 9744:7ed6c203efe9

[IA64] xensystem.h

Move all Xen memory space constants into xensystem.h
Cleanup related to the move.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Wed Apr 19 10:39:15 2006 -0600 (2006-04-19)
parents f6e8c269f6af
children ced37bea0647
line source
1 #ifndef _ASM_IA64_XENSYSTEM_H
2 #define _ASM_IA64_XENSYSTEM_H
3 /*
4 * xen specific context definition
5 *
6 * Copyright (C) 2005 Hewlett-Packard Co.
7 * Dan Magenheimer (dan.magenheimer@hp.com)
8 *
9 * Copyright (C) 2005 Intel Co.
10 * Kun Tian (Kevin Tian) <kevin.tian@intel.com>
11 *
12 */
13 #include <asm/config.h>
14 #include <linux/kernel.h>
16 /* Define HV space hierarchy.
17 VMM memory space is protected by CPL for paravirtualized domains and
18 by VA for VTi domains. VTi imposes VA bit 60 != VA bit 59 for VMM. */
19 #define XEN_VIRT_SPACE_LOW 0xe800000000000000
20 #define XEN_VIRT_SPACE_HIGH 0xf800000000000000
22 #define __IA64_UNCACHED_OFFSET 0xe800000000000000UL
24 #define XEN_START_ADDR 0xf000000000000000
25 #define HYPERVISOR_VIRT_START 0xf000000000000000
26 #define KERNEL_START 0xf000000004000000
27 #define SHAREDINFO_ADDR 0xf100000000000000
28 #define SHARED_ARCHINFO_ADDR (SHAREDINFO_ADDR + PAGE_SIZE)
29 #define PERCPU_ADDR (SHAREDINFO_ADDR - PERCPU_PAGE_SIZE)
30 #define XSI_OFS (SHARED_ARCHINFO_ADDR - SHAREDINFO_ADDR)
31 #define VHPT_ADDR 0xf200000000000000
32 #ifdef CONFIG_VIRTUAL_FRAME_TABLE
33 #define VIRT_FRAME_TABLE_ADDR 0xf300000000000000
34 #define VIRT_FRAME_TABLE_END 0xf400000000000000
35 #endif
36 #define XEN_END_ADDR 0xf400000000000000
38 #define IS_VMM_ADDRESS(addr) ((((addr) >> 60) ^ ((addr) >> 59)) & 1)
40 #ifndef __ASSEMBLY__
42 #define IA64_HAS_EXTRA_STATE(t) 0
44 struct vcpu;
45 extern void ia64_save_extra (struct vcpu *v);
46 extern void ia64_load_extra (struct vcpu *v);
48 extern struct vcpu *vmx_ia64_switch_to (struct vcpu *next_task);
49 extern struct vcpu *ia64_switch_to (struct vcpu *next_task);
51 #define __switch_to(prev,next,last) do { \
52 ia64_save_fpu(prev->arch._thread.fph); \
53 ia64_load_fpu(next->arch._thread.fph); \
54 if (VMX_DOMAIN(prev)) \
55 vmx_save_state(prev); \
56 else { \
57 if (IA64_HAS_EXTRA_STATE(prev)) \
58 ia64_save_extra(prev); \
59 } \
60 if (VMX_DOMAIN(next)) \
61 vmx_load_state(next); \
62 else { \
63 if (IA64_HAS_EXTRA_STATE(next)) \
64 ia64_save_extra(next); \
65 } \
66 /*ia64_psr(ia64_task_regs(next))->dfh = !ia64_is_local_fpu_owner(next);*/ \
67 (last) = ia64_switch_to((next)); \
68 if (!VMX_DOMAIN(current)){ \
69 vcpu_set_next_timer(current); \
70 } \
71 } while (0)
73 // FIXME SMP... see system.h, does this need to be different?
74 #define switch_to(prev,next,last) __switch_to(prev, next, last)
76 #define local_irq_is_enabled() (!irqs_disabled())
78 #endif // __ASSEMBLY__
79 #endif // _ASM_IA64_XENSYSTEM_H