hw/mips: Use memory_region_init_rom() with read-only regions

This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.

Reviewed-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
Message-Id: <20200224205533.23798-8-philmd@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2020-02-24 21:55:08 +01:00 committed by Aleksandar Markovic
parent 0009b4f32e
commit 3fab7f2311
4 changed files with 5 additions and 10 deletions

View file

@ -319,9 +319,8 @@ static void mips_fulong2e_init(MachineState *machine)
}
/* allocate RAM */
memory_region_init_ram(bios, NULL, "fulong2e.bios", BIOS_SIZE,
memory_region_init_rom(bios, NULL, "fulong2e.bios", BIOS_SIZE,
&error_fatal);
memory_region_set_readonly(bios, true);
memory_region_add_subregion(address_space_mem, 0, machine->ram);
memory_region_add_subregion(address_space_mem, 0x1fc00000LL, bios);