qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH RESEND v2 14/32] hw/sparc: Use memory_region_init_rom() with


From: KONRAD Frederic
Subject: Re: [PATCH RESEND v2 14/32] hw/sparc: Use memory_region_init_rom() with read-only regions
Date: Tue, 25 Feb 2020 11:32:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0



Le 2/24/20 à 9:55 PM, Philippe Mathieu-Daudé a écrit :
This commit was produced with the Coccinelle script
scripts/coccinelle/memory-region-housekeeping.cocci.

Signed-off-by: Philippe Mathieu-Daudé <address@hidden>

Looks good to me.

Reviewed-by: KONRAD Frederic <address@hidden>

Thanks,
Fred

---
  hw/sparc/leon3.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index f5a087dd86..23d0bdbd71 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -256,8 +256,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 */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]