hw/ppc: Use memory_region_init_rom() with read-only regions
This commit was produced with the Coccinelle script scripts/coccinelle/memory-region-housekeeping.cocci. Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
parent
4f1c3fd35e
commit
1bbd95cb08
@ -155,13 +155,12 @@ static void ppc_core99_init(MachineState *machine)
|
||||
memory_region_add_subregion(get_system_memory(), 0, machine->ram);
|
||||
|
||||
/* allocate and load BIOS */
|
||||
memory_region_init_ram(bios, NULL, "ppc_core99.bios", BIOS_SIZE,
|
||||
memory_region_init_rom(bios, NULL, "ppc_core99.bios", BIOS_SIZE,
|
||||
&error_fatal);
|
||||
|
||||
if (bios_name == NULL)
|
||||
bios_name = PROM_FILENAME;
|
||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
||||
memory_region_set_readonly(bios, true);
|
||||
memory_region_add_subregion(get_system_memory(), PROM_ADDR, bios);
|
||||
|
||||
/* Load OpenBIOS (ELF) */
|
||||
|
@ -129,13 +129,12 @@ static void ppc_heathrow_init(MachineState *machine)
|
||||
memory_region_add_subregion(sysmem, 0, machine->ram);
|
||||
|
||||
/* allocate and load BIOS */
|
||||
memory_region_init_ram(bios, NULL, "ppc_heathrow.bios", BIOS_SIZE,
|
||||
memory_region_init_rom(bios, NULL, "ppc_heathrow.bios", BIOS_SIZE,
|
||||
&error_fatal);
|
||||
|
||||
if (bios_name == NULL)
|
||||
bios_name = PROM_FILENAME;
|
||||
filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name);
|
||||
memory_region_set_readonly(bios, true);
|
||||
memory_region_add_subregion(sysmem, PROM_ADDR, bios);
|
||||
|
||||
/* Load OpenBIOS (ELF) */
|
||||
|
Loading…
Reference in New Issue
Block a user