I've got a 21489 system running 5 threads and device drivers for SPI, UART and the AMI bus. I'm getting somewhat frequent thread stack overflow errors and I'm having difficulty tracing the problem.
The value for the Thread Stack Overflow is 0x13555F, which according to the VDK documentation, is the content of the PCSTK. Digging through the linker file, I find that this address is in _tmk_RescheduleISR between the .NoSaveDone and .returnFromDispatch symbols. The attached images are screenshots of the symbols, the disassembly and registers. Also, all my threads have the max stack used at 1/2 to 1/4 of their allocated stack space.
Visually inspecting the registers, I cannot see why there would be a stack overflow call as all the values for CB7 seem reasonable.
Update: If I set a breakpoint at that location and run, I hit the breakpoint then get the kernel panic.
Please disregard. I noticed I had VDK 09 installed instead of the latest 10.1. After upgrade, the error no longer appears.