| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* | 
|  | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 
|  | 3 | * Licensed under the GPL | 
|  | 4 | */ | 
|  | 5 |  | 
|  | 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" | 
|  | 15 |  | 
|  | 16 | void before_mem_tt(unsigned long brk_start) | 
|  | 17 | { | 
|  | 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); | 
|  | 22 | } | 
|  | 23 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | #define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000) | 
| Bodo Stroesser | 1f3be58 | 2005-05-06 21:30:52 -0700 | [diff] [blame] | 25 | #define START (CONFIG_TOP_ADDR - SIZE) | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 26 |  | 
|  | 27 | unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, | 
|  | 28 | unsigned long *task_size_out) | 
|  | 29 | { | 
|  | 30 | /* Round up to the nearest 4M */ | 
|  | 31 | *host_size_out = ROUND_4M((unsigned long) &arg); | 
|  | 32 | *task_size_out = START; | 
|  | 33 | return(START); | 
|  | 34 | } | 
|  | 35 |  | 
|  | 36 | /* | 
|  | 37 | * Overrides for Emacs so that we follow Linus's tabbing style. | 
|  | 38 | * Emacs will notice this stuff at the end of the file and automatically | 
|  | 39 | * adjust the settings for this buffer only.  This must remain at the end | 
|  | 40 | * of the file. | 
|  | 41 | * --------------------------------------------------------------------------- | 
|  | 42 | * Local variables: | 
|  | 43 | * c-file-style: "linux" | 
|  | 44 | * End: | 
|  | 45 | */ |