mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 02:43:15 +01:00
And now we have working thread demo container.
This commit is contained in:
@@ -14,9 +14,13 @@ struct l4_thread_struct {
|
||||
|
||||
/* -- Bora start -- */
|
||||
|
||||
/* A helper macro easing utcb space creation. */
|
||||
/*
|
||||
* A helper macro easing utcb space creation,
|
||||
* FIXME: We need to fix address allocation path, so as to use
|
||||
* actual size of units instead of page size
|
||||
*/
|
||||
#define DECLARE_UTCB_SPACE(name, entries) \
|
||||
char name[(entries + PAGE_SIZE / UTCB_SIZE) * UTCB_SIZE] ALIGN(PAGE_SIZE);
|
||||
char name[entries * PAGE_SIZE] ALIGN(PAGE_SIZE);
|
||||
|
||||
int l4_set_stack_params(unsigned long stack_top,
|
||||
unsigned long stack_bottom,
|
||||
|
||||
@@ -26,7 +26,7 @@ int address_pool_init(struct address_pool *pool,
|
||||
unsigned long start, unsigned long end,
|
||||
unsigned int size)
|
||||
{
|
||||
if ((pool->idpool = id_pool_new_init(__pfn(end - start) / size)) < 0)
|
||||
if ((pool->idpool = id_pool_new_init(__pfn(end - start) )) < 0)
|
||||
return (int)pool->idpool;
|
||||
pool->start = start;
|
||||
pool->end = end;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <l4lib/addr.h>
|
||||
#include <l4lib/thread/utcb-common.h>
|
||||
#include <malloc/malloc.h>
|
||||
#include INC_GLUE(message.h)
|
||||
|
||||
/* Globally disjoint utcb virtual region pool */
|
||||
static struct address_pool utcb_region_pool;
|
||||
|
||||
@@ -130,6 +130,7 @@ int l4_set_utcb_params(unsigned long utcb_start, unsigned long utcb_end)
|
||||
"than utcb start address.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
#if 0
|
||||
/*
|
||||
* This check guarantees two things:
|
||||
* 1. The range must be multiple of UTCB_SIZE, at least one item.
|
||||
@@ -140,6 +141,7 @@ int l4_set_utcb_params(unsigned long utcb_start, unsigned long utcb_end)
|
||||
"of the utcb size(%d).\n", UTCB_SIZE);
|
||||
return -EINVAL;
|
||||
}
|
||||
#endif
|
||||
/* Arguments passed the validity tests. */
|
||||
|
||||
/* Init utcb virtual address pool. */
|
||||
|
||||
Reference in New Issue
Block a user