pussuw edited a comment on pull request #5731:
URL: https://github.com/apache/incubator-nuttx/pull/5731#issuecomment-1080610588


   Thank you for your response, yes it is clear that xcp.regs is still in 
kernel memory and is addressable. However, the memory for the context itself 
exists in MMU mapped memory only if I'm right. As `tcb->stack_alloc_ptr = 
kumm_malloc(stack_size); `uses the userspace heap allocator which works with 
virtual addresses.
   
   What I'm concerned about is that calling `(void)group_addrenv(nexttcb);` 
prior to the context switch changes the MMU mappings already, and the address 
environment that is used to store the task that is being preempted is not in 
place any more. So where does the exception entry actually save the task's 
context (the task that is removed from execution) ? To me it is the new task's 
address environment (task that will continue). Unless I'm totally missing 
something here.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to