~ubuntu-branches/ubuntu/vivid/qemu-linaro/vivid

« back to all changes in this revision

Viewing changes to memory.h

  • Committer: Ricardo Salveti de Araujo
  • Date: 2012-09-20 18:39:31 UTC
  • mfrom: (12922.1.2 qemu-linaro)
  • Revision ID: ricardo.salveti@linaro.org-20120920183931-sp3cg6kpdl8dmwo9
* New upstream release.
  - support emulated systems with more than 2G of memory. (LP: #1030588)
* Drop powerpc-missing-include.patch - merged upstream.
* Update debian/control:
  - drop perl build dependency.
  - add libfdt-dev build dependency.
* Update debian/qemu-keymaps.install file.
* Update debian/rules:
  - update QEMU_CPU for ARM architecture: armv4l -> armv7l.
  - update conf_audio_drv: default to PulseAudio since PA is the default on
    Ubuntu.
  - enable KVM on ARM architecture.
  - enable flat device tree support (--enable-fdt). (LP: #1030594)

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
    CPUWriteMemoryFunc *write[3];
44
44
};
45
45
 
 
46
/* Internal use; thunks between old-style IORange and MemoryRegions. */
 
47
typedef struct MemoryRegionIORange MemoryRegionIORange;
 
48
struct MemoryRegionIORange {
 
49
    IORange iorange;
 
50
    MemoryRegion *mr;
 
51
    target_phys_addr_t offset;
 
52
};
 
53
 
46
54
/*
47
55
 * Memory region callbacks
48
56
 */
117
125
    target_phys_addr_t addr;
118
126
    void (*destructor)(MemoryRegion *mr);
119
127
    ram_addr_t ram_addr;
120
 
    IORange iorange;
121
128
    bool subpage;
122
129
    bool terminates;
123
130
    bool readable;
191
198
    void (*log_global_start)(MemoryListener *listener);
192
199
    void (*log_global_stop)(MemoryListener *listener);
193
200
    void (*eventfd_add)(MemoryListener *listener, MemoryRegionSection *section,
194
 
                        bool match_data, uint64_t data, int fd);
 
201
                        bool match_data, uint64_t data, EventNotifier *e);
195
202
    void (*eventfd_del)(MemoryListener *listener, MemoryRegionSection *section,
196
 
                        bool match_data, uint64_t data, int fd);
 
203
                        bool match_data, uint64_t data, EventNotifier *e);
197
204
    /* Lower = earlier (during add), later (during del) */
198
205
    unsigned priority;
199
206
    MemoryRegion *address_space_filter;
332
339
bool memory_region_is_ram(MemoryRegion *mr);
333
340
 
334
341
/**
 
342
 * memory_region_is_romd: check whether a memory region is ROMD
 
343
 *
 
344
 * Returns %true is a memory region is ROMD and currently set to allow
 
345
 * direct reads.
 
346
 *
 
347
 * @mr: the memory region being queried
 
348
 */
 
349
static inline bool memory_region_is_romd(MemoryRegion *mr)
 
350
{
 
351
    return mr->rom_device && mr->readable;
 
352
}
 
353
 
 
354
/**
335
355
 * memory_region_name: get a memory region's name
336
356
 *
337
357
 * Returns the string that was used to initialize the memory region.
521
541
                               unsigned size,
522
542
                               bool match_data,
523
543
                               uint64_t data,
524
 
                               int fd);
 
544
                               EventNotifier *e);
525
545
 
526
546
/**
527
547
 * memory_region_del_eventfd: Cancel an eventfd.
541
561
                               unsigned size,
542
562
                               bool match_data,
543
563
                               uint64_t data,
544
 
                               int fd);
 
564
                               EventNotifier *e);
 
565
 
545
566
/**
546
567
 * memory_region_add_subregion: Add a subregion to a container.
547
568
 *
659
680
MemoryRegionSection memory_region_find(MemoryRegion *address_space,
660
681
                                       target_phys_addr_t addr, uint64_t size);
661
682
 
 
683
/**
 
684
 * memory_region_section_addr: get offset within MemoryRegionSection
 
685
 *
 
686
 * Returns offset within MemoryRegionSection
 
687
 *
 
688
 * @section: the memory region section being queried
 
689
 * @addr: address in address space
 
690
 */
 
691
static inline target_phys_addr_t
 
692
memory_region_section_addr(MemoryRegionSection *section,
 
693
                           target_phys_addr_t addr)
 
694
{
 
695
    addr -= section->offset_within_address_space;
 
696
    addr += section->offset_within_region;
 
697
    return addr;
 
698
}
662
699
 
663
700
/**
664
701
 * memory_global_sync_dirty_bitmap: synchronize the dirty log for all memory