Message Signaled Interrupt Implementation in DOS mode

Dear Experts,
I am writing an app to test if MSI(Message Signaled Interrupt) for PCI card is OK or not in DOS mode and have some questions... Please help to clarify them if available !

1.

How to setup the Message Address and Data registers in the Capability registers for my environment(DOS) ? Is there any clear document describing these ? And code example would be better...

2.

How to install my own service routine for this interrupt in DOS mode ?
Regards,
liaoo
liaooAsked:
Who is Participating?
 
liaooAuthor Commented:
0
 
liaooAuthor Commented:
***** [20120821 Status Update] *****
I list what I have done as below and maybe you all can help to clarify these...

(1) Multiple Message Enable = 0( for single MSI set this field = 0; MMC = 100b)
(2) For MSI message address
     - bit[31:20] = 0xFEE
     - bit[19:12] = 0 (Destination ID)
     - bit3 = 0 (Redirection hint = 0)
     - bit2 = 0 (Destination Mode, don't care because of RH = 0)
(3) For MSI message data
     - bit15 = 0 (trigger mode = edge)
     - bit14 = 0 (trigger level, ignored if trigger mode = edge)
     - bit[10:8] = 000 (delivery mode = fixed)
     - bit[7:0] = 0x20 (vector, and I choose to use 0x20)
(4) Finally enable MSI by setting MSICAP.MC.MSIE = 1

@ I have roughly read the doc(chapter 10) http://download.intel.com/products/processor/manual/253668.pdf

My current status: I found system hang after enabling MSIE = 1 and device generates interrupt via MSI !

Note: In above sequence the service routine is NOT installed because I have no idea how to do it...( is this the reason why my app hang ? )
0
 
liaooAuthor Commented:
When setting the vector in Message Data field to 0x20, app hang...But if set to 0x76, I found app did not hang and then I can check if device generates interrupt and Local APIC receives this interrupt message as below:

#1. For PCI device(AHCI controller):
a) ID(Interrupt Disable) = 0
b) IS(Interrupt Status) = 0
c) MSI Cap = 0x09,0xFEE00000,0x00000076

#2 For AHCI HBA registers:
a) PxIS = 0x00000023
b) PxIE = 0x7DC0007F
c) IS = 0x00000001
d) IE bit1 = 1

By #1 and #2 I think device successfully sends the message to request service because:
1. IS bit0 = 1(Port 0 has pending interrupt status)
2. IE(Interrupt Enable) = 1
3. PCI Command register bit10(ID) = 0
4. MSICAP.MC.MSIE = 1(to MSI engine)

Also I found the LAPIC receives this interrupt message because:
1. Local APIC IRR(Interrupt Request Register) bit118(=0x76) = 1
2. Local APIC ISR(In-Service register) bit118(=0x76) = 1

Thus it seems that device generates the interrupt and Local APIC receives this; even so, my service routine is NOT called
0
 
liaooAuthor Commented:
After setting the vector to 0x70 my own service routine is successfully invoked. Besides the read/write access is ok in MSI mode !

But I still did not know why it failed with vector = 0x20 or 0x76...

Any idea ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.