[newsham@zang.kcc.hawaii.edu (Tim Newsham) writes:]
>I'm not sure I know exactly what you mean. What is P-code? How would
>a device driver put it in the kernel (or does this reside in the processes
>address space?). I'd like to get this implemented so I can finish
>debugging the scsi driver. Thanks.
I simply mean an interpretive pseudo-assembly code which permits the driver
to describe actions which need to be taken within a hardware interrupt
handler. In its simplest form you would write the following in your server:
tst_mydev: mov.l DEV_REG,d0
btst d0,$3
beq is_interrupting
movq $0,d0
ret
is_interrupting:
mov.l $CLR_INTR,DEV_REG2
movq $1,d0
ret
tst_mydev_end:
And then pass tst_mydev and (tst_mydev_end-tst_mydev) (i.e., the length) as
a part of ISR registration. But allowing the driver to specify just *any*
instruction might not be desirable (or it might be, but make sure it's
position independent!) so instead you could devise a pseudo-assembly code
and pass that instead. The p-code interpreter would be kernel code.
Apologies if any of my 68k assembly is wrong; it's been a while.
Andy
Received on Thu Nov 10 19:27:00 1994
This archive was generated by hypermail 2.1.8 : Thu Sep 22 2005 - 15:12:10 PDT