direct-io.hg

view xen/include/xeno/config.h @ 451:973c31c99779

bitkeeper revision 1.232 (3ec3d51aE6D2CLYLncQQCXyoOi7XwQ)

config.h:
Only enable DMA for IDE disk devices (in particular, we want it disabled for the weird CD-and-crippled-ide-interface combos you get on server boxes :-)
author kaf24@scramble.cl.cam.ac.uk
date Thu May 15 17:57:46 2003 +0000 (2003-05-15)
parents 2eb189eacf01
children 3212022b1d8d
line source
1 /******************************************************************************
2 * config.h
3 *
4 * A Linux-style configuration list.
5 */
7 #ifndef __XENO_CONFIG_H__
8 #define __XENO_CONFIG_H__
10 #define CONFIG_X86 1
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
17 #define CONFIG_PCI 1
18 #define CONFIG_PCI_BIOS 1
19 #define CONFIG_PCI_DIRECT 1
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
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
41 #define HZ 100
43 /*
44 * Just to keep compiler happy.
45 * NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!!
46 * It depends on size of irq_cpustat_t, for example, being 64 bytes. :-)
47 * Mmmm... so niiiiiice....
48 */
49 #define SMP_CACHE_BYTES 64
50 #define NR_CPUS 16
51 #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
52 #define ____cacheline_aligned __cacheline_aligned
54 /*** Hypervisor owns top 64MB of virtual address space. ***/
55 #define HYPERVISOR_VIRT_START (0xFC000000UL)
57 /*
58 * First 4MB are mapped read-only for all. It's for the machine->physical
59 * mapping table (MPT table). The following are virtual addresses.
60 */
61 #define READONLY_MPT_VIRT_START (HYPERVISOR_VIRT_START)
62 #define READONLY_MPT_VIRT_END (READONLY_MPT_VIRT_START + (4*1024*1024))
63 /*
64 * Next 16MB is fixed monitor space, which is part of a 48MB direct-mapped
65 * memory region. The following are machine addresses.
66 */
67 #define MAX_MONITOR_ADDRESS (16*1024*1024)
68 #define MAX_DMA_ADDRESS (16*1024*1024)
69 #define MAX_DIRECTMAP_ADDRESS (48*1024*1024)
70 /* And the virtual addresses for the direct-map region... */
71 #define DIRECTMAP_VIRT_START (READONLY_MPT_VIRT_END)
72 #define DIRECTMAP_VIRT_END (DIRECTMAP_VIRT_START + MAX_DIRECTMAP_ADDRESS)
73 #define MONITOR_VIRT_START (DIRECTMAP_VIRT_START)
74 #define MONITOR_VIRT_END (MONITOR_VIRT_START + MAX_MONITOR_ADDRESS)
75 #define RDWR_MPT_VIRT_START (MONITOR_VIRT_END)
76 #define RDWR_MPT_VIRT_END (RDWR_MPT_VIRT_START + (4*1024*1024))
77 #define FRAMETABLE_VIRT_START (RDWR_MPT_VIRT_END)
78 #define FRAMETABLE_VIRT_END (DIRECTMAP_VIRT_END)
79 /* Next 4MB of virtual address space used for per-domain mappings (eg. GDT). */
80 #define PERDOMAIN_VIRT_START (DIRECTMAP_VIRT_END)
81 #define PERDOMAIN_VIRT_END (PERDOMAIN_VIRT_START + (4*1024*1024))
82 #define GDT_VIRT_START (PERDOMAIN_VIRT_START)
83 #define GDT_VIRT_END (GDT_VIRT_START + (64*1024))
84 #define LDT_VIRT_START (GDT_VIRT_END)
85 #define LDT_VIRT_END (LDT_VIRT_START + (64*1024))
86 /* Penultimate 4MB of virtual address space used for domain page mappings. */
87 #define MAPCACHE_VIRT_START (PERDOMAIN_VIRT_END)
88 #define MAPCACHE_VIRT_END (MAPCACHE_VIRT_START + (4*1024*1024))
89 /* Final 4MB of virtual address space used for ioremap(). */
90 #define IOREMAP_VIRT_START (MAPCACHE_VIRT_END)
91 #define IOREMAP_VIRT_END (IOREMAP_VIRT_START + (4*1024*1024))
93 /*
94 * Amount of slack domain memory to leave in system, in megabytes.
95 * Prevents a hard out-of-memory crunch for thinsg like network receive.
96 */
97 #define SLACK_DOMAIN_MEM_KILOBYTES 2048
99 /* Linkage for x86 */
100 #define FASTCALL(x) x __attribute__((regparm(3)))
101 #define asmlinkage __attribute__((regparm(0)))
102 #define __ALIGN .align 16,0x90
103 #define __ALIGN_STR ".align 16,0x90"
104 #define SYMBOL_NAME_STR(X) #X
105 #define SYMBOL_NAME(X) X
106 #define SYMBOL_NAME_LABEL(X) X##:
107 #ifdef __ASSEMBLY__
108 #define ALIGN __ALIGN
109 #define ALIGN_STR __ALIGN_STR
110 #define ENTRY(name) \
111 .globl SYMBOL_NAME(name); \
112 ALIGN; \
113 SYMBOL_NAME_LABEL(name)
114 #endif
116 /* syslog levels ==> nothing! */
117 #define KERN_NOTICE
118 #define KERN_WARNING
119 #define KERN_DEBUG
120 #define KERN_INFO
121 #define KERN_ERR
122 #define KERN_CRIT
123 #define KERN_EMERG
124 #define KERN_ALERT
126 #define barrier() __asm__ __volatile__("": : :"memory")
128 #define __HYPERVISOR_CS 0x0008
129 #define __HYPERVISOR_DS 0x0010
131 #define NR_syscalls 256
133 #define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f))
134 #define struct_cpy(_x,_y) (memcpy((_x),(_y),sizeof(*(_x))))
136 #define likely(_x) (_x)
137 #define unlikely(_x) (_x)
139 #define dev_probe_lock() ((void)0)
140 #define dev_probe_unlock() ((void)0)
142 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
144 #define capable(_c) 0
146 #ifndef __ASSEMBLY__
147 extern unsigned long _end; /* standard ELF symbol */
148 extern void __out_of_line_bug(int line) __attribute__((noreturn));
149 #define out_of_line_bug() __out_of_line_bug(__LINE__)
150 #endif
152 #endif /* __XENO_CONFIG_H__ */