mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
memory: Rename readable flag to romd_mode
"Readable" is a very unfortunate name for this flag because even a rom_device region will always be readable from the guest POV. What differs is the mapping, just like the comments had to explain already. Also, readable could currently be understood as being a generic region flag, but it only applies to rom_device regions. So rename the flag and the function to modify it after the original term "ROMD" which could also be interpreted as "ROM direct", i.e. ROM mode with direct access. In any case, the scope of the flag is clearer now. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
4b81126e33
commit
5f9a5ea1c0
4 changed files with 30 additions and 30 deletions
|
@ -105,7 +105,7 @@ static void pflash_timer (void *opaque)
|
|||
DPRINTF("%s: command %02x done\n", __func__, pfl->cmd);
|
||||
/* Reset flash */
|
||||
pfl->status ^= 0x80;
|
||||
memory_region_rom_device_set_readable(&pfl->mem, true);
|
||||
memory_region_rom_device_set_romd(&pfl->mem, true);
|
||||
pfl->wcycle = 0;
|
||||
pfl->cmd = 0;
|
||||
}
|
||||
|
@ -281,7 +281,7 @@ static void pflash_write(pflash_t *pfl, hwaddr offset,
|
|||
|
||||
if (!pfl->wcycle) {
|
||||
/* Set the device in I/O access mode */
|
||||
memory_region_rom_device_set_readable(&pfl->mem, false);
|
||||
memory_region_rom_device_set_romd(&pfl->mem, false);
|
||||
}
|
||||
|
||||
switch (pfl->wcycle) {
|
||||
|
@ -458,7 +458,7 @@ static void pflash_write(pflash_t *pfl, hwaddr offset,
|
|||
"\n", __func__, offset, pfl->wcycle, pfl->cmd, value);
|
||||
|
||||
reset_flash:
|
||||
memory_region_rom_device_set_readable(&pfl->mem, true);
|
||||
memory_region_rom_device_set_romd(&pfl->mem, true);
|
||||
|
||||
pfl->wcycle = 0;
|
||||
pfl->cmd = 0;
|
||||
|
|
|
@ -111,7 +111,7 @@ static void pflash_setup_mappings(pflash_t *pfl)
|
|||
|
||||
static void pflash_register_memory(pflash_t *pfl, int rom_mode)
|
||||
{
|
||||
memory_region_rom_device_set_readable(&pfl->orig_mem, rom_mode);
|
||||
memory_region_rom_device_set_romd(&pfl->orig_mem, rom_mode);
|
||||
pfl->rom_mode = rom_mode;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue