123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- #include "common/glib.h"
- #include "common/printk.h"
- #include "common/kprint.h"
- #include "exception/gate.h"
- #include "exception/trap.h"
- #include "exception/irq.h"
- #include "mm/mm.h"
- #include "process/process.h"
- #include "syscall/syscall.h"
- unsigned int *FR_address = (unsigned int *)0xb8000;
-
- struct memory_desc memory_management_struct = {{0}, 0};
- void show_welcome()
- {
-
- printk("\n\n");
- for (int i = 0; i < 74; ++i)
- printk(" ");
- printk_color(0x00e0ebeb, 0x00e0ebeb, " \n");
- for (int i = 0; i < 74; ++i)
- printk(" ");
- printk_color(BLACK, 0x00e0ebeb, " Welcome to DragonOS ! \n");
- for (int i = 0; i < 74; ++i)
- printk(" ");
- printk_color(0x00e0ebeb, 0x00e0ebeb, " \n\n");
- }
- void system_initialize()
- {
-
-
-
- init_printk(8, 16);
-
- load_TR(10);
- ul tss_item_addr = 0x7c00;
- set_TSS64(_stack_start, _stack_start, _stack_start, tss_item_addr, tss_item_addr,
- tss_item_addr, tss_item_addr, tss_item_addr, tss_item_addr, tss_item_addr);
-
-
- init_sys_vector();
-
- mm_init();
-
- init_irq();
-
- syscall_init();
-
- process_init();
- }
- void Start_Kernel(void)
- {
- system_initialize();
-
-
-
- while (1)
- ;
- }
- void ignore_int()
- {
- printk("[");
- printk_color(YELLOW, BLACK, "WARN");
- printk("] Unknown interrupt or fault at RIP.\n");
- return;
- }
|