mirror of https://gitee.com/openkylin/qemu.git
hw/sparc: 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: KONRAD Frederic <frederic.konrad@adacore.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
5ccc751ef8
commit
ec7b217510
|
@ -255,8 +255,7 @@ static void leon3_generic_hw_init(MachineState *machine)
|
|||
|
||||
/* Allocate BIOS */
|
||||
prom_size = 8 * MiB;
|
||||
memory_region_init_ram(prom, NULL, "Leon3.bios", prom_size, &error_fatal);
|
||||
memory_region_set_readonly(prom, true);
|
||||
memory_region_init_rom(prom, NULL, "Leon3.bios", prom_size, &error_fatal);
|
||||
memory_region_add_subregion(address_space_mem, LEON3_PROM_OFFSET, prom);
|
||||
|
||||
/* Load boot prom */
|
||||
|
|
Loading…
Reference in New Issue