The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/sys/memrange.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*
    2  * Memory range attribute operations, peformed on /dev/mem
    3  */
    4 
    5 /* Memory range attributes */
    6 #define MDF_UNCACHEABLE         (1<<0)  /* region not cached */
    7 #define MDF_WRITECOMBINE        (1<<1)  /* region supports "write combine" action */
    8 #define MDF_WRITETHROUGH        (1<<2)  /* write-through cached */
    9 #define MDF_WRITEBACK           (1<<3)  /* write-back cached */
   10 #define MDF_WRITEPROTECT        (1<<4)  /* read-only region */
   11 #define MDF_ATTRMASK            (0x00ffffff)
   12 
   13 #define MDF_FIXBASE             (1<<24) /* fixed base */
   14 #define MDF_FIXLEN              (1<<25) /* fixed length */
   15 #define MDF_FIRMWARE            (1<<26) /* set by firmware (XXX not useful?) */
   16 #define MDF_ACTIVE              (1<<27) /* currently active */
   17 #define MDF_BOGUS               (1<<28) /* we don't like it */
   18 #define MDF_FIXACTIVE           (1<<29) /* can't be turned off */
   19 #define MDF_BUSY                (1<<30) /* range is in use */
   20 
   21 struct mem_range_desc
   22 {
   23         u_int64_t       mr_base;
   24         u_int64_t       mr_len;
   25         int             mr_flags;
   26         char            mr_owner[8];
   27 };
   28 
   29 struct mem_range_op
   30 {
   31         struct mem_range_desc   *mo_desc;
   32         int                     mo_arg[2];
   33 #define MEMRANGE_SET_UPDATE     0
   34 #define MEMRANGE_SET_REMOVE     1
   35         /* XXX want a flag that says "set and undo when I exit" */
   36 };
   37 
   38 #define MEMRANGE_GET    _IOWR('m', 50, struct mem_range_op)
   39 #define MEMRANGE_SET    _IOW('m', 51, struct mem_range_op)
   40 
   41 #ifdef KERNEL
   42 
   43 MALLOC_DECLARE(M_MEMDESC);
   44 
   45 struct mem_range_softc;
   46 struct mem_range_ops
   47 {
   48         void    (*init)(struct mem_range_softc *sc);
   49         int     (*set)(struct mem_range_softc *sc, struct mem_range_desc *mrd, int *arg);
   50         void    (*initAP)(struct mem_range_softc *sc);
   51 };
   52 
   53 struct mem_range_softc 
   54 {
   55         struct mem_range_ops    *mr_op;
   56         int                     mr_cap;
   57         int                     mr_ndesc;
   58         struct mem_range_desc   *mr_desc;
   59 };
   60 
   61 extern struct mem_range_softc mem_range_softc;
   62 
   63 extern int mem_range_attr_get(struct mem_range_desc *mrd, int *arg);
   64 extern int mem_range_attr_set(struct mem_range_desc *mrd, int *arg);
   65 extern void mem_range_AP_init(void);
   66 #endif
   67 

Cache object: 5d2e86f231f3627c6b0618321e75de76


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.