{"push_id":848264805,"size":1,"distinct_size":1,"ref":"refs/heads/feature/safe_stack","head":"14fbe1cd8f98a59f84922e955c13a4521350b873","before":"2c4d90f2f1921d84f75ab7cc3de23389d16f4b86","commits":[{"sha":"14fbe1cd8f98a59f84922e955c13a4521350b873","author":{"email":"8174fa525b0fa9de3166f78d090fe29b5660d94e@rwth-aachen.de","name":"Niklas Hauser"},"message":"Architecture: Cortex: Add stack execution trap.\n\nThe startup code constructs a trampoline in the last 12B of the stack,\nwhich loads and branches to the hard fault handler.\nThe rest of the stack is initialized with relative branching \ninstructions equal to `b __stack_start`.\nSince only relative branches are used, the physical address of the \nstack is irrelevant.\n\nExtra care is takes to respect the max. negative range of the immediate\noperand in the `b` instruction.\nIf the CPU attempts to execute unused stack, it will branch to the\nbottom of the stack to the trampoline either in one instruction, or if\nthe stack is very large and the executed address is larger than the\nmax. negative range, it will take 2 or more branches to reach the\nhard fault handler trampoline.\n\nThe current implementation branches directly to the hard fault handler.\nIdeally it would branch to a shim function which would set a global flag\nto indicate a stack execution fault and then generate a hard fault\ninterrupt in software using the Software Trigger Interrupt Register.","distinct":true,"url":"https://api.github.com/repos/roboterclubaachen/xpcc/commits/14fbe1cd8f98a59f84922e955c13a4521350b873"}]}