Looks like ClockCycles() called inside interrupt handler running on pc
based
486 board couse memory fault error. Any solution ?
Interesting. ClockCycles() is inlined, becoming a rdtsc assembly
instruction.
That instruction only exists on Pentium and beyond. The doc says that the
kernel
will emulate the rdtsc instruction if the CPU doesn’t support it. That
emulation
probably doesn’t work from within an interrupt.
That looks like an oversight to me? Let’s see what QNX has to say.
Thanks Janusz.
Interrupt handler is very simple and works until I add ClockCysles() call.
486 board couse memory fault error. Any solution ?
Interesting. ClockCycles() is inlined, becoming a rdtsc assembly
instruction.
That instruction only exists on Pentium and beyond. The doc says that the
kernel
will emulate the rdtsc instruction if the CPU doesn’t support it. That
emulation
probably doesn’t work from within an interrupt.
That looks like an oversight to me? Let’s see what QNX has to say.
It seems the wrong set of inline assembly is being inlined, (ie. if it’s not a
pentium+ there should be a different set). I’ll take a closer look, and post
back after I explore the issue more in depth.
486 board couse memory fault error. Any solution ?
Interesting. ClockCycles() is inlined, becoming a rdtsc assembly
instruction.
That instruction only exists on Pentium and beyond. The doc says that
the
kernel
will emulate the rdtsc instruction if the CPU doesn’t support it. That
emulation
probably doesn’t work from within an interrupt.
That looks like an oversight to me? Let’s see what QNX has to say.
It seems the wrong set of inline assembly is being inlined, (ie. if it’s
not a
pentium+ there should be a different set).
gcc has option to control what CPU it’s being compile for, but I don’t
think this is where the solution lies.
Historicly programs compiled for Pentium work on 386.
I’ll take a closer look, and post back after I explore the issue more in
depth.
gcc has option to control what CPU it’s being compile for, but I don’t
think this is where the solution lies.
Historicly programs compiled for Pentium work on 386.
Correct - I wasn’t trying to imply that was the solution, and I hope
I didn’t lead anyone astray (more of a brain storm). I’m looking into
it.
gcc has option to control what CPU it’s being compile for, but I don’t
think this is where the solution lies.
Historicly programs compiled for Pentium work on 386.
Correct - I wasn’t trying to imply that was the solution, and I hope
I didn’t lead anyone astray (more of a brain storm). I’m looking into
it.
There is an issue with the rdtsc emualtion when in an interrupt handler (only
on x86). I’ll put it on the bug list for the furture release.
gcc has option to control what CPU it’s being compile for, but I don’t
think this is where the solution lies.
Historicly programs compiled for Pentium work on 386.
Correct - I wasn’t trying to imply that was the solution, and I hope
I didn’t lead anyone astray (more of a brain storm). I’m looking into
it.
There is an issue with the rdtsc emualtion when in an interrupt handler
(only
on x86). I’ll put it on the bug list for the furture release.