summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorGavin.Bai <gavin_8724@163.com>2019-08-31 10:07:55 (GMT)
committer Gavin.Bai <gavin_8724@163.com>2019-08-31 10:07:55 (GMT)
commit52dafbf1bee017ce5c59e96ffc0dad2f455e2664 (patch)
tree7181246f38d248bfd1bff0c1b9676a26bd7a9942
parente15077f1fddf1d1d44f7a82bcb26ee92fa943b72 (diff)
downloadAIC-OS-52dafbf1bee017ce5c59e96ffc0dad2f455e2664.zip
Fix Merge issues.
-rw-r--r--SylixOS/arch/ppc/common/e500/ppcExcE500.c16
-rw-r--r--SylixOS/arch/ppc/common/ppcExc.c16
-rw-r--r--SylixOS/kernel/include/k_api.h3
3 files changed, 25 insertions, 10 deletions
diff --git a/SylixOS/arch/ppc/common/e500/ppcExcE500.c b/SylixOS/arch/ppc/common/e500/ppcExcE500.c
index fb20088..7f5ee4c 100644
--- a/SylixOS/arch/ppc/common/e500/ppcExcE500.c
+++ b/SylixOS/arch/ppc/common/e500/ppcExcE500.c
@@ -204,14 +204,22 @@ VOID archE500AlignmentExceptionHandle (addr_t ulRetAddr)
{
PLW_CLASS_TCB ptcbCur;
LW_VMM_ABORT abtInfo;
+ addr_t ulAbortAddr;
+ PPC_PARAM *param = archKernelParamGet();
LW_TCB_GET_CUR(ptcbCur);
- ptcbCur->TCB_archRegCtx.REG_uiDar = ppcE500GetDEAR();
+ ulAbortAddr = ppcE500GetDEAR();
+ ptcbCur->TCB_archRegCtx.REG_uiDar = ulAbortAddr;
- abtInfo = ppcUnalignedHandle(&ptcbCur->TCB_archRegCtx);
- if (abtInfo.VMABT_uiType) {
- API_VmmAbortIsr(ulRetAddr, ptcbCur->TCB_archRegCtx.REG_uiDar, &abtInfo, ptcbCur);
+ abtInfo.VMABT_uiType = LW_VMM_ABORT_TYPE_BUS;
+ abtInfo.VMABT_uiMethod = BUS_ADRALN;
+
+ if (param->PP_bUnalign) {
+ API_VmmAbortIsrEx(ulRetAddr, ulAbortAddr, &abtInfo, ptcbCur, archE500UnalignedHandle);
+
+ } else {
+ API_VmmAbortIsr(ulRetAddr, ulAbortAddr, &abtInfo, ptcbCur);
}
}
/*********************************************************************************************************
diff --git a/SylixOS/arch/ppc/common/ppcExc.c b/SylixOS/arch/ppc/common/ppcExc.c
index 736280c..cba1022 100644
--- a/SylixOS/arch/ppc/common/ppcExc.c
+++ b/SylixOS/arch/ppc/common/ppcExc.c
@@ -250,14 +250,22 @@ VOID archAlignmentExceptionHandle (addr_t ulRetAddr)
{
PLW_CLASS_TCB ptcbCur;
LW_VMM_ABORT abtInfo;
+ addr_t ulAbortAddr;
+ PPC_PARAM *param = archKernelParamGet();
LW_TCB_GET_CUR(ptcbCur);
- ptcbCur->TCB_archRegCtx.REG_uiDar = ppcGetDAR();
+ ulAbortAddr = ppcGetDAR();
+ ptcbCur->TCB_archRegCtx.REG_uiDar = ulAbortAddr;
- abtInfo = ppcUnalignedHandle(&ptcbCur->TCB_archRegCtx);
- if (abtInfo.VMABT_uiType) {
- API_VmmAbortIsr(ulRetAddr, ptcbCur->TCB_archRegCtx.REG_uiDar, &abtInfo, ptcbCur);
+ abtInfo.VMABT_uiType = LW_VMM_ABORT_TYPE_BUS;
+ abtInfo.VMABT_uiMethod = BUS_ADRALN;
+
+ if (param->PP_bUnalign) {
+ API_VmmAbortIsrEx(ulRetAddr, ulAbortAddr, &abtInfo, ptcbCur, archUnalignedHandle);
+
+ } else {
+ API_VmmAbortIsr(ulRetAddr, ulAbortAddr, &abtInfo, ptcbCur);
}
}
/*********************************************************************************************************
diff --git a/SylixOS/kernel/include/k_api.h b/SylixOS/kernel/include/k_api.h
index b7074e8..7d5d993 100644
--- a/SylixOS/kernel/include/k_api.h
+++ b/SylixOS/kernel/include/k_api.h
@@ -288,11 +288,10 @@ LW_API PLW_CLASS_TCB API_ThreadTcbSelf(VOID); /* 获得
LW_API LW_OBJECT_HANDLE API_ThreadIdInter(VOID); /* 获得被中断线程 ID */
LW_API PLW_CLASS_TCB API_ThreadTcbInter(VOID); /* 获得被中断线程 TCB */
- /* 只在内核模块中使用 */
LW_API ULONG API_ThreadTcbById(LW_OBJECT_HANDLE ulId,
PLW_CLASS_TCB pctcb);
-#endif
+#endif /* 只在内核模块中使用 */
LW_API ULONG API_ThreadDesc(LW_OBJECT_HANDLE ulId,
PLW_CLASS_TCB_DESC ptcbdesc); /* 获得线程概要信息 */