File:  [Qemu by Fabrice Bellard] / qemu / iorange.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 18:33:39 2018 UTC (3 years, 1 month ago) by root
Branches: qemu, MAIN
CVS tags: qemu1001, qemu1000, qemu0151, qemu0150, qemu0141, qemu0140, HEAD
qemu 0.14.0

    1: #ifndef IORANGE_H
    2: #define IORANGE_H
    3: 
    4: #include <stdint.h>
    5: 
    6: typedef struct IORange IORange;
    7: typedef struct IORangeOps IORangeOps;
    8: 
    9: struct IORangeOps {
   10:     void (*read)(IORange *iorange, uint64_t offset, unsigned width,
   11:                  uint64_t *data);
   12:     void (*write)(IORange *iorange, uint64_t offset, unsigned width,
   13:                   uint64_t data);
   14: };
   15: 
   16: struct IORange {
   17:     const IORangeOps *ops;
   18:     uint64_t base;
   19:     uint64_t len;
   20: };
   21: 
   22: static inline void iorange_init(IORange *iorange, const IORangeOps *ops,
   23:                                 uint64_t base, uint64_t len)
   24: {
   25:     iorange->ops = ops;
   26:     iorange->base = base;
   27:     iorange->len = len;
   28: }
   29: 
   30: #endif

unix.superglobalmegacorp.com