Hangs during OMAP ROM reset/poweroff
Jeffrey Lee (213) 6048 posts |
I’m not quite sure when this bug appeared, but while testing my HAL USB stuff I noticed that my touchbook would hang during the pre-reset/power off sequence (i.e. inbetween Service_PreReset starting and HAL_Reset being called). For a while I was also able to reproduce the issue on one of my beagleboards, but then it later vanished, since it’s a timing specific issue. Anyway, what’s happening is the following:
Looking at the above list, I can see several issues contributing to the bug:
There’s also the issue that our pre-reset sequence isn’t as friendly as it probably could/should be. It would be nice if Ctrl-Break could follow a shutdown sequence similar to the shutdown sequence that the Wimp follows – closing files, dismounting discs, etc. But that might be something that’s at odds with the philosophy of Ctrl-Break – it seems like something you should only be using once the machine’s already crashed, so if it tried to be too friendly then there’s a chance that it would hit some corrupted code/memory and never succeed. There’s still some bits of this that I’ll be investigating myself, but if anyone has any thoughts on how to improve the pre-reset sequence then please share them. With any luck the improvements made here will also help make Iyonix resets a bit more reliable (although I’ll admit that I’m still using OS 5.12!) |
Steve Revill (20) 1361 posts |
Tut, tut, naughty USB drivers…
I take it the BB and similar (or the OMAP itself) doesn’t have a hardware watchdog feature we could use as a last resort? |
Jeffrey Lee (213) 6048 posts |
Yes, there’s a watchdog timer which can be used to reset the OMAP. I haven’t tried it yet, but I guess it would be functionally identical to the reset that the HAL performs. Anyway, adding a timeout to the audio code seems to do the trick, so for now that fix will do. |
Steve Revill (20) 1361 posts |
Yep, my watchdog suggestion clearly wasn’t a suggested solution but a nice-to-have for RISC OS (debatable?). |