Rev 2130 | Rev 2434 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2130 | Rev 2217 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2009. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2009. 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: 2130 $ |
8 | $Revision: 2217 $ |
9 | 9 | ||
Line 169... | Line 169... | ||
169 | proc map_io_mem stdcall, base:dword, size:dword, flags:dword |
169 | proc map_io_mem stdcall, base:dword, size:dword, flags:dword |
Line 170... | Line 170... | ||
170 | 170 | ||
171 | push ebx |
171 | push ebx |
172 | push edi |
172 | push edi |
- | 173 | mov eax, [size] |
|
173 | mov eax, [size] |
174 | add eax, [base] |
174 | add eax, 4095 |
175 | add eax, 4095 |
- | 176 | and eax, -4096 |
|
- | 177 | mov ecx, [base] |
|
- | 178 | and ecx, -4096 |
|
175 | and eax, -4096 |
179 | sub eax, ecx |
- | 180 | mov [size], eax |
|
176 | mov [size], eax |
181 | |
177 | stdcall alloc_kernel_space, eax |
182 | stdcall alloc_kernel_space, eax |
178 | test eax, eax |
183 | test eax, eax |
179 | jz .fail |
184 | jz .fail |
Line 187... | Line 192... | ||
187 | shr ecx, 12 |
192 | shr ecx, 12 |
188 | and edx, -4096 |
193 | and edx, -4096 |
189 | or edx, [flags] |
194 | or edx, [flags] |
190 | @@: |
195 | @@: |
191 | mov [page_tabs+eax*4], edx |
196 | mov [page_tabs+eax*4], edx |
192 | ; push eax |
- | |
193 | invlpg [ebx] |
197 | invlpg [ebx] |
194 | ; pop eax |
- | |
195 | inc eax |
198 | inc eax |
196 | add ebx, edi |
199 | add ebx, edi |
197 | add edx, edi |
200 | add edx, edi |
198 | loop @B |
201 | loop @B |