]> rtime.felk.cvut.cz Git - lisovros/qemu_apohw.git/commitdiff
spapr_nvram: Correct max nvram size
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Fri, 4 Apr 2014 07:26:26 +0000 (18:26 +1100)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:26 +0000 (13:24 +0200)
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 <thuth@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/nvram/spapr_nvram.c

index 635713e7663e2e868764032cdfe7427bb6bd859c..af49c4667d8dcfb2df444437729f8863fa9d5ea1 100644 (file)
@@ -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,