mirror of
https://github.com/drasko/codezero.git
synced 2026-04-20 02:39:04 +02:00
Fixed detection of devzero file.
Fixed adding VMA_ANONYMOUS flag explicitly if no file was given
This commit is contained in:
@@ -265,7 +265,7 @@ int start_boot_task(struct vm_file *file, struct task_ids *ids)
|
||||
|
||||
/* mmap each task's environment as anonymous memory. */
|
||||
if ((err = do_mmap(0, 0, task, task->env_start,
|
||||
VM_READ | VM_WRITE | VMA_PRIVATE,
|
||||
VM_READ | VM_WRITE | VMA_PRIVATE | VMA_ANONYMOUS,
|
||||
__pfn(task->env_end - task->env_start)) < 0)) {
|
||||
printf("do_mmap: Mapping environment failed with %d.\n",
|
||||
err);
|
||||
@@ -274,7 +274,7 @@ int start_boot_task(struct vm_file *file, struct task_ids *ids)
|
||||
|
||||
/* mmap each task's stack as anonymous memory. */
|
||||
if ((err = do_mmap(0, 0, task, task->stack_start,
|
||||
VM_READ | VM_WRITE | VMA_PRIVATE,
|
||||
VM_READ | VM_WRITE | VMA_PRIVATE | VMA_ANONYMOUS,
|
||||
__pfn(task->stack_end - task->stack_start)) < 0)) {
|
||||
printf("do_mmap: Mapping stack failed with %d.\n", err);
|
||||
goto error;
|
||||
@@ -284,7 +284,7 @@ int start_boot_task(struct vm_file *file, struct task_ids *ids)
|
||||
printf("%s: Mapping utcb for new task at: 0x%x\n", __TASKNAME__,
|
||||
task->utcb_address);
|
||||
if ((err = do_mmap(0, 0, task, task->utcb_address,
|
||||
VM_READ | VM_WRITE | VMA_SHARED,
|
||||
VM_READ | VM_WRITE | VMA_SHARED | VMA_ANONYMOUS,
|
||||
DEFAULT_UTCB_SIZE) < 0)) {
|
||||
printf("do_mmap: Mapping utcb failed with %d.\n", err);
|
||||
goto error;
|
||||
|
||||
Reference in New Issue
Block a user