[okl4-developer] CONFIG_UTCB_SIZE and UTCB_SIZE

Geoffrey Lee glee at ok-labs.com
Tue Aug 26 16:32:27 EST 2008


On Tue, Aug 26, 2008 at 12:26:19PM +1000, Tomas Hruby wrote:
> Hi,

Hi Tomas

> 
> I would like to ask what is the relationship between CONFIG_UTCB_SIZE
> and UTCB_SIZE. The former is a kernel define and it is (12) for x86.
> It shouldbe probably (1 << 12) and we have discussed this already so I
> assume it is (1 << 12). However UTCB_SIZE is defined in userspace l4
> lib and is defined as (1 << 9) for x86. When l4test calls
> L4_ThreadControl() in initThreads() it sets utcb to utcbbase +
> (2)*UTCB_SIZE. My first question is why (2)* ?
> 
> When the utcb gets in the SYS_THREAD_CONTROL() handler it checks
> whether the address is CONFIG_UTCB_SIZE aligned. This test fails since
> the address is (2)*UTCB_SIZE aligned. I am setting the sizes to
> CONFIG_UTCB_SIZE == (1 << 13) and UTCB_SIZE == (1 << 9). So I ran into
> the problem described above. I believe that x86 would have the same
> troubles.

This seems to be an issue.  I think the CONFIG_UTCB_SIZE define
should be set to the actual architecture-dependent size of the UTCB
for that particular architecture, e.g. for x86 it would be ( 1 << 9)
i.e. 512.

	-gl


> 
> Therefore I wanted to set the UTCB_SIZE to (1 << 13) as well. For some
> reason which I cannot explain if I change the value of UTCB_BITS
> to anything larger than 9 OpenBoot crashes when loading the image. Is
> this value used by the build system to layout something in
> compiletime? I have no clue what does this value changes in the image :(
> 
> Cheers,
> 
> 			Tomas
> 
> _______________________________________________
> Developer mailing list
> Developer at okl4.org
> https://lists.okl4.org/mailman/listinfo/developer
> 

-- 




More information about the Developer mailing list