[okl4-developer] CONFIG_UTCB_SIZE and UTCB_SIZE

Tomas Hruby thruby at cs.otago.ac.nz
Tue Aug 26 12:26:19 EST 2008


Hi,

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.

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



More information about the Developer mailing list