Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux
[deliverable/linux.git] / drivers / staging / memrar / memrar-abi
CommitLineData
933025b6
OO
1What: /dev/memrar
2Date: March 2010
d7a75e19
OO
3KernelVersion: 2.6.34
4Contact: Eugene Epshteyn <eugene.epshteyn@intel.com>
933025b6
OO
5Description: The Intel Moorestown Restricted Access Region (RAR)
6 Handler driver exposes an ioctl() based interface that
7 allows a user to reserve and release blocks of RAR
8 memory.
9
10 Note: A sysfs based one was not appropriate for the
11 RAR handler's usage model.
12
13 =========================================================
14 ioctl() Requests
15 =========================================================
16 RAR_HANDLER_RESERVE
17 -------------------
18 Description: Reserve RAR block.
19 Type: struct RAR_block_info
20 Direction: in/out
21 Errors: EINVAL (invalid RAR type or size)
22 ENOMEM (not enough RAR memory)
23
24 RAR_HANDLER_STAT
25 ----------------
26 Description: Get RAR statistics.
27 Type: struct RAR_stat
28 Direction: in/out
29 Errors: EINVAL (invalid RAR type)
30
31 RAR_HANDLER_RELEASE
32 -------------------
33 Description: Release previously reserved RAR block.
34 Type: 32 bit unsigned integer
35 (e.g. uint32_t), i.e the RAR "handle".
36 Direction: in
37 Errors: EINVAL (invalid RAR handle)
38
39
40 =========================================================
41 ioctl() Request Parameter Types
42 =========================================================
43 The structures referred to above are defined as
44 follows:
45
46 /**
47 * struct RAR_block_info - user space struct that
48 * describes RAR buffer
49 * @type: Type of RAR memory (e.g.,
50 * RAR_TYPE_VIDEO or RAR_TYPE_AUDIO) [in]
51 * @size: Requested size of a block in bytes to
52 * be reserved in RAR. [in]
53 * @handle: Handle that can be used to refer to
54 * reserved block. [out]
55 *
56 * This is the basic structure exposed to the user
57 * space that describes a given RAR buffer. It used
58 * as the parameter for the RAR_HANDLER_RESERVE ioctl.
59 * The buffer's underlying bus address is not exposed
60 * to the user. User space code refers to the buffer
61 * entirely by "handle".
62 */
63 struct RAR_block_info {
64 __u32 type;
65 __u32 size;
66 __u32 handle;
67 };
68
69 /**
70 * struct RAR_stat - RAR statistics structure
71 * @type: Type of RAR memory (e.g.,
72 * RAR_TYPE_VIDEO or
73 * RAR_TYPE_AUDIO) [in]
74 * @capacity: Total size of RAR memory
75 * region. [out]
76 * @largest_block_size: Size of the largest reservable
77 * block. [out]
78 *
79 * This structure is used for RAR_HANDLER_STAT ioctl.
80 */
81 struct RAR_stat {
82 __u32 type;
83 __u32 capacity;
84 __u32 largest_block_size;
85 };
86
87 Lastly, the RAR_HANDLER_RELEASE ioctl expects a
88 "handle" to the RAR block of memory. It is a 32 bit
89 unsigned integer.
This page took 0.087608 seconds and 5 git commands to generate.