1/*
2 * Copyright (c) 2006 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20 * DEALINGS IN THE SOFTWARE.
21 *
22 * Neither the name of the Advanced Micro Devices, Inc. nor the names of its
23 * contributors may be used to endorse or promote products derived from this
24 * software without specific prior written permission.
25 */
26
27#ifndef CIMDEV_H_
28#define CIMDEV_H_
29
30#define CIM_RESERVE_MEM 0x01
31#define CIM_FREE_MEM    0x02
32#define CIMDEV_MINOR_DEV 156
33
34/* Block flags */
35#define CIM_F_FREE    0x01      /* This block is marked as free */
36#define CIM_F_CMDBUF  0x02      /* GP command buffer flag */
37#define CIM_F_PRIVATE 0x04      /* This block is reserved only for its owner */
38#define CIM_F_PUBLIC  0x08      /* This block can be used by the world */
39
40typedef struct {
41    /* These fields get populated by the client */
42    char owner[10];
43    char name[15];
44    int flags;
45    int size;
46
47    /* These fields are populated by the device */
48    unsigned long offset;
49} cim_mem_req_t;
50
51typedef struct {
52    char owner[10];
53    unsigned long offset;
54} cim_mem_free_t;
55
56#endif
57