diff --git a/include/version.h b/include/version.h index 95cfc82..9933966 100644 --- a/include/version.h +++ b/include/version.h @@ -1,3 +1,3 @@ #define VERSION_MAJOR 0 #define VERSION_MINOR 2 -#define VERSION_BUILD 14 +#define VERSION_BUILD 34 diff --git a/kernel/cpu/idt.c b/kernel/cpu/idt.c index affa8c7..a693c3a 100644 --- a/kernel/cpu/idt.c +++ b/kernel/cpu/idt.c @@ -89,7 +89,7 @@ static void exception_handler(struct frame state) { void isr_generic(struct frame state) { if (state.int_number > 255) { return; } - // if (state.int_number != 32) { LOG("Обработка прерывания %u\n", state.int_number); } + if (state.int_number != 32) { LOG("Обработка прерывания %u\n", state.int_number); } if (state.int_number < 32) { exception_handler(state); diff --git a/kernel/mod.c b/kernel/mod.c index 82358df..025c1f8 100644 --- a/kernel/mod.c +++ b/kernel/mod.c @@ -33,7 +33,7 @@ static void *elf_entry(elf64_header_t *module_bin) { // Приводим заголовок ELF файла к типу elf64_header_t elf64_header_t *elf_header = (elf64_header_t *)module_bin; - // LOG("(uint64_t)elf_header->e_entry = 0x%x, type = %u\n", (uint64_t)elf_header->e_entry, elf_header->e_type); + LOG("(uint64_t)elf_header->e_entry = 0x%x, тип = %u\n", (uint64_t)elf_header->e_entry, elf_header->e_type); if (elf_header->e_type != 2) { LOG("\t\tОшибка! Модуль неправильно собран!\n"); @@ -92,6 +92,7 @@ void mod_init( ) { LOG("Ошибка выделения памяти для массива module_list\n"); return; } + LOG("module_list = 0x%x\n", module_list); } for (uint64_t i = 0; i < module_count; i++) { diff --git a/modules/ios/main.c b/modules/ios/main.c index adc2151..7ef9e98 100644 --- a/modules/ios/main.c +++ b/modules/ios/main.c @@ -22,7 +22,7 @@ static void main( ) { for (uint64_t i = 0; i < *mod_count; i++) { if (str_contains(mod_list[i].name, "[APP]")) { - //fb_printf("%u. %s\n", app_count, mod_list[i].name); + // fb_printf("%u. %s\n", app_count, mod_list[i].name); app_list[app_count] = mod_list[i]; app_count++; } diff --git a/modules/ps2/main.c b/modules/ps2/main.c index 5863362..48ae06c 100644 --- a/modules/ps2/main.c +++ b/modules/ps2/main.c @@ -8,9 +8,6 @@ static char c_char = '\0'; static key_event_t keyboard_buffer; void virt_exit( ) { - fb_printf("Выход для Bochs\n"); - outw(0xB004, 0x2000); - fb_printf("Выход для Qemu\n"); outw(0x604, 0x2000); @@ -80,8 +77,7 @@ static int is_ctrl(uint8_t scancode) { } } -void handler(struct frame *state) { - (void)state; +static void handler( ) { while (!(inb(0x64) & 1)) { asm volatile("pause"); } uint8_t scancode = inb(0x60); @@ -169,6 +165,6 @@ module_info_t __attribute__((section(".minit"))) init(env_t *env) { .err_code = 0, .module_id = 0, .irq = 33, - .irq_handler = handler, + .irq_handler = &handler, .get_func = __get_func }; } \ No newline at end of file