Clubcos  0.0.0
Clubcos - Clubc Operating System
 모두 데이타 구조 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 매크로 페이지들
interrupt.h
이 파일의 문서화 페이지로 가기
1 // Copyright (c) 2014, 임경현 (dlarudgus20)
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 //
7 // * Redistributions of source code must retain the above copyright notice, this
8 // list of conditions and the following disclaimer.
9 //
10 // * Redistributions in binary form must reproduce the above copyright notice,
11 // this list of conditions and the following disclaimer in the documentation
12 // and/or other materials provided with the distribution.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
18 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 
32 #ifndef INTERRUPT_H_
33 #define INTERRUPT_H_
34 
35 #include <stddef.h>
36 #include <stdint.h>
37 #include "circular_queue.h"
38 #include "pic.h"
39 
40 // Interrupt Queue
41 enum
42 {
43  // INTERRUPT_QUEUE_FLAG_TIMER = PIC_IRQ_TIMER << 24, /* unused */
45 };
46 
47 
52 
56 typedef struct tagInterruptContext
57 {
58  uint32_t gs;
59  uint32_t fs;
60  uint32_t es;
61  uint32_t ds;
62 
63  uint32_t edi;
64  uint32_t esi;
65  uint32_t ebp;
66  uint32_t esp;
67  uint32_t ebx;
68  uint32_t edx;
69  uint32_t ecx;
70  uint32_t eax;
71 
72  union
73  {
74  struct
75  {
76  uint32_t eip;
77  uint32_t cs;
78  uint32_t eflag;
79  uint32_t esp2;
80  uint32_t ss2;
81  };
82  struct
83  {
84  uint32_t err_code;
85  uint32_t err_eip;
86  uint32_t err_cs;
87  uint32_t err_eflag;
88  uint32_t err_esp2;
89  uint32_t err_ss2;
90  };
91  };
93 
94 /* CPU 예외 핸들러 */
100 void ckExceptIntHandler05();
101 void ckExceptIntHandler06();
102 void ckExceptIntHandler07();
103 void ckExceptIntHandler08();
104 void ckExceptIntHandler09();
105 void ckExceptIntHandler0A();
106 void ckExceptIntHandler0B();
107 void ckExceptIntHandler0C();
108 void ckExceptIntHandler0D();
109 void ckExceptIntHandler0E();
110 void ckExceptIntHandler0F();
111 void ckExceptIntHandler10();
112 void ckExceptIntHandler11();
113 void ckExceptIntHandler12();
114 void ckExceptIntHandler13();
115 void ckExceptIntHandler14();
116 
117 void ckUnknownIntHandler();
118 
119 #endif /* INTERRUPT_H_ */
void ckExceptIntHandler0B()
void ckExceptIntHandler00()
uint32_t es
Definition: interrupt.h:60
uint32_t eip
Definition: interrupt.h:76
void ckExceptIntHandler0A()
void ckExceptIntHandler13()
void ckExceptIntHandler04()
uint32_t ss2
Definition: interrupt.h:80
void ckExceptIntHandler01()
void ckExceptIntHandler0F()
uint32_t ds
Definition: interrupt.h:61
uint32_t err_eflag
Definition: interrupt.h:87
uint32_t esi
Definition: interrupt.h:64
void ckExceptIntHandler0E()
void ckExceptIntHandler12()
void ckExceptIntHandler02()
uint32_t err_ss2
Definition: interrupt.h:89
uint32_t esp2
Definition: interrupt.h:79
void ckExceptIntHandler07()
void ckExceptIntHandler10()
uint32_t err_cs
Definition: interrupt.h:86
uint32_t edi
Definition: interrupt.h:63
void ckInterruptQueueInitialize(void)
인터럽트 큐를 초기화합니다.
Definition: interrupt.c:40
uint32_t eflag
Definition: interrupt.h:78
uint32_t err_eip
Definition: interrupt.h:85
void ckExceptIntHandler08()
void ckExceptIntHandler11()
void ckExceptIntHandler0C()
uint32_t cs
Definition: interrupt.h:77
void ckExceptIntHandler14()
struct tagInterruptContext InterruptContext
인터럽트 콘텍스트입니다.
uint32_t edx
Definition: interrupt.h:68
uint32_t fs
Definition: interrupt.h:59
uint32_t err_code
Definition: interrupt.h:84
uint32_t ecx
Definition: interrupt.h:69
요소의 크기가 4바이트인 환형 큐 구조체입니다.
Definition: circular_queue.h:42
uint32_t gs
Definition: interrupt.h:58
Definition: interrupt.h:44
Definition: pic.h:51
uint32_t err_esp2
Definition: interrupt.h:88
void ckUnknownIntHandler()
uint32_t ebx
Definition: interrupt.h:67
uint32_t eax
Definition: interrupt.h:70
uint32_t ebp
Definition: interrupt.h:65
void ckExceptIntHandler09()
void ckExceptIntHandler06()
void ckExceptIntHandler05()
인터럽트 콘텍스트입니다.
Definition: interrupt.h:56
CircularQueue32 g_InterruptQueue
인터럽트 큐입니다.
Definition: interrupt.c:37
void ckExceptIntHandler0D()
void ckExceptIntHandler03()
uint32_t esp
Definition: interrupt.h:66