Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 6262 → Rev 6263

/kernel/trunk/core/exports.inc
56,6 → 56,7
\
get_display, 'GetDisplay', \
set_screen, 'SetScreen', \
set_framebuffer, 'SetFramebuffer', \ ; gcc fastcall
window._.get_rect, 'GetWindowRect', \ ; gcc fastcall
pci_api_drv, 'PciApi', \
pci_read8, 'PciRead8', \ ; stdcall
/kernel/trunk/core/memory.inc
405,95 → 405,6
endp
 
align 4
proc init_LFB
locals
pg_count dd ?
endl
 
cmp dword [LFBAddress], -1
jne @f
mov [BOOT_VARS+BOOT_MTRR], byte 2
; max VGA=640*480*4=1228800 bytes
; + 32*640*4=81920 bytes for mouse pointer
stdcall alloc_pages, ((1228800+81920)/4096)
 
push eax
call alloc_page
stdcall map_page_table, LFB_BASE, eax
pop eax
or eax, PG_UWR
mov ebx, LFB_BASE
; max VGA=640*480*4=1228800 bytes
; + 32*640*4=81920 bytes for mouse pointer
mov ecx, (1228800+81920)/4096
call commit_pages
mov [LFBAddress], dword LFB_BASE
ret
@@:
test [SCR_MODE], word 0100000000000000b
jnz @f
mov [BOOT_VARS+BOOT_MTRR], byte 2
ret
@@:
call init_mtrr
 
mov edx, LFB_BASE
mov esi, [LFBAddress]
mov edi, 0x00C00000
mov dword [exp_lfb+4], edx
 
shr edi, 12
mov [pg_count], edi
shr edi, 10
 
bt [cpu_caps], CAPS_PSE
jnc .map_page_tables
or esi, PDE_LARGE+PG_UWR
mov edx, sys_proc+PROC.pdt_0+(LFB_BASE shr 20)
@@:
mov [edx], esi
add edx, 4
add esi, 0x00400000
dec edi
jnz @B
 
bt [cpu_caps], CAPS_PGE
jnc @F
or dword [sys_proc+PROC.pdt_0+(LFB_BASE shr 20)], PG_GLOBAL
@@:
mov dword [LFBAddress], LFB_BASE
mov eax, cr3 ;flush TLB
mov cr3, eax
ret
 
.map_page_tables:
 
@@:
call alloc_page
stdcall map_page_table, edx, eax
add edx, 0x00400000
dec edi
jnz @B
 
mov eax, [LFBAddress]
mov edi, page_tabs + (LFB_BASE shr 10)
or eax, PG_GLOBAL+PG_UWR
and eax, [pte_valid_mask]
mov ecx, [pg_count]
cld
@@:
stosd
add eax, 0x1000
loop @B
 
mov dword [LFBAddress], LFB_BASE
mov eax, cr3 ;flush TLB
mov cr3, eax
 
ret
endp
 
align 4
proc new_mem_resize stdcall, new_size:dword
 
push ebx
/kernel/trunk/core/taskman.inc
75,7 → 75,7
slot_base dd ?
file_base dd ?
file_size dd ?
handle dd ? ;temp. for default cursor handle for curr. thread
; handle dd ? ;temp. for default cursor handle for curr. thread
;app header data
hdr_cmdline dd ? ;0x00
hdr_path dd ? ;0x04
87,15 → 87,15
 
pushad
 
cmp [SCR_MODE], word 0x13
jbe @f
pushad
stdcall set_cursor, [def_cursor_clock]
mov [handle], eax
mov [redrawmouse_unconditional], 1
call wakeup_osloop
popad
@@:
; cmp [SCR_MODE], word 0x13
; jbe @f
; pushad
; stdcall set_cursor, [def_cursor_clock]
; mov [handle], eax
; mov [redrawmouse_unconditional], 1
; call wakeup_osloop
; popad
;@@:
mov [flags], edx
 
; [ebp] pointer to filename
256,6 → 256,9
test eax, eax
jz .failed
 
mov ebx, [sys_proc+LHEAD.prev]
__list_add eax, ebx, sys_proc
 
mov ebx, [hdr_mem]
mov [eax+PROC.mem_used], ebx
 
274,8 → 277,6
@@:
mov [ebx+APPDATA.tls_base], edx
 
if GREEDY_KERNEL
else
mov ecx, [hdr_mem]
mov edi, [file_size]
add edi, 4095
287,7 → 288,6
cld
rep stosb
@@:
end if
 
; release only virtual space, not phisical memory
 
315,14 → 315,14
call unlock_application_table
mov eax, esi
.final:
cmp [SCR_MODE], word 0x13
jbe @f
pushad
stdcall set_cursor, [handle]
mov [redrawmouse_unconditional], 1
call wakeup_osloop
popad
@@:
; cmp [SCR_MODE], word 0x13
; jbe @f
; pushad
; stdcall set_cursor, [handle]
; mov [redrawmouse_unconditional], 1
; call wakeup_osloop
; popad
;@@:
ret
endp
 
632,12 → 632,12
.internal:
push ecx
 
mov esi, [ecx+PROC.dlls_list_ptr]
mov esi, ecx
list_del esi
 
mov esi, [esi+PROC.dlls_list_ptr]
call destroy_all_hdlls
 
; mov ecx, pg_data.mutex
; call mutex_lock
 
mov esi, [esp]
add esi, PROC.pdt_0
mov edi, (0x80000000 shr 20)/4
657,9 → 657,6
 
call kernel_free ;ecx still in stack
stdcall map_page, [tmp_task_ptab], 0, PG_UNMAP
; mov ecx, pg_data.mutex
; call mutex_unlock
 
.exit:
ret