~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to drivers/staging/memrar/memrar-abi

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
What:           /dev/memrar
 
2
Date:           March 2010
 
3
KernelVersion:  2.6.34
 
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
 
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.