On the Arduino / ATmega328p, the 16-bit Timer/PWM modules have a input capture unit that allows the precise time of arrival for an input edge to be recorded even if the processor is busy when the input edge arrives. (For details refer to the datasheet, section 20.9 on page 155.)
Does the Raspberry Pi have any kind of comparable hardware peripheral, or some other way to precisely timestamp an input edge that occurs while the processor is busy? I've tried searching through the BCM2835 ARM Peripherals datasheet, but I haven't been able to find anything that matches my needs so far.
I would suppose this could be accomplished by using the FIQ to trigger a DMA from the system timer to somewhere else, but from the register docs it seems like the FIQ can only be set up for GPU and base interrupts. I'm not sure how to get the FIQ to trigger on GPIO interrupts, and even if I knew how, I'm not sure if this is a correct way to proceed, or if there's some other way to do this more cleanly.
How can I precisely capture the arrival time of an input edge?
A small constant delay is not a problem since I can just subtract it back out, but for my application I need at least microsecond precision or better.