debuggers.hg

view xen/include/asm-ia64/config.h @ 4615:58efb3448933

bitkeeper revision 1.1327.1.1 (426536d2PUqtjTi2v06bzD10RFwarg)

Merge bk://xen.bkbits.net/xeno-unstable.bk
into bkbits.net:/repos/x/xen-ia64/xeno-unstable-ia64.bk
author xen-ia64.adm@bkbits.net
date Tue Apr 19 16:50:26 2005 +0000 (2005-04-19)
parents 445b12a7221a f1c946e1226a
children 1dd9ce40afca
line source
1 // control flags for turning on/off features under test
2 #undef CLONE_DOMAIN0
3 //#define CLONE_DOMAIN0 1
4 #define DOMU_BUILD_STAGING
5 #define VHPT_GLOBAL
6 #define DOMU_AUTO_RESTART
8 // manufactured from component pieces
10 // defined in linux/arch/ia64/defconfig
11 //#define CONFIG_IA64_GENERIC
12 #define CONFIG_IA64_HP_SIM
13 #define CONFIG_IA64_L1_CACHE_SHIFT 7
14 // needed by include/asm-ia64/page.h
15 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
16 #define CONFIG_IA64_GRANULE_16MB
17 // needed in arch/ia64/setup.c to reserve memory for domain0
18 #define CONFIG_BLK_DEV_INITRD
20 #ifndef __ASSEMBLY__
22 // can't find where this typedef was before?!?
23 // needed by include/asm-ia64/processor.h (and other places)
24 typedef int pid_t;
26 // from include/linux/kernel.h
27 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
29 //////////////////////////////////////
31 #define FASTCALL(x) x // see linux/include/linux/linkage.h
32 #define fastcall // " "
34 #define touch_nmi_watchdog()
35 // from linux/include/linux/types.h
36 #define BITS_TO_LONGS(bits) \
37 (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
38 #define DECLARE_BITMAP(name,bits) \
39 unsigned long name[BITS_TO_LONGS(bits)]
40 #define CLEAR_BITMAP(name,bits) \
41 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
43 // FIXME?: x86-ism used in xen/mm.h
44 #define LOCK_PREFIX
46 extern unsigned long xenheap_phys_end;
47 extern unsigned long xen_pstart;
48 extern unsigned long xenheap_size;
50 // from linux/include/linux/mm.h
51 extern struct page *mem_map;
53 // xen/include/asm/config.h
54 extern char _end[]; /* standard ELF symbol */
56 // linux/include/linux/compiler.h
57 #define __attribute_const__
58 #define __user
59 //#define __kernel
60 //#define __safe
61 #define __force
62 #define __iomem
63 #define __chk_user_ptr(x) (void)0
64 //#define __chk_io_ptr(x) (void)0
65 //#define __builtin_warning(x, y...) (1)
66 //#define __acquires(x)
67 //#define __releases(x)
68 //#define __acquire(x) (void)0
69 //#define __release(x) (void)0
70 //#define __cond_lock(x) (x)
71 #define __must_check
72 #define __deprecated
74 // xen/include/asm/config.h
75 #define HZ 100
76 // leave SMP for a later time
77 #define NR_CPUS 1
78 //#define NR_CPUS 16
79 //#define CONFIG_NR_CPUS 16
80 #define barrier() __asm__ __volatile__("": : :"memory")
82 // linux/include/spinlock.h
83 #define DEFINE_SPINLOCK(x) spinlock_t x = SPIN_LOCK_UNLOCKED
85 ///////////////////////////////////////////////////////////////
86 // xen/include/asm/config.h
87 // Natural boundary upon TR size to define xenheap space
88 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
89 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
90 #define ELFSIZE 64
92 ///////////////////////////////////////////////////////////////
94 // get rid of difficult circular include dependency
95 #define CMPXCHG_BUGCHECK(v)
96 #define CMPXCHG_BUGCHECK_DECL
98 // from include/asm-ia64/smp.h
99 #ifdef CONFIG_SMP
100 #error "Lots of things to fix to enable CONFIG_SMP!"
101 #endif
102 #define get_cpu() 0
103 #define put_cpu() do {} while(0)
105 // from linux/include/linux/mm.h
106 struct page;
108 // function calls; see decl in xen/include/xen/sched.h
109 #undef free_task_struct
110 #undef alloc_task_struct
112 // initial task has a different name in Xen
113 //#define idle0_task init_task
114 #define idle0_exec_domain init_task
116 // avoid redefining task_t in asm/thread_info.h
117 #define task_t struct domain
119 // linux/include/asm-ia64/machvec.h (linux/arch/ia64/lib/io.c)
120 #define platform_inb __ia64_inb
121 #define platform_inw __ia64_inw
122 #define platform_inl __ia64_inl
123 #define platform_outb __ia64_outb
124 #define platform_outw __ia64_outw
125 #define platform_outl __ia64_outl
127 // FIXME: This just overrides a use in a typedef (not allowed in ia64,
128 // or maybe just in older gcc's?) used in ac_timer.c but should be OK
129 // (and indeed is probably required!) elsewhere
130 #undef __cacheline_aligned
131 #undef ____cacheline_aligned
132 #undef ____cacheline_aligned_in_smp
133 #define __cacheline_aligned
134 #define ____cacheline_aligned
135 #define ____cacheline_aligned_in_smp
137 #include "asm/types.h" // for u64
138 struct device {
139 #if 0
140 struct list_head node; /* node in sibling list */
141 struct list_head bus_list; /* node in bus's list */
142 struct list_head driver_list;
143 struct list_head children;
144 struct device * parent;
146 struct kobject kobj;
147 char bus_id[BUS_ID_SIZE]; /* position on parent bus */
149 struct bus_type * bus; /* type of bus device is on */
150 struct device_driver *driver; /* which driver has allocated this
151 device */
152 void *driver_data; /* data private to the driver */
153 void *platform_data; /* Platform specific data (e.g. ACPI,
154 BIOS data relevant to device) */
155 struct dev_pm_info power;
156 u32 power_state; /* Current operating state. In
157 ACPI-speak, this is D0-D3, D0
158 being fully functional, and D3
159 being off. */
161 unsigned char *saved_state; /* saved device state */
162 u32 detach_state; /* State to enter when device is
163 detached from its driver. */
165 #endif
166 u64 *dma_mask; /* dma mask (if dma'able device) */
167 #if 0
168 struct list_head dma_pools; /* dma pools (if dma'ble) */
170 void (*release)(struct device * dev);
171 #endif
172 };
174 // from linux/include/linux/pci.h
175 struct pci_bus_region {
176 unsigned long start;
177 unsigned long end;
178 };
180 // from linux/include/linux/module.h
182 // warning: unless search_extable is declared, the return value gets
183 // truncated to 32-bits, causing a very strange error in privop handling
184 struct exception_table_entry;
186 const struct exception_table_entry *
187 search_extable(const struct exception_table_entry *first,
188 const struct exception_table_entry *last,
189 unsigned long value);
190 void sort_extable(struct exception_table_entry *start,
191 struct exception_table_entry *finish);
192 void sort_main_extable(void);
194 // defined (why?) in include/asm-i386/processor.h
195 // used in common/physdev.c
196 #define IO_BITMAP_SIZE 32
197 #define IO_BITMAP_BYTES (IO_BITMAP_SIZE * 4)
199 #define printk printf
201 #undef __ARCH_IRQ_STAT
203 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
205 // from include/asm-x86/*/uaccess.h
206 #define array_access_ok(type,addr,count,size) \
207 (likely(sizeof(count) <= 4) /* disallow 64-bit counts */ && \
208 access_ok(type,addr,count*size))
210 // without this, uart_config_stageX does outb's which are non-portable
211 #define NO_UART_CONFIG_OK
213 // see drivers/char/console.c
214 #define OPT_CONSOLE_STR "com1"
216 #define __attribute_used__ __attribute__ ((unused))
218 // see include/asm-x86/atomic.h (different from standard linux)
219 #define _atomic_set(v,i) (((v).counter) = (i))
220 #define _atomic_read(v) ((v).counter)
221 // FIXME following needs work
222 #define atomic_compareandswap(old, new, v) old
224 // x86 typedef still used in sched.h, may go away later
225 //typedef unsigned long l1_pgentry_t;
227 // see include/asm-ia64/mm.h, handle remaining pfn_info uses until gone
228 #define pfn_info page
230 // see common/keyhandler.c
231 #define nop() asm volatile ("nop 0")
233 #define ARCH_HAS_EXEC_DOMAIN_MM_PTR
235 // see arch/x86/nmi.c !?!?
237 // these declarations got moved at some point, find a better place for them
238 extern int opt_noht;
239 extern int ht_per_core;
240 extern unsigned int watchdog_on;
242 // xen/include/asm/config.h
243 /******************************************************************************
244 * config.h
245 *
246 * A Linux-style configuration list.
247 */
249 #ifndef __XEN_IA64_CONFIG_H__
250 #define __XEN_IA64_CONFIG_H__
252 #undef CONFIG_X86
254 //#define CONFIG_SMP 1
255 //#define CONFIG_NR_CPUS 2
256 //leave SMP for a later time
257 #undef CONFIG_SMP
258 #undef CONFIG_X86_LOCAL_APIC
259 #undef CONFIG_X86_IO_APIC
260 #undef CONFIG_X86_L1_CACHE_SHIFT
262 // this needs to be on to run on hp zx1 with more than 4GB
263 // it is hacked around for now though
264 //#define CONFIG_VIRTUAL_MEM_MAP
266 //#ifndef CONFIG_IA64_HP_SIM
267 // looks like this is hard to turn off for Xen
268 #define CONFIG_ACPI 1
269 #define CONFIG_ACPI_BOOT 1
270 //#endif
272 #define CONFIG_PCI 1
273 #define CONFIG_PCI_BIOS 1
274 #define CONFIG_PCI_DIRECT 1
276 #define CONFIG_XEN_ATTENTION_KEY 1
277 #endif /* __ASSEMBLY__ */
278 #endif /* __XEN_IA64_CONFIG_H__ */
280 // FOLLOWING ADDED FOR XEN POST-NGIO and/or LINUX 2.6.7
282 // following derived from linux/include/linux/compiler-gcc3.h
283 // problem because xen (over?)simplifies include/xen/compiler.h
284 #if __GNUC_MAJOR < 3 || __GNUC_MINOR__ >= 3
285 # define __attribute_used__ __attribute__((__used__))
286 #else
287 # define __attribute_used__ __attribute__((__unused__))
288 #endif