From 2643d953b18547bca0700f3989c2717f4f9416a1 Mon Sep 17 00:00:00 2001 From: "Marat Zakiyanov (Mario79)" Date: Sat, 21 Apr 2012 11:41:37 +0000 Subject: [PATCH] A more detailed log of the boot in a black screen. git-svn-id: svn://kolibrios.org@2642 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/sys32.inc | 34 ++++++++++----------- kernel/trunk/data32.inc | 41 ++++++++++++++++++++----- kernel/trunk/kernel.asm | 60 ++++++++++++++++++++++++++----------- 3 files changed, 93 insertions(+), 42 deletions(-) diff --git a/kernel/trunk/core/sys32.inc b/kernel/trunk/core/sys32.inc index dadf5b3eb9..fb3313edf8 100644 --- a/kernel/trunk/core/sys32.inc +++ b/kernel/trunk/core/sys32.inc @@ -677,24 +677,22 @@ term9: ret restore .slot -iglobal -if lang eq ru - boot_sched_1 db 'Создание GDT TSS указателя',0 - boot_sched_2 db 'Создание IDT таблицы',0 -else - boot_sched_1 db 'Building gdt tss pointer',0 - boot_sched_2 db 'Building IDT table',0 -end if -endg +;iglobal +;if lang eq ru +; boot_sched_1 db 'Создание GDT TSS указателя',0 +; boot_sched_2 db 'Создание IDT таблицы',0 +;else +; boot_sched_1 db 'Building gdt tss pointer',0 +; boot_sched_2 db 'Building IDT table',0 +;end if +;endg -build_scheduler: +;build_scheduler: +; mov esi, boot_sched_1 +; call boot_log +; call build_process_gdt_tss_pointer - mov esi, boot_sched_1 - call boot_log - ; call build_process_gdt_tss_pointer - - ; mov esi,boot_sched_2 - ; call boot_log - - ret +; mov esi,boot_sched_2 +; call boot_log +; ret diff --git a/kernel/trunk/data32.inc b/kernel/trunk/data32.inc index fcd3afc47d..27788a2d03 100644 --- a/kernel/trunk/data32.inc +++ b/kernel/trunk/data32.inc @@ -49,11 +49,23 @@ keymap_alt: if lang eq ru -; boot_fonts db 'Шрифты загружены',0 + boot_initirq db 'Инициализация IRQ',0 + boot_picinit db 'Инициализация PIC',0 + boot_v86machine db 'Инициализация системы V86 машины',0 + boot_inittimer db 'Инициализация системного таймера (IRQ0)',0 + boot_initapic db 'Попытка инициализации APIC',0 + boot_enableirq db 'Включить прерывания 2, 6, 13, 14, 15',0 + boot_enablint_ide db 'Разрешение прерываний в контроллере IDE',0 + boot_detectfloppy db 'Поиск floppy дисководов',0 + boot_detecthdcd db 'Поиск жестких дисков и ATAPI приводов',0 + boot_getcache db 'Получение памяти для кэша',0 + boot_detectpart db 'Поиск разделов на дисковых устройствах',0 + boot_init_sys db 'Инициализация системного каталога /sys',0 + boot_loadlibs db 'Загрузка библиотек (.obj)',0 boot_memdetect db 'Количество оперативной памяти',' ',' Мб',0 boot_tss db 'Установка TSSs',0 boot_cpuid db 'Чтение CPUIDs',0 - boot_devices db 'Поиск устройств',0 +; boot_devices db 'Поиск устройств',0 boot_timer db 'Установка таймера',0 boot_irqs db 'Переопределение IRQ',0 boot_setmouse db 'Установка мыши',0 @@ -69,15 +81,30 @@ if lang eq ru boot_pal_vga db 'Установка VGA 640x480 палитры',0 boot_failed db 'Загрузка первого приложения не удалась',0 boot_mtrr db 'Установка MTRR',0 + + boot_APIC_found db 'APIC включен', 0 + boot_APIC_nfound db 'APIC не найден', 0 if preboot_blogesc boot_tasking db 'Все готово для запуска, нажмитре ESC для старта',0 end if else -; boot_fonts db 'Fonts loaded',0 + boot_initirq db 'Initialize IRQ',0 + boot_picinit db 'Initialize PIC',0 + boot_v86machine db 'Initialize system V86 machine',0 + boot_inittimer db 'Initialize system timer (IRQ0)',0 + boot_initapic db 'Try to initialize APIC',0 + boot_enableirq db 'Enable interrupts 2, 6, 13, 14, 15',0 + boot_enablint_ide db 'Enable interrupts in IDE controller',0 + boot_detectfloppy db 'Search floppy drives',0 + boot_detecthdcd db 'Search hard drives and ATAPI drives',0 + boot_getcache db 'Get memory for cache',0 + boot_detectpart db 'Search partitions on disk devices',0 + boot_init_sys db 'Initialize system directory /sys',0 + boot_loadlibs db 'Loading librares (.obj)',0 boot_memdetect db 'Determining amount of memory',0 boot_tss db 'Setting TSSs',0 boot_cpuid db 'Reading CPUIDs',0 - boot_devices db 'Detecting devices',0 +; boot_devices db 'Detecting devices',0 boot_setmouse db 'Setting mouse',0 boot_windefs db 'Setting window defaults',0 boot_bgr db 'Calculating background',0 @@ -90,14 +117,14 @@ else boot_pal_vga db 'Setting VGA 640x480 palette',0 boot_failed db 'Failed to start first app',0 boot_mtrr db 'Setting MTRR',0 + + boot_APIC_found db 'APIC enabled', 0 + boot_APIC_nfound db 'APIC not found', 0 if preboot_blogesc boot_tasking db 'All set - press ESC to start',0 end if end if - boot_APIC_found db 'APIC enabled', 0 - boot_APIC_nfound db 'APIC not found', 0 - ;new_process_loading db 'K : New Process - loading',13,10,0 ;new_process_running db 'K : New Process - done',13,10,0 start_not_enough_memory db 'K : New Process - not enough memory',13,10,0 diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 729005e3f2..7f364f0729 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -447,6 +447,10 @@ v20ga24: mov [GETPIXEL], dword Vesa20_getpixel32 no_mode_0x12: + mov [MOUSE_PICTURE], dword mousepointer + mov [_display.check_mouse], check_mouse_area_for_putpixel + mov [_display.check_m_pixel], check_mouse_area_for_getpixel + ; -------- Fast System Call init ---------- ; Intel SYSENTER/SYSEXIT (AMD CPU support it too) bt [cpu_caps], CAPS_SEP @@ -610,19 +614,31 @@ no_mode_0x12: rep stosd ; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f - + mov esi, boot_initirq + call boot_log call init_irqs + + mov esi, boot_picinit + call boot_log call PIC_init + mov esi, boot_v86machine + call boot_log ; Initialize system V86 machine call init_sys_v86 + mov esi, boot_inittimer + call boot_log ; Initialize system timer (IRQ0) call PIT_init + mov esi, boot_initapic + call boot_log ; Try to Initialize APIC call APIC_init + mov esi, boot_enableirq + call boot_log ; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15) ; they are used: when partitions are scanned, hd_read relies on timer call unmask_timer @@ -632,6 +648,8 @@ no_mode_0x12: stdcall enable_irq, 14 stdcall enable_irq, 15 + mov esi, boot_enablint_ide + call boot_log ; Enable interrupts in IDE controller mov al, 0 mov dx, 0x3F6 @@ -640,9 +658,25 @@ no_mode_0x12: out dx, al ;!!!!!!!!!!!!!!!!!!!!!!!!!! -include 'detect/disks.inc' +; mov esi, boot_detectdisks +; call boot_log +;include 'detect/disks.inc' + mov esi, boot_detectfloppy + call boot_log +include 'detect/dev_fd.inc' + mov esi, boot_detecthdcd + call boot_log +include 'detect/dev_hdcd.inc' + mov esi, boot_getcache + call boot_log +include 'detect/getcache.inc' + mov esi, boot_detectpart + call boot_log +include 'detect/sear_par.inc' ;!!!!!!!!!!!!!!!!!!!!!!!!!! + mov esi, boot_init_sys + call boot_log call Parser_params if ~ defined extended_primary_loader @@ -662,6 +696,9 @@ if 0 mov ax, [OS_BASE+0x10000+bx_from_load] cmp ax, 'r1'; if using not ram disk, then load librares and parameters {SPraid.simba} je no_lib_load + + mov esi, boot_loadlibs + call boot_log ; LOADING LIBRARES stdcall dll.Load, @IMPORT ; loading librares for kernel (.obj files) call load_file_parse_table ; prepare file parse table @@ -669,24 +706,13 @@ if 0 no_lib_load: end if -; LOAD FONTS I and II - -; stdcall read_file, char, FONT_I, 0, 2304 -; stdcall read_file, char2, FONT_II, 0, 2560 - - mov [MOUSE_PICTURE], dword mousepointer - mov [_display.check_mouse], check_mouse_area_for_putpixel - mov [_display.check_m_pixel], check_mouse_area_for_getpixel - -; mov esi, boot_fonts -; call boot_log - ; Display APIC status mov esi, boot_APIC_found cmp [irq_mode], IRQ_APIC je @f mov esi, boot_APIC_nfound @@: + call boot_log ; PRINT AMOUNT OF MEMORY mov esi, boot_memdetect @@ -709,10 +735,10 @@ end if ; BUILD SCHEDULER - call build_scheduler; sys32.inc +; call build_scheduler; sys32.inc - mov esi, boot_devices - call boot_log +; mov esi, boot_devices +; call boot_log mov [pci_access_enabled], 1