Subversion Repositories Kolibri OS

Rev

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

Rev 855 Rev 859
Line 56... Line 56...
56
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
57
 
57
 
Line 58... Line 58...
58
include 'macros.inc'
58
include 'macros.inc'
Line 59... Line 59...
59
 
59
 
Line 60... Line 60...
60
$Revision: 855 $
60
$Revision: 859 $
Line 61... Line 61...
61
 
61
 
Line 121... Line 121...
121
public @balloc@4
121
public @balloc@4
122
 
122
 
Line 123... Line 123...
123
public __setvars
123
public __setvars
Line -... Line 124...
-
 
124
 
-
 
125
public _rd_base
-
 
126
public _rd_fat
-
 
127
public _rd_fat_end
-
 
128
public _rd_root
-
 
129
public _rd_root_end
124
 
130
 
125
extrn _16bit_start
131
extrn _16bit_start
Line 126... Line 132...
126
extrn _16bit_end
132
extrn _16bit_end
Line 127... Line 133...
127
 
133
 
128
extrn _enter_bootscreen
134
extrn _enter_bootscreen
Line 129... Line 135...
129
 
135
 
130
extrn _init
136
extrn _init
131
extrn _init_mm
137
extrn _init_mm
132
 
138
 
133
public _rd_base
139
extrn @init_heap@8
Line -... Line 140...
-
 
140
extrn @find_large_md@4
-
 
141
extrn @find_small_md@4
-
 
142
extrn @phis_alloc@4
134
public _rd_fat
143
extrn @mem_alloc@8
135
public _rd_fat_end
144
 
Line -... Line 145...
-
 
145
extrn _alloc_kernel_space@4
-
 
146
 
-
 
147
extrn _slab_cache_init
-
 
148
extrn _alloc_pages
136
public _rd_root
149
extrn _alloc_page
Line 137... Line 150...
137
public _rd_root_end
150
 
Line 138... Line 151...
138
 
151
extrn _get_free_mem
Line 347... Line 360...
347
           mov [unpack.p], eax
360
           mov [unpack.p], eax
348
 
361
 
Line 349... Line 362...
349
; MEMORY MODEL
362
; MEMORY MODEL
Line 350... Line -...
350
 
-
 
351
           call init_kernel_heap     ; FIXME initialize heap after pager
-
 
352
 
363
 
353
           call _init_mm
364
           call _init_mm
Line -... Line 365...
-
 
365
           mov [pg_data.pg_mutex], 0
-
 
366
 
-
 
367
           call _slab_cache_init
-
 
368
 
-
 
369
           mov ecx, 0x80000000
-
 
370
           mov edx, 0x40000000
354
           mov [pg_data.pg_mutex], 0
371
           call @init_heap@8
355
 
372
 
356
           mov esi, _16bit_start
373
           mov esi, _16bit_start
357
           mov ecx, _16bit_end
374
           mov ecx, _16bit_end
358
           shr ecx, 2
375
           shr ecx, 2
359
           mov edi, _16BIT_BASE
376
           mov edi, _16BIT_BASE
Line 360... Line -...
360
           cld
-
 
361
           rep movsd
-
 
362
 
377
           cld
Line 363... Line 378...
363
           xchg bx, bx
378
           rep movsd
364
 
379
 
365
           jmp far 0x60:_enter_bootscreen;
380
           jmp far 0x60:_enter_bootscreen;
Line 377... Line 392...
377
           mov gs, dx
392
           mov gs, dx
378
 
393
 
Line 379... Line 394...
379
; SAVE & CLEAR 0-0xffff
394
; SAVE & CLEAR 0-0xffff
Line -... Line 395...
-
 
395
 
380
 
396
           cld
381
           xor esi, esi
397
           xor esi, esi
382
           mov   edi,0x1F0000
398
           mov   edi,BOOT_VAR
383
           mov   ecx,0x10000 / 4
399
           mov   ecx,0x10000 / 4
384
           rep   movsd
400
           rep   movsd
385
           xor edi, edi
401
           xor edi, edi
386
           xor eax, eax
402
           xor eax, eax
387
           mov   ecx,0x10000 / 4
403
           mov   ecx,0x10000 / 4
Line -... Line 404...
-
 
404
           rep   stosd
-
 
405
 
-
 
406
           mov edi, SLOT_BASE
-
 
407
           mov   ecx,0x10000 / 4
-
 
408
           rep   stosd
-
 
409
 
-
 
410
           mov dword [_sys_pdbr], eax
-
 
411
           mov dword [_sys_pdbr+4], eax
-
 
412
           mov eax, cr3
388
           rep   stosd
413
           mov cr3, eax
389
 
414
 
390
; SAVE REAL MODE VARIABLES
415
; SAVE REAL MODE VARIABLES
391
	mov	ax, [BOOT_VAR + 0x9031]
416
	mov	ax, [BOOT_VAR + 0x9031]
Line 786... Line 811...
786
	call  set_variables
811
	call  set_variables
Line 787... Line 812...
787
 
812
 
Line 788... Line -...
788
; SET MOUSE
-
 
789
 
813
; SET MOUSE
790
	;call   detect_devices
814
 
Line 791... Line 815...
791
	stdcall load_driver, szPS2MDriver
815
	stdcall load_driver, szPS2MDriver
792
       ; stdcall load_driver, szCOM_MDriver
816
       ; stdcall load_driver, szCOM_MDriver
Line 827... Line 851...
827
	   stdcall map_page,esi,(tss._io_map_0-OS_BASE), PG_MAP
851
	   stdcall map_page,esi,(tss._io_map_0-OS_BASE), PG_MAP
828
	   add esi, 0x1000
852
	   add esi, 0x1000
829
	   stdcall map_page,esi,(tss._io_map_1-OS_BASE), PG_MAP
853
	   stdcall map_page,esi,(tss._io_map_1-OS_BASE), PG_MAP
830
 
854
 
Line 831... Line 855...
831
	   stdcall map_page,tss._io_map_0,\
855
         ;  stdcall map_page,tss._io_map_0,\
832
		   (tss._io_map_0-OS_BASE), PG_MAP
856
         ;          (tss._io_map_0-OS_BASE), PG_MAP
833
	   stdcall map_page,tss._io_map_1,\
857
         ;  stdcall map_page,tss._io_map_1,\
834
		   (tss._io_map_1-OS_BASE), PG_MAP
858
         ;          (tss._io_map_1-OS_BASE), PG_MAP
Line 835... Line 859...
835
 
859
 
836
;  mov ax,[OS_BASE+0x10000+bx_from_load]
860
;  mov ax,[OS_BASE+0x10000+bx_from_load]
837
;  cmp ax,'r1'           ; if not rused ram disk - load network configuration from files {SPraid.simba}
861
;  cmp ax,'r1'           ; if not rused ram disk - load network configuration from files {SPraid.simba}
838
;  je  no_st_network
862
;  je  no_st_network
839
;        call set_network_conf
863
;        call set_network_conf
Line 840... Line 864...
840
;  no_st_network:
864
;  no_st_network:
Line 841... Line -...
841
 
-
 
842
; LOAD FIRST APPLICATION
-
 
843
 
-
 
844
	cmp   byte [BOOT_VAR+0x9030],1
-
 
845
	jne   no_load_vrr_m
-
 
846
 
-
 
847
	mov	ebp, vrr_m
-
 
848
	call	fs_execute_from_sysdir
-
 
849
 
-
 
850
	cmp   eax,2		     ; if vrr_m app found (PID=2)
-
 
851
	je    first_app_found
-
 
Line 852... Line 865...
852
 
865
 
853
no_load_vrr_m:
866
; LOAD FIRST APPLICATION
Line 854... Line 867...
854
 
867
 
Line 1891... Line 1904...
1891
   smn2:
1904
   smn2:
1892
 
1905
 
Line 1893... Line 1906...
1893
     ret
1906
     ret
Line 1894... Line -...
1894
 
-
 
1895
 
-
 
1896
detect_devices:
-
 
1897
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
 
1898
;include 'detect/commouse.inc'
-
 
1899
;include 'detect/ps2mouse.inc'
-
 
1900
;include 'detect/dev_fd.inc'
-
 
1901
;include 'detect/dev_hdcd.inc'
-
 
1902
;include 'detect/sear_par.inc'
-
 
1903
;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
 
1904
    ret
-
 
1905
 
-
 
1906
 
1907
 
Line 1907... Line 1908...
1907
sys_end:
1908
sys_end:
1908
 
1909
 
Line 2168... Line 2169...
2168
 .end:
2169
 .end:
2169
     ret
2170
     ret
2170
 
2171
 
Line 2171... Line 2172...
2171
sysfn_getfreemem:
2172
sysfn_getfreemem:
2172
     mov eax, [pg_data.pages_free]
2173
     call _get_free_mem
2173
     shl eax, 2
2174
     shl eax, 2
2174
     mov [esp+32],eax
2175
     mov [esp+32],eax
2175
     ret
2176
     ret
Line 2176... Line 2177...
2176
 
2177