Changeset 323 for trunk/hal/x86_64/core
- Timestamp:
- Aug 6, 2017, 8:33:00 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/hal/x86_64/core/hal_init.c
r312 r323 82 82 /* -------------------------------------------------------------------------- */ 83 83 84 /* XXX XXX XXX libk */ 85 char * 86 strstr(char *s, const char *find) 87 { 88 char c, sc; 89 size_t len; 90 91 if ((c = *find++) != 0) { 92 len = strlen(find); 93 do { 94 do { 95 if ((sc = *s++) == 0) 96 return (NULL); 97 } while (sc != c); 98 } while (strncmp(s, find, len) != 0); 99 s--; 100 } 101 return s; 102 } 103 104 static void 105 dump_memmap() 84 /* 85 * Configure the features of the system depending on the multiboot info. 86 */ 87 static void multiboot_init() 106 88 { 107 89 size_t mmap_length = mb_info.mi_mmap_length; … … 398 380 x86_printf("[+] bootloader: '%s'\n", mb_loader_name); 399 381 400 dump_memmap();401 x86_printf("[+] dump finished\n");382 multiboot_init(); 383 x86_printf("[+] multiboot_init called\n"); 402 384 403 385 hal_gpt_init(firstpa); … … 473 455 } 474 456 475 static void 476 setregion(struct region_descriptor *rd, void *base, uint16_t limit) 457 static void setregion(struct region_descriptor *rd, void *base, uint16_t limit) 477 458 { 478 459 rd->rd_limit = limit; … … 482 463 /* -------------------------------------------------------------------------- */ 483 464 484 static void 485 gdt_set_memseg(struct gdt_memseg *sd, void *base, size_t limit, 465 static void gdt_set_memseg(struct gdt_memseg *sd, void *base, size_t limit, 486 466 int type, int dpl, int gran, bool_t is64) 487 467 { … … 499 479 } 500 480 501 static void 502 gdt_set_sysseg(struct gdt_sysseg *sd, void *base, size_t limit, 481 static void gdt_set_sysseg(struct gdt_sysseg *sd, void *base, size_t limit, 503 482 int type, int dpl, int gran) 504 483 { … … 565 544 } 566 545 567 static void 568 idt_set_seg(struct idt_seg *seg, void *func, int ist, int type,int dpl, int sel)546 static void idt_set_seg(struct idt_seg *seg, void *func, int ist, int type, 547 int dpl, int sel) 569 548 { 570 549 seg->gd_looffset = (uint64_t)func & 0xffff;
Note: See TracChangeset
for help on using the changeset viewer.