Rev 848 | Rev 859 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 848 | Rev 854 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. 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: 848 $ |
8 | $Revision: 854 $ |
9 | 9 | ||
10 | 10 | ||
Line 229... | Line 229... | ||
229 | endl |
229 | endl |
Line 230... | Line 230... | ||
230 | 230 | ||
231 | cmp dword [LFBAddress], -1 |
231 | cmp dword [LFBAddress], -1 |
232 | jne @f |
232 | jne @f |
233 | mov [BOOT_VAR+0x901c],byte 2 |
233 | mov [BOOT_VAR+0x901c],byte 2 |
234 | stdcall alloc_pages, 0x280000 shr 12 |
234 | stdcall _alloc_pages, 0x280000 shr 12 |
235 | add eax, OS_BASE |
235 | add eax, OS_BASE |
236 | mov [LFBAddress], eax |
236 | mov [LFBAddress], eax |
237 | ret |
237 | ret |
238 | @@: |
238 | @@: |
Line 323... | Line 323... | ||
323 | jae .grow |
323 | jae .grow |
Line 324... | Line 324... | ||
324 | 324 | ||
Line 325... | Line 325... | ||
325 | xchg esi, edi |
325 | xchg esi, edi |
326 | 326 | ||
327 | @@: |
327 | @@: |
328 | call alloc_page |
328 | call _alloc_page |
Line 329... | Line 329... | ||
329 | test eax, eax |
329 | test eax, eax |
Line 345... | Line 345... | ||
345 | jb @B |
345 | jb @B |
346 | .grow: |
346 | .grow: |
347 | pop edi |
347 | pop edi |
348 | pop esi |
348 | pop esi |
349 | @@: |
349 | @@: |
350 | call alloc_page |
350 | call _alloc_page |
351 | test eax, eax |
351 | test eax, eax |
352 | jz .exit |
352 | jz .exit |
353 | stdcall map_page,esi,eax,dword PG_UW |
353 | stdcall map_page,esi,eax,dword PG_UW |
Line 354... | Line 354... | ||
354 | 354 | ||
Line 475... | Line 475... | ||
475 | jz .check_ptab ;òàáëèöà ñòðàíèö íå ñîçäàíà |
475 | jz .check_ptab ;òàáëèöà ñòðàíèö íå ñîçäàíà |
Line 476... | Line 476... | ||
476 | 476 | ||
477 | align 4 |
477 | align 4 |
Line -... | Line 478... | ||
- | 478 | .kernel_heap: |
|
478 | .kernel_heap: |
479 | |
479 | 480 | mov ecx, ebx |
|
480 | shr ebx, 22 |
481 | shr ebx, 22 |
481 | mov edx, [master_tab + ebx*4] |
482 | mov edx, [master_tab + ebx*4] |
Line -... | Line 483... | ||
- | 483 | test edx, PG_MAP |
|
- | 484 | jz .check_ptab ;òàáëèöà ñòðàíèö íå ñîçäàíà |
|
- | 485 | ||
482 | test edx, PG_MAP |
486 | shr ecx, 12 |
483 | jz .check_ptab ;òàáëèöà ñòðàíèö íå ñîçäàíà |
487 | mov eax, [page_tabs+ecx*4] |
484 | 488 | ||
485 | .check_ptab: |
489 | .check_ptab: |
Line 486... | Line 490... | ||
486 | mov edx, [_sys_pdbr + ebx*4] |
490 | mov edx, [_sys_pdbr + ebx*4] |
487 | test edx, PG_MAP |
491 | test edx, PG_MAP |
488 | jnz @F |
492 | jnz @F |
Line 489... | Line 493... | ||
489 | 493 | ||
490 | call alloc_page |
494 | call _alloc_page |
Line 520... | Line 524... | ||
520 | mov eax, [page_tabs+ebx*4] |
524 | mov eax, [page_tabs+ebx*4] |
521 | test eax, 2 |
525 | test eax, 2 |
522 | jz .fail ;àäðåñ íå çàðåçåðâèðîâàí äëÿ ; |
526 | jz .fail ;àäðåñ íå çàðåçåðâèðîâàí äëÿ ; |
523 | ;èñïîëüçîâàíèÿ. Îøèáêà |
527 | ;èñïîëüçîâàíèÿ. Îøèáêà |
524 | .alloc: |
528 | .alloc: |
525 | call alloc_page |
529 | call _alloc_page |
526 | test eax, eax |
530 | test eax, eax |
527 | jz .fail |
531 | jz .fail |
Line 528... | Line 532... | ||
528 | 532 | ||
Line 564... | Line 568... | ||
564 | jae .fail |
568 | jae .fail |
Line 565... | Line 569... | ||
565 | 569 | ||
566 | ; io permission map |
570 | ; io permission map |
Line 567... | Line 571... | ||
567 | ; copy-on-write protection |
571 | ; copy-on-write protection |
568 | 572 | ||
569 | call alloc_page |
573 | call _alloc_page |
Line 570... | Line 574... | ||
570 | test eax, eax |
574 | test eax, eax |
571 | jz .fail |
575 | jz .fail |
Line 1178... | Line 1182... | ||
1178 | 1182 | ||
1179 | mov ebx, [size] |
1183 | mov ebx, [size] |
1180 | shr ebx, 12 |
1184 | shr ebx, 12 |
Line 1181... | Line 1185... | ||
1181 | push ebx |
1185 | push ebx |
1182 | 1186 | ||
Line 1183... | Line 1187... | ||
1183 | stdcall alloc_pages, ebx |
1187 | stdcall _alloc_pages, ebx |
1184 | pop ecx |
1188 | pop ecx |