Re: Interrupt questions
Mouse <[email protected]>
| Newsgroups | gmane.os.netbsd.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
> Is it legal to call uprintf() inside an interrupt handler? I don't know. It might work enough of the time to be useful even if it's not promised; I've used printf() on amd64 inside interrupt handlers often enough. I don't know whether it's promised, but I've found it works reliably enough to be a useful debugging tool. I don't recall trying it on any ARM, much less something like your board, but it might be worth investigating. > If not, is there another way to add traces? Sure. For example, I've had cases where printf introduces enough delay to cause problems; I've dealt with them in various ways, such as by allocating a ring buffer of logging events and putting my logs there. You can print them from (eg) an every-tick callout or you can just leave them there for postmortem debugging or some debugging interface (such as an ioctl or a custom character special device).... Depending on the details, there may be other useful things you can do. I've occasionally used hardware things, such as toggling a GPIO pin, to exfiltrate debugging information. /~\ The ASCII Mouse \ / Ribbon Campaign X Against HTML [email protected] / \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B