Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1598 → Rev 1599

/kernel/branches/Kolibri-A/trunk/core/memory.inc
337,41 → 337,36
 
align 4
proc init_LFB
locals
pg_count dd ?
endl
 
cmp dword [LFBAddress], -1
jne @f
mov [BOOT_VAR+0x901c],byte 2
stdcall alloc_pages, (0x280000 / 4096)
 
push eax
call alloc_page
stdcall map_page_table, LFB_BASE, eax
pop eax
or eax, PG_UW
mov ebx, LFB_BASE
mov ecx, 0x280000 / 4096
call commit_pages
mov [LFBAddress], dword LFB_BASE
ret
@@:
test [SCR_MODE],word 0100000000000000b
jnz @f
mov [BOOT_VAR+0x901c],byte 2
ret
@@:
; cmp dword [LFBAddress], -1
; jne @f
;
; mov esi, boot_framebuf
; call boot_log
;
; mov [BOOT_VAR+0x901c],byte 2
; stdcall alloc_pages, (0x280000 / 4096)
;
; push eax
; call alloc_page
; stdcall map_page_table, LFB_BASE, eax
; pop eax
; or eax, PG_UW
; mov ebx, LFB_BASE
; mov ecx, 0x280000 / 4096
; call commit_pages
; mov [LFBAddress], dword LFB_BASE
; ret
;@@:
call init_mtrr
 
mov edx, LFB_BASE
mov esi, [LFBAddress]
mov edi, 0x00C00000
mov edi, 0x00C00000 ; 12Mb
mov dword [exp_lfb+4], edx
 
shr edi, 12
mov [pg_count], edi
shr edi, 10
shr edi, 12 ; C00
; mov [pg_count], edi
shr edi, 10 ; 3
 
or esi, PG_GLOBAL+PG_LARGE+PG_UW
mov edx, sys_pgdir+(LFB_BASE shr 20)
389,16 → 384,11
endp
 
align 4
proc init_userDMA
init_userDMA:
stdcall alloc_pages, 4096 ; 16M <<<<<<<<<<+++++++++++++++++++++++++++++++++
add eax, 0x007FFFF0
add eax, 0x007FFFF0 ; terrible mess, sorry ...
and eax, 0xFF800000 ; align at 8M boundary
mov [UserDMAaddr], eax
; or eax, PG_UW + PG_NOCACHE
; mov ebx, USER_DMA_BUFFER
; mov ecx, 2048 ; 8M, to be sure
; call commit_pages
; mov eax, [UserDMAaddr]
or eax, PG_LARGE + PG_UW + PG_NOCACHE
mov ebx, sys_pgdir + (USER_DMA_BUFFER shr 20)
mov [ebx], eax
405,8 → 395,9
add ebx, 4
add eax, 0x00400000
mov [ebx], eax
mov eax, cr3 ;flush TLB
mov cr3, eax
ret
endp
 
align 4
proc new_mem_resize stdcall, new_size:dword
/kernel/branches/Kolibri-A/trunk/core/syscall.inc
99,7 → 99,7
dd 0
dd 0
dd 0
dd 0;sys_pci ; 62-PCI functions
dd sys_pci ; 62-PCI functions
dd sys_msg_board ; 63-System message board
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
170,7 → 170,7
dd undefined_syscall ; 59-reserved
dd sys_IPC ; 60-Inter Process Communication
dd sys_gs ; 61-Direct graphics access
dd pci_api;cross_order ; 62-PCI functions
dd cross_order ; 62-PCI functions
dd cross_order ; 63-System message board
dd sys_resize_app_memory ; 64-Resize application memory usage
dd sys_putimage_palette ; 65-PutImagePalette