summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c28b31e)
raw | patch | inline | side by side (parent: c28b31e)
author | vwan@ti.com <vwan@ti.com> | |
Fri, 8 Nov 2013 00:47:44 +0000 (16:47 -0800) | ||
committer | Chris Ring <cring@ti.com> | |
Fri, 8 Nov 2013 20:44:34 +0000 (12:44 -0800) |
Add static memory entry to inform loader of internal memory areas on DSP1 and IPU2.
This addresses SDOCM00104907.
Signed-off-by: VW <vwan@ti.com>
This addresses SDOCM00104907.
Signed-off-by: VW <vwan@ti.com>
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayudsp/VAYUDspProc.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayudsp/VAYUDspProc.c
index 7bd73f730d6be196210698980bcd08d50fd94711..5dea43f7fa694dbd23aeb706d547785ef9f24b47 100644 (file)
/*!
* @brief Number of static entries in address translation table.
*/
-#define AddrTable_STATIC_COUNT 0
+#define AddrTable_STATIC_COUNT 3
/*!
* @brief Max entries in address translation table.
*/
static ProcMgr_AddrInfo AddrTable[AddrTable_SIZE] =
{
+ /* L2 RAM */
+ {
+ .addr[ProcMgr_AddrType_MasterKnlVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterUsrVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterPhys] = 0x40800000u,
+ .addr[ProcMgr_AddrType_SlaveVirt] = 0x800000u,
+ .addr[ProcMgr_AddrType_SlavePhys] = -1u,
+ .size = 0x40000u,
+ .isCached = FALSE,
+ .mapMask = ProcMgr_SLAVEVIRT,
+ .isMapped = TRUE,
+ .refCount = 0u /* refCount set to 0 for static entry */
+ },
+
+ /* L1P RAM */
+ {
+ .addr[ProcMgr_AddrType_MasterKnlVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterUsrVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterPhys] = 0x40E00000u,
+ .addr[ProcMgr_AddrType_SlaveVirt] = 0xE00000u,
+ .addr[ProcMgr_AddrType_SlavePhys] = -1u,
+ .size = 0x8000u,
+ .isCached = FALSE,
+ .mapMask = ProcMgr_SLAVEVIRT,
+ .isMapped = TRUE,
+ .refCount = 0u /* refCount set to 0 for static entry */
+ },
+
+ /* L1D RAM */
+ {
+ .addr[ProcMgr_AddrType_MasterKnlVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterUsrVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterPhys] = 0x40F00000u,
+ .addr[ProcMgr_AddrType_SlaveVirt] = 0xF00000u,
+ .addr[ProcMgr_AddrType_SlavePhys] = -1u,
+ .size = 0x8000u,
+ .isCached = FALSE,
+ .mapMask = ProcMgr_SLAVEVIRT,
+ .isMapped = TRUE,
+ .refCount = 0u /* refCount set to 0 for static entry */
+ },
};
/* =============================================================================
"VAYUDSPPROC_attach", status,
"Failed to enable the slave MMU");
}
+ else {
+#endif
+ GT_0trace(curTrace, GT_2CLASS,
+ "VAYUDSPPROC_attach: Slave MMU "
+ "is configured!");
+
+ /*
+ * Pull DSP MMU out of reset to make internal
+ * memory "loadable"
+ */
+ status = VAYUDSP_halResetCtrl(object->halObject,
+ Processor_ResetCtrlCmd_MMU_Release);
+ if (status < 0) {
+ /*! @retval status */
+ GT_setFailureReason(curTrace,
+ GT_4CLASS,
+ "VAYUDSP_halResetCtrl",
+ status,
+ "Reset MMU_Release failed");
+ }
+#if !defined(SYSLINK_BUILD_OPTIMIZE)
+ }
#endif
- GT_0trace(curTrace, GT_2CLASS,
- "VAYUDSPPROC_attach: Slave MMU "
- "is configured!");
}
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
GT_0trace(curTrace, GT_2CLASS,
"VAYUDSPPROC_detach: Disabling Slave MMU ...");
+ status = VAYUDSP_halResetCtrl(object->halObject,
+ Processor_ResetCtrlCmd_MMU_Reset);
+#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
+ if (status < 0) {
+ /*! @retval status */
+ GT_setFailureReason (curTrace,
+ GT_4CLASS,
+ "VAYUDSP_halResetCtrl",
+ status,
+ "Reset MMU failed");
+ }
+#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
+
status = VAYUDSP_halMmuCtrl(object->halObject,
Processor_MmuCtrlCmd_Disable, NULL);
else {
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
if (object->params.mmuEnable) {
- status = VAYUDSP_halResetCtrl(object->halObject,
- Processor_ResetCtrlCmd_MMU_Release);
- if (status < 0) {
- /*! @retval status */
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUDSP_halResetCtrl",
- status,
- "Reset MMU_Release failed");
- }
- else {
status = rproc_dsp_setup(object->halObject,
object->params.memEntries,
object->params.numMemEntries);
status,
"rproc_dsp_setup failed");
}
- }
}
/* release the slave cpu from reset */
if (status >= 0) {
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
if (object->params.mmuEnable) {
rproc_dsp_destroy(object->halObject);
- status = VAYUDSP_halResetCtrl(object->halObject,
- Processor_ResetCtrlCmd_MMU_Reset);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
- if (status < 0) {
- /*! @retval status */
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUDSP_halResetCtrl",
- status,
- "Reset MMU failed");
- }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
}
}
#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
if ((startAddr <= *dstAddr) && (*dstAddr < endAddr)) {
found = TRUE;
- ai->refCount++;
+
+ /* refCount does not need to be incremented for static entries */
+
break;
}
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/vayucore0/VAYUIpuCore0Proc.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/vayucore0/VAYUIpuCore0Proc.c
index 1e9b7d06f5f886fd5f5cbc2a3d98b8cf6da0074b..c0d92d0211afe15f00a3d0baf0419747cb8d9507 100644 (file)
/*!
* @brief Number of static entries in address translation table.
*/
-#define AddrTable_STATIC_COUNT 0
+#define AddrTable_STATIC_COUNT 1
/*!
* @brief Max entries in address translation table.
*/
static ProcMgr_AddrInfo AddrTable[AddrTable_SIZE] =
{
+ /* L2 RAM */
+ {
+ .addr[ProcMgr_AddrType_MasterKnlVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterUsrVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterPhys] = 0x55020000u,
+ .addr[ProcMgr_AddrType_SlaveVirt] = 0x20000000u,
+ .addr[ProcMgr_AddrType_SlavePhys] = -1u,
+ .size = 0x10000u,
+ .isCached = FALSE,
+ .mapMask = ProcMgr_SLAVEVIRT,
+ .isMapped = TRUE,
+ .refCount = 0u /* refCount set to 0 for static entry */
+ },
};
/* =============================================================================
"VAYUIPUCORE0PROC_attach", status,
"Failed to enable the slave MMU");
}
+ else {
+#endif
+ GT_0trace(curTrace, GT_2CLASS,
+ "VAYUIPUCORE0PROC_attach: Slave MMU "
+ "is configured!");
+ /*
+ * Pull IPU MMU out of reset to make internal
+ * memory "loadable"
+ */
+ status = VAYUIPUCORE0_halResetCtrl(
+ object->halObject,
+ Processor_ResetCtrlCmd_MMU_Release);
+ if (status < 0) {
+ /*! @retval status */
+ GT_setFailureReason(curTrace,
+ GT_4CLASS,
+ "VAYUIPUCORE0_halResetCtrl",
+ status,
+ "Reset MMU_Release failed");
+ }
+#if !defined(SYSLINK_BUILD_OPTIMIZE)
+ }
#endif
- GT_0trace(curTrace, GT_2CLASS,
- "VAYUIPUCORE0PROC_attach: Slave MMU "
- "is configured!");
}
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
GT_0trace(curTrace, GT_2CLASS,
"VAYUIPUCORE0PROC_detach: Disabling Slave MMU ...");
+ status = VAYUIPUCORE0_halResetCtrl(object->halObject,
+ Processor_ResetCtrlCmd_MMU_Reset);
+#if !defined(SYSLINK_BUILD_OPTIMIZE)
+ if (status < 0) {
+ /*! @retval status */
+ GT_setFailureReason (curTrace,
+ GT_4CLASS,
+ "VAYUIPUCORE0_halResetCtrl",
+ status,
+ "Reset MMU failed");
+ }
+#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
+
status = VAYUIPU_halMmuCtrl(object->halObject,
Processor_MmuCtrlCmd_Disable, NULL);
#if !defined(SYSLINK_BUILD_OPTIMIZE)
else {
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
if (object->params.mmuEnable) {
- status = VAYUIPUCORE0_halResetCtrl(object->halObject,
- Processor_ResetCtrlCmd_MMU_Release);
+ status = rproc_ipu_setup(object->halObject,
+ object->params.memEntries,
+ object->params.numMemEntries);
if (status < 0) {
/*! @retval status */
GT_setFailureReason (curTrace,
GT_4CLASS,
"VAYUIPUCORE0_halResetCtrl",
status,
- "Reset MMU_Release failed");
- }
- else {
- status = rproc_ipu_setup(object->halObject,
- object->params.memEntries,
- object->params.numMemEntries);
- if (status < 0) {
- /*! @retval status */
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUIPUCORE0_halResetCtrl",
- status,
- "rproc_ipu_setup failed");
- }
+ "rproc_ipu_setup failed");
}
}
/* release the slave cpu from reset */
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
if (object->params.mmuEnable) {
rproc_ipu_destroy(object->halObject);
- status = VAYUIPUCORE0_halResetCtrl(object->halObject,
- Processor_ResetCtrlCmd_MMU_Reset);
-#if !defined(SYSLINK_BUILD_OPTIMIZE)
- if (status < 0) {
- /*! @retval status */
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUIPUCORE0_halResetCtrl",
- status,
- "Reset MMU failed");
- }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
}
}
#if !defined(SYSLINK_BUILD_OPTIMIZE)
if ((startAddr <= *dstAddr) && (*dstAddr < endAddr)) {
found = TRUE;
- ai->refCount++;
+ /* refCount does not need to be incremented for static entries */
break;
}
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/vayucore1/VAYUIpuCore1Proc.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/vayucore1/VAYUIpuCore1Proc.c
index f35a95b423730cb5445c7917275c575718fbe28d..4c0c2cdc424917bb016904dfc0daf22286a985f7 100644 (file)
/*!
* @brief Number of static entries in address translation table.
*/
-#define AddrTable_STATIC_COUNT 0
+#define AddrTable_STATIC_COUNT 1
/*!
* @brief Max entries in address translation table.
*/
static ProcMgr_AddrInfo AddrTable[AddrTable_SIZE] =
{
+ /* L2 RAM */
+ {
+ .addr[ProcMgr_AddrType_MasterKnlVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterUsrVirt] = -1u,
+ .addr[ProcMgr_AddrType_MasterPhys] = 0x55020000u,
+ .addr[ProcMgr_AddrType_SlaveVirt] = 0x20000000u,
+ .addr[ProcMgr_AddrType_SlavePhys] = -1u,
+ .size = 0x10000u,
+ .isCached = FALSE,
+ .mapMask = ProcMgr_SLAVEVIRT,
+ .isMapped = TRUE, /* Internal memory is always 'mapped' on the slave */
+ .refCount = 0u /* refCount set to 0 for static entry */
+ },
};
/* =============================================================================
"VAYUIPUCORE1PROC_attach", status,
"Failed to enable the slave MMU");
}
+ else {
+#endif
+ GT_0trace(curTrace, GT_2CLASS,
+ "VAYUIPUCORE1PROC_attach: Slave MMU "
+ "is configured!");
+ /*
+ * Pull IPU MMU out of reset to make internal
+ * memory "loadable"
+ */
+ status = VAYUIPUCORE1_halResetCtrl(
+ object->halObject,
+ Processor_ResetCtrlCmd_MMU_Release);
+ if (status < 0) {
+ /*! @retval status */
+ GT_setFailureReason(curTrace,
+ GT_4CLASS,
+ "VAYUIPUCORE1_halResetCtrl",
+ status,
+ "Reset MMU_Release failed");
+ }
+#if !defined(SYSLINK_BUILD_OPTIMIZE)
+ }
#endif
- GT_0trace(curTrace, GT_2CLASS,
- "VAYUIPUCORE1PROC_attach: Slave MMU "
- "is configured!");
}
#if !defined(SYSLINK_BUILD_OPTIMIZE)
}
GT_0trace(curTrace, GT_2CLASS,
"VAYUIPUCORE1PROC_detach: Disabling Slave MMU ...");
+ status = VAYUIPUCORE1_halResetCtrl(object->halObject,
+ Processor_ResetCtrlCmd_MMU_Reset);
+#if !defined(SYSLINK_BUILD_OPTIMIZE)
+ if (status < 0) {
+ /*! @retval status */
+ GT_setFailureReason (curTrace,
+ GT_4CLASS,
+ "VAYUIPUCORE1_halResetCtrl",
+ status,
+ "Reset MMU failed");
+ }
+#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) */
+
status = VAYUIPU_halMmuCtrl(object->halObject,
Processor_MmuCtrlCmd_Disable, NULL);
#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
}
else {
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
- if (object->params.mmuEnable) {
- status = VAYUIPUCORE1_halResetCtrl(object->halObject,
- Processor_ResetCtrlCmd_MMU_Release);
- if (status < 0) {
- /*! @retval status */
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUIPUCORE1_halResetCtrl",
- status,
- "Reset MMU_Release failed");
- }
- /* No need to call rproc_ipu_setup from here, handled in
- * core0 */
- }
+
/* release the slave cpu from reset */
if (status >= 0) {
status = VAYUIPUCORE1_halResetCtrl(object->halObject,
"Failed to place slave in reset");
}
#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
- if (object->params.mmuEnable) {
- /* Don't need to call rproc_ipu_destroy, handled in core0 */
- status = VAYUIPUCORE1_halResetCtrl(object->halObject,
- Processor_ResetCtrlCmd_MMU_Reset);
-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
- if (status < 0) {
- /*! @retval status */
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUIPUCORE1_halResetCtrl",
- status,
- "Reset MMU failed");
- }
-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */
- }
+
}
#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)
}
if ((startAddr <= *dstAddr) && (*dstAddr < endAddr)) {
found = TRUE;
- ai->refCount++;
+ /* refCount does not need to be incremented for static entries */
break;
}
}