[kernelreadfans] I/O APIC

  • From: "oyk" <oyk@xxxxxxxxxxx>
  • To: kernelreadfans <kernelreadfans@xxxxxxxxxxxxx>
  • Date: Fri, 30 May 2003 16:44:19 +0800

Hi,guys,
   今天我通过demsg检查我开机I/O APIC的信息。根据书上说的,P4的CPU都是有local 
APIC的。我想对照demsg信息和书上关于I/O 
APIC相关论述比较一下。先引用ulk2的两句话...:)
Each Local APIC has 32-bit registers, an internal clock, a local timer device, 
and two additional IRQ lines LINT0 and LINT1 reserved for local interrupts.
The I/O APIC consists of a set of 24 IRQ lines, a 24-entry Interrupt 
Redirection Table, programmable registers, and a message unit for sending and 
receiving APIC messages over the APIC bus.
我们通过dmesg观察,提取I/O APIC相关部分。
ENABLING IO-APIC IRQs
Setting 1 in the phys_id_present_map
..changing IO-APIC physical APIC ID to 1 ... ok.
init IO_APIC IRQs
IO-APIC (apicid-pin) 1-0, 1-9, 1-10, 1-11, 1-16, 1-20, 1-21, 1-22, 1-23 not 
connected.
.TIMER: vector=0x31 pin1=2 pin2=0
number of MP IRQ sources: 17.
number of IO-APIC #1 registers: 24.
testing the IO APIC.......................
这段话告诉我们:
1. 第一个local 
APIC(我的机子是UP)的0、9、10、11、16、20、21、22和23引脚没有使用,马上在后面我们就可以看见更详细的信息。
2. 
内部定时器TIMER,通过后面信息观察发现vector为0x31,对应了编号为2的寄存器,我们知道时钟中断对应IRQ0,我们在后面可以看见对应关系(IRQ0
 -> 0:2)。疑问:pin1和pin2代表什么?
3. 我想,17号IRQ用于MP之间通信。
4. 指明改CPU的IO-APIC有24个寄存器。
再看一段demsg信息
NR Log Phy Mask Trig IRR Pol Stat Dest Deli Vect:   
 00 000 00  1    0    0   0   0    0    0    00
 01 001 01  0    0    0   0   0    1    1    39
 02 001 01  0    0    0   0   0    1    1    31
 03 001 01  0    0    0   0   0    1    1    41
 04 001 01  0    0    0   0   0    1    1    49
 05 001 01  0    0    0   0   0    1    1    51
 06 001 01  0    0    0   0   0    1    1    59
 07 001 01  0    0    0   0   0    1    1    61
 08 001 01  0    0    0   0   0    1    1    69
 09 000 00  1    0    0   0   0    0    0    00
 0a 000 00  1    0    0   0   0    0    0    00
 0b 000 00  1    0    0   0   0    0    0    00
 0c 001 01  0    0    0   0   0    1    1    71
 0d 001 01  0    0    0   0   0    1    1    79
 0e 001 01  0    0    0   0   0    1    1    81
 0f 001 01  0    0    0   0   0    1    1    89
 10 000 00  1    0    0   0   0    0    0    00
 11 001 01  1    1    0   1   0    1    1    91
 12 001 01  1    1    0   1   0    1    1    99
 13 001 01  1    1    0   1   0    1    1    A1
 14 000 00  1    0    0   0   0    0    0    00
 15 000 00  1    0    0   0   0    0    0    00
 16 000 00  1    0    0   0   0    0    0    00
 17 000 00  1    0    0   0   0    0    0    00
这段信息说明local APIC的24个寄存器的使用情况,及其对应的IVT编号(Vect)。
IRQ to pin mappings:
IRQ0 -> 0:2
IRQ1 -> 0:1
IRQ3 -> 0:3
IRQ4 -> 0:4
IRQ5 -> 0:5
IRQ6 -> 0:6
IRQ7 -> 0:7
IRQ8 -> 0:8
IRQ12 -> 0:12
IRQ13 -> 0:13
IRQ14 -> 0:14
IRQ15 -> 0:15
IRQ17 -> 0:17
IRQ18 -> 0:18
IRQ19 -> 0:19
这段信息说明了系统支持的IRQ对应的APIC引脚关系。

谁有SMP机子,贴一个SMP APIC的dmesg信息,谢谢了!

Best Regards
  Ouyang Kai
-----------------------------------------------------------
a HUST guy!  Welcome subscribe kernelreadfans@xxxxxxxxxxxx
FreeBSD: http://www.freebsd.org http://daily.daemonnews.org
Linux:   http://www.kernel.org  http://www.linuxfans.org
------------------------------------------------------------



Other related posts:

  • » [kernelreadfans] I/O APIC