summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/agp/agpamd64gart_io.h
blob: d40b9fce90a83ae4336a89f4d259fb132270468f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
 * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 * Use is subject to license terms.
 */

#ifndef	_SYS_AGPAMD64GART_IO_H
#define	_SYS_AGPAMD64GART_IO_H

#pragma ident	"%Z%%M%	%I%	%E% SMI"

#ifdef __cplusplus
extern "C" {
#endif

#ifdef _KERNEL

#define	AMD64GART_NAME		"amd64_gart"
#define	CPUGART_DEVLINK		"/dev/agp/cpugart"

#define	AGPAMD64GARTIOC_BASE	'M'

#define	AMD64_GET_INFO		_IOR(AGPAMD64GARTIOC_BASE, 50, amdgart_info_t)
#define	AMD64_SET_GART_ADDR	_IOW(AGPAMD64GARTIOC_BASE, 51, uint32_t)
#define	AMD64_FLUSH_GTLB	_IO(AGPAMD64GARTIOC_BASE, 52)
#define	AMD64_CONFIGURE		_IO(AGPAMD64GARTIOC_BASE, 53)
#define	AMD64_UNCONFIG		_IO(AGPAMD64GARTIOC_BASE, 54)

/* Used to retrieve attributes of the amd64 gart device */
typedef struct amdgart_info {
	uint64_t	cgart_aperbase;
	size_t		cgart_apersize;
} amdgart_info_t;

#endif /* _KERNEL */

#ifdef __cplusplus
}
#endif

#endif /* _SYS_AGPAMD64GART_IO_H */