4 Contact: Eugene Epshteyn <eugene.epshteyn@intel.com>
5 Description: 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
10 Note: A sysfs based one was not appropriate for the
11 RAR handler's usage model.
13 =========================================================
15 =========================================================
18 Description: Reserve RAR block.
19 Type: struct RAR_block_info
21 Errors: EINVAL (invalid RAR type or size)
22 ENOMEM (not enough RAR memory)
26 Description: Get RAR statistics.
29 Errors: EINVAL (invalid RAR type)
33 Description: Release previously reserved RAR block.
34 Type: 32 bit unsigned integer
35 (e.g. uint32_t), i.e the RAR "handle".
37 Errors: EINVAL (invalid RAR handle)
40 =========================================================
41 ioctl() Request Parameter Types
42 =========================================================
43 The structures referred to above are defined as
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]
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".
63 struct RAR_block_info {
70 * struct RAR_stat - RAR statistics structure
71 * @type: Type of RAR memory (e.g.,
73 * RAR_TYPE_AUDIO) [in]
74 * @capacity: Total size of RAR memory
76 * @largest_block_size: Size of the largest reservable
79 * This structure is used for RAR_HANDLER_STAT ioctl.
84 __u32 largest_block_size;
87 Lastly, the RAR_HANDLER_RELEASE ioctl expects a
88 "handle" to the RAR block of memory. It is a 32 bit