Linux-2.6.12-rc2
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / arch / um / kernel / tt / mem.c
blob74346a04a2b287f5ecb3a8d86ac97f3c7e2ad0ab
1 /*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #include "linux/stddef.h"
7 #include "linux/config.h"
8 #include "linux/mm.h"
9 #include "asm/uaccess.h"
10 #include "mem_user.h"
11 #include "kern_util.h"
12 #include "user_util.h"
13 #include "kern.h"
14 #include "tt.h"
16 void before_mem_tt(unsigned long brk_start)
18 if(debug)
19 remap_data(UML_ROUND_DOWN(&_stext), UML_ROUND_UP(&_etext), 1);
20 remap_data(UML_ROUND_DOWN(&_sdata), UML_ROUND_UP(&_edata), 1);
21 remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1);
24 #ifdef CONFIG_HOST_2G_2G
25 #define TOP 0x80000000
26 #else
27 #define TOP 0xc0000000
28 #endif
30 #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000)
31 #define START (TOP - SIZE)
33 unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out,
34 unsigned long *task_size_out)
36 /* Round up to the nearest 4M */
37 *host_size_out = ROUND_4M((unsigned long) &arg);
38 *task_size_out = START;
39 return(START);
43 * Overrides for Emacs so that we follow Linus's tabbing style.
44 * Emacs will notice this stuff at the end of the file and automatically
45 * adjust the settings for this buffer only. This must remain at the end
46 * of the file.
47 * ---------------------------------------------------------------------------
48 * Local variables:
49 * c-file-style: "linux"
50 * End: