Changeset 80 for trunk/hal/x86_64
- Timestamp:
- Jun 27, 2017, 5:24:02 PM (7 years ago)
- Location:
- trunk/hal/x86_64/core
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_init.c
r74 r80 184 184 kernel_init(&btinfo); 185 185 x86_printf("[+] kernel_init called\n"); 186 187 188 sti(); 189 while (1); 186 190 187 191 int m = 0; … … 288 292 static void idt_create() 289 293 { 290 extern uint64_t x86_traps[], x86_intrs[] ;294 extern uint64_t x86_traps[], x86_intrs[], x86_rsvd; 291 295 struct idt_seg *idt; 292 296 size_t i; 293 297 294 298 idt = (struct idt_seg *)&idtstore; 299 300 /* First, put a dead entry */ 301 for (i = 0; i < NIDT; i++) { 302 idt_set_seg(&idt[i], (void *)&x86_rsvd, 0, 303 SDT_SYS386IGT, SEL_KPL, GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL)); 304 } 295 305 296 306 /* General exceptions */ -
trunk/hal/x86_64/core/hal_kentry.S
r51 r80 111 111 ASM_ENTRY(x86_trap1e) 112 112 ASM_ENTRY(x86_trap1f) 113 ASM_ENTRY(x86_rsvd) 113 114 /* 20 - 31 reserved for future exp */ 114 115 ZTRAPENTRY(T_RESERVED) … … 119 120 ASM_ENTRY(x86_spurious) 120 121 ZTRAPENTRY(T_ASTFLT) 121 122 122 ASM_ENTRY(x86_timer) 123 ZTRAPENTRY(T_ASTFLT) 123 124 124 125 /* … … 164 165 x86_intrs: 165 166 .quad x86_spurious 167 .quad x86_timer 166 168 -
trunk/hal/x86_64/core/hal_lapic.h
r51 r80 24 24 25 25 #define LAPIC_SPURIOUS_VECTOR LAPICVEC_MIN 26 #define LAPIC_TIMER_VECTOR (LAPICVEC_MIN + 1) 26 27 27 28 #define LAPIC_ID 0x020 /* ID. RW */ -
trunk/hal/x86_64/core/hal_segmentation.h
r51 r80 194 194 #define CPUVEC_MAX 32 /* reserved entries for CPU exceptions */ 195 195 #define LAPICVEC_MIN CPUVEC_MAX 196 #define LAPICVEC_MAX (LAPICVEC_MIN + 1)196 #define LAPICVEC_MAX (LAPICVEC_MIN + 2) 197 197 198 198 #define NIDT 256 /* total number of IDT entries */
Note: See TracChangeset
for help on using the changeset viewer.