Subversion Repositories Kolibri OS

Rev

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

Rev 2219 Rev 2229
Line 66... Line 66...
66
;;
66
;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
67
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 68... Line 68...
68
 
68
 
Line 69... Line 69...
69
include 'macros.inc'
69
include 'macros.inc'
Line 70... Line 70...
70
 
70
 
Line 71... Line 71...
71
$Revision: 2219 $
71
$Revision: 2229 $
Line 224... Line 224...
224
           mov   ds,ax
224
           mov   ds,ax
225
           mov   es,ax
225
           mov   es,ax
226
           mov   fs,ax
226
           mov   fs,ax
227
           mov   gs,ax
227
           mov   gs,ax
228
           mov   ss,ax
228
           mov   ss,ax
229
           mov   esp,0x5ec00       ; Set stack
229
           mov   esp,0x006CC00       ; Set stack
Line 230... Line 230...
230
 
230
 
Line 231... Line 231...
231
; CLEAR 0x280000 - HEAP_BASE
231
; CLEAR 0x280000 - HEAP_BASE
232
 
232
 
233
           xor   eax,eax
233
           xor   eax,eax
234
           mov   edi,CLEAN_ZONE
234
           mov   edi,CLEAN_ZONE
235
           mov   ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4
235
           mov   ecx,(HEAP_BASE-OS_BASE-CLEAN_ZONE) / 4
Line 236... Line -...
236
           cld
-
 
237
           rep   stosd
-
 
238
 
-
 
239
           mov   edi,0x40000
-
 
240
           mov   ecx,(0x90000-0x40000)/4
236
           cld
241
           rep   stosd
237
           rep   stosd
242
 
238
 
-
 
239
; CLEAR KERNEL UNDEFINED GLOBALS
-
 
240
           mov   edi, endofcode-OS_BASE
243
; CLEAR KERNEL UNDEFINED GLOBALS
241
           mov   ecx, 0x90000
Line 244... Line 242...
244
           mov   edi, endofcode-OS_BASE
242
           sub   ecx, edi
Line 245... Line 243...
245
           mov   ecx, (uglobals_size/4)+4
243
           shr   ecx, 2
Line 602... Line 600...
602
        mov     ecx, 0x10000/32
600
        mov     ecx, 0x10000/32
603
        rep     stosd
601
        rep     stosd
Line 604... Line 602...
604
 
602
 
Line -... Line 603...
-
 
603
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
605
; REDIRECT ALL IRQ'S TO INT'S 0x20-0x2f
604
 
Line 606... Line 605...
606
 
605
        call  init_irqs
607
	call	PIC_init
606
        call  PIC_init
Line 613... Line 612...
613
	call	PIT_init
612
	call	PIT_init
Line 614... Line 613...
614
 
613
 
615
; Try to Initialize APIC
614
; Try to Initialize APIC
Line 616... Line -...
616
	call	APIC_init
-
 
617
 
-
 
618
        call pci_irq_fixup
615
	call	APIC_init
619
 
616
 
620
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
617
; Enable timer IRQ (IRQ0) and hard drives IRQs (IRQ14, IRQ15)
621
; they are used: when partitions are scanned, hd_read relies on timer
618
; they are used: when partitions are scanned, hd_read relies on timer
622
        call unmask_timer
619
        call unmask_timer
Line 678... Line 675...
678
        call  boot_log
675
        call  boot_log
Line 679... Line 676...
679
 
676
 
680
; Display APIC status
677
; Display APIC status
681
	mov	esi, boot_APIC_found
678
	mov	esi, boot_APIC_found
682
        cmp     [irq_mode], IRQ_APIC
679
        cmp     [irq_mode], IRQ_APIC
683
        jne    @f
-
 
684
 
680
        je    @f
685
	mov	esi, boot_APIC_nfound
681
	mov	esi, boot_APIC_nfound
686
@@:
-
 
Line 687... Line 682...
687
        call    boot_log
682
@@:
688
 
683
 
689
; PRINT AMOUNT OF MEMORY
684
; PRINT AMOUNT OF MEMORY