changeset 40:58d50d1f238d

band-aid fix in ETM for the crash on boot (race condition)
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 05 Nov 2015 01:31:02 +0000
parents acba9be2fc15
children c56a4b0bcf38
files chipsetsw/services/etm/etm_api.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/services/etm/etm_api.c	Thu Nov 05 00:56:18 2015 +0000
+++ b/chipsetsw/services/etm/etm_api.c	Thu Nov 05 01:31:02 2015 +0000
@@ -49,6 +49,17 @@
 	/* Type for a registration event. */
 	T_ETM_REGISTER_REQ *etm_registration_p;
 
+	/*
+	 * FreeCalypso change: the following hack is a band-aid fix
+	 * for what appears to be a race condition bug that has always
+	 * been present in TI's TCS211 fw.  It appears that some parts
+	 * of the fw can call etm_register() before ETM has initialized
+	 * itself, and the call to etm_malloc() below results in a
+	 * crash.
+	 */
+	if (!strcmp(name, "TML1"))
+		return ETM_AGAIN;
+
 	tr_etm(TgTrEtmLow, "ETM API: _register bridge function(%s)", name);
 
     /* Allocate the memory for the message to send */