Page 1 of 1

Question about Memory Protection (TriCore)

Posted: Thu Oct 08, 2015 2:22 pm
by AlTi
Hi,

I´m just curious about the bold marked sentence on your wiki:

[a] - The OS shares the stack with tasks and ISRs. If SP is invalid when calling a system API, a fault may happen. If a context change happens inside a system call (e.g., ActivateTask() made on a task with higher priority), data from the OS remain saved on the stack of the calling task; other tasks or ISRs from the same OS-Application can overwrite those values. A solution for this problem is in testing on TriCore implementation, but since the kernel on AURIX never allocate stack (this is due to the special carateristic of TriCore Architecture and the compilers optimizations) the implementation cannot be proved until it will backported on PPC or on a new architecture with this pontential problem.

http://erika.tuxfamily.org/wiki/index.p ... tion_notes

How can you be sure, that the kernel never allocates stack? Can you force the optimizations (I´m using the Hightec compiler)?

Thank you for you help.

Re: Question about Memory Protection (TriCore)

Posted: Thu Oct 08, 2015 2:47 pm
by e.guidieri
Static inspection of generated assembly code.

You can do it by yourself just grepping a10 in kernel's assembly generated files.

Errico