Subversion Repositories Kolibri OS

Rev

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

Rev 6246 Rev 6252
Line 201... Line 201...
201
        call free_kernel_space
201
        call free_kernel_space
202
        jmp     .ok
202
        jmp     .ok
Line 203... Line 203...
203
 
203
 
204
align 4
204
align 4
-
 
205
set_framebuffer:
205
set_framebuffer:
206
        push    esi
206
        mov     edx, LFB_BASE shr 22
207
        push    edi
-
 
208
        lea     esi, [ecx+FRB.pde]
-
 
209
        mov     eax, sys_proc
-
 
210
 
-
 
211
        pushfd
207
        mov     eax, [ecx+FRB.pde]
212
        cli
-
 
213
        mov     [_display.current_lfb], ecx
-
 
214
 
-
 
215
.patch_pde:
208
        mov     dword [master_tab+edx*4], eax
216
        lea     edi, [eax+PROC.pdt_0+4096-32]   ;last 8 pd entries up to 32Mb framebuffer
209
        mov     eax, [ecx+FRB.pde+4]
217
        mov     ecx, 8
-
 
218
        rep movsd                               ;patch pde
-
 
219
        sub     esi, 32
-
 
220
        mov     edi, [eax+PROC.list.next]       ;next process/address space
210
        mov     dword [master_tab+edx*4+4], eax
221
        xchg    eax, edi
-
 
222
        cmp     eax, edi
-
 
223
        jne     .patch_pde
211
        mov     eax, [ecx+FRB.pde+8]
224
 
-
 
225
        bt      [cpu_caps], CAPS_PGE
-
 
226
        jnc     .cr3_flush
212
        mov     dword [master_tab+edx*4+8], eax
227
 
-
 
228
        mov     eax, cr4
-
 
229
        btr     eax, 7                          ;clear cr4.PGE
-
 
230
        mov     cr4, eax                        ;flush TLB
213
        mov     eax, [ecx+FRB.pde+12]
231
        bts     eax, 7
-
 
232
        mov     cr4, eax                        ;flush TLB
-
 
233
.exit:
-
 
234
        popfd
-
 
235
        pop     edi
214
        mov     dword [master_tab+edx*4+12], eax
236
        pop     esi
Line -... Line 237...
-
 
237
        ret
-
 
238
 
-
 
239
.cr3_flush:
-
 
240
        mov     eax, cr3
-
 
241
        mov     cr3, eax                        ;flush TLB