qemu-patch-raspberry4/include
Peter Maydell 1228c4596a hw/core/loader: Add new function rom_ptr_for_as()
For accesses to rom blob data before or during reset, we have a
function rom_ptr() which looks for a rom blob that would be loaded to
the specified address, and returns a pointer into the rom blob data
corresponding to that address.  This allows board or CPU code to say
"what is the data that is going to be loaded to this address?".

However, this function does not take account of memory region
aliases.  If for instance a machine model has RAM at address
0x0000_0000 which is aliased to also appear at 0x1000_0000, a
rom_ptr() query for address 0x0000_0000 will only return a match if
the guest image provided by the user was loaded at 0x0000_0000 and
not if it was loaded at 0x1000_0000, even though they are the same
RAM and a run-time guest CPU read of 0x0000_0000 will read the data
loaded to 0x1000_0000.

Provide a new function rom_ptr_for_as() which takes an AddressSpace
argument, so that it can check whether the MemoryRegion corresponding
to the address is also mapped anywhere else in the AddressSpace and
look for rom blobs that loaded to that alias.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210318174823.18066-5-peter.maydell@linaro.org
2021-03-23 11:47:31 +00:00
..
authz Prefer 'on' | 'off' over 'yes' | 'no' for bool options 2021-01-29 17:07:53 +00:00
block emulated nvme updates and fixes 2021-03-18 19:55:37 +00:00
chardev chardev: do not use machine_init_done 2020-12-15 12:51:51 -05:00
crypto qom: Remove module_obj_name parameter from OBJECT_DECLARE* macros 2020-09-18 14:12:32 -04:00
disas Hexagon (disas) disassembler 2021-02-18 07:48:22 -08:00
exec memory: Add offset_in_region to flatview_cb arguments 2021-03-23 11:47:31 +00:00
fpu softfloat: Define comparison operations for bfloat16 2020-08-29 19:25:42 -07:00
hw hw/core/loader: Add new function rom_ptr_for_as() 2021-03-23 11:47:31 +00:00
io io: add qio_channel_readv_full_all_eof & qio_channel_readv_full_all helpers 2021-02-10 09:23:28 +00:00
libdecnumber include: Make headers more self-contained 2019-08-16 13:31:51 +02:00
migration migration: introduce a delete_snapshot wrapper 2021-02-08 11:19:51 +00:00
monitor migrate: remove QMP/HMP commands for speed, downtime and cache size 2021-03-18 09:22:55 +00:00
net net: Add a 'do_not_pad" to NetClientState 2021-03-22 17:34:31 +08:00
qapi qapi: Implement deprecated-input=reject for QMP command arguments 2021-03-19 16:05:11 +01:00
qemu Final fixes for 6.0 2021-03-18 14:57:55 +00:00
qom qom: move user_creatable_add_opts logic to vl.c and QAPIfy it 2021-03-19 10:18:17 +01:00
scsi scsi: inline sg_io_sense_from_errno() into the callers. 2021-03-06 11:42:56 +01:00
semihosting semihosting: Move include/hw/semihosting/ -> include/semihosting/ 2021-03-10 15:34:12 +00:00
standard-headers m68k pull request 20210315 2021-03-17 10:38:27 +00:00
sysemu blockdev: Drop deprecated bogus -drive interface type 2021-03-19 15:18:43 +01:00
tcg tcg/tci: Implement the disassembler properly 2021-03-17 07:24:44 -06:00
ui ui/console: Add placeholder flag to message surface 2021-03-04 09:35:36 +01:00
user trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
elf.h Remove deprecated target tilegx 2021-03-09 11:26:32 +01:00
glib-compat.h glib-compat: add g_unix_get_passwd_entry_qemu() 2020-11-02 19:52:08 -06:00
qemu-common.h qemu-common.h: Update copyright string to 2021 2021-03-09 22:19:24 +01:00
qemu-io.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
trace-tcg.h trace: get rid of generated-events.h/generated-events.c 2016-10-12 09:54:52 +02:00