Rev 889 | Rev 897 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 889 | Rev 890 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 889 $ |
8 | $Revision: 890 $ |
9 | 9 | ||
10 | 10 | ||
Line 27... | Line 27... | ||
27 | map_space: ;not implemented |
27 | map_space: ;not implemented |
Line 28... | Line 28... | ||
28 | 28 | ||
Line -... | Line 29... | ||
- | 29 | ||
- | 30 | ret |
|
29 | 31 | ||
Line 30... | Line 32... | ||
30 | ret |
32 | align 4 |
Line 31... | Line 33... | ||
31 | 33 | _MapIoMem: |
|
Line 69... | Line 71... | ||
69 | ; eax= page base + page flags |
71 | ; eax= page base + page flags |
70 | ; ebx= linear address |
72 | ; ebx= linear address |
71 | ; ecx= count |
73 | ; ecx= count |
Line 72... | Line 74... | ||
72 | 74 | ||
- | 75 | align 4 |
|
73 | align 4 |
76 | _CommitPages: |
74 | commit_pages: |
77 | commit_pages: |
75 | push edi |
78 | push edi |
76 | test ecx, ecx |
79 | test ecx, ecx |
Line 134... | Line 137... | ||
134 | ; param |
137 | ; param |
135 | ; eax= base |
138 | ; eax= base |
136 | ; ecx= count |
139 | ; ecx= count |
Line 137... | Line 140... | ||
137 | 140 | ||
- | 141 | align 4 |
|
138 | align 4 |
142 | _UnmapPages: |
Line 139... | Line 143... | ||
139 | unmap_pages: |
143 | unmap_pages: |
Line 140... | Line 144... | ||
140 | 144 | ||
Line 360... | Line 364... | ||
360 | ; |
364 | ; |
361 | ; retval |
365 | ; retval |
362 | ; eax= phisical page address |
366 | ; eax= phisical page address |
Line 363... | Line 367... | ||
363 | 367 | ||
- | 368 | align 4 |
|
364 | align 4 |
369 | _GetPgAddr: |
365 | get_pg_addr: |
370 | get_pg_addr: |
366 | shr eax, 12 |
371 | shr eax, 12 |
367 | mov eax, [page_tabs+eax*4] |
372 | mov eax, [page_tabs+eax*4] |
368 | and eax, 0xFFFFF000 |
373 | and eax, 0xFFFFF000 |
Line 858... | Line 863... | ||
858 | push 2 |
863 | push 2 |
859 | jmp .ret |
864 | jmp .ret |
860 | .buffer_overflow: |
865 | .buffer_overflow: |
861 | push 3 |
866 | push 3 |
862 | .ret: |
867 | .ret: |
863 | mov eax, [used_buf] |
868 | mov ecx, [used_buf] |
864 | cmp eax, [ipc_tmp] |
869 | cmp ecx, [ipc_tmp] |
865 | jz @f |
870 | jz @f |
- | 871 | ||
866 | stdcall free_kernel_space,eax |
872 | call @mem_free@4 |
867 | @@: |
873 | @@: |
868 | pop eax |
874 | pop eax |
869 | popf |
875 | popf |
870 | ret |
876 | ret |
871 | endp |
877 | endp |
Line 1103... | Line 1109... | ||
1103 | pop ecx |
1109 | pop ecx |
1104 | ret |
1110 | ret |
1105 | endp |
1111 | endp |
Line 1106... | Line 1112... | ||
1106 | 1112 | ||
- | 1113 | align 4 |
|
1107 | align 4 |
1114 | _CreateRingBuffer: |
1108 | proc create_ring_buffer stdcall, size:dword, flags:dword |
1115 | proc create_ring_buffer stdcall, size:dword, flags:dword |
1109 | locals |
1116 | locals |
1110 | buf_ptr dd ? |
1117 | buf_ptr dd ? |
Line 1149... | Line 1156... | ||
1149 | 1156 | ||
1150 | mov eax, [buf_ptr] |
1157 | mov eax, [buf_ptr] |
1151 | pop ebx |
1158 | pop ebx |
1152 | ret |
1159 | ret |
1153 | .mm_fail: |
1160 | .mm_fail: |
- | 1161 | mov ecx, [buf_ptr] |
|
1154 | ;stdcall free_kernel_space, [buf_ptr] |
1162 | call @mem_free@4 |
1155 | pop ebx |
1163 | pop ebx |
1156 | xor eax, eax |
1164 | xor eax, eax |
1157 | .fail: |
1165 | .fail: |
1158 | ret |
1166 | ret |