Added support for basic x86 features
Includes 'gdt', 'idt' and a serial driver
This commit is contained in:
parent
39ed861359
commit
ca5351b847
11 changed files with 231 additions and 67 deletions
39
init/descriptor.S
Normal file
39
init/descriptor.S
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#define __ASM__
|
||||
#include <kernel/gdt.h>
|
||||
#include <kernel/idt.h>
|
||||
|
||||
/*
|
||||
* Data section
|
||||
*/
|
||||
.data
|
||||
|
||||
.global __gdtr
|
||||
__gdtr:
|
||||
.word 0
|
||||
.quad 0
|
||||
.global __gdt
|
||||
__gdt:
|
||||
.skip GDT_SIZE
|
||||
|
||||
.global __idtr
|
||||
__idtr:
|
||||
.word 0
|
||||
.quad 0
|
||||
.global __idt
|
||||
__idt:
|
||||
.skip IDT_SIZE
|
||||
|
||||
/*
|
||||
* Code Section
|
||||
*/
|
||||
.text
|
||||
|
||||
.global gdt_load
|
||||
gdt_load:
|
||||
lgdt (__gdtr)
|
||||
ret
|
||||
|
||||
.global idt_load
|
||||
idt_load:
|
||||
lidt (__idtr)
|
||||
ret
|
||||
Loading…
Reference in a new issue