# HG changeset patch # User Mychaela Falconia # Date 1446687062 0 # Node ID 58d50d1f238dcdca11caac6fab7e3708ffc3a60c # Parent acba9be2fc15069cc93bd8061e57e14457eb5a25 band-aid fix in ETM for the crash on boot (race condition) diff -r acba9be2fc15 -r 58d50d1f238d chipsetsw/services/etm/etm_api.c --- 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 */