summaryrefslogtreecommitdiff
path: root/core/minute-ia/init.S
diff options
context:
space:
mode:
Diffstat (limited to 'core/minute-ia/init.S')
-rw-r--r--core/minute-ia/init.S35
1 files changed, 15 insertions, 20 deletions
diff --git a/core/minute-ia/init.S b/core/minute-ia/init.S
index 907efe6913..8a5ec8e4e2 100644
--- a/core/minute-ia/init.S
+++ b/core/minute-ia/init.S
@@ -7,6 +7,7 @@
#include "config.h"
#include "interrupts.h"
+#include "ia_structs.h"
.equ CR0_NW, (1 << 29)
.equ CR0_CD, (1 << 30)
@@ -25,7 +26,7 @@
.word def_irq_low # low 16 bits of default_int_handler
.word code_seg
.byte 0
- .byte IDT_FLAGS
+ .byte IDT_DESC_FLAGS
.word def_irq_high # high 16 bits of default_int_handler
.endm
@@ -292,26 +293,20 @@ interrupt_descriptor # 255
__gdt:
# Entry 0: Null descriptor
- .word 0x0000
- .word 0x0000
- .byte 0x00
- .byte 0x00
- .byte 0x00
- .byte 0x00
+ .long 0x0
+ .long 0x0
# Entry 1: Code descriptor
- .word 0xffff # Limit: xffff
- .word 0x0000 # Base: xxxx0000
- .byte 0x00 # Base: xx00xxxx
- .byte 0x9b # Code E/R, Present, DPL0, Acesssed=1
- .byte 0xcf # Limit fxxxx, Page Gra, 32 bit
- .byte 0x00 # Base: 00xxxxxx
- # Entry 0: Data descriptor
- .word 0xffff # Limit: xffff
- .word 0x0000 # Base: xxxx0000
- .byte 0x00 # Base: xx00xxxx
- .byte 0x93 # Data R/W, Present, DPL0, Acesssed=1
- .byte 0xcf # Limit fxxxx, Page Gra, 32 bit
- .byte 0x00 # Base: 00xxxxxx
+ # Base: 0x0
+ # Limit: 0xffffffff
+ # Flags: 0x9b (Code E/R, Present, DPL0, Acessed=1)
+ .long GEN_GDT_DESC_LO(0x0, 0xffffffff, GDT_DESC_CODE_FLAGS)
+ .long GEN_GDT_DESC_UP(0x0, 0xffffffff, GDT_DESC_CODE_FLAGS)
+ # Entry 2: Data descriptor
+ # Base: 0x0
+ # Limit: 0xffffffff
+ # Flags: 0x93 (Data R/W, Present, DPL0, Acessed=1)
+ .long GEN_GDT_DESC_LO(0x0, 0xffffffff, GDT_DESC_DATA_FLAGS)
+ .long GEN_GDT_DESC_UP(0x0, 0xffffffff, GDT_DESC_DATA_FLAGS)
#.section .data
__idt_ptr: