diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-04-26 16:49:23 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-04-26 16:49:23 +0100 |
commit | cc05c43ad942165ecc6ffd39e41991bee43af044 (patch) | |
tree | 9177b464e37e5fac8cbc9db9534515fac82c996e /softmmu_template.h | |
parent | e1a5476354d396773e4c555f126d752d4ae58fa9 (diff) |
memory: Define API for MemoryRegionOps to take attrs and return status
Define an API so that devices can register MemoryRegionOps whose read
and write callback functions are passed an arbitrary pointer to some
transaction attributes and can return a success-or-failure status code.
This will allow us to model devices which:
* behave differently for ARM Secure/NonSecure memory accesses
* behave differently for privileged/unprivileged accesses
* may return a transaction failure (causing a guest exception)
for erroneous accesses
This patch defines the new API and plumbs the attributes parameter through
to the memory.c public level functions io_mem_read() and io_mem_write(),
where it is currently dummied out.
The success/failure response indication is also propagated out to
io_mem_read() and io_mem_write(), which retain the old-style
boolean true-for-error return.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'softmmu_template.h')
0 files changed, 0 insertions, 0 deletions