Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
triazo
/
kernel
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
3
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9360a1b9
authored
Oct 19, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Changed c interrupt header
parent
3214743a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
src/idt.c
src/idt.h
src/idt.c
View file @
9360a1b9
...
@@ -13,7 +13,7 @@ idt_desc _idt [MAX_IDT_INT];
...
@@ -13,7 +13,7 @@ idt_desc _idt [MAX_IDT_INT];
uint16_t
_code_sel
;
uint16_t
_code_sel
;
void
(
*
handlers
[
256
])
(
uint32_t
interrupt
,
uint32_t
error
);
void
(
*
handlers
[
256
])
(
uint32_t
error
);
void
idt_install
()
void
idt_install
()
{
{
...
@@ -41,7 +41,7 @@ void default_handler(struct reg_state reg, uint32_t interrupt, uint32_t error, s
...
@@ -41,7 +41,7 @@ void default_handler(struct reg_state reg, uint32_t interrupt, uint32_t error, s
serial_writestring
(
"
\n
"
);
serial_writestring
(
"
\n
"
);
if
(
handlers
[
interrupt
]
!=
NULL
)
if
(
handlers
[
interrupt
]
!=
NULL
)
{
{
handlers
[
interrupt
](
interrupt
,
error
);
handlers
[
interrupt
](
error
);
}
}
return
;
return
;
}
}
...
@@ -73,6 +73,10 @@ int install_ir(uint32_t i, uint16_t flags, uint16_t code_sel, IRQ_HANDLER irq)
...
@@ -73,6 +73,10 @@ int install_ir(uint32_t i, uint16_t flags, uint16_t code_sel, IRQ_HANDLER irq)
_idt
[
i
].
code_sel
=
code_sel
;
_idt
[
i
].
code_sel
=
code_sel
;
return
0
;
return
0
;
}
}
void
install_c_ir
(
uint32_t
interrupt
,
void
(
*
handler
)
(
uint32_t
))
{
handlers
[
interrupt
]
=
handler
;
}
void
idt_ftoi
(
int
a
,
IRQ_HANDLER
irq
)
void
idt_ftoi
(
int
a
,
IRQ_HANDLER
irq
)
{
{
...
...
src/idt.h
View file @
9360a1b9
...
@@ -47,6 +47,7 @@ struct stack_state
...
@@ -47,6 +47,7 @@ struct stack_state
extern
void
default_handler
(
struct
reg_state
reg
,
uint32_t
interrupt
,
uint32_t
error
,
struct
stack_state
stack
);
extern
void
default_handler
(
struct
reg_state
reg
,
uint32_t
interrupt
,
uint32_t
error
,
struct
stack_state
stack
);
extern
idt_desc
*
get_ir
(
uint32_t
i
);
extern
idt_desc
*
get_ir
(
uint32_t
i
);
extern
int
install_ir
(
uint32_t
i
,
uint16_t
flags
,
uint16_t
code_sel
,
IRQ_HANDLER
);
extern
int
install_ir
(
uint32_t
i
,
uint16_t
flags
,
uint16_t
code_sel
,
IRQ_HANDLER
);
extern
void
install_c_ir
(
uint32_t
interrupt
,
void
(
*
handler
)
(
uint32_t
));
extern
int
idt_init
(
uint16_t
code_sel
);
extern
int
idt_init
(
uint16_t
code_sel
);
extern
void
idt_ftoi
(
int
a
,
IRQ_HANDLER
irq
);
extern
void
idt_ftoi
(
int
a
,
IRQ_HANDLER
irq
);
extern
void
idtsetup
();
extern
void
idtsetup
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment