1
/******************************************************************************
4
* A Linux-style configuration list.
7
#ifndef __XENO_CONFIG_H__
8
#define __XENO_CONFIG_H__
13
#define CONFIG_X86_LOCAL_APIC 1
14
#define CONFIG_X86_IO_APIC 1
15
#define CONFIG_X86_L1_CACHE_SHIFT 5
18
#define CONFIG_PCI_BIOS 1
19
#define CONFIG_PCI_DIRECT 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
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 CONFIG_XEN_ATTENTION_KEY 1
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....
51
#define SMP_CACHE_BYTES 64
53
#define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES)))
54
#define ____cacheline_aligned __cacheline_aligned
56
/*** Hypervisor owns top 64MB of virtual address space. ***/
57
#define HYPERVISOR_VIRT_START (0xFC000000UL)
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.
63
#define READONLY_MPT_VIRT_START (HYPERVISOR_VIRT_START)
64
#define READONLY_MPT_VIRT_END (READONLY_MPT_VIRT_START + (4*1024*1024))
66
* Next 16MB is fixed monitor space, which is part of a 44MB direct-mapped
67
* memory region. The following are machine addresses.
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))
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.
102
#define SLACK_DOMAIN_MEM_KILOBYTES 2048
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##:
113
#define ALIGN __ALIGN
114
#define ALIGN_STR __ALIGN_STR
115
#define ENTRY(name) \
116
.globl SYMBOL_NAME(name); \
118
SYMBOL_NAME_LABEL(name)
121
/* syslog levels ==> nothing! */
122
#define KERN_NOTICE ""
123
#define KERN_WARNING ""
124
#define KERN_DEBUG ""
128
#define KERN_EMERG ""
129
#define KERN_ALERT ""
131
#define barrier() __asm__ __volatile__("": : :"memory")
133
#define __HYPERVISOR_CS 0x0808
134
#define __HYPERVISOR_DS 0x0810
136
#define NR_syscalls 256
138
#define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f))
139
#define struct_cpy(_x,_y) (memcpy((_x),(_y),sizeof(*(_x))))
141
#define dev_probe_lock() ((void)0)
142
#define dev_probe_unlock() ((void)0)
144
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
146
#define capable(_c) 0
150
#include <xeno/compiler.h>
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__)
156
extern unsigned int opt_ser_baud;
157
#define SERIAL_ENABLED (opt_ser_baud != 0)
159
#endif /* __ASSEMBLY__ */
161
#endif /* __XENO_CONFIG_H__ */