Rev 294 | Rev 328 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 294 | Rev 321 | ||
---|---|---|---|
Line 229... | Line 229... | ||
229 | endp |
229 | endp |
230 | 230 | ||
Line 231... | Line 231... | ||
231 | align 4 |
231 | align 4 |
232 | proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword |
232 | proc map_page stdcall,lin_addr:dword,phis_addr:dword,flags:dword |
- | 233 | push ebx |
|
233 | mov eax, [phis_addr] |
234 | mov eax, [phis_addr] |
234 | and eax, not 0xFFF |
235 | and eax, not 0xFFF |
235 | or eax, [flags] |
236 | or eax, [flags] |
236 | mov ebx, [lin_addr] |
237 | mov ebx, [lin_addr] |
237 | shr ebx, 12 |
238 | shr ebx, 12 |
238 | mov [pages_tab+ebx*4], eax |
239 | mov [pages_tab+ebx*4], eax |
239 | mov eax, [lin_addr] |
240 | mov eax, [lin_addr] |
240 | invlpg [eax] |
241 | invlpg [eax] |
- | 242 | pop ebx |
|
241 | ret |
243 | ret |
242 | endp |
244 | endp |
Line 243... | Line 245... | ||
243 | 245 | ||
244 | align 4 |
246 | align 4 |
Line 288... | Line 290... | ||
288 | 290 | ||
Line 289... | Line 291... | ||
289 | align 4 |
291 | align 4 |
290 | release_pages: |
292 | release_pages: |
Line 291... | Line 293... | ||
291 | 293 | ||
292 | push ebp |
294 | pushad |
293 | mov ebx, pg_data.pg_mutex |
295 | mov ebx, pg_data.pg_mutex |
Line 294... | Line 296... | ||
294 | call wait_mutex ;ebx |
296 | call wait_mutex ;ebx |
295 | 297 | ||
Line 327... | Line 329... | ||
327 | dec ecx |
329 | dec ecx |
328 | jnz @B |
330 | jnz @B |
329 | mov [pg_data.pages_free], ebp |
331 | mov [pg_data.pages_free], ebp |
330 | and [pg_data.pg_mutex],0 |
332 | and [pg_data.pg_mutex],0 |
331 | pop ebp |
333 | popad |
332 | ret |
334 | ret |
333 | 335 | ||
Line 334... | Line 336... | ||
334 | align 4 |
336 | align 4 |
335 | proc map_page_table stdcall, lin_addr:dword, phis_addr:dword |
337 | proc map_page_table stdcall, lin_addr:dword, phis_addr:dword |
- | 338 | push ebx |
|
336 | mov ebx, [lin_addr] |
339 | mov ebx, [lin_addr] |
337 | shr ebx, 22 |
340 | shr ebx, 22 |
338 | mov eax, [phis_addr] |
341 | mov eax, [phis_addr] |
339 | and eax, not 0xFFF |
342 | and eax, not 0xFFF |
340 | or eax, PG_UW ;+PG_NOCACHE |
343 | or eax, PG_UW ;+PG_NOCACHE |
341 | mov dword [current_pgdir+ebx*4], eax |
344 | mov dword [current_pgdir+ebx*4], eax |
342 | mov eax, [lin_addr] |
345 | mov eax, [lin_addr] |
343 | shr eax, 10 |
346 | shr eax, 10 |
344 | add eax, pages_tab |
347 | add eax, pages_tab |
345 | invlpg [eax] |
348 | invlpg [eax] |
- | 349 | pop ebx |
|
346 | ret |
350 | ret |
347 | endp |
351 | endp |
Line 348... | Line 352... | ||
348 | 352 | ||
349 | align 4 |
353 | align 4 |