boards: qemu_x86: use correct memory size
All x86 QEMU boards have a hard-coded memory size of 9MB which does not corresponding with what is defined in device tree. So make use of CONFIG_SRAM_SIZE to provide correct memory size. Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
parent
8ed9fecbba
commit
9bd5860440
1 changed files with 8 additions and 1 deletions
|
@ -19,8 +19,15 @@ else()
|
|||
set(QEMU_CPU_TYPE_${ARCH} qemu32,+nx,+pae)
|
||||
endif()
|
||||
|
||||
if(CONFIG_XIP)
|
||||
# Extra 4MB to emulate flash area
|
||||
math(EXPR QEMU_MEMORY_SIZE_MB "${CONFIG_SRAM_SIZE} / 1024 + 4")
|
||||
else()
|
||||
math(EXPR QEMU_MEMORY_SIZE_MB "${CONFIG_SRAM_SIZE} / 1024")
|
||||
endif()
|
||||
|
||||
set(QEMU_FLAGS_${ARCH}
|
||||
-m 9
|
||||
-m ${QEMU_MEMORY_SIZE_MB}
|
||||
-cpu ${QEMU_CPU_TYPE_${ARCH}}
|
||||
-device isa-debug-exit,iobase=0xf4,iosize=0x04
|
||||
${REBOOT_FLAG}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue