mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 19:03:15 +01:00
Environment is backed by a special per-task file maintained by mm0 for each task. This file is filled in by the env pager, by simple copying of env data into the faulty page upon a fault. UTCB and all anon regions (stack) could use the same scheme. Fixed IS_ERR(x) to accept negative values that are above -1000 for errors. This protects against false positives for pointers such as 0xE0000000. modified: include/l4/generic/scheduler.h modified: include/l4/macros.h modified: src/arch/arm/exception.c modified: tasks/fs0/include/linker.lds modified: tasks/libl4/src/init.c modified: tasks/libposix/shm.c new file: tasks/mm0/include/env.h modified: tasks/mm0/include/file.h new file: tasks/mm0/include/lib/addr.h deleted: tasks/mm0/include/lib/vaddr.h modified: tasks/mm0/include/task.h new file: tasks/mm0/include/utcb.h new file: tasks/mm0/src/env.c modified: tasks/mm0/src/fault.c modified: tasks/mm0/src/file.c modified: tasks/mm0/src/init.c new file: tasks/mm0/src/lib/addr.c modified: tasks/mm0/src/lib/idpool.c deleted: tasks/mm0/src/lib/vaddr.c modified: tasks/mm0/src/mmap.c modified: tasks/mm0/src/shm.c modified: tasks/mm0/src/task.c new file: tasks/mm0/src/utcb.c modified: tasks/test0/include/linker.lds
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
/*
|
|
* Simple linker script for userspace or svc tasks.
|
|
*
|
|
* Copyright (C) 2007 Bahadir Balban
|
|
*/
|
|
|
|
/*
|
|
* The only catch with this linker script is that everything
|
|
* is linked starting at virtual_base, and loaded starting
|
|
* at physical_base. virtual_base is the predefined region
|
|
* of virtual memory for userland applications. physical_base
|
|
* is determined at build-time, it is one of the subsequent pages
|
|
* that come after the kernel image's load area.
|
|
*/
|
|
/* USER_AREA_START, see memlayout.h */
|
|
virtual_base = 0x10000000;
|
|
__stack = (0x20000000 - 0x1000 - 8); /* First page before the env/args */
|
|
INCLUDE "include/physical_base.lds"
|
|
|
|
/* physical_base = 0x228000; */
|
|
offset = virtual_base - physical_base;
|
|
|
|
ENTRY(_start)
|
|
|
|
SECTIONS
|
|
{
|
|
. = virtual_base;
|
|
_start_text = .;
|
|
.text : AT (ADDR(.text) - offset) { crt0.o(.text) *(.text) }
|
|
/* rodata is needed else your strings will link at physical! */
|
|
.rodata : AT (ADDR(.rodata) - offset) { *(.rodata) }
|
|
.rodata1 : AT (ADDR(.rodata1) - offset) { *(.rodata1) }
|
|
.data : AT (ADDR(.data) - offset) { *(.data) }
|
|
.bss : AT (ADDR(.bss) - offset) { *(.bss) }
|
|
_end = .;
|
|
}
|