-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathint.c
78 lines (72 loc) · 3.01 KB
/
int.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/***************************************************************************************
* FileName : mtask.c
* CopyRight : 1.0
* ModuleName : multi task management module
*
* Create Data : 2016/01/06
* Author/Corportation : ZhuoJianhuan
*
* Abstract Description : カ猜ホホワタ昉トハオマヨホトシ
* task->flags = 2;ア桄セユヤレヤヒミミヨミ
* task->flags = 1;ア桄セユヤレハケモテヨミ
*
*--------------------------------Revision History--------------------------------------
* No version Date Revised By Item Description
* 1 v1.0 2016/01/06 ZhuoJianhuan Create this file
*
***************************************************************************************/
/**************************************************************
* Debug switch Section
**************************************************************/
/**************************************************************
* Include File Section
**************************************************************/
#include "bootpack.h"
#include <stdio.h>
/**************************************************************
* Macro Define Section
**************************************************************/
/**************************************************************
* Struct Define Section
**************************************************************/
/**************************************************************
* Prototype Declare Section
**************************************************************/
/**************************************************************
* Global Variable Declare Section
**************************************************************/
/**************************************************************
* File Static Variable Define Section
**************************************************************/
/**************************************************************
* Function Define Section
**************************************************************/
/**
* @description ウシサッヨミカマPICノ靹テ
*/
void init_pic(void){
io_out8(PIC0_IMR, 0xff ); //ス鋓ケPIC0ヒミヨミカマ
io_out8(PIC1_IMR, 0xff ); //ス鋓ケPIC1ヒミヨミカマ
io_out8(PIC0_ICW1, 0x11 ); //ア゚ムリエ・キ「ト」ハス
io_out8(PIC0_ICW2, 0x20 ); //IRQ0-7モノINT20-27スモハユ
io_out8(PIC0_ICW3, 1 << 2); //PIC1モノIRQ2チャスモ
io_out8(PIC0_ICW4, 0x01 ); //ボサコウ衂」ハス
io_out8(PIC1_ICW1, 0x11 ); //ア゚ムリエ・キ「ト」ハス
io_out8(PIC1_ICW2, 0x28 ); //IRQ8-15モノINT28-2fスモハユ
io_out8(PIC1_ICW3, 2 ); //PIC1モノIRQ2チャスモ
io_out8(PIC1_ICW4, 0x01 ); //ボサコウ衂」ハス
io_out8(PIC0_IMR, 0xfb ); //11111011 PIC1ヨョヘ篳ォイソス鋓ケ
io_out8(PIC1_IMR, 0xff ); //ス鋓ケPIC1ヒミヨミカマ
return;
}
void inthandler27(int *esp)
/* PIC0からの不完全割り込み対策 */
/* Athlon64X2機などではチップセットの都合によりPICの初期化時にこの割り込みが1度だけおこる */
/* この割り込み処理関数は、その割り込みに対して何もしないでやり過ごす */
/* なぜ何もしなくていいの?
→ この割り込みはPIC初期化時の電気的なノイズによって発生したものなので、
まじめに何か処理してやる必要がない。 */
{
io_out8(PIC0_OCW2, 0x67); /* IRQ-07受付完了をPICに通知 */
return;
}