CLICK2ABS(gap_clicks), /* how big is gap, page-aligned */
0,0, /* not preallocated */
VM_STACKTOP, /* regular stack top */
- 0, is_elf)) != OK) {
+ 0, is_elf, 1)) != OK) {
SANITYCHECK(SCL_DETAIL);
printf("VM: new_mem: failed\n");
if(ptok) {
phys_bytes data_start, /* data starts here, if preallocated, otherwise 0 */
phys_bytes stacktop,
int prealloc_stack,
- int is_elf
+ int is_elf,
+ int full_memview
)
{
int s;
map_text_addr = vstart + text_addr;
vmp->vm_arch.vm_seg[T].mem_phys = ABS2CLICK(map_text_addr);
vmp->vm_arch.vm_seg[T].mem_vir = ABS2CLICK(text_addr);
- vmp->vm_arch.vm_seg[T].mem_len = ABS2CLICK(text_bytes);
+ if(full_memview) {
+ vmp->vm_arch.vm_seg[T].mem_len = ABS2CLICK(VM_DATATOP) -
+ vmp->vm_arch.vm_seg[T].mem_phys;
+ } else {
+ vmp->vm_arch.vm_seg[T].mem_len = ABS2CLICK(text_bytes);
+ }
vmp->vm_offset = vstart;
stack_bytes, child_gap_bytes, 0, 0,
CLICK2ABS(vmc->vm_arch.vm_seg[S].mem_vir +
vmc->vm_arch.vm_seg[S].mem_len),
- 1, is_elf)) != OK) {
+ 1, is_elf, 0)) != OK) {
printf("VM: fork: proc_new failed\n");
return r;
}
vmp->vm_arch.vm_seg[D].mem_vir) - BASICSTACK,
CLICK2ABS(vmp->vm_arch.vm_seg[T].mem_phys),
CLICK2ABS(vmp->vm_arch.vm_seg[D].mem_phys),
- VM_STACKTOP, 0, is_elf) != OK) {
+ VM_STACKTOP, 0, is_elf, 0) != OK) {
panic("failed proc_new for boot process");
}
}
int proc_new(struct vmproc *vmp, phys_bytes start, phys_bytes text_addr,
phys_bytes text_bytes, phys_bytes data_addr, phys_bytes data_bytes,
phys_bytes stack, phys_bytes gap, phys_bytes text_here, phys_bytes
- data_here, vir_bytes stacktop, int prealloc_stack, int is_elf);
+ data_here, vir_bytes stacktop, int prealloc_stack, int is_elf, int full);
phys_bytes find_kernel_top(void);
/* break.c */