aboutsummaryrefslogtreecommitdiff
path: root/include/exec/memory.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-12-14 13:30:48 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-12-14 13:30:48 +0000
commit3c8133f973767460f8e42c9e656f2f3ed703d00d (patch)
treec4c81c69036ee9f15608d4b4cf3ae035a269b09c /include/exec/memory.h
parent75693e14113c0d1c1ebc1e8405e00879d2a11c84 (diff)
downloadqemu-3c8133f973767460f8e42c9e656f2f3ed703d00d.zip
qemu-3c8133f973767460f8e42c9e656f2f3ed703d00d.tar.gz
qemu-3c8133f973767460f8e42c9e656f2f3ed703d00d.tar.bz2
Rename cpu_physical_memory_write_rom() to address_space_write_rom()
The API of cpu_physical_memory_write_rom() is odd, because it takes an AddressSpace, unlike all the other cpu_physical_memory_* access functions. Rename it to address_space_write_rom(), and bring its API into line with address_space_write(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20181122133507.30950-3-peter.maydell@linaro.org
Diffstat (limited to 'include/exec/memory.h')
-rw-r--r--include/exec/memory.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/exec/memory.h b/include/exec/memory.h
index 8e61450..ffd23ed 100644
--- a/include/exec/memory.h
+++ b/include/exec/memory.h
@@ -1792,6 +1792,32 @@ MemTxResult address_space_write(AddressSpace *as, hwaddr addr,
MemTxAttrs attrs,
const uint8_t *buf, int len);
+/**
+ * address_space_write_rom: write to address space, including ROM.
+ *
+ * This function writes to the specified address space, but will
+ * write data to both ROM and RAM. This is used for non-guest
+ * writes like writes from the gdb debug stub or initial loading
+ * of ROM contents.
+ *
+ * Note that portions of the write which attempt to write data to
+ * a device will be silently ignored -- only real RAM and ROM will
+ * be written to.
+ *
+ * Return a MemTxResult indicating whether the operation succeeded
+ * or failed (eg unassigned memory, device rejected the transaction,
+ * IOMMU fault).
+ *
+ * @as: #AddressSpace to be accessed
+ * @addr: address within that address space
+ * @attrs: memory transaction attributes
+ * @buf: buffer with the data transferred
+ * @len: the number of bytes to write
+ */
+MemTxResult address_space_write_rom(AddressSpace *as, hwaddr addr,
+ MemTxAttrs attrs,
+ const uint8_t *buf, int len);
+
/* address_space_ld*: load from an address space
* address_space_st*: store to an address space
*