Skip to content

Commit

Permalink
arm: add memory map for DDR region
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
qinwei2004 authored and xiaoxiang781216 committed Oct 22, 2024
1 parent ad92b72 commit 9b0fc12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arch/arm/src/qemu/qemu_memorymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
},
};

/****************************************************************************
Expand Down
3 changes: 3 additions & 0 deletions arch/arm/src/qemu/qemu_memorymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,23 @@
#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 *********************************************/

#define VIRT_FLASH_VSECTION VIRT_FLASH_PSECTION
#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. */

#define VIRT_FLASH_SECSIZE (128*1024*1024)
#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
Expand Down

0 comments on commit 9b0fc12

Please sign in to comment.