mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 03:09:16 +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:
@@ -30,7 +30,6 @@
|
||||
#endif
|
||||
|
||||
#ifndef RT_USING_SMART
|
||||
#define PV_OFFSET 0
|
||||
#define USER_VADDR_START 0
|
||||
#endif
|
||||
|
||||
@@ -533,6 +532,9 @@ void rt_hw_mmu_setup(rt_aspace_t aspace, struct mem_desc *mdesc, int desc_nr)
|
||||
mdesc->vaddr_start + 1,
|
||||
.prefer = (void *)mdesc->vaddr_start};
|
||||
|
||||
if (mdesc->paddr_start == (rt_size_t)ARCH_MAP_FAILED)
|
||||
mdesc->paddr_start = mdesc->vaddr_start + PV_OFFSET;
|
||||
|
||||
rt_aspace_map_phy_static(aspace, &mdesc->varea, &hint, attr,
|
||||
mdesc->paddr_start >> MM_PAGE_SHIFT, &err);
|
||||
mdesc++;
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
#include <tlb.h>
|
||||
|
||||
#ifdef RT_USING_SMART
|
||||
#include <board.h>
|
||||
#include <ioremap.h>
|
||||
#include <lwp_user_mm.h>
|
||||
#endif
|
||||
|
||||
#ifndef RT_USING_SMART
|
||||
#define PV_OFFSET 0
|
||||
#define USER_VADDR_START 0
|
||||
#endif
|
||||
|
||||
@@ -476,6 +476,9 @@ void rt_hw_mmu_setup(rt_aspace_t aspace, struct mem_desc *mdesc, int desc_nr)
|
||||
mdesc->vaddr_start + 1,
|
||||
.prefer = (void *)mdesc->vaddr_start};
|
||||
|
||||
if (mdesc->paddr_start == (rt_size_t)ARCH_MAP_FAILED)
|
||||
mdesc->paddr_start = mdesc->vaddr_start + PV_OFFSET;
|
||||
|
||||
rt_aspace_map_phy_static(aspace, &mdesc->varea, &hint, attr,
|
||||
mdesc->paddr_start >> MM_PAGE_SHIFT, &err);
|
||||
mdesc++;
|
||||
|
||||
Reference in New Issue
Block a user