spapr_nvram: Correct max nvram size
PATCH 1/1 spapr_nvram: Correct max nvram size
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 <[email protected]>
Signed-off-by Alexey Kardashevskiy <[email protected]>
--- hw/nvram/spapr_nvram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/nvram/spapr_nvram.c +1 -1
@@ -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,
Signature · 1 line
1.8.4.rc4
Alexander Graf
AppliedQuoted 7 lines · Alexey Kardashevskiy
Currently it is UINT16_MAX*16 = 65536*16 = 1048560 which is not a round number and therefore a bit confusing.
This defines
MAX_NVRAM_SIZEprecisely as 1MB.Suggested-by Thomas Huth <[email protected]>Signed-off-by Alexey Kardashevskiy <[email protected]>
Thanks, applied to ppc-next-2.1.
Alex