index 6b797e471e652af45594f80dc8699855faf38c95..659757b52bfe28aa1deb279f561480f813e24857 100644 (file)
/*
- * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
+ * Copyright (c) 2012-2018 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
}
sharedAddr = SharedRegion_getPtr(sharedShmBase);
+ if ( sharedAddr == NULL ) {
+ *handlePtr = NULL;
+ return (ListMP_E_NOTFOUND);
+ }
status = ListMP_openByAddr(sharedAddr, handlePtr);
obj->cacheLineSize = SharedRegion_getCacheLineSize(obj->regionId);
#ifdef xdc_target__isaCompatible_v7A
- /* ARM speculative execution might have pulled attrs into cache */
- if (obj->cacheEnabled) {
- Cache_inv(obj->attrs, sizeof(ti_sdo_ipc_ListMP_Attrs), Cache_Type_ALL,
+ /* ARM speculative execution might have pulled attrs into cache */
+ if (obj->cacheEnabled) {
+ Cache_inv(obj->attrs, sizeof(ti_sdo_ipc_ListMP_Attrs), Cache_Type_ALL,
TRUE);
- }
+ }
#endif
/* get the local address of the SRPtr */
localAddr = SharedRegion_getPtr(obj->attrs->gateMPAddr);
+ /* Do NULL check on localAddr */
+ Assert_isTrue(localAddr != NULL, ti_sdo_ipc_Ipc_A_internal);
+
status = GateMP_openByAddr(localAddr, (GateMP_Handle *)&(obj->gate));
if (status != GateMP_S_SUCCESS) {
Error_raise(eb, ti_sdo_ipc_Ipc_E_internal, 0, 0);