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-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-2  -  FREEBSD-11-1  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-4  -  FREEBSD-10-3  -  FREEBSD-10-2  -  FREEBSD-10-1  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-3  -  FREEBSD-9-2  -  FREEBSD-9-1  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-4  -  FREEBSD-8-3  -  FREEBSD-8-2  -  FREEBSD-8-1  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-4  -  FREEBSD-7-3  -  FREEBSD-7-2  -  FREEBSD-7-1  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-4  -  FREEBSD-6-3  -  FREEBSD-6-2  -  FREEBSD-6-1  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-5  -  FREEBSD-5-4  -  FREEBSD-5-3  -  FREEBSD-5-2  -  FREEBSD-5-1  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  linux-2.6  -  linux-2.4.22  -  MK83  -  MK84  -  PLAN9  -  DFBSD  -  NETBSD  -  NETBSD5  -  NETBSD4  -  NETBSD3  -  NETBSD20  -  OPENBSD  -  xnu-517  -  xnu-792  -  xnu-792.6.70  -  xnu-1228  -  xnu-1456.1.26  -  xnu-1699.24.8  -  xnu-2050.18.24  -  OPENSOLARIS  -  minix-3-1-1 
SearchContext: -  none  -  3  -  10 

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

Cache object: 008686d6f32008742e53fdbd33f84596


[ 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.