ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h @ 6427:3428d58a85e1

merge?
author cl349@firebug.cl.cam.ac.uk
date Thu Aug 25 14:41:52 2005 +0000 (2005-08-25)
parents 4abd299ef2f6 d1ac7c6ffb63
children b54144915ae6
line source
1 /**
2 * machine_specific_memory_setup - Hook for machine specific memory setup.
3 *
4 * Description:
5 * This is included late in kernel/setup.c so that it can make
6 * use of all of the static functions.
7 **/
9 static char * __init machine_specific_memory_setup(void)
10 {
11 unsigned long max_pfn = xen_start_info.nr_pages;
13 e820.nr_map = 0;
14 add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM);
16 return "Xen";
17 }
19 void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
20 {
21 clear_bit(X86_FEATURE_VME, c->x86_capability);
22 clear_bit(X86_FEATURE_DE, c->x86_capability);
23 clear_bit(X86_FEATURE_PSE, c->x86_capability);
24 clear_bit(X86_FEATURE_PGE, c->x86_capability);
25 clear_bit(X86_FEATURE_SEP, c->x86_capability);
26 if (!(xen_start_info.flags & SIF_PRIVILEGED))
27 clear_bit(X86_FEATURE_MTRR, c->x86_capability);
28 }
30 extern void hypervisor_callback(void);
31 extern void failsafe_callback(void);
33 static void __init machine_specific_arch_setup(void)
34 {
35 HYPERVISOR_set_callbacks(
36 __KERNEL_CS, (unsigned long)hypervisor_callback,
37 __KERNEL_CS, (unsigned long)failsafe_callback);
39 machine_specific_modify_cpu_capabilities(&boot_cpu_data);
40 }