ia64/xen-unstable

view xen/include/asm-ia64/config.h @ 17840:4ebd8f377426

[IA64] re-add efi support to acpi_os_get_root_pointer()

On ia64 RSDP address is obtained from efi table instead of
memory scan. Otherwise it may use wrong table to fail to find
tables.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Jun 12 15:44:21 2008 +0100 (2008-06-12)
parents 611787b6ca35
children 8a0415fac759
line source
1 #ifndef _IA64_CONFIG_H_
2 #define _IA64_CONFIG_H_
4 #undef DEBUG_PFMON
6 // manufactured from component pieces
8 // defined in linux/arch/ia64/defconfig
9 #define CONFIG_IA64_GENERIC
10 #define CONFIG_HZ 32
12 #define CONFIG_IA64_L1_CACHE_SHIFT 7
13 // needed by include/asm-ia64/page.h
14 #define CONFIG_IA64_PAGE_SIZE_16KB // 4KB doesn't work?!?
15 #define CONFIG_IA64_GRANULE_16MB
17 // this needs to be on to run on system with large memory hole
18 #define CONFIG_VIRTUAL_FRAME_TABLE
20 #define CONFIG_EFI
21 #define CONFIG_EFI_PCDP
22 #define CONFIG_SERIAL_SGI_L1_CONSOLE
24 #define CONFIG_XEN_SMP
26 #ifdef CONFIG_XEN_SMP
27 #define CONFIG_SMP 1
28 #define CONFIG_HOTPLUG_CPU 1
29 #ifdef MAX_PHYS_CPUS
30 #define NR_CPUS MAX_PHYS_CPUS
31 #else
32 #define NR_CPUS 64
33 #endif
34 #define CONFIG_NUMA
35 #define CONFIG_ACPI_NUMA
36 #define NODES_SHIFT 8
37 #define MAX_NUMNODES (1 << NODES_SHIFT)
38 #define NR_NODE_MEMBLKS (MAX_NUMNODES*2)
39 #define MAX_PXM_DOMAINS 256
40 #else
41 #undef CONFIG_SMP
42 #define NR_CPUS 1
43 #endif
44 #define CONFIG_NR_CPUS NR_CPUS
46 #define CONFIG_IOSAPIC
47 #define supervisor_mode_kernel (0)
49 #define CONFIG_DMA_BITSIZE 32
51 #define PADDR_BITS 48
53 /* If PERFC is used, include privop maps. */
54 #ifdef PERF_COUNTERS
55 #define CONFIG_PRIVOP_ADDRS
56 #define PRIVOP_COUNT_NADDRS 30
57 #endif
59 #define CONFIG_VGA 1
62 #define NR_hypercalls 64
64 /* PV domains use this value for priv. level 0 emulation */
65 #define CONFIG_CPL0_EMUL 1
67 #ifndef __ASSEMBLY__
69 // can't find where this typedef was before?!?
70 // needed by include/asm-ia64/processor.h (and other places)
71 typedef int pid_t;
73 // now needed for xen/include/mm.h
74 typedef unsigned long paddr_t;
75 #define INVALID_PADDR (~0UL)
76 // from include/linux/kernel.h
77 #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1))
79 //////////////////////////////////////
81 #define FASTCALL(x) x // see linux/include/linux/linkage.h
82 #define fastcall // " "
84 #define watchdog_disable() ((void)0)
85 #define watchdog_enable() ((void)0)
86 // from linux/include/linux/types.h
87 #define CLEAR_BITMAP(name,bits) \
88 memset(name, 0, BITS_TO_LONGS(bits)*sizeof(unsigned long))
90 // FIXME?: x86-ism used in xen/mm.h
91 #define LOCK_PREFIX
93 extern unsigned long xenheap_phys_end;
94 extern unsigned long total_pages;
95 extern unsigned long xen_pstart;
96 extern unsigned long xenheap_size;
98 extern int running_on_sim;
100 // from linux/include/linux/mm.h
101 extern struct page_info *mem_map;
103 // xen/include/asm/config.h
104 extern char _end[]; /* standard ELF symbol */
106 // linux/include/linux/compiler.h
107 //#define __kernel
108 //#define __safe
109 #define __force
110 #define __chk_user_ptr(x) (void)0
111 //#define __chk_io_ptr(x) (void)0
112 //#define __builtin_warning(x, y...) (1)
113 //#define __acquires(x)
114 //#define __releases(x)
115 //#define __acquire(x) (void)0
116 //#define __release(x) (void)0
117 //#define __cond_lock(x) (x)
118 //#define __must_check
119 #define __deprecated
121 // xen/include/asm/config.h
122 //#define HZ 1000
123 // FIXME SMP: leave SMP for a later time
124 ///////////////////////////////////////////////////////////////
125 // xen/include/asm/config.h
126 // Natural boundary upon TR size to define xenheap space
127 #define XENHEAP_DEFAULT_MB (1 << (KERNEL_TR_PAGE_SHIFT - 20))
128 #define XENHEAP_DEFAULT_SIZE (1 << KERNEL_TR_PAGE_SHIFT)
129 #define ELFSIZE 64
131 ///////////////////////////////////////////////////////////////
133 // get rid of difficult circular include dependency
134 #define CMPXCHG_BUGCHECK(v)
135 #define CMPXCHG_BUGCHECK_DECL
137 // from include/asm-ia64/smp.h
138 #define get_cpu() smp_processor_id()
139 #define put_cpu() do {} while(0)
140 #define put_cpu_no_resched() do{} while (0)
142 // needed for common/dom0_ops.c until hyperthreading is supported
143 #ifdef CONFIG_SMP
144 extern int smp_num_siblings;
145 #else
146 #define smp_num_siblings 1
147 #endif
149 // function calls; see decl in xen/include/xen/sched.h
150 #undef free_task_struct
151 #undef alloc_task_struct
152 #define get_thread_info(v) alloc_thread_info(v)
154 // avoid redefining task_t in asm/thread_info.h
155 #define task_t struct domain
157 // avoid redefining task_struct in asm/current.h
158 #define task_struct vcpu
160 #include <xen/cache.h>
161 #ifndef CONFIG_SMP
162 #define __cacheline_aligned_in_smp
163 #else
164 #define __cacheline_aligned_in_smp __cacheline_aligned
165 #endif
167 #define ____cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
168 #ifndef CONFIG_SMP
169 #define ____cacheline_aligned_in_smp
170 #else
171 #define ____cacheline_aligned_in_smp ____cacheline_aligned
172 #endif
174 #define CONFIG_PERFMON
176 #ifndef __ASSEMBLY__
177 #include "asm/types.h" // for u64
178 #include "linux/linkage.h" // for asmlinkage which is used by
179 // xen/include/acpi/acpixf.h
180 #endif
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 #define find_first_set_bit(x) (ffs(x)-1) // FIXME: Is this right???
196 // see drivers/char/console.c
197 #define OPT_CONSOLE_STR "com1"
199 #define __nocast
201 // see include/asm-x86/atomic.h (different from standard linux)
202 #define _atomic_set(v,i) (((v).counter) = (i))
203 #define _atomic_read(v) ((v).counter)
204 #define atomic_compareandswap(old, new, v) ((atomic_t){ cmpxchg(v, _atomic_read(old), _atomic_read(new)) })
206 // Deprivated linux inf and put here for short time compatibility
207 #define kmalloc(s, t) xmalloc_bytes((s))
208 #define kfree(s) xfree((s))
209 #define kzalloc(size, flags) \
210 ({ \
211 unsigned char *mem; \
212 mem = (unsigned char *)xmalloc_bytes(size); \
213 if (mem) \
214 memset(mem, 0, size); \
215 (void *)mem; \
216 })
217 #define kcalloc(n, size, flags) kzalloc(n * size, flags)
218 #define alloc_bootmem_node(pg, size) xmalloc_bytes(size)
220 // see common/keyhandler.c
221 #define nop() asm volatile ("nop 0")
223 // from include/linux/preempt.h (needs including from interrupt.h or smp.h)
224 #define preempt_enable() do { } while (0)
225 #define preempt_disable() do { } while (0)
227 // needed for include/xen/linuxtime.h
228 typedef s64 time_t;
229 typedef s64 suseconds_t;
231 // needed for include/linux/jiffies.h
232 typedef long clock_t;
234 // from include/linux/kernel.h, needed by jiffies.h
235 #define typecheck(type,x) \
236 ({ type __dummy; \
237 typeof(x) __dummy2; \
238 (void)(&__dummy == &__dummy2); \
239 1; \
240 })
242 // from include/linux/timex.h, needed by arch/ia64/time.c
243 #define TIME_SOURCE_CPU 0
245 // used in common code
246 #define softirq_pending(cpu) (cpu_data(cpu)->softirq_pending)
248 // dup'ed from signal.h to avoid changes to includes
249 #define SA_SHIRQ 0x04000000
250 #define SA_INTERRUPT 0x20000000
252 // needed for setup.c
253 extern unsigned long loops_per_jiffy;
254 extern char saved_command_line[];
255 struct screen_info { };
256 #define seq_printf(a,b...) printk(b)
257 //#define CONFIG_BLK_DEV_INITRD // needed to reserve memory for domain0
259 #define CONFIG_SHADOW 1
261 // xen/include/asm/config.h
262 /******************************************************************************
263 * config.h
264 *
265 * A Linux-style configuration list.
266 */
268 #ifndef __XEN_IA64_CONFIG_H__
269 #define __XEN_IA64_CONFIG_H__
271 #undef CONFIG_X86
273 #define CONFIG_MCKINLEY
275 #undef CONFIG_X86_LOCAL_APIC
276 #undef CONFIG_X86_IO_APIC
277 #undef CONFIG_X86_L1_CACHE_SHIFT
279 //#ifndef CONFIG_IA64_HP_SIM
280 // looks like this is hard to turn off for Xen
281 #define CONFIG_ACPI 1
282 #define CONFIG_ACPI_BOOT 1
283 //#endif
285 #define CONFIG_XEN_ATTENTION_KEY 1
286 #endif /* __ASSEMBLY__ */
287 #endif /* __XEN_IA64_CONFIG_H__ */
289 /* Allow .serialize.data/instruction in asm files.
290 Old as doesn't handle this. */
291 #define HAVE_SERIALIZE_DIRECTIVE
293 /* Define CONFIG_PRIVIFY to support privified OS (deprecated). */
294 #undef CONFIG_PRIVIFY
296 #define CONFIG_XENCOMM_MARK_DIRTY 1
298 #endif /* _IA64_CONFIG_H_ */