index 5666beb713662174aac7bbccbf4a869b21a9a6de..bbb40fadb24507cb7d9f5beb579db2a5f2fd28ac 100644 (file)
/*
- * Copyright (c) 2012, Texas Instruments Incorporated
+ * Copyright (c) 2012-2013, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
/* For PRINTVERBOSE* */
#include <_lad.h>
+/* For MultiProc id to remoteproc index map */
+#include <_MultiProc.h>
+
static Bool verbose = FALSE;
int ConnectSocket(int sock, UInt16 procId, int dst)
/* connect to remote service */
memset(&dstAddr, 0, sizeof(dstAddr));
dstAddr.family = AF_RPMSG;
- /* rpmsg "vproc_id" is one less than the MultiProc ID: */
- dstAddr.vproc_id = procId - 1;
+ /* convert MultiProc 'procId' to remoteproc index */
+ dstAddr.vproc_id = _MultiProc_cfg.rprocList[procId];
dstAddr.addr = dst;
len = sizeof(struct sockaddr_rpmsg);
memset(&srcAddr, 0, sizeof(srcAddr));
srcAddr.family = AF_RPMSG;
/* We bind the remote proc ID, but local address! */
- srcAddr.vproc_id = (rprocId - 1);
+ srcAddr.vproc_id = _MultiProc_cfg.rprocList[rprocId];
srcAddr.addr = localAddr;
len = sizeof(struct sockaddr_rpmsg);