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  * $FreeBSD: src/sys/sys/memrange.h,v 1.7 2004/08/04 18:30:31 markm Exp $
    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: c7f4c799563c749e664ec50fd8d17063


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