[openbeos] Re: Calling an Interrupt from within a Driver

On 9/14/06, François Revol <revol@xxxxxxx> wrote:

> Hi List,
>
> I'm baffled at a small hack that the X.Org and Syllable i830
> (intel_extreme) drivers.
> I have absolutely no idea how to do this in BeOS/Haiku, other then
> using inline Assembly.
>
> Here is the extracted code:
> http://rafb.net/paste/results/GYxYjZ90.html
>

I'm not sure what you want exactly (that url is now invalid).

If all you want to do is call your interrupt handler yourself to
simulate an interrupt (because some versions of the chipset doesn't
generate them), you can just do something like:

cpu_status st;
status_t err;
st = disable_interrupts();
err = myinthandler(mydata);
restore_interrupts(st);

// optionally trigger a resched
if (err == B_INVOKE_SCHEDULER)
   snooze(1); // not sure it's the best way

If you want to do that from the accelerant or other user code you can
add a specific ioctl() code and put that in the appropriate ioctl()
case block.

If you want to simulate an interrupt that another driver hooked, then I
can explain you why you don't want to (because it's not clean). It
might be possible if really needed with some kernel insight, but you
really shouldn't need that.

There is no generic syscall to fake interrupts/irqs that I know of, let
alone a vm86 handler in BeOS.

François.



Unfortunetly, this won't work -- as i don't wish to "Fake" Interrupts. I want to call an actual interrupt so the BIOS updates it's memory size. (This is a hack, though the 'other' intel graphics drivers do it).

Heres another link, hopefully it wont disapear:
http://cpp.sourceforge.net/?show=19837

I'm guessing now there's no way around Assembly, so i'll just try and
create my own realint()-like routines this afternoon. I'm sure they
could come in handy at least once more?

--
Thank You
Mathew Schofield
mr.skoe@xxxxxxxxx

Other related posts: