Rev 5032 | Rev 5130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5032 | Rev 5057 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. 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: 5032 $ |
8 | $Revision: 5057 $ |
9 | 9 | ||
Line 348... | Line 348... | ||
348 | invlpg [eax] |
348 | invlpg [eax] |
349 | pop ebx |
349 | pop ebx |
350 | ret |
350 | ret |
351 | endp |
351 | endp |
Line -... | Line 352... | ||
- | 352 | ||
- | 353 | uglobal |
|
- | 354 | sb16_buffer_allocated db 0 |
|
- | 355 | endg |
|
- | 356 | ||
- | 357 | ; Allocates [.size] bytes so that the target memory block |
|
- | 358 | ; is inside one 64K page for 24-bit DMA controller, |
|
- | 359 | ; that is, somewhere between 00xx0000h and 00xxFFFFh. |
|
- | 360 | proc alloc_dma24 |
|
- | 361 | ; Implementation note. |
|
- | 362 | ; The only user of that function is SB16 driver, |
|
- | 363 | ; so just return a statically allocated buffer. |
|
- | 364 | virtual at esp |
|
- | 365 | dd ? ; return address |
|
- | 366 | .size dd ? |
|
- | 367 | end virtual |
|
- | 368 | cmp [sb16_buffer_allocated], 0 |
|
- | 369 | jnz .fail |
|
- | 370 | inc [sb16_buffer_allocated] |
|
- | 371 | mov eax, SB16Buffer |
|
- | 372 | ret 4 |
|
- | 373 | .fail: |
|
- | 374 | xor eax, eax |
|
- | 375 | ret 4 |
|
- | 376 | endp |
|
352 | 377 | ||
353 | ; Allocates a physical page for master page table |
378 | ; Allocates a physical page for master page table |
354 | ; that duplicates first Mb of OS_BASE at address 0; |
379 | ; that duplicates first Mb of OS_BASE at address 0; |
355 | ; used for starting APs and for shutting down, |
380 | ; used for starting APs and for shutting down, |
356 | ; where it is important to execute code in trivial-mapped pages. |
381 | ; where it is important to execute code in trivial-mapped pages. |