qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH v2 3/7] hw/arm/musicpal: Map flash using memory_region_add_su


From: Richard Henderson
Subject: Re: [PATCH v2 3/7] hw/arm/musicpal: Map flash using memory_region_add_subregion_aliased()
Date: Wed, 21 Apr 2021 18:41:05 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 4/19/21 2:43 AM, Philippe Mathieu-Daudé wrote:
Instead of using a device specific feature for mapping the
flash memory multiple times over a wider region, use the
generic memory_region_add_subregion_aliased() helper.

There is no change in the memory layout:

- before:

   (qemu) info mtree
   00000000fe000000-00000000ffffffff (prio 0, i/o): pflash
     00000000fe000000-00000000fe7fffff (prio 0, romd): alias pflash-alias 
@musicpal.flash 0000000000000000-00000000007fffff
     00000000fe800000-00000000feffffff (prio 0, romd): alias pflash-alias 
@musicpal.flash 0000000000000000-00000000007fffff
     00000000ff000000-00000000ff7fffff (prio 0, romd): alias pflash-alias 
@musicpal.flash 0000000000000000-00000000007fffff
     00000000ff800000-00000000ffffffff (prio 0, romd): alias pflash-alias 
@musicpal.flash 0000000000000000-00000000007fffff

- after:

   00000000fe000000-00000000ffffffff (prio 0, i/o): masked musicpal.flash [span 
of 8 MiB]
     00000000fe000000-00000000fe7fffff (prio 0, romd): alias musicpal.flash 
[#0/4] @musicpal.flash 0000000000000000-00000000007fffff
     00000000fe800000-00000000feffffff (prio 0, romd): alias musicpal.flash 
[#1/4] @musicpal.flash 0000000000000000-00000000007fffff
     00000000ff000000-00000000ff7fffff (prio 0, romd): alias musicpal.flash 
[#2/4] @musicpal.flash 0000000000000000-00000000007fffff
     00000000ff800000-00000000ffffffff (prio 0, romd): alias musicpal.flash 
[#3/4] @musicpal.flash 0000000000000000-00000000007fffff

Flatview is the same:

   (qemu) info mtree -f
   FlatView #0
    AS "memory", root: system
    AS "cpu-memory-0", root: system
    AS "emac-dma", root: system
    Root memory region: system
     00000000fe000000-00000000fe7fffff (prio 0, romd): musicpal.flash
     00000000fe800000-00000000feffffff (prio 0, romd): musicpal.flash
     00000000ff000000-00000000ff7fffff (prio 0, romd): musicpal.flash
     00000000ff800000-00000000ffffffff (prio 0, romd): musicpal.flash

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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