Container/Pager/Capability initialization that works.

Need to safely free boot memory and jump to first task's stack.
Need to test scheduler and all syscall entries.
This commit is contained in:
Bahadir Balban
2009-08-04 13:56:11 +03:00
parent 7e8845abf8
commit 519bfba8c7
12 changed files with 150 additions and 126 deletions

View File

@@ -72,11 +72,12 @@ SECTIONS
{
. = ALIGN(16K); /* For initial pgd */
*(.init.pgd)
*(.init.data)
*(.init.bootmem)
*(.init.data)
}
/* Space for boot stack */
. += 0x1000;
. = ALIGN(4K); /* A page aligned stack of at least 4KB */
_end_init = .;
_bootstack = .;
_end_kernel = .;

View File

@@ -69,6 +69,20 @@ struct cap_list {
void capability_init(struct capability *cap);
struct capability *capability_create(void);
static inline void cap_list_init(struct cap_list *clist)
{
clist->ncaps = 0;
link_init(&clist->caps);
}
static inline void cap_list_insert(struct capability *cap,
struct cap_list *clist)
{
list_insert(&cap->list, &clist->caps);
clist->ncaps++;
}
#if 0
/* Virtual memory space allocated to container */
struct capability cap_virtmap = {

View File

@@ -35,6 +35,13 @@ struct container_head {
struct link list;
};
static inline void
container_head_init(struct container_head *chead)
{
chead->ncont = 0;
link_init(&chead->list);
}
/*
* Everything on the platform is described and stored
* in the structure below.

View File

@@ -2,8 +2,11 @@
#define __ARM_GLUE_INIT_H__
#include <l4/generic/tcb.h>
#include <l4/generic/space.h>
void switch_to_user(struct ktcb *inittask);
void timer_start(void);
extern struct address_space init_space;
#endif /* __ARM_GLUE_INIT_H__ */