index e4bb004ba0612e2a2dec6e9aca453e3ddaaf298b..ba60477bef570b2582359c1738039a0beedb8c49 100644 (file)
/*
- * Copyright (c) 2012-2013, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* Search all processors.
*/
status = NameServer_get((NameServer_Handle)GateMP_module->nameServer, name,
- &nsValue, &len, ti_sdo_utils_MultiProc_procIdList);
+ &nsValue, &len, MultiProc_getClusterProcList());
if (status < 0) {
*handlePtr = NULL;
UInt i;
Bits32 *delegateReservedMask;
UInt32 nsValue[6];
+ Int ret;
minAlign = Memory_getMaxDefaultTypeAlign();
if (SharedRegion_getCacheLineSize(0) > minAlign) {
if (GateMP_module->hostSupport == TRUE) {
/* Add special entry to store inuse arrays' location and size */
- nsValue[0] = (UInt32)GateMP_module->remoteSystemInUse;
- nsValue[1] = (UInt32)GateMP_module->remoteCustom1InUse;
- nsValue[2] = (UInt32)GateMP_module->remoteCustom2InUse;
+ ret = _GateMP_virtToPhys(
+ (UInt32)GateMP_module->remoteSystemInUse, &nsValue[0]);
+ Assert_isTrue(ret == GateMP_S_SUCCESS, (Assert_Id)NULL);
+ ret = _GateMP_virtToPhys(
+ (UInt32)GateMP_module->remoteCustom1InUse, &nsValue[1]);
+ Assert_isTrue(ret == GateMP_S_SUCCESS, (Assert_Id)NULL);
+ ret = _GateMP_virtToPhys(
+ (UInt32)GateMP_module->remoteCustom2InUse, &nsValue[2]);
+ Assert_isTrue(ret == GateMP_S_SUCCESS, (Assert_Id)NULL);
nsValue[3] = GateMP_module->numRemoteSystem;
nsValue[4] = GateMP_module->numRemoteCustom1;
nsValue[5] = GateMP_module->numRemoteCustom2;
ti_sdo_ipc_GateMP_Handle *remoteHandles;
UInt8 *inUseArray;
- UInt numResources;
+ UInt size;
/* Cannot call when numOpen is non-zero. */
Assert_isTrue(obj->numOpens == 0, ti_sdo_ipc_GateMP_A_invalidDelete);
inUseArray = GateMP_module->remoteSystemInUse;
remoteHandles = GateMP_module->remoteSystemGates;
- numResources = GateMP_module->numRemoteSystem;
+ size = GateMP_module->numRemoteSystem * sizeof(UInt8);
break;
case GateMP_RemoteProtect_CUSTOM1:
inUseArray = GateMP_module->remoteCustom1InUse;
remoteHandles = GateMP_module->remoteCustom1Gates;
- numResources = GateMP_module->numRemoteCustom1;
+ size = GateMP_module->numRemoteCustom1 * sizeof(UInt8);
break;
case GateMP_RemoteProtect_CUSTOM2:
inUseArray = GateMP_module->remoteCustom2InUse;
remoteHandles = GateMP_module->remoteCustom2Gates;
- numResources = GateMP_module->numRemoteCustom2;
+ size = GateMP_module->numRemoteCustom2 * sizeof(UInt8);
break;
case GateMP_RemoteProtect_NONE:
/*
systemKey = Hwi_disable();
}
+#ifdef xdc_target__isaCompatible_v7A
+ /* ARM speculative execution might have pulled array into cache */
+ if (obj->cacheEnabled) {
+ Cache_inv(inUseArray, size, Cache_Type_ALL, TRUE);
+ }
+#endif
/* update the GateMP resource tracker */
inUseArray[obj->resourceId] = UNUSED;
if (obj->cacheEnabled) {
- Cache_wbInv(inUseArray,
- numResources * sizeof(UInt8),
- Cache_Type_ALL,
- TRUE);
+ Cache_wbInv(inUseArray, size, Cache_Type_ALL, TRUE);
}
if (GateMP_module->defaultGate != NULL) {
{
SharedRegion_SRPtr srPtr;
- if (obj->attrs != NULL) {
- srPtr = SharedRegion_getSRPtr(obj->attrs, obj->regionId);
- }
- else {
- srPtr = NULL;
- }
+ srPtr = SharedRegion_getSRPtr(obj->attrs, obj->regionId);
return (srPtr);
}