Setting IRQ vector from driver

Setting IRQ vector from driver

Post by Mats Byggmasta » Thu, 03 Feb 2000 04:00:00



Hi,
is it possible to set any of the interrupt vectors that are located in the first
1024 bytes of physical memory from a device driver? In kernel 2.0 this worked with
a simple pointer access but in 2.2 (?) these memory locations seems to have become
protected. I'm working on a i386 system btw.

Is there any trick or even a kernel API call I can use? I just need to set vector
0x88 to some value, then restore it a few milliseconds later. This happens only
once when initializing the driver and our hardware. No interrupt will ever be
generated on this vector.

Regards,
Mats      
(hoping for some positive feedback)

-------------------------------------------
Mats Byggmastar, B.Sc., SW Design Engineer
GSM/GPRS/D-AMPS cellular data testequipment
Moesarc Technology AS, Oslo Norway

 
 
 

Setting IRQ vector from driver

Post by Mats Byggmasta » Thu, 03 Feb 2000 04:00:00



> Is there any trick or even a kernel API call I can use?

Doh! I found the problem myself. Simply using phys_to_virt()
did the job. The vector table is obviously not protected.
How stupid of me! Now I do something like this:

long save = *(long *) phys_to_virt(0x88 * 4);
*(long *) phys_to_virt(0x88 * 4) = new_value;

// Do stuff...

*(long *) phys_to_virt(0x88 * 4) = save;

-------------------------------------------
Mats Byggmastar, B.Sc., SW Design Engineer
GSM/GPRS/D-AMPS cellular data testequipment
Moesarc Technology AS, Oslo Norway


 
 
 

Setting IRQ vector from driver

Post by eric_nelson_phoe.. » Thu, 03 Feb 2000 04:00:00


The question is, if no interrupt is generated, why on earth do you care
if the vector is set?

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

Setting IRQ vector from driver

Post by Mats Byggmasta » Fri, 04 Feb 2000 04:00:00



> The question is, if no interrupt is generated, why on earth do you care
> if the vector is set?

To establish contact with our custom HW. I pass the base address of my
DMA buffers trough this vector to the card. It's an old ISA card
and this is the way it was designed 10 years ago. My alternative is
to modify the DSP code on the card to read the base address through
an I/O port but I don't really want to touch the messy DSP assembly
code.

-------------------------------------------
Mats Byggmastar, B.Sc., Software developer
GSM/GPRS/D-AMPS cellular data testequipment
Moesarc Technology AS, Oslo Norway

 
 
 

1. get/set IRQ vector in kernel version 2.2.x

I'm trying to port a DSP-board driver from kernel version
2.0 to version 2.2. When starting up the DSP a rather strange
(and stupid) procedure is used. Some information is passed from
the driver to the DSP by writing it to irq vector 0x88. The DSP
then reads the info. The vector is then restored.

In the old version this was done simply by writing the info
directly to adderes 0x220 (4 * 0x88) in memory. However, this
no longer works. The kernel does a register dump with a message
telling it can't derefenece memory at address 0x220.

I can't seem to find any suitable kernel function for this low
level stuff I need to do. Any ideas?

Mats

-------------------------------------------
Mats Byggmastar, B.Sc., Software developer
GSM/GPRS/D-AMPS cellular data testequipment
Moesarc Technology AS, Oslo Norway

2. pthread_attr_setstacksize

3. [2.5] rename vector to irq

4. Wanted: Suggestions on running a clock window

5. Abit BP6 and Unexpected IRQ Vectors

6. hisax fix MAX_CARD setup and potential buffer overflow

7. Unexpected IRQ vector... what?

8. ppp-2.4.0-1 vs auth

9. Kernel: IRQ Vector Problem in SMP

10. kernel: Unexpected IRQ Vector 216 on CPU0?

11. kernel 2.2.5, SMP and "unexpected IRQ vector 7"

12. Want to create an IRQ-Driver which counts the signals on a free IRQ

13. Help: mcd driver does not read IRQ settings from bootstrap