Repository navigation
arch/tricore: enter svcall by jump and add bus error hook - #21150
Merged
xiaoxiang781216 merged 3 commits intoNov 2, 2026
Merged
Conversation
When a svcall trap is taken, the trap entry has already saved the context into CSAs, and then the svcall handler is executed by 'call', which allocates one more CSA that is not needed. Use 'ji' to jump to the svcall handler instead, so one CSA is saved for each svcall. Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
The current trapcall function comes in through the jump instruction, so the return method needs to be modified. Signed-off-by: zhangyu117 <zhangyu117@xiaomi.com>
Add tricore_bustrap_register_hook() so that safety test modules can intercept expected bus errors during self-tests. If the registered hook handles the trap, tricore_bustrap returns normally instead of triggering a system panic. Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
zhangyu981027
requested review from
davids5,
jerpelea and
johannes-nivus
as code owners
October 30, 2026 03:11
xiaoxiang781216
approved these changes
Oct 30, 2026
|
This was referenced Oct 31, 2026
xiaoxiang781216
approved these changes
Oct 31, 2026
xiaoxiang781216
approved these changes
Nov 2, 2026
casaroli
approved these changes
Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: Please adhere to Contributing Guidelines.
Summary
TriCore trap handling preparation, independent of iLLD:
Dependency
Depends on #21305.
Impact
TriCore architecture only (arch/tricore). No impact on other architectures.
Testing
Built triboard_tc4x9_com:nsh (TC4xx) and a2g-tc397-5v-tft:nsh (TC3xx) with tricore-elf-gcc on Ubuntu host (TC3xx with both make and cmake), each commit passes checkpatch.
Tested on both TC3xx (TC397) and TC4xx (TC4x9) boards: system boots normally, ostest passes, svcall/context switch and trap cases work as expected.