Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2433 → Rev 2434

/kernel/branches/Kolibri-acpi/core/memory.inc
166,6 → 166,7
ret
endp
 
align 4
proc map_io_mem stdcall, base:dword, size:dword, flags:dword
 
push ebx
358,7 → 359,9
cmp dword [LFBAddress], -1
jne @f
mov [BOOT_VAR+0x901c],byte 2
stdcall alloc_pages, (0x280000 / 4096)
; 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
366,7 → 369,9
pop eax
or eax, PG_UW
mov ebx, LFB_BASE
mov ecx, 0x280000 / 4096
; 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
470,7 → 475,8
pop eax
call free_page
 
.next: add edi, 1
.next:
add edi, 1
cmp edi, esi
jb @B
 
797,7 → 803,8
; and eax, 0xFFFFF000
; stdcall map_page, edi, eax
 
@@: mov edi, [lin_addr]
@@:
mov edi, [lin_addr]
and edi, 0xFFFFF000
mov ecx, [buf_size]
add ecx, 4095
857,7 → 864,8
jz .exit
stdcall map_page,edi,eax,PG_UW
 
@@: mov edi, [lin_addr]
@@:
mov edi, [lin_addr]
and edi, 0xFFFFF000
mov ecx, [buf_size]
add ecx, 4095
988,7 → 996,8
add edx, 4095
and edx, not 4095
 
.touch: mov eax, [ecx]
.touch:
mov eax, [ecx]
add ecx, 0x1000
cmp ecx, edx
jb .touch
1299,6 → 1308,11
@@:
ret
 
.26:
stdcall user_unmap, ecx, edx, esi
mov [esp+32], eax
ret
 
.fail:
xor eax, eax
mov [esp+32], eax
1321,8 → 1335,9
dd f68.21 ; load_driver
dd f68.22 ; shmem_open
dd f68.23 ; shmem_close
dd f68.24
dd f68.25
dd f68.24 ; set exception handler
dd f68.25 ; unmask exception
dd f68.26 ; user_unmap
 
 
align 4