ia64/xen-unstable

view linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/setup_arch_post.h @ 8534:da7873110bbb

Tiny bootstrap cleanup.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Jan 09 19:46:46 2006 +0100 (2006-01-09)
parents 06d84bf87159
children 0ffd94a02318
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 char *who;
12 unsigned long start_pfn, max_pfn;
14 who = "Xen";
16 start_pfn = 0;
17 max_pfn = xen_start_info->nr_pages;
19 e820.nr_map = 0;
20 add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM);
22 return who;
23 }
25 void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c)
26 {
27 clear_bit(X86_FEATURE_VME, c->x86_capability);
28 clear_bit(X86_FEATURE_DE, c->x86_capability);
29 clear_bit(X86_FEATURE_PSE, c->x86_capability);
30 clear_bit(X86_FEATURE_PGE, c->x86_capability);
31 clear_bit(X86_FEATURE_SEP, c->x86_capability);
32 if (!(xen_start_info->flags & SIF_PRIVILEGED))
33 clear_bit(X86_FEATURE_MTRR, c->x86_capability);
34 }
36 extern void hypervisor_callback(void);
37 extern void failsafe_callback(void);
39 static void __init machine_specific_arch_setup(void)
40 {
41 HYPERVISOR_set_callbacks(
42 (unsigned long) hypervisor_callback,
43 (unsigned long) failsafe_callback,
44 (unsigned long) system_call);
46 machine_specific_modify_cpu_capabilities(&boot_cpu_data);
47 }