diff --git a/conts/libl4/include/l4lib/thread/thread.h b/conts/libl4/include/l4lib/thread/thread.h index 396c715..eb5b2ec 100644 --- a/conts/libl4/include/l4lib/thread/thread.h +++ b/conts/libl4/include/l4lib/thread/thread.h @@ -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, diff --git a/conts/libl4/src/addr.c b/conts/libl4/src/addr.c index 1b1d047..4151922 100644 --- a/conts/libl4/src/addr.c +++ b/conts/libl4/src/addr.c @@ -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; diff --git a/conts/libl4/src/thread/utcb-common.c b/conts/libl4/src/thread/utcb-common.c index 8991b91..053896a 100644 --- a/conts/libl4/src/thread/utcb-common.c +++ b/conts/libl4/src/thread/utcb-common.c @@ -7,6 +7,7 @@ #include #include #include +#include INC_GLUE(message.h) /* Globally disjoint utcb virtual region pool */ static struct address_pool utcb_region_pool; diff --git a/conts/libl4/src/thread/utcb.c b/conts/libl4/src/thread/utcb.c index 2d21141..eeaab39 100644 --- a/conts/libl4/src/thread/utcb.c +++ b/conts/libl4/src/thread/utcb.c @@ -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. */