Rev 1289 | Rev 1314 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1289 | Rev 1300 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2009. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2009. 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: 1289 $ |
8 | $Revision: 1300 $ |
9 | 9 | ||
Line 319... | Line 319... | ||
319 | endl |
319 | endl |
Line 320... | Line 320... | ||
320 | 320 | ||
321 | cmp dword [LFBAddress], -1 |
321 | cmp dword [LFBAddress], -1 |
322 | jne @f |
322 | jne @f |
323 | mov [BOOT_VAR+0x901c],byte 2 |
323 | mov [BOOT_VAR+0x901c],byte 2 |
- | 324 | stdcall alloc_pages, (0x280000 / 4096) |
|
- | 325 | ||
- | 326 | push eax |
|
- | 327 | call alloc_page |
|
- | 328 | stdcall map_page_table, LFB_BASE, eax |
|
- | 329 | pop eax |
|
- | 330 | or eax, PG_UW |
|
- | 331 | mov ebx, LFB_BASE |
|
- | 332 | mov ecx, 0x280000 / 4096 |
|
324 | stdcall kernel_alloc, 0x280000 |
333 | call commit_pages |
325 | mov [LFBAddress], eax |
334 | mov [LFBAddress], dword LFB_BASE |
326 | ret |
335 | ret |
327 | @@: |
336 | @@: |
328 | test [SCR_MODE],word 0100000000000000b |
337 | test [SCR_MODE],word 0100000000000000b |
329 | jnz @f |
338 | jnz @f |
Line 332... | Line 341... | ||
332 | @@: |
341 | @@: |
333 | call init_mtrr |
342 | call init_mtrr |
Line 334... | Line 343... | ||
334 | 343 | ||
335 | mov edx, LFB_BASE |
344 | mov edx, LFB_BASE |
336 | mov esi, [LFBAddress] |
345 | mov esi, [LFBAddress] |
337 | mov edi, 0x00800000 |
346 | mov edi, 0x00C00000 |
Line 338... | Line 347... | ||
338 | mov dword [exp_lfb+4], edx |
347 | mov dword [exp_lfb+4], edx |
339 | 348 | ||
340 | shr edi, 12 |
349 | shr edi, 12 |
Line 556... | Line 565... | ||
556 | mov ebp, esp |
565 | mov ebp, esp |
557 | mov ebx, cr2 |
566 | mov ebx, cr2 |
558 | push ebx ;that is locals: .err_addr = cr2 |
567 | push ebx ;that is locals: .err_addr = cr2 |
559 | inc [pg_data.pages_faults] |
568 | inc [pg_data.pages_faults] |
Line 560... | Line -... | ||
560 | - | ||
561 | ; push eax |
- | |
562 | ; push edx |
- | |
563 | ; mov edx, 0x400 ;bochs |
- | |
564 | ; mov al,0xff ;bochs |
- | |
565 | ; out dx, al ;bochs |
- | |
566 | ; pop edx |
- | |
567 | ; pop eax |
- | |
568 | 569 | ||
Line 569... | Line 570... | ||
569 | mov eax, [pf_err_code] |
570 | mov eax, [pf_err_code] |
570 | 571 | ||
Line 590... | Line 591... | ||
590 | .fail: ;simply return to caller |
591 | .fail: ;simply return to caller |
591 | mov esp, ebp |
592 | mov esp, ebp |
592 | pop ebx ;restore exception number (#PF) |
593 | pop ebx ;restore exception number (#PF) |
593 | ret |
594 | ret |
Line -... | Line 595... | ||
- | 595 | ||
- | 596 | ; xchg bx, bx |
|
- | 597 | ; add esp,12 ;clear in stack: locals(.err_addr) + #PF + ret_to_caller |
|
- | 598 | ; restore_ring3_context |
|
- | 599 | ; iretd |
|
594 | 600 | ||
595 | .user_space: |
601 | .user_space: |
596 | test eax, PG_MAP |
602 | test eax, PG_MAP |
597 | jnz .err_access ;Ñòðàíèöà ïðèñóòñòâóåò |
603 | jnz .err_access ;Ñòðàíèöà ïðèñóòñòâóåò |