반응형

해당 글은 ioapic를 확인하는 과정에서 오류가 발생하여, 원인을 파악하던 중 발견된 내용입니다.

확인 해보니 버전과 관련해서 동기화가 되지 않아 발생한 것으로 나옵니다.

보다 상세한 인터럽트 관련된 내용은 추후 또는 검색을 통해서 확인 해보시길 바랍니다.

이후 부터는 반어를 사용합니다. 이점 양해해주십시오. 감사합니다.

-----------------------------------------------------------------------------------------------

 

Windows에서 인터럽트는 하드웨어 인터럽트와 프로그래밍 인터럽트(PIC)가 있다.

하드웨어 인터럽트는 여기에서 다루지 않고 프로그래밍 인터럽트에 대해서 확인 과정을 정리하도록 하겠다.

프로그래밍 인터럽트는 PIC(Programmable Interrupt Contorller)라고 한다.

 

또한, PIC는 x86에서는 i8259A PIC / i82489 APIC(Advanced Programmable Interrupt Controller)로 나뉘어 사용된다.

x64에서는 APIC를 사용하기 때문에 APIC를 제공하지 않는 시스템에서는 인터럽트를 사용할 수 없다.

 

그럼 PIC와 APIC의 내용을 확인 해보자.

PIC, APIC는 HAL*.DLL을 기반으로 동작하기 때문에 PIC가 만약 실행되지 않는다면 APIC HAL(Halapic.dll)을 사용하기 때문이다.

그러나, 아래와 같이 PIC가 동작한다면 APIC는 MPS HAL(Halmps.dll)을 사용하기 때문에 PIC, APIC가 동작하게 되는 것이다.

(※ 더 자세한 내용은 http://support.microsoft.com/kb/309283/ko 확인 해보길 바란다.)

 

 

kd> !pic

----- IRQ Number ----- 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Physically in service:  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .
Physically masked:      Y  Y  Y  Y  Y  Y  Y  Y  Y  Y  Y  Y  Y  Y  Y  Y
Physically requested:   Y  .  .  .  .  .  Y  .  Y  Y  .  .  Y  .  .  Y
Level Triggered:        .  .  .  .  .  Y  .  .  .  Y  Y  Y  .  .  .  .

0: kd> !apic
Apic @ fffe0000  ID:0 (40011)  LogDesc:01000000  DestFmt:ffffffff  TPR 00
TimeCnt: 00000000clk  SpurVec:1f  FaultVec:e3  error:0
Ipi Cmd: 0e000000`000008e1  Vec:E1  FixedDel  Lg:0e000000      edg high      
Timer..: 00000000`000300fd  Vec:FD  FixedDel    Dest=Self      edg high      m
Linti0.: 00000000`0001001f  Vec:1F  FixedDel    Dest=Self      edg high      m
Linti1.: 00000000`000004ff  Vec:FF  NMI         Dest=Self      edg high      
TMR: 56, 76, 86, B1
IRR: 56, B1, D1
ISR: D1

 

추가적으로 I/O APIC를 확인하기 위해서 명령어를 입력할 경우 아래와 같은 에러 메시지가 발생하게 된다면

버전과 관련된 부분일 수 있으므로 .reload 후 다시 조회할 경우 가능하게 된다.

(※ 3번 연속으로 조회를 할 경우 되는 경우도 있다고 하니 참고 하길 바란다.

http://www.osronline.com/showthread.cfm?link=226560)

 

 

1: kd> !ioapic
Error retrieving address of HalpMpInfoTable

 

1: kd> .reload
Connected to Windows 7 7601 x86 compatible target at (Mon Mar 10 08:54:00.789 2014 (UTC + 9:00)), ptr64 FALSE
Loading Kernel Symbols
.............................................................

Press ctrl-c (cdb, kd, ntsd) or ctrl-break (windbg) to abort symbol loads that take too long.
Run !sym noisy before .reload to track down problems loading symbols.

..
................................................................
...........................
Loading User Symbols

Loading unloaded module list
.......
1: kd> .reload hal
1: kd> dt hal!HalpMpInfo

   +0x000 ApicVersion      : Uint4B
   +0x004 ProcessorCount   : Uint4B
   +0x008 DynamicProcessorCount : Uint4B
   +0x00c NtProcessors     : Uint4B
   +0x010 StartedPackages  : Uint4B
   +0x014 BusCount         : Uint4B
   +0x018 IoApicCount      : Uint4B
   +0x01c IoApicIntiCount  : Uint4B
   +0x020 LintiCount       : Uint4B
   +0x024 IMCRPresent      : Uint4B
   +0x028 LocalApicBase    : Uint4B
   +0x02c IoApicBase       : Ptr32 Ptr32 Uint4B
   +0x030 IoApicPhys       : Ptr32 Uint4B
   +0x034 IoApicIntiBase   : Ptr32 Uint4B

1: kd> dt hal!HalpMpInfo @@masm(hal!HalpMpInfoTable)
   +0x000 ApicVersion      : 0x10
   +0x004 ProcessorCount   : 4
   +0x008 DynamicProcessorCount : 0
   +0x00c NtProcessors     : 4
   +0x010 StartedPackages  : 1
   +0x014 BusCount         : 0
   +0x018 IoApicCount      : 1
   +0x01c IoApicIntiCount  : 0xf0
   +0x020 LintiCount       : 0
   +0x024 IMCRPresent      : 0
   +0x028 LocalApicBase    : 0xfee00000
   +0x02c IoApicBase       : 0xffd04044  -> 0xffd05000  -> 0x1c
   +0x030 IoApicPhys       : 0xffd04048  -> 0xfec00000
   +0x034 IoApicIntiBase   : 0xffd0404c  -> 0


1: kd> !ioapic
IoApic @ FEC00000  ID:4 (11)  Arb:4000000
Inti00.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti01.: 0f000000`00000971  Vec:71  LowestDl  Lg:0f000000      edg high      
Inti02.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti03.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti04.: 0f000000`000009b2  Vec:B2  LowestDl  Lg:0f000000      edg high      
Inti05.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti06.: 00000000`000109a2  Vec:A2  LowestDl  Lg:00000000      edg high      m
Inti07.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti08.: 01000000`000008d1  Vec:D1  FixedDel  Lg:01000000      edg high      
Inti09.: 0f000000`0000e9b1  Vec:B1  LowestDl  Lg:0f000000      lvl low  rirr 
Inti0A.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti0B.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti0C.: 0f000000`00000961  Vec:61  LowestDl  Lg:0f000000      edg high      
Inti0D.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti0E.: 0f000000`000009b6  Vec:B6  LowestDl  Lg:0f000000      edg high      
Inti0F.: 0f000000`000009a6  Vec:A6  LowestDl  Lg:0f000000      edg high      
Inti10.: 0f000000`0000a976  Vec:76  LowestDl  Lg:0f000000      lvl low       
Inti11.: 0f000000`0000a986  Vec:86  LowestDl  Lg:0f000000      lvl low       
Inti12.: 0f000000`0000e956  Vec:56  LowestDl  Lg:0f000000      lvl low  rirr 
Inti13.: 0f000000`0000a966  Vec:66  LowestDl  Lg:0f000000      lvl low       
Inti14.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti15.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti16.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m
Inti17.: 00000000`000100ff  Vec:FF  FixedDel  Ph:00000000      edg high      m

 

 

 

반응형

+ Recent posts