Apr 01, 2021
11:43 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 01, 2021
11:43 PM
Hi,
Can someone help me checking if it`s correct to implement/solve the Trap class3 TIN7.
This issue was raised when finished a NMI trap handler and 2 instruction followed: rslcx, rfe
The NMI trap handler implemented like below:
void __trap(7) __vector_table(0) NMI_TrapService(void)
{
/* Set flag to indicate NMI trap raised */
}
2 instruction followed:
__asm (" rslcx");
__asm (" rfe");
then Trap class3 TIN7 was raised.
I`m not sure if there is some step missing or wrong. Please guide me.
Thank you in advance.
Can someone help me checking if it`s correct to implement/solve the Trap class3 TIN7.
This issue was raised when finished a NMI trap handler and 2 instruction followed: rslcx, rfe
The NMI trap handler implemented like below:
void __trap(7) __vector_table(0) NMI_TrapService(void)
{
/* Set flag to indicate NMI trap raised */
}
2 instruction followed:
__asm (" rslcx");
__asm (" rfe");
then Trap class3 TIN7 was raised.
I`m not sure if there is some step missing or wrong. Please guide me.
Thank you in advance.
2 Replies
Apr 05, 2021
06:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 05, 2021
06:53 AM
A Trap with Class 3 TIN 7 is a Nesting Error (NEST), per the TriCore Architecture Manual. A NEST will happen if CALL/RET and TRAP/RFE get mixed up - i.e., if you did a CALL, but the function ends in an RFE instead of a RET.
Can you double-check how NMI_TrapService is called? Perhaps an OS is getting in between. List out the code at BTV plus the Class 3 offset of 0x60, and see if it's jumping to NMI_TrapService, or if it's calling NMI_TrapService.
If you're using an OS, you might need to declare NMI_TrapService as a regular function rather than a trap.
Can you double-check how NMI_TrapService is called? Perhaps an OS is getting in between. List out the code at BTV plus the Class 3 offset of 0x60, and see if it's jumping to NMI_TrapService, or if it's calling NMI_TrapService.
If you're using an OS, you might need to declare NMI_TrapService as a regular function rather than a trap.
Apr 05, 2021
11:24 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Apr 05, 2021
11:24 PM
Hi wrangler,
Yes, I`m using an OS from our vendor.
The NMI_TrapService is called in the way as below:
__asm (" call " NMI_TrapService);
After changed the declaration of this NMI_TrapService to a regular function, this issue has resolved.
Thank you again~
Yes, I`m using an OS from our vendor.
The NMI_TrapService is called in the way as below:
__asm (" call " NMI_TrapService);
After changed the declaration of this NMI_TrapService to a regular function, this issue has resolved.
Thank you again~