Received: from eggs.gnu.org ([2001:4830:134:3::10]:45992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVyWh-0003j5-Dk for qemu-devel@nongnu.org; Fri, 04 Apr 2014 03:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVyWU-0008Nb-JU for qemu-devel@nongnu.org; Fri, 04 Apr 2014 03:26:59 -0400 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:58085) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVyWT-0008Mv-QO for qemu-devel@nongnu.org; Fri, 04 Apr 2014 03:26:46 -0400 Received: from /spool/local by e23smtp07.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 4 Apr 2014 17:26:39 +1000 From: Alexey Kardashevskiy Date: Fri, 4 Apr 2014 18:26:26 +1100 Message-Id: <1396596386-26126-1-git-send-email-aik@ozlabs.ru> Subject: [Qemu-devel] [PATCH] spapr_nvram: Correct max nvram size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alexey Kardashevskiy , qemu-ppc@nongnu.org, Alexander Graf , Thomas Huth Currently it is UINT16_MAX*16 = 65536*16 = 1048560 which is not a round number and therefore a bit confusing. This defines MAX_NVRAM_SIZE precisely as 1MB. Suggested-by: Thomas Huth Signed-off-by: Alexey Kardashevskiy --- hw/nvram/spapr_nvram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c index 635713e..af49c46 100644 --- a/hw/nvram/spapr_nvram.c +++ b/hw/nvram/spapr_nvram.c @@ -42,7 +42,7 @@ typedef struct sPAPRNVRAM { #define MIN_NVRAM_SIZE 8192 #define DEFAULT_NVRAM_SIZE 65536 -#define MAX_NVRAM_SIZE (UINT16_MAX * 16) +#define MAX_NVRAM_SIZE 1048576 static void rtas_nvram_fetch(PowerPCCPU *cpu, sPAPREnvironment *spapr, uint32_t token, uint32_t nargs, -- 1.8.4.rc4