Subversion Repositories Kolibri OS

Rev

Rev 2640 | Rev 2643 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2640 Rev 2642
Line 67... Line 67...
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
include 'struct.inc'
70
include 'struct.inc'
Line 71... Line 71...
71
 
71
 
Line 72... Line 72...
72
$Revision: 2640 $
72
$Revision: 2642 $
Line 445... Line 445...
445
        jne     no_mode_0x12
445
        jne     no_mode_0x12
446
        mov     [PUTPIXEL], dword VGA_putpixel
446
        mov     [PUTPIXEL], dword VGA_putpixel
447
        mov     [GETPIXEL], dword Vesa20_getpixel32
447
        mov     [GETPIXEL], dword Vesa20_getpixel32
448
no_mode_0x12:
448
no_mode_0x12:
Line -... Line 449...
-
 
449
 
-
 
450
        mov     [MOUSE_PICTURE], dword mousepointer
-
 
451
        mov     [_display.check_mouse], check_mouse_area_for_putpixel
-
 
452
        mov     [_display.check_m_pixel], check_mouse_area_for_getpixel
449
 
453
 
450
; -------- Fast System Call init ----------
454
; -------- Fast System Call init ----------
451
; Intel SYSENTER/SYSEXIT (AMD CPU support it too)
455
; Intel SYSENTER/SYSEXIT (AMD CPU support it too)
452
        bt      [cpu_caps], CAPS_SEP
456
        bt      [cpu_caps], CAPS_SEP
453
        jnc     .SEnP  ; SysEnter not Present
457
        jnc     .SEnP  ; SysEnter not Present
Line 608... Line 612...
608
        or      eax, -1
612
        or      eax, -1
609
        mov     ecx, 0x10000/32
613
        mov     ecx, 0x10000/32
610
        rep stosd
614
        rep stosd
Line 611... Line 615...
611
 
615
 
612
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
-
 
-
 
616
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
-
 
617
        mov     esi, boot_initirq
613
 
618
        call    boot_log
-
 
619
        call    init_irqs
-
 
620
 
-
 
621
        mov     esi, boot_picinit
614
        call    init_irqs
622
        call    boot_log
Line -... Line 623...
-
 
623
        call    PIC_init
-
 
624
 
615
        call    PIC_init
625
        mov     esi, boot_v86machine
616
 
626
        call    boot_log
Line -... Line 627...
-
 
627
; Initialize system V86 machine
-
 
628
        call    init_sys_v86
617
; Initialize system V86 machine
629
 
618
        call    init_sys_v86
630
        mov     esi, boot_inittimer
Line -... Line 631...
-
 
631
        call    boot_log
-
 
632
; Initialize system timer (IRQ0)
619
 
633
        call    PIT_init
620
; Initialize system timer (IRQ0)
634
 
Line -... Line 635...
-
 
635
        mov     esi, boot_initapic
-
 
636
        call    boot_log
621
        call    PIT_init
637
; Try to Initialize APIC
622
 
638
        call    APIC_init
623
; Try to Initialize APIC
639
 
624
        call    APIC_init
640
        mov     esi, boot_enableirq
625
 
641
        call    boot_log
626
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
642
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
627
; they are used: when partitions are scanned, hd_read relies on timer
643
; they are used: when partitions are scanned, hd_read relies on timer
628
        call    unmask_timer
644
        call    unmask_timer
Line -... Line 645...
-
 
645
        stdcall enable_irq, 2               ; @#$%! PIC
-
 
646
        stdcall enable_irq, 6               ; FDD
629
        stdcall enable_irq, 2               ; @#$%! PIC
647
        stdcall enable_irq, 13              ; co-processor
630
        stdcall enable_irq, 6               ; FDD
648
        stdcall enable_irq, 14
631
        stdcall enable_irq, 13              ; co-processor
649
        stdcall enable_irq, 15
632
        stdcall enable_irq, 14
650
 
633
        stdcall enable_irq, 15
651
        mov     esi, boot_enablint_ide
634
 
652
        call    boot_log
Line 635... Line 653...
635
; Enable interrupts in IDE controller
653
; Enable interrupts in IDE controller
-
 
654
        mov     al, 0
-
 
655
        mov     dx, 0x3F6
636
        mov     al, 0
656
        out     dx, al
-
 
657
        mov     dl, 0x76
-
 
658
        out     dx, al
-
 
659
 
-
 
660
;!!!!!!!!!!!!!!!!!!!!!!!!!!
-
 
661
;        mov     esi, boot_detectdisks
-
 
662
;        call    boot_log
-
 
663
;include 'detect/disks.inc'
-
 
664
        mov     esi, boot_detectfloppy
-
 
665
        call    boot_log
-
 
666
include 'detect/dev_fd.inc'
-
 
667
        mov     esi, boot_detecthdcd
-
 
668
        call    boot_log
637
        mov     dx, 0x3F6
669
include 'detect/dev_hdcd.inc'
Line -... Line 670...
-
 
670
        mov     esi, boot_getcache
-
 
671
        call    boot_log
638
        out     dx, al
672
include 'detect/getcache.inc'
Line 639... Line 673...
639
        mov     dl, 0x76
673
        mov     esi, boot_detectpart
640
        out     dx, al
674
        call    boot_log
641
 
675
include 'detect/sear_par.inc'
Line 660... Line 694...
660
 
694
 
661
if 0
695
if 0
662
        mov     ax, [OS_BASE+0x10000+bx_from_load]
696
        mov     ax, [OS_BASE+0x10000+bx_from_load]
663
        cmp     ax, 'r1'; if using not ram disk, then load librares and parameters {SPraid.simba}
697
        cmp     ax, 'r1'; if using not ram disk, then load librares and parameters {SPraid.simba}
-
 
698
        je      no_lib_load
-
 
699
 
-
 
700
        mov     esi, boot_loadlibs
664
        je      no_lib_load
701
        call    boot_log
665
; LOADING LIBRARES
702
; LOADING LIBRARES
666
        stdcall dll.Load, @IMPORT           ; loading librares for kernel (.obj files)
703
        stdcall dll.Load, @IMPORT           ; loading librares for kernel (.obj files)
667
        call    load_file_parse_table       ; prepare file parse table
704
        call    load_file_parse_table       ; prepare file parse table
668
        call    set_kernel_conf             ; configure devices and gui
705
        call    set_kernel_conf             ; configure devices and gui
669
no_lib_load:
706
no_lib_load:
Line 670... Line -...
670
end if
-
 
671
 
-
 
672
; LOAD FONTS I and II
-
 
673
 
-
 
674
;        stdcall read_file, char, FONT_I, 0, 2304
-
 
675
;        stdcall read_file, char2, FONT_II, 0, 2560
-
 
676
 
-
 
677
        mov     [MOUSE_PICTURE], dword mousepointer
-
 
678
        mov     [_display.check_mouse], check_mouse_area_for_putpixel
-
 
679
        mov     [_display.check_m_pixel], check_mouse_area_for_getpixel
-
 
680
 
-
 
681
;        mov     esi, boot_fonts
-
 
682
;        call    boot_log
707
end if
683
 
708
 
684
; Display APIC status
709
; Display APIC status
685
        mov     esi, boot_APIC_found
710
        mov     esi, boot_APIC_found
686
        cmp     [irq_mode], IRQ_APIC
711
        cmp     [irq_mode], IRQ_APIC
687
        je      @f
712
        je      @f
-
 
713
        mov     esi, boot_APIC_nfound
Line 688... Line 714...
688
        mov     esi, boot_APIC_nfound
714
@@:
689
@@:
715
        call    boot_log
690
 
716
 
Line 707... Line 733...
707
        inc     edi
733
        inc     edi
708
        call    display_number_force
734
        call    display_number_force
Line 709... Line 735...
709
 
735
 
Line 710... Line 736...
710
; BUILD SCHEDULER
736
; BUILD SCHEDULER
Line 711... Line 737...
711
 
737
 
712
        call    build_scheduler; sys32.inc
738
;        call    build_scheduler; sys32.inc
Line 713... Line 739...
713
 
739
 
Line 714... Line 740...
714
        mov     esi, boot_devices
740
;        mov     esi, boot_devices