2 * Memory range attribute operations, peformed on /dev/mem
5 #ifdef HAVE_XORG_CONFIG_H
6 #include <xorg-config.h>
12 /* Memory range attributes */
13 #define MDF_UNCACHEABLE (1<<0) /* region not cached */
14 #define MDF_WRITECOMBINE (1<<1) /* region supports "write combine"
16 #define MDF_WRITETHROUGH (1<<2) /* write-through cached */
17 #define MDF_WRITEBACK (1<<3) /* write-back cached */
18 #define MDF_WRITEPROTECT (1<<4) /* read-only region */
19 #define MDF_ATTRMASK (0x00ffffff)
21 #define MDF_FIXBASE (1<<24) /* fixed base */
22 #define MDF_FIXLEN (1<<25) /* fixed length */
23 #define MDF_FIRMWARE (1<<26) /* set by firmware (XXX not useful?) */
24 #define MDF_ACTIVE (1<<27) /* currently active */
25 #define MDF_BOGUS (1<<28) /* we don't like it */
26 #define MDF_FIXACTIVE (1<<29) /* can't be turned off */
27 #define MDF_BUSY (1<<30) /* range is in use */
29 struct mem_range_desc
{
37 struct mem_range_desc
*mo_desc
;
39 #define MEMRANGE_SET_UPDATE 0
40 #define MEMRANGE_SET_REMOVE 1
41 /* XXX want a flag that says "set and undo when I exit" */
43 #define MEMRANGE_GET _IOWR('m', 50, struct mem_range_op)
44 #define MEMRANGE_SET _IOW('m', 51, struct mem_range_op)
48 struct mem_range_softc
;
49 struct mem_range_ops
{
50 void (*init
) __P((struct mem_range_softc
* sc
));
51 int (*set
) __P((struct mem_range_softc
* sc
, struct mem_range_desc
* mrd
, int *arg
));
52 void (*initAP
) __P((struct mem_range_softc
* sc
));
55 struct mem_range_softc
{
56 struct mem_range_ops
*mr_op
;
59 struct mem_range_desc
*mr_desc
;
62 extern struct mem_range_softc mem_range_softc
;
64 extern int mem_range_attr_get
__P((struct mem_range_desc
* mrd
, int *arg
));
65 extern int mem_range_attr_set
__P((struct mem_range_desc
* mrd
, int *arg
));
66 extern void mem_range_AP_init
__P((void));