Clubcos  0.0.0
Clubcos - Clubc Operating System
 모두 데이타 구조 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 매크로 페이지들
idt.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 IDT_H_
33 #define IDT_H_
34 
35 #include <stddef.h>
36 #include <stdint.h>
37 
38 #include "memory_map.h"
39 
41 typedef uint8_t IdtType;
42 
46 typedef struct tagIdt
47 {
49 
50  uint16_t HandlerSegment;
51 
52  uint8_t ReservedZero1;
53 
54  union
55  {
56  struct
57  {
59 
60  unsigned D:1;
61 
62  unsigned ReservedZero3:1;
63 
64  unsigned DPL:2, P:1;
65  };
67  };
68 
70 } Idt;
71 
73 static Idt * const g_pIdtTable = (Idt *)IDT_TABLE_ADDRESS;
74 
82 void ckIdtInit(Idt *pIdt, void (*HandlerAddress)(), uint16_t HandlerSegment, uint8_t DPL);
83 
87 void ckIdtLoad(uint16_t size, Idt *address);
88 
92 void ckIdtTableInitialize(void);
93 
94 #endif /* IDT_H_ */
uint8_t ReservedZero1
Definition: idt.h:52
void ckIdtLoad(uint16_t size, Idt *address)
lidt 명령어로 IDT 테이블을 로드합니다.
struct tagIdt Idt
IDT를 나타내는 구조체입니다.
IdtType type
Definition: idt.h:66
uint8_t IdtType
Idt 구조체를 참조하십시오.
Definition: idt.h:41
uint16_t HandlerAddress_16_31
Definition: idt.h:69
void ckIdtInit(Idt *pIdt, void(*HandlerAddress)(), uint16_t HandlerSegment, uint8_t DPL)
Idt 구조체를 초기화합니다.
Definition: idt.c:77
uint16_t HandlerSegment
Definition: idt.h:50
unsigned ReservedZero2
Definition: idt.h:58
IDT를 나타내는 구조체입니다.
Definition: idt.h:46
void ckIdtTableInitialize(void)
IDT 테이블을 초기화합니다.
Definition: idt.c:37
unsigned ReservedZero3
Definition: idt.h:62
unsigned P
Definition: idt.h:64
uint16_t HandlerAddress_0_15
Definition: idt.h:48
unsigned ReservedOne2
Definition: idt.h:58
unsigned ReservedOne1
Definition: idt.h:58
unsigned D
Definition: idt.h:60
#define IDT_TABLE_ADDRESS
IDT 테이블의 선형 주소입니다.
Definition: memory_map.h:64
unsigned DPL
Definition: idt.h:64