2005-04-16 18:20:36 -04:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
|
|
|
|
* Licensed under the GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "linux/stddef.h"
|
|
|
|
#include "linux/config.h"
|
|
|
|
#include "linux/mm.h"
|
|
|
|
#include "asm/uaccess.h"
|
|
|
|
#include "mem_user.h"
|
|
|
|
#include "kern_util.h"
|
|
|
|
#include "user_util.h"
|
|
|
|
#include "kern.h"
|
|
|
|
#include "tt.h"
|
|
|
|
|
|
|
|
void before_mem_tt(unsigned long brk_start)
|
|
|
|
{
|
|
|
|
if(debug)
|
|
|
|
remap_data(UML_ROUND_DOWN(&_stext), UML_ROUND_UP(&_etext), 1);
|
|
|
|
remap_data(UML_ROUND_DOWN(&_sdata), UML_ROUND_UP(&_edata), 1);
|
|
|
|
remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000)
|
2005-05-07 00:30:52 -04:00
|
|
|
#define START (CONFIG_TOP_ADDR - SIZE)
|
2005-04-16 18:20:36 -04:00
|
|
|
|
2006-07-10 07:45:06 -04:00
|
|
|
unsigned long set_task_sizes_tt(unsigned long *task_size_out)
|
2005-04-16 18:20:36 -04:00
|
|
|
{
|
2006-07-10 07:45:06 -04:00
|
|
|
unsigned long host_task_size;
|
|
|
|
|
2005-04-16 18:20:36 -04:00
|
|
|
/* Round up to the nearest 4M */
|
2006-07-10 07:45:06 -04:00
|
|
|
host_task_size = ROUND_4M((unsigned long) &host_task_size);
|
2005-04-16 18:20:36 -04:00
|
|
|
*task_size_out = START;
|
2006-07-10 07:45:06 -04:00
|
|
|
|
|
|
|
return host_task_size;
|
2005-04-16 18:20:36 -04:00
|
|
|
}
|