diff --git a/examples/simple/vmm.c b/examples/simple/vmm.c index b5ee8d5ba..a037ec2f4 100644 --- a/examples/simple/vmm.c +++ b/examples/simple/vmm.c @@ -23,31 +23,35 @@ // Part of the problem is that we might need multiple DTBs for the same example // e.g one DTB for VMM one, one DTB for VMM two. we should be able to hide all // of this in the build system to avoid doing any run-time DTB stuff. + +/* + * As this is just an example, for simplicity we just make the size of the + * guest's "RAM" the same for all platforms. For just booting Linux with a + * simple user-space, 0x10000000 bytes (256MB) is plenty. + */ +#define GUEST_RAM_SIZE 0x10000000 + #if defined(BOARD_qemu_arm_virt_hyp) #define GUEST_DTB_VADDR 0x4f000000 #define GUEST_INIT_RAM_DISK_VADDR 0x4d700000 -#define GUEST_RAM_SIZE 0x10000000 #elif defined(BOARD_rpi4b_hyp) #define GUEST_DTB_VADDR 0x2e000000 #define GUEST_INIT_RAM_DISK_VADDR 0x2d700000 -#define GUEST_RAM_SIZE 0x10000000 #elif defined(BOARD_odroidc2_hyp) #define GUEST_DTB_VADDR 0x2f000000 #define GUEST_INIT_RAM_DISK_VADDR 0x2d700000 -#define GUEST_RAM_SIZE 0x10000000 #elif defined(BOARD_odroidc4_hyp) #define GUEST_DTB_VADDR 0x2f000000 #define GUEST_INIT_RAM_DISK_VADDR 0x2d700000 -#define GUEST_RAM_SIZE 0x10000000 #elif defined(BOARD_imx8mm_evk_hyp) #define GUEST_DTB_VADDR 0x4f000000 #define GUEST_INIT_RAM_DISK_VADDR 0x4d700000 -#define GUEST_RAM_SIZE 0x10000000 #else #error Need to define VM image address and DTB address #endif -/* For simplicity we just enforce the serial IRQ channel to be the same across platforms. */ +/* For simplicity we just enforce the serial IRQ channel number to be the same + * across platforms. */ #define SERIAL_IRQ_CH 1 #if defined(BOARD_qemu_arm_virt_hyp)