diff options
author | Cam Macdonell <cam@cs.ualberta.ca> | 2010-07-26 18:10:57 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2010-08-10 16:25:15 -0500 |
commit | cd6704980d8f16cfb8f9cda64afc810eff5e6726 (patch) | |
tree | 3ad1a2281eeb375fcf8d2ade7576d70cfdd072fb /cpu-common.h | |
parent | b69e11464955ac56dbd06c92c65563fa17163848 (diff) | |
download | qemu-cd6704980d8f16cfb8f9cda64afc810eff5e6726.tar.gz qemu-cd6704980d8f16cfb8f9cda64afc810eff5e6726.tar.bz2 qemu-cd6704980d8f16cfb8f9cda64afc810eff5e6726.zip |
Add qemu_ram_alloc_from_ptr function
Provide a function to add an allocated region of memory to the qemu RAM.
This patch is copied from Marcelo's qemu_ram_map() in qemu-kvm and given the
clearer name qemu_ram_alloc_from_ptr().
Signed-off-by: Cam Macdonell <cam@cs.ualberta.ca>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'cpu-common.h')
-rw-r--r-- | cpu-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cpu-common.h b/cpu-common.h index 71e7933c51..0426bc8e27 100644 --- a/cpu-common.h +++ b/cpu-common.h @@ -40,6 +40,8 @@ static inline void cpu_register_physical_memory(target_phys_addr_t start_addr, } ram_addr_t cpu_get_physical_page_desc(target_phys_addr_t addr); +ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, + ram_addr_t size, void *host); ram_addr_t qemu_ram_alloc(DeviceState *dev, const char *name, ram_addr_t size); void qemu_ram_free(ram_addr_t addr); /* This should only be used for ram local to a device. */ |