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
8ffdb91a
authored
Oct 04, 2015
by
malcolm
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Maybe fixes some stuff dark magic why:
parent
83b7c108
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
src/gdt.c
src/idt.c
src/kern.c
src/gdt.c
View file @
8ffdb91a
#include "gdt.h"
#include "gdt.h"
#include "string.h"
#include "string.h"
#include "serial.h"
#include "serial.h"
#include "term.h"
//
#include "term.h"
uint16_t
gdt_limit
;
uint16_t
gdt_limit
;
uint32_t
gdt_base
;
uint32_t
gdt_base
;
...
@@ -18,7 +18,7 @@ void gdt_install(){
...
@@ -18,7 +18,7 @@ void gdt_install(){
gdtr
.
base
=
gdt_base
;
gdtr
.
base
=
gdt_base
;
asm
volatile
(
"lgdt (%0)"
:
:
"r"
(
&
gdtr
));
asm
volatile
(
"lgdt (%0)"
:
:
"r"
(
&
gdtr
));
set_cs
(
8
);
set_cs
(
8
);
asm
volatile
(
"mov $0x10, %ax;\
asm
volatile
(
"mov $0x10, %ax;
\
mov %ax, %ds; \
mov %ax, %ds; \
mov %ax, %es; \
mov %ax, %es; \
mov %ax, %fs; \
mov %ax, %fs; \
...
...
src/idt.c
View file @
8ffdb91a
...
@@ -15,6 +15,8 @@ void idt_install() {
...
@@ -15,6 +15,8 @@ void idt_install() {
idtr
.
limit
=
idt_limit
;
idtr
.
limit
=
idt_limit
;
idtr
.
base
=
idt_base
;
idtr
.
base
=
idt_base
;
char
f
[
20
];
char
f
[
20
];
itoa
(
idtr
.
limit
,
f
);
itoa
(
idtr
.
base
,
f
);
asm
volatile
(
"lidt (%0)"
:
:
"r"
(
&
idtr
));
asm
volatile
(
"lidt (%0)"
:
:
"r"
(
&
idtr
));
}
}
...
...
src/kern.c
View file @
8ffdb91a
...
@@ -16,7 +16,6 @@ void kernel_main() {
...
@@ -16,7 +16,6 @@ void kernel_main() {
/* Initialize terminal and serial interfaces */
/* Initialize terminal and serial interfaces */
terminal_initialize
();
terminal_initialize
();
serial_init
();
serial_init
();
gdt_init
();
gdt_init
();
idt_init
(
0x8
);
idt_init
(
0x8
);
...
...
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