Created libc under containers/posix which now all tasks use to build.

There is a problem in the new libc that test0 now misbehaves. Going to be fixed.
This commit is contained in:
Bahadir Balban
2009-08-27 12:00:04 +03:00
parent 87e2aeaf58
commit a41caeebd2
67 changed files with 2760 additions and 53 deletions

View File

@@ -1 +0,0 @@
arch-arm

View File

@@ -0,0 +1,12 @@
.section .text.head
.global _start;
.type _start,function;
.align;
_start:
ldr sp, =__stack
bl __container_init
1:
b 1b

View File

@@ -4,6 +4,7 @@
#include <arch/mm.h>
#include <task.h>
#include <vm_area.h>
#include <printf.h>
/* Extracts generic protection flags from architecture-specific pte */
unsigned int vm_prot_flags(pte_t pte)

View File

@@ -0,0 +1,12 @@
.section .text.head
.global _start;
.type _start,function;
.align;
_start:
ldr sp, =__stack
bl __container_init
1:
b 1b

View File

@@ -13,7 +13,7 @@
#include <l4/api/errno.h>
#include INC_GLUE(memory.h)
#include <stdio.h>
#include <printf.h>
/* All memory allocated here is discarded after boot */

View File

@@ -11,6 +11,7 @@
#include <l4lib/arch/syscalls.h>
#include <l4/generic/cap-types.h> /* TODO: Move this to API */
#include <lib/malloc.h>
#include <printf.h>
struct cap_list capability_list;

View File

@@ -348,7 +348,7 @@ int read_file_pages(struct vm_file *vmfile, unsigned long pfn_start,
f_offset);
if (IS_ERR(page)) {
printf("%s: %s:Could not read page %d "
"from file with vnum: 0x%x\n", __TASKNAME__,
"from file with vnum: 0x%lx\n", __TASKNAME__,
__FUNCTION__, f_offset, vm_file_to_vnum(vmfile));
return (int)page;
}
@@ -460,7 +460,7 @@ int write_file_pages(struct vm_file *f, unsigned long pfn_start,
err = f->vm_obj.pager->ops.page_out(&f->vm_obj, f_offset);
if (err < 0) {
printf("%s: %s:Could not write page %d "
"to file with vnum: 0x%x\n", __TASKNAME__,
"to file with vnum: 0x%lx\n", __TASKNAME__,
__FUNCTION__, f_offset, vm_file_to_vnum(f));
return err;
}

View File

@@ -9,7 +9,7 @@
#include <l4/types.h>
#include INC_GLUE(memory.h)
#include <lib/addr.h>
#include <stdio.h>
#include <printf.h>
/*
* Initializes an address pool, but uses an already

View File

@@ -6,7 +6,7 @@
#include <lib/bit.h>
#include <l4/macros.h>
#include <l4/config.h>
#include <stdio.h>
#include <printf.h>
#include INC_GLUE(memory.h)
/* Emulation of ARM's CLZ (count leading zeroes) instruction */

View File

@@ -10,7 +10,7 @@
#include <lib/elf/elfprg.h>
#include <lib/elf/elfsym.h>
#include <lib/elf/elfsect.h>
#include <printf.h>
int elf_probe(struct elf_header *header)
{

View File

@@ -7,7 +7,7 @@
#include <lib/malloc.h>
#include <l4/macros.h>
#include INC_GLUE(memory.h)
#include <stdio.h>
#include <printf.h>
#include <l4/api/errno.h>
struct id_pool *id_pool_new_init(int totalbits)

View File

@@ -18,6 +18,7 @@ Messages that indicate a software error will contain three asterisks (***).
*****************************************************************************/
#include <string.h> /* memcpy(), memset() */
#include <stdio.h> /* printf() */
#include <printf.h>
#include <l4/macros.h>
#define _32BIT 1

View File

@@ -239,8 +239,8 @@ void *do_mmap(struct vm_file *mapfile, unsigned long file_offset,
/* Get total file pages, check if mapping is within file size */
file_npages = __pfn(page_align_up(mapfile->length));
if (npages > file_npages - file_offset) {
printf("%s: Trying to map %d pages from page %d, "
"but file length is %d\n", __FUNCTION__,
printf("%s: Trying to map %d pages from page %lu, "
"but file length is %lu\n", __FUNCTION__,
npages, file_offset, file_npages);
return PTR_ERR(-EINVAL);
}

View File

@@ -71,8 +71,8 @@ int file_page_out(struct vm_object *vm_obj, unsigned long page_offset)
/* Check first if the file has such a page at all */
if (__pfn(page_align_up(f->length) <= page_offset)) {
printf("%s: %s: Trying to look up page %d, but file length "
"is %d bytes.\n", __TASKNAME__, __FUNCTION__,
printf("%s: %s: Trying to look up page %lu, but file length "
"is %lu bytes.\n", __TASKNAME__, __FUNCTION__,
page_offset, f->length);
BUG();
}
@@ -123,8 +123,8 @@ struct page *file_page_in(struct vm_object *vm_obj, unsigned long page_offset)
/* Check first if the file has such a page at all */
if (__pfn(page_align_up(f->length) <= page_offset)) {
printf("%s: %s: Trying to look up page %d, but file length "
"is %d bytes.\n", __TASKNAME__, __FUNCTION__,
printf("%s: %s: Trying to look up page %lu, but file length "
"is %lu bytes.\n", __TASKNAME__, __FUNCTION__,
page_offset, f->length);
BUG();
}
@@ -253,8 +253,8 @@ struct page *bootfile_page_in(struct vm_object *vm_obj,
/* Check first if the file has such a page at all */
if (__pfn(page_align_up(boot_file->length) <= offset)) {
printf("%s: %s: Trying to look up page %d, but file length "
"is %d bytes.\n", __TASKNAME__, __FUNCTION__,
printf("%s: %s: Trying to look up page %lu, but file length "
"is %lu bytes.\n", __TASKNAME__, __FUNCTION__,
offset, boot_file->length);
BUG();
}

View File

@@ -10,6 +10,7 @@
#include <mmap.h>
#include <shm.h>
#include <globals.h>
#include <printf.h>
struct vm_statistics {
int tasks; /* All tasks counted on the system */

View File

@@ -10,6 +10,7 @@
#include <utcb.h>
#include <lib/malloc.h>
#include <vm_area.h>
#include <printf.h>
/*
* UTCB management in Codezero
@@ -140,7 +141,7 @@ out:
if (IS_ERR(err = do_mmap(0, 0, task, slot,
VMA_ANONYMOUS | VMA_PRIVATE |
VMA_FIXED | VM_READ | VM_WRITE, 1))) {
printf("UTCB: mmapping failed with %d\n", err);
printf("UTCB: mmapping failed with %p\n", err);
return (int)err;
}
}

View File

@@ -9,6 +9,7 @@
#include <l4/api/errno.h>
#include <lib/malloc.h>
#include <globals.h>
#include <printf.h>
/* Global list of all in-memory files on the system */
struct global_list global_vm_files = {