Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2434 → Rev 2433

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