~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/xeno/config.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/******************************************************************************
2
 
 * config.h
3
 
 * 
4
 
 * A Linux-style configuration list.
5
 
 */
6
 
 
7
 
#ifndef __XENO_CONFIG_H__
8
 
#define __XENO_CONFIG_H__
9
 
 
10
 
#define CONFIG_X86 1
11
 
 
12
 
#define CONFIG_SMP 1
13
 
#define CONFIG_X86_LOCAL_APIC 1
14
 
#define CONFIG_X86_IO_APIC 1
15
 
#define CONFIG_X86_L1_CACHE_SHIFT 5
16
 
 
17
 
#define CONFIG_PCI 1
18
 
#define CONFIG_PCI_BIOS 1
19
 
#define CONFIG_PCI_DIRECT 1
20
 
 
21
 
#define CONFIG_IDE 1
22
 
#define CONFIG_BLK_DEV_IDE 1
23
 
#define CONFIG_BLK_DEV_IDEDMA 1
24
 
#define CONFIG_BLK_DEV_IDEPCI 1
25
 
#define CONFIG_IDEDISK_MULTI_MODE 1
26
 
#define CONFIG_IDEDISK_STROKE 1
27
 
#define CONFIG_IDEPCI_SHARE_IRQ 1
28
 
#define CONFIG_BLK_DEV_IDEDMA_PCI 1
29
 
#define CONFIG_IDEDMA_PCI_AUTO 1
30
 
#define CONFIG_IDEDMA_AUTO 1
31
 
#define CONFIG_IDEDMA_ONLYDISK 1
32
 
#define CONFIG_BLK_DEV_IDE_MODES 1
33
 
#define CONFIG_BLK_DEV_PIIX 1
34
 
 
35
 
#define CONFIG_SCSI 1
36
 
#define CONFIG_SCSI_LOGGING 1
37
 
#define CONFIG_BLK_DEV_SD 1
38
 
#define CONFIG_SD_EXTRA_DEVS 40
39
 
#define CONFIG_SCSI_MULTI_LUN 1
40
 
 
41
 
#define CONFIG_XEN_ATTENTION_KEY 1
42
 
 
43
 
#define HZ 100
44
 
 
45
 
/*
46
 
 * Just to keep compiler happy.
47
 
 * NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!!
48
 
 * It depends on size of irq_cpustat_t, for example, being 64 bytes. :-)
49
 
 * Mmmm... so niiiiiice....
50
 
 */
51
 
#define SMP_CACHE_BYTES 64
52
 
#define NR_CPUS 16
53
 
#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
54
 
#define ____cacheline_aligned __cacheline_aligned
55
 
 
56
 
/*** Hypervisor owns top 64MB of virtual address space. ***/
57
 
#define HYPERVISOR_VIRT_START (0xFC000000UL)
58
 
 
59
 
/*
60
 
 * First 4MB are mapped read-only for all. It's for the machine->physical
61
 
 * mapping table (MPT table). The following are virtual addresses.
62
 
 */
63
 
#define READONLY_MPT_VIRT_START (HYPERVISOR_VIRT_START)
64
 
#define READONLY_MPT_VIRT_END   (READONLY_MPT_VIRT_START + (4*1024*1024))
65
 
/*
66
 
 * Next 16MB is fixed monitor space, which is part of a 44MB direct-mapped
67
 
 * memory region. The following are machine addresses.
68
 
 */
69
 
#define MAX_MONITOR_ADDRESS   (16*1024*1024)
70
 
#define MAX_DMA_ADDRESS       (16*1024*1024)
71
 
#define MAX_DIRECTMAP_ADDRESS (44*1024*1024)
72
 
/* And the virtual addresses for the direct-map region... */
73
 
#define DIRECTMAP_VIRT_START  (READONLY_MPT_VIRT_END)
74
 
#define DIRECTMAP_VIRT_END    (DIRECTMAP_VIRT_START + MAX_DIRECTMAP_ADDRESS)
75
 
#define MONITOR_VIRT_START    (DIRECTMAP_VIRT_START)
76
 
#define MONITOR_VIRT_END      (MONITOR_VIRT_START + MAX_MONITOR_ADDRESS)
77
 
#define RDWR_MPT_VIRT_START   (MONITOR_VIRT_END)
78
 
#define RDWR_MPT_VIRT_END     (RDWR_MPT_VIRT_START + (4*1024*1024))
79
 
#define FRAMETABLE_VIRT_START (RDWR_MPT_VIRT_END)
80
 
#define FRAMETABLE_VIRT_END   (DIRECTMAP_VIRT_END)
81
 
/* Next 4MB of virtual address space is used as a linear p.t. mapping. */
82
 
#define LINEAR_PT_VIRT_START  (DIRECTMAP_VIRT_END)
83
 
#define LINEAR_PT_VIRT_END    (LINEAR_PT_VIRT_START + (4*1024*1024))
84
 
/* Next 4MB of virtual address space used for per-domain mappings (eg. GDT). */
85
 
#define PERDOMAIN_VIRT_START  (LINEAR_PT_VIRT_END)
86
 
#define PERDOMAIN_VIRT_END    (PERDOMAIN_VIRT_START + (4*1024*1024))
87
 
#define GDT_VIRT_START        (PERDOMAIN_VIRT_START)
88
 
#define GDT_VIRT_END          (GDT_VIRT_START + (64*1024))
89
 
#define LDT_VIRT_START        (GDT_VIRT_END)
90
 
#define LDT_VIRT_END          (LDT_VIRT_START + (64*1024))
91
 
/* Penultimate 4MB of virtual address space used for domain page mappings. */
92
 
#define MAPCACHE_VIRT_START   (PERDOMAIN_VIRT_END)
93
 
#define MAPCACHE_VIRT_END     (MAPCACHE_VIRT_START + (4*1024*1024))
94
 
/* Final 4MB of virtual address space used for ioremap(). */
95
 
#define IOREMAP_VIRT_START    (MAPCACHE_VIRT_END)
96
 
#define IOREMAP_VIRT_END      (IOREMAP_VIRT_START + (4*1024*1024))
97
 
 
98
 
/*
99
 
 * Amount of slack domain memory to leave in system, in megabytes.
100
 
 * Prevents a hard out-of-memory crunch for thinsg like network receive.
101
 
 */
102
 
#define SLACK_DOMAIN_MEM_KILOBYTES 2048
103
 
 
104
 
/* Linkage for x86 */
105
 
#define FASTCALL(x)     x __attribute__((regparm(3)))
106
 
#define asmlinkage        __attribute__((regparm(0)))
107
 
#define __ALIGN .align 16,0x90
108
 
#define __ALIGN_STR ".align 16,0x90"
109
 
#define SYMBOL_NAME_STR(X) #X
110
 
#define SYMBOL_NAME(X) X
111
 
#define SYMBOL_NAME_LABEL(X) X##:
112
 
#ifdef __ASSEMBLY__
113
 
#define ALIGN __ALIGN
114
 
#define ALIGN_STR __ALIGN_STR
115
 
#define ENTRY(name) \
116
 
  .globl SYMBOL_NAME(name); \
117
 
  ALIGN; \
118
 
  SYMBOL_NAME_LABEL(name)
119
 
#endif
120
 
 
121
 
/* syslog levels ==> nothing! */
122
 
#define KERN_NOTICE  ""
123
 
#define KERN_WARNING ""
124
 
#define KERN_DEBUG   ""
125
 
#define KERN_INFO    ""
126
 
#define KERN_ERR     ""
127
 
#define KERN_CRIT    ""
128
 
#define KERN_EMERG   ""
129
 
#define KERN_ALERT   ""
130
 
 
131
 
#define barrier() __asm__ __volatile__("": : :"memory")
132
 
 
133
 
#define __HYPERVISOR_CS 0x0808
134
 
#define __HYPERVISOR_DS 0x0810
135
 
 
136
 
#define NR_syscalls 256
137
 
 
138
 
#define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f))
139
 
#define struct_cpy(_x,_y) (memcpy((_x),(_y),sizeof(*(_x))))
140
 
 
141
 
#define dev_probe_lock() ((void)0)
142
 
#define dev_probe_unlock() ((void)0)
143
 
 
144
 
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
145
 
 
146
 
#define capable(_c) 0
147
 
 
148
 
#ifndef __ASSEMBLY__
149
 
 
150
 
#include <xeno/compiler.h>
151
 
 
152
 
extern unsigned long _end; /* standard ELF symbol */
153
 
extern void __out_of_line_bug(int line) __attribute__((noreturn));
154
 
#define out_of_line_bug() __out_of_line_bug(__LINE__)
155
 
 
156
 
extern unsigned int opt_ser_baud;
157
 
#define SERIAL_ENABLED (opt_ser_baud != 0)
158
 
 
159
 
#endif /* __ASSEMBLY__ */
160
 
 
161
 
#endif /* __XENO_CONFIG_H__ */