qemu_x86_tiny: don't use first megabyte at all

Just tell the kernel that RAM starts 1MB in, period.
Better simulation of a low-memory microcontroller as
we're not managing a very large number of page frames
we'll never use.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
Andrew Boie 2020-12-14 21:14:05 -08:00 committed by Anas Nashif
commit ea10c98c08
5 changed files with 10 additions and 2 deletions

View file

@ -9,6 +9,7 @@
#include <mem.h>
#define DT_DRAM_SIZE DT_SIZE_K(8192)
#define DT_DRAM_BASE 0
#include <ia32.dtsi>

View file

@ -4,6 +4,9 @@
#include <mem.h>
#ifndef DT_DRAM_BASE
#define DT_DRAM_BASE 0
#endif
#ifndef DT_DRAM_SIZE
#define DT_DRAM_SIZE DT_SIZE_K(4096)
#endif

View file

@ -4,5 +4,6 @@
* SPDX-License-Identifier: Apache-2.0
*/
#define DT_DRAM_SIZE DT_SIZE_K(2048)
#define DT_DRAM_BASE 0x100000
#define DT_DRAM_SIZE DT_SIZE_K(128)
#include "qemu_x86.dts"

View file

@ -22,4 +22,7 @@ CONFIG_X86_PAE=n
CONFIG_X86_COMMON_PAGE_TABLE=y
CONFIG_X86_KPTI=n
CONFIG_KERNEL_VM_SIZE=0x400000
CONFIG_KERNEL_VM_BASE=0x0
CONFIG_X86_MMU_PAGE_POOL_PAGES=0
CONFIG_KERNEL_VM_OFFSET=0x100000
CONFIG_X86_KERNEL_OFFSET=0

View file

@ -29,7 +29,7 @@
dram0: memory@0 {
device_type = "memory";
reg = <0x0 DT_DRAM_SIZE>;
reg = <DT_DRAM_BASE DT_DRAM_SIZE>;
};
soc {