aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSubash Lakkimsetti2016-08-29 11:28:55 -0500
committerBuddy Liong2016-09-07 12:11:55 -0500
commitf50085d80e2f2355e7b0168dc8b4cd10f27dbafb (patch)
tree0c72988d9b0d84b6db7ee8de0d3bc248bb0169c6
parent8ad2a268739f134b70e972711f59bd74346a87e1 (diff)
downloadipumm-f50085d80e2f2355e7b0168dc8b4cd10f27dbafb.tar.gz
ipumm-f50085d80e2f2355e7b0168dc8b4cd10f27dbafb.tar.xz
ipumm-f50085d80e2f2355e7b0168dc8b4cd10f27dbafb.zip
Invalidating parameter buffers for codec_get_version
Previously version_buf pointer is set to buffer pointer (data.buf) of (IVIDDEC3_Status *) status. The pointer dyn_params and status are not cache invalidated first which can cause the status->data.buf to be accessed without cache invalidation. Due to this corruption, it can cause exception on IPUMM. The solution is to cache invalidate the dyn_params and status pointer first to get the valid pointer of dyn_params and status. Then set the version_buf with status->data.buf. Perform cache invalidation on the version_buf to get the valid pointer. Change-Id: I3258cca0ee191c488fc6457391215b8bfcde3b85 Signed-off-by: Subash Lakkimsetti <x0091084@ti.com>
-rw-r--r--src/ti/framework/dce/dce.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ti/framework/dce/dce.c b/src/ti/framework/dce/dce.c
index 78848d4..f33b772 100644
--- a/src/ti/framework/dce/dce.c
+++ b/src/ti/framework/dce/dce.c
@@ -919,14 +919,16 @@ static int codec_get_version(UInt32 size, UInt32 *data)
919 ERROR("invalid number of params sent"); 919 ERROR("invalid number of params sent");
920 return (-1); 920 return (-1);
921 } 921 }
922
923 dce_inv(dyn_params);
924 dce_inv(status);
925
922 if( codec_id == OMAP_DCE_VIDDEC3 ) { 926 if( codec_id == OMAP_DCE_VIDDEC3 ) {
923 version_buf = (void *)(H2P((MemHeader *)((IVIDDEC3_Status *)status)->data.buf)); 927 version_buf = (void *)(H2P((MemHeader *)((IVIDDEC3_Status *)status)->data.buf));
924 } else if( codec_id == OMAP_DCE_VIDENC2 ) { 928 } else if( codec_id == OMAP_DCE_VIDENC2 ) {
925 version_buf = (void *)(H2P((MemHeader *)((IVIDENC2_Status *)status)->data.buf)); 929 version_buf = (void *)(H2P((MemHeader *)((IVIDENC2_Status *)status)->data.buf));
926 } 930 }
927 931
928 dce_inv(dyn_params);
929 dce_inv(status);
930 dce_inv(version_buf); 932 dce_inv(version_buf);
931 933
932 ivahd_acquire(); 934 ivahd_acquire();