seL4 / sel4-tutorials

Tutorials for working with seL4 and/or CAmkES.

Home Page:https://docs.sel4.systems/Tutorials

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mistake in capabilities tutorial

lainy opened this issue · comments

commented

Not sure if this is the correct place to post this.

Lines 162-163 of capabilities.md, which are lines 4-5 of the main.c file:

size_t initial_cnode_object_size = BIT(info->initThreadCNodeSizeBits);
printf("Initial CNode is %zu bytes in size\n", initial_cnode_object_size);

However, BIT(n) is 1ul<<n, so this is not in fact reporting the CNode size is bytes.

If I understand correctly, BIT(info->initThreadCNodeSizeBits) would be the number of CSlots the CNode can hold, so the printf should perhaps read:

printf("Initial CNode is %zu slots in size\n", initial_cnode_object_size);

Of course this is inconsequential to what the tutorial is teaching, but it seemed worth pointing out.

That does seem to be correct. If you want to make a quick PR to fix, we should be able to merge it fairly quickly.

commented

Closing this, see comments on PR #48