Subversion Repositories Kolibri OS

Rev

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

Rev 102 Rev 103
Line 411... Line 411...
411
; ENABLE PAGING
411
; ENABLE PAGING
412
        mov     eax,cr0
412
        mov     eax,cr0
413
        or      eax,0x80000000
413
        or      eax,0x80000000
414
        mov     cr0,eax
414
        mov     cr0,eax
415
        jmp     $+2
415
        jmp     $+2
-
 
416
        
-
 
417
        call    MEM_Init
-
 
418
;add 0x800000-0xc00000 area
-
 
419
        cmp     word [0xfe0c],0x13
-
 
420
        jle     .less_memory
-
 
421
        mov     eax,0x800000      ;linear address
-
 
422
        mov     ebx,0x400000 shr 12 ;size in pages (4Mb)
-
 
423
        mov     ecx,0x800000        ;physical address
-
 
424
        jmp     .end_first_block
-
 
425
.less_memory:
-
 
426
        mov     eax,0x980000      ;linear address
-
 
427
        mov     ebx,0x280000 shr 12 ;size in pages (2.5Mb)
-
 
428
        mov     ecx,0x980000        ;physical address
-
 
429
.end_first_block:
-
 
430
        call    MEM_Add_Heap        ;nobody can lock mutex yet
-
 
431
 
-
 
432
        call    create_general_page_table
-
 
433
;add 0x1000000(0xd80000)-end_of_memory area
-
 
434
        mov     eax,second_base_address
-
 
435
        mov     ebx,[0xfe8c]
-
 
436
        mov     ecx,[0xfe84]
-
 
437
        sub     ebx,ecx
-
 
438
        shr     ebx,12
-
 
439
        add     eax,ecx
-
 
440
        call    MEM_Add_Heap
-
 
441
;init physical memory manager.
-
 
442
        call    Init_Physical_Memory_Manager        
-
 
443
        
416
        mov     dword [0xfe80],0x800000
444
        mov     dword [0xfe80],0x80000000 ;0x800000
Line 417... Line 445...
417
 
445
 
418
;Set base of graphic segment to linear address of LFB
446
;Set base of graphic segment to linear address of LFB
419
        mov     eax,[0xfe80]                      ; set for gs
447
        mov     eax,[0xfe80]                      ; set for gs
420
        mov     [graph_data_l+2],ax
448
        mov     [graph_data_l+2],ax
Line 482... Line 510...
482
;        mov     esi,boot_ext_region
510
;        mov     esi,boot_ext_region
483
;        call    boot_log
511
;        call    boot_log
484
;        jmp     $
512
;        jmp     $
485
;extended_region_found:
513
;extended_region_found:
Line 486... Line -...
486
 
-
 
487
        call    MEM_Init
-
 
488
;add 0x800000-0xc00000 area
-
 
489
        cmp     word [0xfe0c],0x13
-
 
490
        jle     .less_memory
-
 
491
        mov     eax,0x80000000      ;linear address
-
 
492
        mov     ebx,0x400000 shr 12 ;size in pages (4Mb)
-
 
493
        mov     ecx,0x800000        ;physical address
-
 
494
        jmp     .end_first_block
-
 
495
.less_memory:
-
 
496
        mov     eax,0x80180000      ;linear address
-
 
497
        mov     ebx,0x280000 shr 12 ;size in pages (2.5Mb)
-
 
498
        mov     ecx,0x980000        ;physical address
-
 
499
.end_first_block:
-
 
Line 500... Line -...
500
        call    MEM_Add_Heap        ;nobody can lock mutex yet
-
 
501
 
-
 
502
        call    create_general_page_table
-
 
503
;add 0x1000000(0xd80000)-end_of_memory area
-
 
504
        mov     eax,second_base_address
-
 
505
        mov     ebx,[0xfe8c]
-
 
506
        mov     ecx,[0xfe84]
-
 
507
        sub     ebx,ecx
-
 
508
        shr     ebx,12
-
 
509
        add     eax,ecx
-
 
510
        call    MEM_Add_Heap
-
 
Line 511... Line 514...
511
;init physical memory manager.
514
 
Line 512... Line 515...
512
        call    Init_Physical_Memory_Manager
515
 
513
 
516