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
af8238f6
authored
Dec 06, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Switched completely to trapframes
parent
5a66d675
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
16 deletions
src/PCB.h
src/idt.c
src/idt.h
src/PCB.h
View file @
af8238f6
...
...
@@ -28,9 +28,9 @@ typedef struct//all regs in proc
uint32_t
err
;
//
uint32_t eip;
//
uint16_t cs;
//
uint16_t cspad;
uint32_t
eip
;
uint16_t
cs
;
uint16_t
cspad
;
//uint32_t eflags;
...
...
src/idt.c
View file @
af8238f6
...
...
@@ -43,17 +43,13 @@ void load_error_handlers()
}
}
void
default_handler
(
trapframe
reg
,
/*uint32_t interrupt, uint32_t error,*/
struct
stack_state
stack
)
void
default_handler
(
trapframe
reg
)
{
uint32_t
interrupt
=
reg
.
trap
;
uint32_t
error
=
reg
.
err
;
if
(
interrupt
<
32
)
stack
.
eip
+=
2
;
//char f[20];
//serial_val(interrupt);
if
(
handlers
[
interrupt
]
!=
NULL
)
if
(
reg
.
trap
<
32
)
reg
.
eip
+=
2
;
if
(
handlers
[
reg
.
trap
]
!=
NULL
)
{
handlers
[
interrupt
](
erro
r
);
handlers
[
reg
.
trap
](
reg
.
er
r
);
}
return
;
}
...
...
src/idt.h
View file @
af8238f6
...
...
@@ -37,15 +37,15 @@ typedef struct
uint32_t edi;
}__attribute__((packed));*/
struct
stack_state
{
/*
struct stack_state
{
uint32_t eip;
uint32_t cd;
uint32_t eflags;
}
__attribute__
((
packed
));
}__attribute__((packed));*/
extern
void
default_handler
(
trapframe
reg
,
/*uint32_t interrupt, uint32_t error,*/
struct
stack_state
stack
);
extern
void
default_handler
(
trapframe
reg
);
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
void
install_c_ir
(
uint32_t
interrupt
,
void
(
*
handler
)
(
uint32_t
));
...
...
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