From 9b0fc1277b9254f646008f7beb4cd648840732f2 Mon Sep 17 00:00:00 2001 From: qinwei1 Date: Mon, 20 Nov 2023 09:55:46 +0800 Subject: [PATCH] arm: add memory map for DDR region Summary add memory map for DDR region fix arm-v7a/knsh boot dataabort on arm_addrenv_utils.c first time memset after arm_pgvaddr. Signed-off-by: qinwei1 --- arch/arm/src/qemu/qemu_memorymap.c | 4 ++++ arch/arm/src/qemu/qemu_memorymap.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/arch/arm/src/qemu/qemu_memorymap.c b/arch/arm/src/qemu/qemu_memorymap.c index a4c5ec4233771..6cff3db0e80be 100644 --- a/arch/arm/src/qemu/qemu_memorymap.c +++ b/arch/arm/src/qemu/qemu_memorymap.c @@ -57,6 +57,10 @@ static const struct section_mapping_s g_section_mapping[] = VIRT_PCIE_PSECTION, VIRT_PCIE_VSECTION, MMU_IOFLAGS, _NSECTIONS(VIRT_PCIE_SECSIZE) }, + { + VIRT_DDR_PSECTION, VIRT_DDR_VSECTION, + MMU_MEMFLAGS, _NSECTIONS(VIRT_DDR_SECSIZE) + }, }; /**************************************************************************** diff --git a/arch/arm/src/qemu/qemu_memorymap.h b/arch/arm/src/qemu/qemu_memorymap.h index 01fea1d37ebf8..47d633d4bcda1 100644 --- a/arch/arm/src/qemu/qemu_memorymap.h +++ b/arch/arm/src/qemu/qemu_memorymap.h @@ -42,6 +42,7 @@ #define VIRT_IO_PSECTION 0x08000000 /* 0x08000000-0x0e000000 */ #define VIRT_SEC_MEM_PSECTION 0x0e000000 /* 0x0e000000-0x0f000000 */ #define VIRT_PCIE_PSECTION 0x10000000 /* 0x10000000-0x40000000 */ +#define VIRT_DDR_PSECTION 0x40000000 /* 0x40000000-0x50000000 */ /* Qemu virt Virtual Memory Map *********************************************/ @@ -49,6 +50,7 @@ #define VIRT_IO_VSECTION VIRT_IO_PSECTION #define VIRT_SEC_MEM_VSECTION VIRT_SEC_MEM_PSECTION #define VIRT_PCIE_VSECTION VIRT_PCIE_PSECTION +#define VIRT_DDR_VSECTION VIRT_DDR_PSECTION /* Sizes of memory regions in bytes. */ @@ -56,6 +58,7 @@ #define VIRT_IO_SECSIZE (96*1024*1024) #define VIRT_SEC_MEM_SECSIZE (16*1024*1024) #define VIRT_PCIE_SECSIZE (3*256*1024*1024) +#define VIRT_DDR_SECSIZE (256*1024*1024) /**************************************************************************** * Public Function Prototypes