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