[okl4-developer] Confused about Kernel IDs

Harry Vennik htvennik at zonnet.nl
Sat Jun 2 05:35:02 EST 2007


Hi,

I am a bit confused about the encoding of the Kernel ID. The  
documentation of the OKL4 kernel states that a Kernel ID is of type  
Version, which is again defined to have two fields of 8 bits each,  
one for the id, one for the subid.
In the kip.h header file, I find just that, in the definition of the  
L4_KernelId_t type:

typedef union {
     L4_Word_t raw;
     struct {
         L4_BITFIELD4(L4_Word_t, __padding:16, subid:8, id:8, __PAD32);
     } x;
} L4_KernelId_t;

But then there is something strange, later on in that file:
#define L4_KID_L4_486           ((0 << 16) + 1)
#define L4_KID_L4_PENTIUM       ((0 << 16) + 2)
#define L4_KID_L4_X86           ((0 << 16) + 3)
#define L4_KID_L4_MIPS          ((1 << 16) + 1)
#define L4_KID_L4_ALPHA         ((2 << 16) + 1)
#define L4_KID_FIASCO           ((3 << 16) + 1)
#define L4_KID_L4KA_Hazelnut    ((4 << 16) + 1)
#define L4_KID_L4KA_Pistachio   ((4 << 16) + 2)
#define L4_KID_L4KA_Strawberry  ((4 << 16) + 3)
#define L4_KID_NICTA_Pistachio  ((5 << 16) + 1)
#define L4_KID_OKL4             ((6 << 16) + 0)

This doesn't quite match. According to these constants, the id is in  
bits 16-23 and the subid in 0-7, while the type definition says it  
should be id in 24-31 and subid in 16-23.
The latter also matches what the OKL4 documentation says in paragraph  
D-3.2.4.

Are those constants wrong??

Regards,

Harry



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20070601/b87aeeed/attachment.htm 


More information about the Developer mailing list