Changeset 45 for trunk/hal/x86_64/hal_init.c
- Timestamp:
- Jun 23, 2017, 11:55:08 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/hal_init.c
r44 r45 24 24 #include <hal_multiboot.h> 25 25 #include <hal_segmentation.h> 26 #include <hal_acpi.h> 27 #include <hal_lapic.h> 26 28 #include <hal_internal.h> 27 29 … … 98 100 hal_acpi_init(); 99 101 x86_printf("[+] hal_acpi_init called\n"); 102 103 hal_gpt_bootstrap_reset(); 104 x86_printf("[+] hal_gpt_bootstrap_reset called\n"); 105 106 hal_init_lapic(); 107 x86_printf("[+] hal_init_lapic called\n"); 100 108 101 109 x86_printf("-> mytest = %z\n", mytest); … … 207 215 static void idt_create() 208 216 { 209 extern uint64_t x86_traps[] ;217 extern uint64_t x86_traps[], x86_intrs[]; 210 218 struct idt_seg *idt; 211 219 size_t i; 212 220 213 221 idt = (struct idt_seg *)&idtstore; 214 for (i = 0; i < NCPUIDT; i++) { 215 idt_set_seg(&idt[i], (void *)x86_traps[i], 0, SDT_SYS386IGT, 216 SEL_KPL, GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL)); 222 223 /* General exceptions */ 224 for (i = CPUVEC_MIN; i < CPUVEC_MAX; i++) { 225 idt_set_seg(&idt[i], (void *)x86_traps[i - CPUVEC_MIN], 0, 226 SDT_SYS386IGT, SEL_KPL, GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL)); 217 227 } 228 229 /* LAPIC interrupts */ 230 for (i = LAPICVEC_MIN; i < LAPICVEC_MAX; i++) { 231 idt_set_seg(&idt[i], (void *)x86_intrs[i - LAPICVEC_MIN], 0, 232 SDT_SYS386IGT, SEL_KPL, GDT_FIXED_SEL(GDT_KCODE_SEL, SEL_KPL)); 233 } 234 218 235 } 219 236
Note: See TracChangeset
for help on using the changeset viewer.