goldfish & qemu: handle MMU table and CONFIG_RAM_END

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2024-01-18 23:27:04 +08:00 committed by Xiang Xiao
parent 1cd8413d19
commit 2f7b107608
3 changed files with 13 additions and 2 deletions

View File

@ -36,6 +36,11 @@
#include <arch/board/board.h> #include <arch/board/board.h>
#include "arm_internal.h" #include "arm_internal.h"
#include "chip.h"
#ifdef CONFIG_ARCH_HAVE_MMU
#include "mmu.h"
#endif
/**************************************************************************** /****************************************************************************
* Pre-processor Definitions * Pre-processor Definitions

View File

@ -38,6 +38,9 @@
#define PGTABLE_BASE_PADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE) #define PGTABLE_BASE_PADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE)
#define PGTABLE_BASE_VADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE) #define PGTABLE_BASE_VADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE)
#undef CONFIG_RAM_END
#define CONFIG_RAM_END PGTABLE_BASE_PADDR
#define NUTTX_TEXT_VADDR (CONFIG_FLASH_VSTART & 0xfff00000) #define NUTTX_TEXT_VADDR (CONFIG_FLASH_VSTART & 0xfff00000)
#define NUTTX_TEXT_PADDR (CONFIG_FLASH_VSTART & 0xfff00000) #define NUTTX_TEXT_PADDR (CONFIG_FLASH_VSTART & 0xfff00000)
#define NUTTX_TEXT_PEND ((CONFIG_FLASH_END + 0x000fffff) & 0xfff00000) #define NUTTX_TEXT_PEND ((CONFIG_FLASH_END + 0x000fffff) & 0xfff00000)
@ -45,7 +48,7 @@
#define NUTTX_RAM_VADDR (CONFIG_RAM_VSTART & 0xfff00000) #define NUTTX_RAM_VADDR (CONFIG_RAM_VSTART & 0xfff00000)
#define NUTTX_RAM_PADDR (CONFIG_RAM_START & 0xfff00000) #define NUTTX_RAM_PADDR (CONFIG_RAM_START & 0xfff00000)
#define NUTTX_RAM_PEND ((CONFIG_RAM_END + 0x000fffff) & 0xfff00000) #define NUTTX_RAM_PEND ((CONFIG_RAM_START + CONFIG_RAM_SIZE + 0x000fffff) & 0xfff00000)
#define NUTTX_RAM_SIZE (NUTTX_RAM_PEND - NUTTX_RAM_PADDR) #define NUTTX_RAM_SIZE (NUTTX_RAM_PEND - NUTTX_RAM_PADDR)
/**************************************************************************** /****************************************************************************

View File

@ -38,6 +38,9 @@
#define PGTABLE_BASE_PADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE) #define PGTABLE_BASE_PADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE)
#define PGTABLE_BASE_VADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE) #define PGTABLE_BASE_VADDR (CONFIG_RAM_START + CONFIG_RAM_SIZE - ALL_PGTABLE_SIZE)
#undef CONFIG_RAM_END
#define CONFIG_RAM_END PGTABLE_BASE_PADDR
#define NUTTX_TEXT_VADDR (CONFIG_FLASH_VSTART & 0xfff00000) #define NUTTX_TEXT_VADDR (CONFIG_FLASH_VSTART & 0xfff00000)
#define NUTTX_TEXT_PADDR (CONFIG_FLASH_VSTART & 0xfff00000) #define NUTTX_TEXT_PADDR (CONFIG_FLASH_VSTART & 0xfff00000)
#define NUTTX_TEXT_PEND ((CONFIG_FLASH_END + 0x000fffff) & 0xfff00000) #define NUTTX_TEXT_PEND ((CONFIG_FLASH_END + 0x000fffff) & 0xfff00000)
@ -45,7 +48,7 @@
#define NUTTX_RAM_VADDR (CONFIG_RAM_VSTART & 0xfff00000) #define NUTTX_RAM_VADDR (CONFIG_RAM_VSTART & 0xfff00000)
#define NUTTX_RAM_PADDR (CONFIG_RAM_START & 0xfff00000) #define NUTTX_RAM_PADDR (CONFIG_RAM_START & 0xfff00000)
#define NUTTX_RAM_PEND ((CONFIG_RAM_END + 0x000fffff) & 0xfff00000) #define NUTTX_RAM_PEND ((CONFIG_RAM_START + CONFIG_RAM_SIZE + 0x000fffff) & 0xfff00000)
#define NUTTX_RAM_SIZE (NUTTX_RAM_PEND - NUTTX_RAM_PADDR) #define NUTTX_RAM_SIZE (NUTTX_RAM_PEND - NUTTX_RAM_PADDR)
/**************************************************************************** /****************************************************************************