Subversion Repositories Kolibri OS

Rev

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

Rev 4608 Rev 5032
Line 3... Line 3...
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
3
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;;
4
;; Distributed under terms of the GNU General Public License    ;;
4
;; Distributed under terms of the GNU General Public License    ;;
5
;;                                                              ;;
5
;;                                                              ;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 7... Line 7...
7
 
7
 
Line 8... Line 8...
8
$Revision: 4608 $
8
$Revision: 5032 $
9
 
9
 
Line 348... Line 348...
348
        invlpg  [eax]
348
        invlpg  [eax]
349
        pop     ebx
349
        pop     ebx
350
        ret
350
        ret
351
endp
351
endp
Line -... Line 352...
-
 
352
 
-
 
353
; Allocates a physical page for master page table
-
 
354
; that duplicates first Mb of OS_BASE at address 0;
-
 
355
; used for starting APs and for shutting down,
-
 
356
; where it is important to execute code in trivial-mapped pages.
-
 
357
; Returns eax = allocated physical page.
-
 
358
proc create_trampoline_pgmap
-
 
359
; The only non-trivial moment:
-
 
360
; we need a linear address to fill information,
-
 
361
; but we don't need it outside of this function,
-
 
362
; so we're returning physical address.
-
 
363
; Therefore, allocate memory with kernel_alloc,
-
 
364
; this will allocate physical page and a linear address somewhere,
-
 
365
; and deallocate only linear address with free_kernel_space.
-
 
366
        stdcall kernel_alloc, 0x1000
-
 
367
        mov     edi, eax
-
 
368
        mov     esi, master_tab
-
 
369
        mov     ecx, 1024
-
 
370
        rep movsd
-
 
371
        mov     ecx, [master_tab+(OS_BASE shr 20)]
-
 
372
        mov     [eax], ecx
-
 
373
        mov     edi, eax
-
 
374
        call    get_pg_addr
-
 
375
        push    eax
-
 
376
        stdcall free_kernel_space, edi
-
 
377
        pop     eax
-
 
378
        ret
-
 
379
endp
352
 
380
 
353
align 4
381
align 4
354
proc init_LFB
382
proc init_LFB
355
           locals
383
           locals
356
             pg_count dd ?
384
             pg_count dd ?