mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 10:53:16 +01:00
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:
@@ -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 = .;
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user