mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 19:44:24 +08:00
[rt-smart] PV_OFFSET as a variable (#6904)
* [rt-smart/mem] remove pv_offset * [rt-smart] list kernel space command * [rt-smart] restore ioremap region * [revert] restore kernel space isolation * [rt-smart/pv_off] code format * [rt-smart] add get_pvoff() * [pvoffset] pvoff as constant for C codes * [pvoff] pvoff as interfaces
This commit is contained in:
@@ -92,7 +92,6 @@ CONFIG_RT_USING_CACHE=y
|
||||
# CONFIG_RT_USING_CPU_FFS is not set
|
||||
CONFIG_ARCH_MM_MMU=y
|
||||
CONFIG_KERNEL_VADDR_START=0x40000000
|
||||
CONFIG_PV_OFFSET=0x0
|
||||
CONFIG_ARCH_RISCV=y
|
||||
CONFIG_ARCH_RISCV64=y
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ stack_size = 4096
|
||||
|
||||
stack_lds = open('link_stacksize.lds', 'w')
|
||||
if GetDepend('__STACKSIZE__'): stack_size = GetDepend('__STACKSIZE__')
|
||||
stack_lds.write('__STACKSIZE__ = %d;' % stack_size)
|
||||
stack_lds.write('__STACKSIZE__ = %d;\n' % stack_size)
|
||||
stack_lds.close()
|
||||
|
||||
# make a building
|
||||
|
||||
@@ -44,8 +44,8 @@ rt_region_t init_page_region =
|
||||
extern volatile rt_size_t MMUTable[__SIZE(VPN2_BIT)] __attribute__((aligned(4 * 1024)));
|
||||
|
||||
struct mem_desc platform_mem_desc[] = {
|
||||
{KERNEL_VADDR_START, KERNEL_VADDR_START + 0x4000000 - 1, KERNEL_VADDR_START + PV_OFFSET, NORMAL_MEM},
|
||||
{0x1000, 0x3ffff000 - 1, 0x1000 + PV_OFFSET, DEVICE_MEM},
|
||||
{KERNEL_VADDR_START, KERNEL_VADDR_START + 0x4000000 - 1, (rt_size_t)ARCH_MAP_FAILED, NORMAL_MEM},
|
||||
{0x1000, 0x3ffff000 - 1, (rt_size_t)ARCH_MAP_FAILED, DEVICE_MEM},
|
||||
};
|
||||
|
||||
#define NUM_MEM_DESC (sizeof(platform_mem_desc) / sizeof(platform_mem_desc[0]))
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
extern unsigned int __bss_start;
|
||||
extern unsigned int __bss_end;
|
||||
|
||||
#define RAM_SIZE (64 * 1024 * 1024)
|
||||
#define RAM_BASE (0x40000000)
|
||||
#define RAM_END (RAM_BASE + RAM_SIZE - PV_OFFSET)
|
||||
#define RAM_SIZE (64 * 1024 * 1024)
|
||||
#define RAM_BASE (0x40000000)
|
||||
#define RAM_END_VADDR (KERNEL_VADDR_START + RAM_SIZE)
|
||||
|
||||
#define RT_HW_HEAP_BEGIN ((void *)&__bss_end)
|
||||
#define RT_HW_HEAP_END ((void *)(((rt_size_t)RT_HW_HEAP_BEGIN) + 16 * 1024 * 1024))
|
||||
#define RT_HW_PAGE_START (RT_HW_HEAP_END)
|
||||
#define RT_HW_PAGE_END ((void *)RAM_END)
|
||||
#define RT_HW_PAGE_END ((void *)RAM_END_VADDR)
|
||||
|
||||
void rt_hw_board_init(void);
|
||||
void rt_init_user_mem(struct rt_thread *thread, const char *name, unsigned long *entry);
|
||||
|
||||
@@ -55,7 +55,6 @@
|
||||
#define RT_USING_CACHE
|
||||
#define ARCH_MM_MMU
|
||||
#define KERNEL_VADDR_START 0x40000000
|
||||
#define PV_OFFSET 0x0
|
||||
#define ARCH_RISCV
|
||||
#define ARCH_RISCV64
|
||||
|
||||
|
||||
Reference in New Issue
Block a user