[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 2/6] hw/arm/mps2: Use the IEC binary prefix definitions
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v2 2/6] hw/arm/mps2: Use the IEC binary prefix definitions |
Date: |
Mon, 21 Oct 2019 21:06:49 +0200 |
IEC binary prefixes ease code review: the unit is explicit.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
hw/arm/mps2-tz.c | 3 ++-
hw/arm/mps2.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c
index 6b24aaacde..f8b620bcc6 100644
--- a/hw/arm/mps2-tz.c
+++ b/hw/arm/mps2-tz.c
@@ -38,6 +38,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/arm/boot.h"
@@ -458,7 +459,7 @@ static void mps2tz_common_init(MachineState *machine)
* call the 16MB our "system memory", as it's the largest lump.
*/
memory_region_allocate_system_memory(&mms->psram,
- NULL, "mps.ram", 0x01000000);
+ NULL, "mps.ram", 16 * MiB);
memory_region_add_subregion(system_memory, 0x80000000, &mms->psram);
/* The overflow IRQs for all UARTs are ORed together.
diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c
index 10efff36b2..d002b126d3 100644
--- a/hw/arm/mps2.c
+++ b/hw/arm/mps2.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/arm/boot.h"
@@ -146,7 +147,7 @@ static void mps2_common_init(MachineState *machine)
* zbt_boot_ctrl is always zero).
*/
memory_region_allocate_system_memory(&mms->psram,
- NULL, "mps.ram", 0x1000000);
+ NULL, "mps.ram", 16 * MiB);
memory_region_add_subregion(system_memory, 0x21000000, &mms->psram);
switch (mmc->fpga_type) {
--
2.21.0
- [PATCH v2 0/6] hw/arm: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v2 1/6] hw/arm/xilinx_zynq: Use the IEC binary prefix definitions, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v2 3/6] hw/arm/collie: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v2 2/6] hw/arm/mps2: Use the IEC binary prefix definitions,
Philippe Mathieu-Daudé <=
- [PATCH v2 4/6] hw/arm/omap2: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v2 5/6] hw/arm/omap1: Create the RAM in the board, Philippe Mathieu-Daudé, 2019/10/21
- [PATCH v2 6/6] hw/arm/digic4: Inline digic4_board_setup_ram() function, Philippe Mathieu-Daudé, 2019/10/21
- Re: [PATCH v2 0/6] hw/arm: Create the RAM in the board, Alistair Francis, 2019/10/21
- Re: [PATCH v2 0/6] hw/arm: Create the RAM in the board, Peter Maydell, 2019/10/22