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
6e562999
authored
Oct 19, 2015
by
triazo
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Clean up kern.c and add checks
parent
1efcb863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
src/kern.c
src/kern.c
View file @
6e562999
...
...
@@ -17,7 +17,7 @@
#include "multiboot.h"
// The parameters passed here ultimately come through the bootloader
void
kernel_main
(
multiboot_info
*
mb
d
,
uint32_t
magic
)
void
kernel_main
(
multiboot_info
*
mb
t
,
uint32_t
magic
)
{
/* Initialize terminal and serial interfaces */
terminal_initialize
();
...
...
@@ -31,12 +31,13 @@ void kernel_main(multiboot_info* mbd, uint32_t magic)
*/
serial_writestring
(
"IDT initialized
\n
"
);
terminal_writestring
(
"Hello, kernel World!
\n
"
);
//serial_writestring("Second Serial Test\n");
serial_hexstring
(
&
magic
,
4
);
serial_writestring
(
"
\n
"
);
serial_hexstring
(
&
(
mbd
->
flags
),
8
);
serial_writestring
(
"
\n
"
);
// Abort if magic is not correct.
if
(
magic
!=
0x2badb002
)
{
serial_writestring
(
"Magic number not correct
\n
"
);
// wait how do we terminate
}
// Enable paging of memory. For now there is only one virtual
// memory space defined by page_dir
...
...
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