[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-arm] [PATCH v5 12/14] aspeed: use error_report instead of LOG_
From: |
Andrew Jeffery |
Subject: |
Re: [Qemu-arm] [PATCH v5 12/14] aspeed: use error_report instead of LOG_GUEST_ERROR |
Date: |
Tue, 13 Sep 2016 12:20:30 +0930 |
On Fri, 2016-09-09 at 18:22 +0200, Cédric Le Goater wrote:
> Also change the default value used in case of an error. The minimum
> size is a bit severe, so let's just use an average RAM size.
I'm not sure we should be switching the default value in this patch,
but I'm not sure it's worth any effort to split it out either...
Otherwise, both the changes seem sensible enough.
Andrew
>
> Signed-off-by: Cédric Le Goater <address@hidden>
> ---
> hw/misc/aspeed_sdmc.c | 17 +++++++++--------
> 1 file changed, 9 insertions(+), 8 deletions(-)
>
> diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c
> index 1d2825237728..20bcdb52c4df 100644
> --- a/hw/misc/aspeed_sdmc.c
> +++ b/hw/misc/aspeed_sdmc.c
> @@ -9,6 +9,7 @@
>
> #include "qemu/osdep.h"
> #include "qemu/log.h"
> +#include "qemu/error-report.h"
> #include "hw/misc/aspeed_sdmc.h"
> #include "hw/misc/aspeed_scu.h"
> #include "hw/qdev-properties.h"
> @@ -151,13 +152,13 @@ static int ast2400_rambits(void)
> case 512:
> return ASPEED_SDMC_DRAM_512MB;
> default:
> - qemu_log_mask(LOG_GUEST_ERROR, "%s: Invalid RAM size: 0x"
> - RAM_ADDR_FMT "\n", __func__, ram_size);
> break;
> }
>
> - /* set a minimum default */
> - return ASPEED_SDMC_DRAM_64MB;
> + /* use a common default */
> + error_report("warning: Invalid RAM size 0x" RAM_ADDR_FMT
> + ". Using default 256M", ram_size);
> + return ASPEED_SDMC_DRAM_256MB;
> }
>
> static int ast2500_rambits(void)
> @@ -172,13 +173,13 @@ static int ast2500_rambits(void)
> case 1024:
> return ASPEED_SDMC_AST2500_1024MB;
> default:
> - qemu_log_mask(LOG_GUEST_ERROR, "%s: Invalid RAM size: 0x"
> - RAM_ADDR_FMT "\n", __func__, ram_size);
> break;
> }
>
> - /* set a minimum default */
> - return ASPEED_SDMC_AST2500_128MB;
> + /* use a common default */
> + error_report("warning: Invalid RAM size 0x" RAM_ADDR_FMT
> + ". Using default 512M", ram_size);
> + return ASPEED_SDMC_AST2500_512MB;
> }
>
> static void aspeed_sdmc_reset(DeviceState *dev)
signature.asc
Description: This is a digitally signed message part
- [Qemu-arm] [PATCH v5 04/14] palmetto-bmc: rename the Aspeed board file to aspeed.c, (continued)
- [Qemu-arm] [PATCH v5 04/14] palmetto-bmc: rename the Aspeed board file to aspeed.c, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 05/14] palmetto-bmc: replace palmetto_bmc with aspeed, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 06/14] palmetto-bmc: add board specific configuration, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 07/14] hw/misc: use macros to define hw-strap1 register on the AST2400 Aspeed SoC, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 08/14] aspeed: add a ast2500 SoC and support to the SCU and SDMC controllers, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 09/14] arm: add support for an ast2500 evaluation board, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 10/14] palmetto-bmc: remove extra no_sdcard assignement, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 11/14] aspeed: calculate the RAM size bits at realize time, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 12/14] aspeed: use error_report instead of LOG_GUEST_ERROR, Cédric Le Goater, 2016/09/09
- Re: [Qemu-arm] [PATCH v5 12/14] aspeed: use error_report instead of LOG_GUEST_ERROR,
Andrew Jeffery <=
- [Qemu-arm] [PATCH v5 13/14] aspeed: add a ram_size property to the memory controller, Cédric Le Goater, 2016/09/09
- [Qemu-arm] [PATCH v5 14/14] aspeed: allocate RAM after the memory controller has checked the size, Cédric Le Goater, 2016/09/09
- Re: [Qemu-arm] [PATCH v5 00/14] arm: add ast2500 support, Peter Maydell, 2016/09/19