qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Stephen Checkoway <stephen.checkoway@oberlin.edu>,
	qemu-block@nongnu.org,
	David Edmondson <david.edmondson@oracle.com>,
	qemu-arm@nongnu.org, Antony Pavlov <antonynpavlov@gmail.com>
Subject: Re: [PATCH v2 5/7] hw/arm/digic: Map flash using memory_region_add_subregion_aliased()
Date: Wed, 21 Apr 2021 18:43:50 -0700	[thread overview]
Message-ID: <dec790d2-9fa7-169b-c2c7-2b8ab3ac187d@linaro.org> (raw)
In-Reply-To: <20210419094329.1402767-6-f4bug@amsat.org>

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-system-arm -M canon-a1100 -S -monitor stdio
>    QEMU 5.2.90 monitor - type 'help' for more information
>    (qemu) info mtree
>    address-space: memory
>      0000000000000000-ffffffffffffffff (prio 0, i/o): system
>        0000000000000000-0000000003ffffff (prio 0, ram): ram
>        00000000c0210000-00000000c02100ff (prio 0, i/o): digic-timer
>        00000000c0210100-00000000c02101ff (prio 0, i/o): digic-timer
>        00000000c0210200-00000000c02102ff (prio 0, i/o): digic-timer
>        00000000c0800000-00000000c0800017 (prio 0, i/o): digic-uart
>        00000000f8000000-00000000ffffffff (prio 0, i/o): pflash
>          00000000f8000000-00000000f83fffff (prio 0, romd): alias pflash-alias @pflash 0000000000000000-00000000003fffff
>          00000000f8400000-00000000f87fffff (prio 0, romd): alias pflash-alias @pflash 0000000000000000-00000000003fffff
>          00000000f8800000-00000000f8bfffff (prio 0, romd): alias pflash-alias @pflash 0000000000000000-00000000003fffff
>          ...
>          00000000ff400000-00000000ff7fffff (prio 0, romd): alias pflash-alias @pflash 0000000000000000-00000000003fffff
>          00000000ff800000-00000000ffbfffff (prio 0, romd): alias pflash-alias @pflash 0000000000000000-00000000003fffff
>          00000000ffc00000-00000000ffffffff (prio 0, romd): alias pflash-alias @pflash 0000000000000000-00000000003fffff
> 
> * after:
> 
>    (qemu) info mtree
>    address-space: memory
>      0000000000000000-ffffffffffffffff (prio 0, i/o): system
>        0000000000000000-0000000003ffffff (prio 0, ram): ram
>        00000000c0210000-00000000c02100ff (prio 0, i/o): digic-timer
>        00000000c0210100-00000000c02101ff (prio 0, i/o): digic-timer
>        00000000c0210200-00000000c02102ff (prio 0, i/o): digic-timer
>        00000000c0800000-00000000c0800017 (prio 0, i/o): digic-uart
>        00000000f8000000-00000000ffffffff (prio 0, i/o): masked pflash [span of 4 MiB]
>          00000000f8000000-00000000f83fffff (prio 0, romd): alias pflash [#0/32] @pflash 0000000000000000-00000000003fffff
>          00000000f8400000-00000000f87fffff (prio 0, romd): alias pflash [#1/32] @pflash 0000000000000000-00000000003fffff
>          00000000f8800000-00000000f8bfffff (prio 0, romd): alias pflash [#2/32] @pflash 0000000000000000-00000000003fffff
>          ...
>          00000000ff400000-00000000ff7fffff (prio 0, romd): alias pflash [#29/32] @pflash 0000000000000000-00000000003fffff
>          00000000ff800000-00000000ffbfffff (prio 0, romd): alias pflash [#30/32] @pflash 0000000000000000-00000000003fffff
>          00000000ffc00000-00000000ffffffff (prio 0, romd): alias pflash [#31/32] @pflash 0000000000000000-00000000003fffff
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   hw/arm/digic_boards.c | 8 +++++---
>   hw/arm/Kconfig        | 1 +
>   2 files changed, 6 insertions(+), 3 deletions(-)

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

r~


  reply	other threads:[~2021-04-22  1:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19  9:43 [PATCH v2 0/7] hw/misc: Add memory_region_add_subregion_aliased() helper [pflash part] Philippe Mathieu-Daudé
2021-04-19  9:43 ` [RFC PATCH v2 1/7] hw/misc: Add device to help managing aliased memory regions Philippe Mathieu-Daudé
2021-04-22  1:33   ` Richard Henderson
2021-07-06 21:24     ` Philippe Mathieu-Daudé
2021-04-19  9:43 ` [PATCH v2 2/7] hw/arm/musicpal: Open-code pflash_cfi02_register() call Philippe Mathieu-Daudé
2021-04-22  1:37   ` Richard Henderson
2021-04-19  9:43 ` [PATCH v2 3/7] hw/arm/musicpal: Map flash using memory_region_add_subregion_aliased() Philippe Mathieu-Daudé
2021-04-22  1:41   ` Richard Henderson
2021-04-19  9:43 ` [PATCH v2 4/7] hw/arm/digic: Open-code pflash_cfi02_register() call Philippe Mathieu-Daudé
2021-04-22  1:42   ` Richard Henderson
2021-04-19  9:43 ` [PATCH v2 5/7] hw/arm/digic: Map flash using memory_region_add_subregion_aliased() Philippe Mathieu-Daudé
2021-04-22  1:43   ` Richard Henderson [this message]
2021-04-19  9:43 ` [PATCH v2 6/7] hw/block/pflash_cfi02: Remove pflash_setup_mappings() Philippe Mathieu-Daudé
2021-04-22  1:47   ` Richard Henderson
2021-04-19  9:43 ` [PATCH v2 7/7] hw/block/pflash_cfi02: Simplify pflash_cfi02_register() prototype Philippe Mathieu-Daudé
2021-04-22  1:48   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dec790d2-9fa7-169b-c2c7-2b8ab3ac187d@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=antonynpavlov@gmail.com \
    --cc=david.edmondson@oracle.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stephen.checkoway@oberlin.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).