x86: ia32: do not use the first megabyte

After witnessing some strange errors with memory not being
what it should be, lifiting everything above 1MB has solved
it. The Zephyr binary was being loaded into memory containing
reserved regions, resulting in data corruption.

We still simulate XIP for testing purposes by setting up the
memory map as follows:

0x000000 - 0x0FFFFF : Non-present
0x100000 - 0x4FFFFF : "Flash" ROM region
0x500000 - 0x8FFFFF : "SRAM" RAM region

For a total of 9 megabytes of physical RAM used.

Fixes problems observed in some large tests when code coverage
is enabled (which increases the amount of RAM used even more).

Fixes: #17782

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2019-08-02 15:48:45 -07:00 committed by Andrew Boie
commit ce3cc4f974
3 changed files with 6 additions and 7 deletions

View file

@ -8,7 +8,7 @@ endif()
set(QEMU_CPU_TYPE_${ARCH} qemu32,+nx,+pae)
set(QEMU_FLAGS_${ARCH}
-m 12
-m 9
-cpu ${QEMU_CPU_TYPE_${ARCH}}
-device isa-debug-exit,iobase=0xf4,iosize=0x04
${REBOOT_FLAG}

View file

@ -4,7 +4,7 @@
#include <mem.h>
#define DT_FLASH_SIZE DT_SIZE_K(4092)
#define DT_FLASH_SIZE DT_SIZE_K(4096)
#define DT_SRAM_SIZE DT_SIZE_K(4096)
#include <ia32.dtsi>