[parisc-linux] code 28 trap

Philipp Rumpf prumpf@inwestnet.de
Fri, 25 Feb 2000 22:49:34 +0100


> > Years ago I wrote an unaligned load/store emulator (trap handler) for
> > a port of an evil OS to PA-RISC.  I still have the code -- it would take
> > a little bit of work to massage it into a real low-level trap handler,
> > but that task should be very straight-forward.
> 
> The code I have is for PA-RISC running in little-endian mode.  There would
> be some additional work to make it bit-endian.
> 
> Do you just love endian issues?

Well, I've got an unaligned handler for another architecture here, the tricky
part is to parse the instructions, and not forget about side-effects of ,M
modifiers.

As for how the code would be run, the most likely way would be to call it
in virtual mode with interrupts disabled and pass in a pointer to a pt_regs
(defined in include/asm/ptrace.h) structure.

	Philipp Rumpf