sync hh.org
[hh.org.git] / arch / um / kernel / tt / mem.c
blob4d1929dfa285ff4c5ed825f883219518a3bf2c75
1 /*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
6 #include "linux/stddef.h"
7 #include "linux/mm.h"
8 #include "asm/uaccess.h"
9 #include "mem_user.h"
10 #include "kern_util.h"
11 #include "user_util.h"
12 #include "kern.h"
13 #include "tt.h"
15 void before_mem_tt(unsigned long brk_start)
17 if(debug)
18 remap_data(UML_ROUND_DOWN(&_stext), UML_ROUND_UP(&_etext), 1);
19 remap_data(UML_ROUND_DOWN(&_sdata), UML_ROUND_UP(&_edata), 1);
20 remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1);
23 #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000)
24 #define START (CONFIG_TOP_ADDR - SIZE)
26 unsigned long set_task_sizes_tt(unsigned long *task_size_out)
28 unsigned long host_task_size;
30 /* Round up to the nearest 4M */
31 host_task_size = ROUND_4M((unsigned long) &host_task_size);
32 *task_size_out = START;
34 return host_task_size;