From aaa3cc9d7b08516020fb0f358a7a321953fb33a7 Mon Sep 17 00:00:00 2001 From: Haryslee Date: Mon, 20 Dec 2021 11:42:20 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20b0d31cb=20from=20https://gitee.com/hary?= =?UTF-8?q?lee/kernel=5Fliteos=5Fa/pulls/738=20fix:=20=E4=BF=AE=E5=A4=8Dxt?= =?UTF-8?q?s=E6=9D=83=E9=99=90=E7=94=A8=E4=BE=8B=E5=8E=8B=E6=B5=8B?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 用例异常时出现Domain fault或者unknown fault,经分析发现是TLB缓存一致性问题, 在缺页异常入口,对上述两种异常类型做异常地址TLB缓存清理即可。 close #I3ZJ1D Signed-off-by: Haryslee Change-Id: Ib84e3e87047fcac392b83a4cf6cca0d91754e66f --- arch/arm/arm/src/los_arch_mmu.c | 2 +- arch/arm/arm/src/los_exc.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/arm/src/los_arch_mmu.c b/arch/arm/arm/src/los_arch_mmu.c index b3991ce2..2298aca8 100644 --- a/arch/arm/arm/src/los_arch_mmu.c +++ b/arch/arm/arm/src/los_arch_mmu.c @@ -790,7 +790,7 @@ STATUS_T LOS_ArchMmuDestroy(LosArchMmu *archMmu) LOS_PhysPageFree(page); } - OsArmWriteTlbiasid(archMmu->asid); + OsArmWriteTlbiasidis(archMmu->asid); OsFreeAsid(archMmu->asid); #endif (VOID)LOS_MuxDestroy(&archMmu->mtx); diff --git a/arch/arm/arm/src/los_exc.c b/arch/arm/arm/src/los_exc.c index 138afdf5..1b087d24 100644 --- a/arch/arm/arm/src/los_exc.c +++ b/arch/arm/arm/src/los_exc.c @@ -228,7 +228,8 @@ UINT32 OsArmSharedPageFault(UINT32 excType, ExcContext *frame, UINT32 far, UINT3 break; } default: - ret = LOS_ERRNO_VM_NOT_FOUND; + OsArmWriteTlbimvaais(ROUNDDOWN(far, PAGE_SIZE)); + ret = LOS_OK; break; } #if defined(LOSCFG_KERNEL_SMP) && defined(LOSCFG_DEBUG_VERSION) -- GitLab