Add qemu 2.4.0
[kvmfornfv.git] / qemu / roms / SLOF / slof / fs / dma-function.fs
1 \ *****************************************************************************
2 \ * Copyright (c) 2004, 2014 IBM Corporation
3 \ * All rights reserved.
4 \ * This program and the accompanying materials
5 \ * are made available under the terms of the BSD License
6 \ * which accompanies this distribution, and is available at
7 \ * http://www.opensource.org/licenses/bsd-license.php
8 \ *
9 \ * Contributors:
10 \ *     IBM Corporation - initial implementation
11 \ ****************************************************************************/
12
13 \ DMA memory allocation functions
14 : dma-alloc ( size -- virt )
15    my-phandle TO calling-child
16    s" dma-alloc" my-phandle parent $call-static
17    0 TO calling-child
18 ;
19
20 : dma-free ( virt size -- )
21    my-phandle TO calling-child
22    s" dma-free" my-phandle parent $call-static
23    0 TO calling-child
24 ;
25
26 : dma-map-in ( virt size cacheable? -- devaddr )
27    my-phandle TO calling-child
28    s" dma-map-in" my-phandle parent $call-static
29    0 TO calling-child
30 ;
31
32 : dma-map-out ( virt devaddr size -- )
33    my-phandle TO calling-child
34    s" dma-map-out" my-phandle parent $call-static
35    0 TO calling-child
36 ;