Greetings 

I am using a 4.0 compatible seL4 snapshot derived from mainline several months 
ago as a base for seL4/MIPS port. Currently, I am debugging sel4tests.  My goal 
— make everything working before moving to hardware. By «everything» I mean 
different configurations of the system (optimization flags, syscall attributes, 
fast/slow path, etc). For example, most stable build uses 
«CONFIG_LIB_SEL4_INLINE_INVOCATIONS», less stable build, which I am debugging 
now, uses «CONFIG_LIB_SEL4_PUBLIC_SYMBOLS». 

This configuration crashes at the start when I am trying to allocate memory for 
the first test: 

Starting test suite sel4test
Starting test 0: TEST_TRIVIAL0001
  TEST_TRIVIAL0001
 b24e68  b0cc4c b0cc2c b0cc2c sel4test-tests 0 0
 * Loading segment 00400000-->005748a4
 * Loading segment 00575000-->00689d84
alloc->num_cspace_slots = 30
alloc->num_cspace_slots = 29
alloc->num_cspace_slots = 28
alloc->num_cspace_slots = 27
alloc->num_cspace_slots = 26
alloc->num_cspace_slots = 25
alloc->num_cspace_slots = 24
alloc->num_cspace_slots = 23
alloc->num_cspace_slots = 22
alloc->num_cspace_slots = 21
alloc->num_cspace_slots = 20
alloc->num_cspace_slots = 19
alloc->num_cspace_slots = 18
alloc->num_cspace_slots = 17
alloc->num_cspace_slots = 16
alloc->num_cspace_slots = 15
alloc->num_cspace_slots = 14
alloc->num_cspace_slots = 13
alloc->num_cspace_slots = 12
alloc->num_cspace_slots = 11
alloc->num_cspace_slots = 10
alloc->num_cspace_slots = 9
alloc->num_cspace_slots = 8
alloc->num_cspace_slots = 7
alloc->num_cspace_slots = 6
alloc->num_cspace_slots = 5
alloc->num_cspace_slots = 4
alloc->num_cspace_slots = 3
alloc->num_cspace_slots = 2
alloc->num_cspace_slots = 1
[email protected]:254 Regular cspace alloc failed, and failed 
from watermark

alloc->num_cspace_slots == 0_refill_watermark:374     slota = 0
alloc->num_cspace_slots = 1
[email protected]:254 Regular cspace alloc failed, and failed 
from watermark

alloc->num_cspace_slots == 0_refill_watermark:374     slota = 0
alloc->num_cspace_slots = 1
[email protected]:254 Regular cspace alloc failed, and failed 
from watermark


I see, that: 

243: error = alloc->cspace.alloc(alloc, alloc->cspace.cspace, slot);

returns the error, and then we allocating memory from the watermark. In other 
builds (for example, with CONFIG_LIB_SEL4_INLINE_INVOCATIONS attributes), I do 
not see this issue - there are no errors on return. 

So, I need to debug function to be sure that I am receiving in the kernel 
proper arguments and so one, but I do not understand how this part of the code 
works. Do you have any documentation, or slides or just simple diagrams how 
this allocator work? What functions are responsible for generating error 
return, where exactly allocation is performed and how to debug this. 

Thank you. 




_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to