Changes since April

Clean up of build directories.
Simplifications to capability model.
This commit is contained in:
Bahadir Balban
2010-06-01 15:08:13 +03:00
parent aef14b55ec
commit 6fa4884a5a
450 changed files with 10449 additions and 7383 deletions

View File

@@ -12,37 +12,13 @@ PROJRELROOT = '../../'
sys.path.append(PROJRELROOT)
sys.path.append('../../../../')
from config.projpaths import *
from config.configuration import *
from config.lib import *
from scripts.config.projpaths import *
from scripts.config.configuration import *
from scripts.config.lib import *
config = configuration_retrieve()
arch = config.arch
gcc_arch_flag = config.gcc_arch_flag
LIBL4_RELDIR = 'conts/libl4'
KERNEL_INCLUDE = join(PROJROOT, 'include')
LIBL4_DIR = join(PROJROOT, LIBL4_RELDIR)
LIBL4_INCLUDE = join(LIBL4_DIR, 'include')
LIBL4_LIBPATH = join(BUILDDIR, LIBL4_RELDIR)
# Locally important paths are here
LIBC_RELDIR = 'conts/libc'
LIBC_DIR = join(PROJROOT, LIBC_RELDIR)
LIBC_LIBPATH = join(BUILDDIR, LIBC_RELDIR)
LIBC_INCLUDE = [join(LIBC_DIR, 'include'), \
join(LIBC_DIR, 'include/arch' + '/' + arch)]
LIBDEV_RELDIR = 'conts/libdev'
LIBDEV_DIR = join(PROJROOT, LIBDEV_RELDIR)
LIBDEV_LIBPATH = join(join(BUILDDIR, LIBDEV_RELDIR), 'sys-userspace')
LIBDEV_INCLUDE = join(LIBDEV_DIR, 'uart/include')
LIBMEM_RELDIR = 'conts/libmem'
LIBMEM_DIR = join(PROJROOT, LIBMEM_RELDIR)
LIBMEM_LIBPATH = join(BUILDDIR, LIBMEM_RELDIR)
LIBMEM_INCLUDE = LIBMEM_DIR
LIBPOSIX_RELDIR = 'conts/posix/libposix'
LIBPOSIX_DIR = join(PROJROOT, LIBPOSIX_RELDIR)
LIBPOSIX_INCLUDE_SERVER = join(LIBPOSIX_DIR, 'include')
@@ -50,26 +26,26 @@ LIBPOSIX_INCLUDE_USERSPACE = join(LIBPOSIX_DIR, 'include/posix')
LIBPOSIX_LIBPATH = join(BUILDDIR, LIBPOSIX_RELDIR)
env = Environment(CC = config.toolchain_userspace + 'gcc',
AR = config.toolchain_userspace + 'ar',
RANLIB = config.toolchain_userspace + 'ranlib',
CCFLAGS = ['-g','-nostdinc', '-nostdlib', '-ffreestanding',
'-march=' + gcc_arch_flag, '-std=gnu99', '-Wall', '-Werror'],
LINKFLAGS = ['-nostdlib'],
ASFLAGS = ['-D__ASSEMBLY__'],
PROGSUFFIX = '.elf',
ENV = {'PATH' : os.environ['PATH']},
LIBS = ['libl4', 'libdev-userspace', 'gcc', 'c-userspace', \
'gcc', 'libmm', 'libmc', 'libmalloc'],
CPPPATH = ['include', LIBDEV_INCLUDE, LIBC_INCLUDE, KERNEL_INCLUDE,
LIBL4_INCLUDE, LIBMEM_INCLUDE, LIBPOSIX_INCLUDE_USERSPACE],
LIBPATH = [LIBDEV_LIBPATH, LIBC_LIBPATH, LIBL4_LIBPATH,
LIBMEM_LIBPATH, LIBPOSIX_LIBPATH],
CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h')
AR = config.toolchain_userspace + 'ar',
RANLIB = config.toolchain_userspace + 'ranlib',
CCFLAGS = ['-g','-nostdinc', '-nostdlib', '-ffreestanding', '-Wall',
'-march=' + gcc_arch_flag, '-std=gnu99', '-Werror'],
LINKFLAGS = ['-nostdlib'],
ASFLAGS = ['-D__ASSEMBLY__'],
PROGSUFFIX = '.elf',
ENV = {'PATH' : os.environ['PATH']},
LIBS = ['libl4', 'libdev-userspace', 'gcc', 'c-userspace', \
'gcc', 'libmem'],
CPPPATH = ['include', LIBDEV_INCLUDE, LIBC_INCLUDE, KERNEL_HEADERS,
LIBL4_INCLUDE, LIBMEM_INCLUDE, LIBPOSIX_INCLUDE_USERSPACE],
LIBPATH = [LIBDEV_USER_LIBPATH, LIBC_LIBPATH, LIBL4_LIBPATH,
LIBMEM_LIBPATH, LIBPOSIX_LIBPATH],
CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h')
contid = ARGUMENTS.get('cont', '0')
libposix_env = env.Clone()
libposix_env.Replace(CPPPATH = [LIBPOSIX_INCLUDE_USERSPACE, 'include', KERNEL_INCLUDE, LIBL4_INCLUDE, LIBMEM_INCLUDE, LIBC_INCLUDE])
libposix_env.Replace(CPPPATH = [LIBPOSIX_INCLUDE_USERSPACE, 'include', KERNEL_HEADERS, LIBL4_INCLUDE, LIBMEM_INCLUDE, LIBC_INCLUDE])
libposix = SConscript('libposix/SConscript', \
exports = { 'config' : config, 'env' : libposix_env, 'contid' : contid}, duplicate = 0, \
variant_dir = join(BUILDDIR, 'conts' + '/posix' + '/libposix'))
@@ -86,7 +62,7 @@ rootfs = SConscript('rootfs/SConscript', \
# No libposix reference because it conflicts with the compiler C library + the cluncky libc we have.
test0_env = env.Clone()
test0_env.Replace(CPPPATH = ['include', KERNEL_INCLUDE, LIBL4_INCLUDE, LIBMEM_INCLUDE, LIBC_INCLUDE, LIBPOSIX_INCLUDE_USERSPACE])
test0_env.Replace(CPPPATH = ['include', KERNEL_HEADERS, LIBL4_INCLUDE, LIBMEM_INCLUDE, LIBC_INCLUDE, LIBPOSIX_INCLUDE_USERSPACE])
test0 = SConscript('test0/SConscript', \
exports = { 'config' : config, 'environment' : test0_env, 'contid' : contid, 'previmage' : rootfs }, duplicate = 0, \
variant_dir = join(BUILDDIR, 'cont' + str(contid) + '/posix' + '/test0'))

View File

@@ -19,8 +19,8 @@ PROJRELROOT = '../../../../'
sys.path.append(os.path.abspath(PROJRELROOT))
from config.projpaths import *
from config.configuration import *
from scripts.config.projpaths import *
from scripts.config.configuration import *
from tools.pyelf import elf
config = configuration_retrieve()

View File

@@ -3,11 +3,9 @@
#
# Copyright (C) 2007 Bahadir Balban
#
import os
import sys
import shutil
import os, sys, shutil
from os.path import join
from configure import *
from scripts.config.config_invoke import *
config = configuration_retrieve()
builddir = ARGUMENTS.get('builddir', 'build/conts/posix')

View File

@@ -2,20 +2,14 @@
# Copyright (C) 2007 Bahadir Balban
#
import os
import glob
import sys
import os, glob, sys
from os.path import join
from string import split
from configure import *
from scripts.config.config_invoke import *
from scripts.config.projpaths import *
config = configuration_retrieve()
project_root = "../.."
kernel_headers = join(project_root, "include")
l4lib_headers = join(project_root, "tasks/libl4/include")
config_h = join(project_root, "include/l4/config.h")
env = Environment(CC = config.toolchain_userspace + 'gcc',
CCFLAGS = ['-g', '-std=gnu99', '-nostdlib', '-ffreestanding'],
LINKFLAGS = ['-nostdlib'],
@@ -38,7 +32,7 @@ def extract_arch_subarch_plat(config_header):
print "\n\nconfig.h does not exist. "\
"Please run: `scons configure' first\n\n"
sys.exit()
f = open(config_h, "r")
f = open(CONFIG_H, "r")
while True:
line = f.readline()
if line == "":
@@ -64,9 +58,9 @@ def extract_arch_subarch_plat(config_header):
sys.exit()
return arch, subarch, plat
arch, subarch, plat = extract_arch_subarch_plat(config_h)
arch, subarch, plat = extract_arch_subarch_plat(CONFIG_H)
headers = ["#include/posix", l4lib_headers, kernel_headers]
headers = ["#include/posix", L4LIB_INCLUDE, KERNEL_HEADERS]
env.Append(CPPPATH = headers)

View File

@@ -7,7 +7,7 @@ arch = config.arch
subarch = config.subarch
sys.path.append('../../../../')
from config.lib import *
from scripts.config.lib import *
container = next((c for c in config.containers if int(c.id) == int(contid)), None)

View File

@@ -11,38 +11,26 @@ PROJRELROOT = '../../../'
sys.path.append(PROJRELROOT)
from config.projpaths import *
from config.configuration import *
from scripts.config.projpaths import *
from scripts.config.configuration import *
config = configuration_retrieve()
arch = config.arch
LIBL4_RELDIR = 'conts/libl4'
KERNEL_INCLUDE = join(PROJROOT, 'include')
LIBL4_DIR = join(PROJROOT, LIBL4_RELDIR)
LIBL4_INCLUDE = join(LIBL4_DIR, 'include')
LIBL4_LIBPATH = join(BUILDDIR, LIBL4_RELDIR)
# Locally important paths are here
LIBC_RELDIR = 'conts/libc'
LIBC_DIR = join(PROJROOT, LIBC_RELDIR)
LIBC_LIBPATH = join(BUILDDIR, LIBC_RELDIR)
LIBC_INCLUDE = [join(LIBC_DIR, 'include'), \
join(LIBC_DIR, 'include/arch' + '/' + arch)]
env = Environment(CC = config.toolchain_userspace + 'gcc',
# We don't use -nostdinc because sometimes we need standard headers,
# such as stdarg.h e.g. for variable args, as in printk().
CCFLAGS = ['-g', '-nostdlib', '-ffreestanding', \
'-std=gnu99', '-Wall', '-Werror'],
LINKFLAGS = ['-nostdlib', '-T' + "include/linker.lds", \
LIBC_LIBPATH, LIBL4_LIBPATH, LIBMEM_LIBPATH],
ASFLAGS = ['-D__ASSEMBLY__'],
PROGSUFFIX = '.elf', # The suffix to use for final executable
ENV = {'PATH' : os.environ['PATH']}, # Inherit shell path
LIBS = ['gcc', 'libl4', 'libc', 'libmm', 'libmc'],
CPPPATH = ["#include", LIBC_INCLUDE, KERNEL_INCLUDE, LIBL4_INCLUDE],
CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h -D__KERNEL__')
# We don't use -nostdinc because sometimes we need standard headers,
# such as stdarg.h e.g. for variable args, as in printk().
CCFLAGS = ['-g', '-nostdlib', '-ffreestanding', '-std=gnu99',
'-Wall', '-Werror'],
LINKFLAGS = ['-nostdlib', '-T' + "include/linker.lds",
LIBC_LIBPATH, LIBL4_LIBPATH, LIBMEM_LIBPATH],
ASFLAGS = ['-D__ASSEMBLY__'],
PROGSUFFIX = '.elf', # The suffix to use for final executable
ENV = {'PATH' : os.environ['PATH']}, # Inherit shell path
LIBS = ['gcc', 'libl4', 'libc', 'libmm', 'libmc'],
CPPPATH = ["#include", LIBC_INCLUDE, KERNEL_HEADERS, LIBL4_INCLUDE],
CPPFLAGS = '-include l4/config.h -include l4/macros.h -include l4/types.h \
-D__KERNEL__')

View File

@@ -10,7 +10,7 @@
#include <l4/lib/list.h>
#include <l4/api/errno.h>
#include <l4/macros.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <stdio.h>

View File

@@ -7,7 +7,7 @@
#include <l4/lib/list.h>
#include <l4/api/errno.h>
#include <lib/pathstr.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <path.h>
#include <stdio.h>
#include <fs.h>

View File

@@ -9,54 +9,70 @@ physical_base = %s;
pager_offset = virtual_base - physical_base;
OUTPUT_ARCH(arm)
ENTRY(_start)
PHDRS
{
rx PT_LOAD;
rw PT_LOAD;
}
SECTIONS
{
. = virtual_base;
/* Put all RX, RO sections here */
__start_text = .;
.text : AT (ADDR(.text) - pager_offset) {
.text : AT (ADDR(.text) - pager_offset)
{
*(.text.head) *(.text)
}
} : rx = 0x90909090
__end_text = .;
__start_rodata = .;
.rodata : AT (ADDR(.rodata) - pager_offset) {
.rodata : AT (ADDR(.rodata) - pager_offset)
{
*(.rodata)
}
.rodata1 : AT (ADDR(.rodata1) - pager_offset) {
} : rx = 0x90909090
.rodata1 : AT (ADDR(.rodata1) - pager_offset)
{
*(.rodata1)
}
} : rx = 0x90909090
__end_rodata = .;
. = ALIGN(4K);
/* Put all RW sections here */
__start_data = .;
.data : AT (ADDR(.data) - pager_offset) {
.data : AT (ADDR(.data) - pager_offset)
{
*(.data)
}
} : rw
__end_data = .;
__start_bss = .;
.bss : AT (ADDR(.bss) - pager_offset) {
.bss : AT (ADDR(.bss) - pager_offset)
{
*(.bss)
}
. = ALIGN(4K);
} : rw
__end_bss = .;
. += 0x2000; /* BSS doesnt increment link counter??? */
__start_stack = .;
.stack : AT (ADDR(.stack) - pager_offset) {
.stack : AT (ADDR(.stack) - pager_offset)
{
*(.stack)
}
. = ALIGN(4K);
} : rw
__stack = .; /* This is the preallocated boot stack */
/* Below part is to be discarded after boot */
. = ALIGN(4K);
__start_init = .;
.init : AT (ADDR(.init) - pager_offset) {
.init : AT (ADDR(.init) - pager_offset)
{
*(.init.data)
*(.init.bootmem)
}
} : rw
__end_init = .;
__end = .;
}

View File

@@ -12,7 +12,7 @@
#include <l4/macros.h>
#include <l4/config.h>
#include INC_GLUE(memory.h)
#include <memcache/memcache.h>
#include <mem/memcache.h>
#include <lib/idpool.h>
/*

View File

@@ -2,7 +2,7 @@
#define __VFS_H__
#include <fs.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <l4/lib/list.h>
#include <memfs/memfs.h>
#include <l4/macros.h>

View File

@@ -4,7 +4,7 @@
* Copyright (C) 2007 Bahadir Balban
*/
#include <lib/idpool.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <l4/macros.h>
#include INC_GLUE(memory.h)
#include <stdio.h>

View File

@@ -94,10 +94,12 @@ void handle_requests(void)
ret = 0;
break;
}
/*
case L4_REQUEST_CAPABILITY: {
ret = sys_request_cap(sender, (struct capability *)mr[0]);
break;
}
*/
case L4_IPC_TAG_SHMGET: {
ret = sys_shmget((key_t)mr[0], (int)mr[1], (int)mr[2]);
break;

View File

@@ -12,7 +12,7 @@
#include L4LIB_INC_ARCH(syscalls.h)
#include <l4/generic/cap-types.h> /* TODO: Move this to API */
#include L4LIB_INC_ARCH(syslib.h)
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <user.h>
/* Capability descriptor list */
@@ -33,6 +33,7 @@ void cap_list_print(struct cap_list *cap_list)
printf("\n");
}
#if 0
#define PAGER_TOTAL_MUTEX 5
int setup_children_mutex(int total_caps, struct cap_list *cap_list)
{
@@ -237,13 +238,16 @@ found:
return 0;
}
#endif
#if 0
int setup_children_caps(int total_caps, struct cap_list *cap_list)
{
setup_children_ipc(total_caps, cap_list);
setup_children_mutex(total_caps, cap_list);
return 0;
}
#endif
/* Copy all init-memory allocated capabilities */
void copy_boot_capabilities(int ncaps)
@@ -283,6 +287,8 @@ int cap_read_all()
}
total_caps = ncaps;
printf("%s: Total of %d capabilities.\n", __FUNCTION__, total_caps);
/* Allocate array of caps from boot memory */
caparray = alloc_bootmem(sizeof(struct capability) * ncaps, 0);
@@ -299,7 +305,7 @@ int cap_read_all()
/* Copy them to real allocated structures */
copy_boot_capabilities(ncaps);
// cap_list_print(&capability_list);
// cap_list_print(&capability_list);
memset(&cont_mem_regions, 0, sizeof(cont_mem_regions));
@@ -371,12 +377,29 @@ int cap_read_all()
!cont_mem_regions.utcb ||
!cont_mem_regions.physmem ||
!cont_mem_regions.pager) {
printf("%s: Error, pager does not have one of the required"
printf("%s: Error, pager does not have one of the required "
"mem capabilities defined. (TASK, SHM, PHYSMEM, UTCB, PAGER)\n",
__TASKNAME__);
printf("%p, %p, %p, %p, %p\n", cont_mem_regions.task,
cont_mem_regions.shmem, cont_mem_regions.utcb,
cont_mem_regions.physmem, cont_mem_regions.pager);
if (cont_mem_regions.task) {
printf("task start: %lx\n", cont_mem_regions.task->start << 12);
printf("task end: %lx\n", cont_mem_regions.task->end << 12);
}
if (cont_mem_regions.shmem) {
printf("shmem start: %lx\n", cont_mem_regions.shmem->start << 12);
printf("shmem end: %lx\n", cont_mem_regions.shmem->end << 12);
}
if (cont_mem_regions.physmem) {
printf("physmem start: %lx\n", cont_mem_regions.physmem->start << 12);
printf("physmem end: %lx\n", cont_mem_regions.physmem->end << 12);
}
if (cont_mem_regions.utcb) {
printf("utcb start: %lx\n", cont_mem_regions.utcb->start << 12);
printf("utcb end: %lx\n", cont_mem_regions.utcb->end << 12);
}
if (cont_mem_regions.pager) {
printf("pager start: %lx\n", cont_mem_regions.pager->start << 12);
printf("pager end: %lx\n", cont_mem_regions.pager->end << 12);
}
BUG();
}
@@ -386,9 +409,10 @@ int cap_read_all()
void setup_caps()
{
cap_read_all();
setup_children_caps(total_caps, &capability_list);
// setup_children_caps(total_caps, &capability_list);
}
#if 0
/*
* Find our own, widened replicable capability of same type as given,
* replicate, reduce and grant as described with given parameters.
@@ -561,3 +585,5 @@ out:
return ret;
}
#endif

View File

@@ -3,7 +3,7 @@
*/
#include <l4/lib/list.h>
#include <vm_area.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <fs.h>
/*

View File

@@ -9,7 +9,7 @@
#include <l4lib/types.h>
#include <l4/macros.h>
#include <l4/api/errno.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <vm_area.h>
#include <syscalls.h>
#include <string.h>

View File

@@ -13,7 +13,7 @@
#include <syscalls.h>
#include <l4lib/exregs.h>
#include <l4lib/ipcdefs.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <l4/api/space.h>
#include L4LIB_INC_ARCH(syslib.h)
#include L4LIB_INC_ARCH(syscalls.h)

View File

@@ -5,8 +5,8 @@
*/
#include <vm_area.h>
#include <task.h>
#include <mm/alloc_page.h>
#include <malloc/malloc.h>
#include <mem/alloc_page.h>
#include <mem/malloc.h>
#include <l4/generic/space.h>
#include <l4/api/errno.h>
#include <string.h>

View File

@@ -5,8 +5,8 @@
*/
#include <init.h>
#include <vm_area.h>
#include <malloc/malloc.h>
#include <mm/alloc_page.h>
#include <mem/malloc.h>
#include <mem/alloc_page.h>
#include <l4/macros.h>
#include <l4/api/errno.h>
#include <l4lib/types.h>
@@ -22,7 +22,6 @@
#include <test.h>
#include <lib/pathstr.h>
#include <malloc/malloc.h>
#include <stdio.h>
#include <task.h>
#include <stat.h>

View File

@@ -14,8 +14,8 @@
#include <stdio.h>
#include <string.h>
#include <mm/alloc_page.h>
#include <malloc/malloc.h>
#include <mem/alloc_page.h>
#include <mem/malloc.h>
#include <lib/bit.h>
#include <task.h>

View File

@@ -5,7 +5,7 @@
*/
#include <l4/lib/math.h>
#include <vm_area.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include INC_API(errno.h)
#include <posix/sys/types.h>
#include L4LIB_INC_ARCH(syscalls.h)
@@ -98,9 +98,59 @@ int task_insert_vma(struct vm_area *this, struct link *vma_list)
BUG();
}
int vma_intersection(struct tcb *task,
unsigned long pfn_start, unsigned long pfn_end)
{
struct vm_area *vma;
list_foreach_struct(vma, &task->vm_area_head->list, list) {
if (set_intersection(pfn_start, pfn_end,
vma->pfn_start, vma->pfn_end))
return 1;
}
return 0;
}
/*
* Take first vma, place region after it. Traverse all vmas, if hit
* an intersection, take the next vma and retry until all are traversed
*/
unsigned long find_unmapped_area(unsigned long npages, struct tcb *task)
{
unsigned long pfn_start = __pfn(task->map_start);
unsigned long pfn_end = pfn_start + npages;
struct vm_area *vma;
if (npages > __pfn(task->map_end - task->map_start))
return 0;
/* If no vmas, first map slot is available. */
if (list_empty(&task->vm_area_head->list))
return task->map_start;
list_foreach_struct(vma, &task->vm_area_head->list, list) {
/* Update region to after this vma */
pfn_start = vma->pfn_end;
pfn_end = pfn_start + npages;
/* If it doesn't intersect with any other vmas
* and is within boundaries, return it */
if (pfn_end <= __pfn(task->map_end) &&
!vma_intersection(task, pfn_start, pfn_end))
return __pfn_to_addr(pfn_start);
}
return 0;
}
#if 0
/*
* Search an empty space in the task's mmapable address region.
*
* This works most of the time - but fails if an empty region is
* encountered that is used at a later vma that doesn't get checked.
* This may occur.
*
* This does a less than O(n) algorithm by starting the estimated region
* and vma comparison from the beginning, once a vma is not intersected
* that means it is an available slot. However if vma's and estimated
@@ -157,6 +207,7 @@ unsigned long find_unmapped_area(unsigned long npages, struct tcb *task)
return 0;
}
#endif
/* Validate an address that is a possible candidate for an mmap() region */
int mmap_address_validate(struct tcb *task, unsigned long map_address,

View File

@@ -9,7 +9,7 @@
#include <l4/lib/math.h>
#include L4LIB_INC_ARCH(syslib.h)
#include <vm_area.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
/* This splits a vma, splitter region must be in the *middle* of original vma */
int vma_split(struct vm_area *vma, struct tcb *task,

View File

@@ -5,8 +5,8 @@
#include <l4/lib/list.h>
#include L4LIB_INC_ARCH(syscalls.h)
#include L4LIB_INC_ARCH(syslib.h)
#include <malloc/malloc.h>
#include <mm/alloc_page.h>
#include <mem/malloc.h>
#include <mem/alloc_page.h>
#include <vm_area.h>
#include <string.h>
#include <globals.h>

View File

@@ -10,7 +10,7 @@
#include <memory.h>
#include <vm_area.h>
#include <globals.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include L4LIB_INC_ARCH(syscalls.h)
#include L4LIB_INC_ARCH(syslib.h)
#include <lib/idpool.h>

View File

@@ -20,7 +20,7 @@
#include <l4lib/exregs.h>
#include <lib/addr.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <init.h>
#include <string.h>

View File

@@ -8,7 +8,7 @@
#include <task.h>
#include <user.h>
#include <l4/api/errno.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
/*
* Checks if the given user virtual address range is

View File

@@ -9,7 +9,7 @@
#include L4LIB_INC_ARCH(utcb.h)
#include <mmap.h>
#include <utcb.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <vm_area.h>
#include <memory.h>

View File

@@ -7,7 +7,7 @@
#include <vm_area.h>
#include <l4/macros.h>
#include <l4/api/errno.h>
#include <malloc/malloc.h>
#include <mem/malloc.h>
#include <globals.h>
/* Global list of all in-memory files on the system */

View File

@@ -2,7 +2,7 @@
import os
import sys
from configure import *
from config.config_invoke import *
config = configuration_retrieve()
objdump = "objdump"

View File

@@ -14,8 +14,8 @@ e = environment.Clone()
sys.path.append('../../../')
from config.projpaths import *
from config.configuration import *
from scripts.config.projpaths import *
from scripts.config.configuration import *
from tools.pyelf.lmanext import *
rootfs_lds_in = \

View File

@@ -6,7 +6,7 @@ import os, sys
arch = config.arch
sys.path.append('../../../../')
from config.lib import *
from scripts.config.lib import *
from tools.pyelf.lmanext import *
src = [Glob('*.c') + Glob('test_exec.S') + Glob('src/*.[Sc]') + Glob('src/arch/arm/*.c')]

View File

@@ -3,12 +3,10 @@
#
# Copyright (C) 2007 Bahadir Balban
#
import os
import sys
import shutil
import os, sys, shutil
from os.path import join
from glob import glob
from configure import *
from scripts.config.config_invoke import *
config = configuration_retrieve()

View File

@@ -11,38 +11,60 @@ __stack = (virtual_base - 0x1000 - 8); /* First page before the env/args */
offset = virtual_base - physical_base;
OUTPUT_ARCH(arm)
ENTRY(_start)
PHDRS
{
rx PT_LOAD;
rw PT_LOAD;
}
SECTIONS
{
. = virtual_base;
/* Put all RX, RO sections here */
_start_text = .;
.text : AT (ADDR(.text) - offset) {
.text : AT (ADDR(.text) - offset)
{
*(.text.head)
*(.text)
}
.rodata : AT (ADDR(.rodata) - offset) {
} : rx = 0x90909090
.rodata : AT (ADDR(.rodata) - offset)
{
*(.rodata)
}
.rodata1 : AT (ADDR(.rodata1) - offset) {
} : rx = 0x90909090
.rodata1 : AT (ADDR(.rodata1) - offset)
{
*(.rodata1)
}
} : rx = 0x90909090
. = ALIGN(4K);
.data : AT (ADDR(.data) - offset) {
/* Put all RW sections here */
.data : AT (ADDR(.data) - offset)
{
_start_test_exec = .;
*(.testexec)
_end_test_exec = .;
*(.data)
}
.got : AT (ADDR(.got) - offset) {
} : rw
.got : AT (ADDR(.got) - offset)
{
*(.got)
}
.got.plt : AT (ADDR(.got.plt) - offset) {
} : rw
.got.plt : AT (ADDR(.got.plt) - offset)
{
*(.got.plt)
}
.bss : AT (ADDR(.bss) - offset) {
} : rw
.bss : AT (ADDR(.bss) - offset)
{
*(.bss)
}
} : rw
_end = .;
}

View File

@@ -8,18 +8,29 @@ virtual_base = %s;
/* First page before the env/args */
OUTPUT_ARCH(arm)
ENTRY(_start)
PHDRS
{
rx PT_LOAD;
rw PT_LOAD;
}
SECTIONS
{
. = virtual_base;
.text : { *(.text.head) *(.text) }
.rodata : { *(.rodata) }
.rodata1 : { *(.rodata1) }
/* RX, RO sections */
.text : { *(.text.head) *(.text) } : rx =0x90909090
.rodata : { *(.rodata) } : rx =0x90909090
.rodata1 : { *(.rodata1) } : rx =0x90909090
. = ALIGN(4K);
.data : { *(.data) }
.got : { *(.got) }
.got.plt : { *(.got.plt) }
.bss : { *(.bss) }
/* RW sections */
.data : { *(.data) } : rw
.got : { *(.got) } : rw
.got.plt : { *(.got.plt) } :rw
.bss : { *(.bss) } : rw
}

View File

@@ -74,6 +74,7 @@ void ipc_extended_test(void)
/* This test makes this assumption */
BUG_ON(L4_IPC_EXTENDED_MAX_SIZE > PAGE_SIZE);
#if 0
/*
* Request capability to ipc to each other from pager
* (Actually only the sender needs it)
@@ -92,6 +93,7 @@ void ipc_extended_test(void)
"err = %d\n", err);
goto out_err;
}
#endif
/*
* Both child and parent gets 2 pages

View File

@@ -36,7 +36,6 @@ int user_mutex_test(void)
{
pid_t child, parent;
int map_size = PAGE_SIZE;
struct capability cap;
void *base;
int err;
@@ -74,7 +73,7 @@ int user_mutex_test(void)
test_printf("%d: Created child with pid %d\n", getpid(), child);
else
test_printf("Child %d running.\n", getpid());
#if 0
/*
* Request capability to ipc to each other from pager
* (Actually only the sender needs it)
@@ -95,6 +94,7 @@ int user_mutex_test(void)
"err = %d\n", err);
goto out_err;
}
#endif
/* Child locks and produces */
if (child == 0) {