[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v4 13/15] mips_malta: Clean up definition of flash
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [Qemu-ppc] [PATCH v4 13/15] mips_malta: Clean up definition of flash memory size somewhat |
Date: |
Fri, 8 Mar 2019 13:32:42 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
On 3/8/19 10:46 AM, Markus Armbruster wrote:
> 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 <address@hidden>
> Cc: Aleksandar Rikalo <address@hidden>
> Signed-off-by: Markus Armbruster <address@hidden>
> Reviewed-by: Alex Bennée <address@hidden>
> Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
> ---
> 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);
>
- [Qemu-ppc] [PATCH v4 07/15] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code, (continued)
- [Qemu-ppc] [PATCH v4 07/15] ppc405_boards: Delete stale, disabled DEBUG_BOARD_INIT code, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 09/15] r2d: Fix flash memory size, sector size, width, device ID, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 08/15] ppc405_boards: Don't size flash memory to match backing image, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 03/15] pflash_cfi01: Log use of flawed "write to buffer", Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 11/15] hw/mips/malta: Remove fl_sectors variable, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 04/15] pflash: Rename *CFI_PFLASH* to *PFLASH_CFI*, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 12/15] hw/mips/malta: Restrict 'bios_size' variable scope, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 13/15] mips_malta: Clean up definition of flash memory size somewhat, Markus Armbruster, 2019/03/08
- Re: [Qemu-ppc] [PATCH v4 13/15] mips_malta: Clean up definition of flash memory size somewhat,
Philippe Mathieu-Daudé <=
- [Qemu-ppc] [PATCH v4 06/15] sam460ex: Don't size flash memory to match backing image, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 01/15] pflash: Rename pflash_t to PFlashCFI01, PFlashCFI02, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 15/15] pflash: Clean up after commit 368a354f02b, part 2, Markus Armbruster, 2019/03/08
- [Qemu-ppc] [PATCH v4 14/15] pflash: Clean up after commit 368a354f02b, part 1, Markus Armbruster, 2019/03/08