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
fc878126
authored
Nov 10, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Fixes warnings
parent
28633c72
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
src/idt.c
src/mem.c
src/idt.c
View file @
fc878126
...
...
@@ -43,7 +43,7 @@ void load_error_handlers()
}
}
void
default_handler
(
struct
reg_state
reg
,
uint32_t
interrupt
,
uint32_t
error
,
struct
stack_state
stack
)
void
default_handler
(
struct
reg_state
__attribute__
((
unused
))
reg
,
uint32_t
interrupt
,
uint32_t
error
,
struct
stack_state
stack
)
{
if
(
interrupt
<
32
)
stack
.
eip
+=
2
;
...
...
src/mem.c
View file @
fc878126
...
...
@@ -81,7 +81,7 @@ page_directory_entry* mem_init_kern_tables(multiboot_memory_map* mmap, multiboot
uint32_t
i
;
for
(
i
=
0
;
i
+
0x1000000
<
mmap
->
length
;
i
+=
0x1000000
)
{
populate_page_table
(
next_table
,
(
void
*
)
mmap
->
base_addr
+
i
,
1024
,
0
);
populate_page_table
(
next_table
,
(
void
*
)
(
intptr_t
)
mmap
->
base_addr
+
i
,
1024
,
0
);
page_directory
[
current_dir_entry
]
=
(
uint32_t
)
next_table
;
page_directory
[
current_dir_entry
]
|=
PAGE_WRITABLE
|
PAGE_PRESENT
;
...
...
@@ -92,7 +92,7 @@ page_directory_entry* mem_init_kern_tables(multiboot_memory_map* mmap, multiboot
// full page table to be mapped. This handlis this case.
if
(
i
!=
mmap
->
length
)
{
populate_page_table
(
next_table
,
(
void
*
)
mmap
->
base_addr
+
i
,
(
mmap
->
length
-
i
)
/
0x1000
,
0
);
populate_page_table
(
next_table
,
(
void
*
)
(
intptr_t
)
mmap
->
base_addr
+
i
,
(
mmap
->
length
-
i
)
/
0x1000
,
0
);
page_directory
[
current_dir_entry
]
=
(
uint32_t
)
next_table
;
page_directory
[
current_dir_entry
]
|=
PAGE_WRITABLE
|
PAGE_PRESENT
;
...
...
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