All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Aurelien Jarno <aurelien@aurel32.net>,
	Aleksandar Rikalo <arikalo@wavecomp.com>
Subject: [Qemu-devel] [PULL 13/27] mips_malta: Clean up definition of flash memory size somewhat
Date: Mon, 11 Mar 2019 23:08:29 +0100	[thread overview]
Message-ID: <20190311220843.4026-14-armbru@redhat.com> (raw)
In-Reply-To: <20190311220843.4026-1-armbru@redhat.com>

pflash_cfi01_register() takes a size in bytes, a block size in bytes
and a number of blocks.  mips_malta_init() passes BIOS_SIZE, 65536,
FLASH_SIZE >> 16.  Actually consistent only because BIOS_SIZE (defined
in include/hw/mips/bios.h as (4 * MiB)) matches FLASH_SIZE (defined
locally as 0x400000).  Confusing all the same.

Pass FLASH_SIZE instead of BIOS_SIZE.

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Aleksandar Rikalo <arikalo@wavecomp.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20190308094610.21210-14-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 hw/mips/mips_malta.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
index 4dfe06a1a0..2f20f56458 100644
--- a/hw/mips/mips_malta.c
+++ b/hw/mips/mips_malta.c
@@ -1262,7 +1262,7 @@ void mips_malta_init(MachineState *machine)
     /* Load firmware in flash / BIOS. */
     dinfo = drive_get(IF_PFLASH, 0, fl_idx);
     fl = pflash_cfi01_register(FLASH_ADDRESS, NULL, "mips_malta.bios",
-                               BIOS_SIZE,
+                               FLASH_SIZE,
                                dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
                                65536, FLASH_SIZE >> 16,
                                4, 0x0000, 0x0000, 0x0000, 0x0000, be);
-- 
2.17.2

  parent reply	other threads:[~2019-03-11 22:09 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 22:08 [Qemu-devel] [PULL 00/27] Pflash and firmware configuration patches for 2019-03-11 Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 01/27] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02 Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 02/27] pflash_cfi01: Do not exit() on guest aborting "write to buffer" Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 03/27] pflash_cfi01: Log use of flawed " Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 04/27] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI* Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 05/27] hw: Use PFLASH_CFI0{1, 2} and TYPE_PFLASH_CFI0{1, 2} Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 06/27] sam460ex: Don't size flash memory to match backing image Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 07/27] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 08/27] ppc405_boards: Don't size flash memory to match backing image Markus Armbruster
2020-03-20 15:25   ` Peter Maydell
2020-03-20 16:10     ` Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 09/27] r2d: Fix flash memory size, sector size, width, device ID Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 10/27] mips_malta: Delete disabled, broken DEBUG_BOARD_INIT code Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 11/27] hw/mips/malta: Remove fl_sectors variable Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 12/27] hw/mips/malta: Restrict 'bios_size' variable scope Markus Armbruster
2019-03-11 22:08 ` Markus Armbruster [this message]
2019-03-11 22:08 ` [Qemu-devel] [PULL 14/27] pflash: Clean up after commit 368a354f02b, part 1 Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 15/27] pflash: Clean up after commit 368a354f02b, part 2 Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 16/27] qdev: Fix latent bug with compat_props and onboard devices Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 17/27] qom: Move compat_props machinery from qdev to QOM Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 18/27] vl: Fix latent bug with -global and onboard devices Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 19/27] sysbus: Fix latent bug with " Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 20/27] vl: Improve legibility of BlockdevOptions queue Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 21/27] vl: Factor configure_blockdev() out of main() Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 22/27] vl: Create block backends before setting machine properties Markus Armbruster
2019-05-16  8:29   ` Michal Privoznik
2019-05-16 11:43     ` Markus Armbruster
2019-05-16 12:44       ` Michal Privoznik
2019-06-03 17:40         ` Markus Armbruster
2019-06-04 13:29           ` Paolo Bonzini
2019-03-11 22:08 ` [Qemu-devel] [PULL 23/27] pflash_cfi01: Add pflash_cfi01_get_blk() helper Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 24/27] pc_sysfw: Remove unused PcSysFwDevice Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 25/27] pc_sysfw: Pass PCMachineState to pc_system_firmware_init() Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 26/27] pc: Support firmware configuration with -blockdev Markus Armbruster
2019-03-11 22:08 ` [Qemu-devel] [PULL 27/27] docs/interop/firmware.json: Prefer -machine to if=pflash Markus Armbruster

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=20190311220843.4026-14-armbru@redhat.com \
    --to=armbru@redhat.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.