summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f8affd0)
raw | patch | inline | side by side (parent: f8affd0)
author | Angela Stegmaier <angelabaker@ti.com> | |
Fri, 18 Dec 2015 17:05:30 +0000 (11:05 -0600) | ||
committer | Angela Stegmaier <angelabaker@ti.com> | |
Mon, 21 Dec 2015 23:06:16 +0000 (17:06 -0600) |
It is not required that the local endpoint be a certain value
when creating an OmapRpc instance. Since we are performing a
NameMap of the created endpoint to the host, the endpoint can
be any value. In fact, hard-coding the value prevents multiple
MmServiceMgr instances from being created on a processor.
This patch changes the port value from the hard-coded value
of 59 to be a value that is assigned by the RPMessage_create
call. In this way, multiple MmServiceMgr instances can
be created.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
when creating an OmapRpc instance. Since we are performing a
NameMap of the created endpoint to the host, the endpoint can
be any value. In fact, hard-coding the value prevents multiple
MmServiceMgr instances from being created on a processor.
This patch changes the port value from the hard-coded value
of 59 to be a value that is assigned by the RPMessage_create
call. In this way, multiple MmServiceMgr instances can
be created.
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
packages/ti/ipc/mm/MmServiceMgr.c | patch | blob | history | |
packages/ti/srvmgr/omaprpc/OmapRpc.c | patch | blob | history |
index de2d7b8db53a2ef47c9db67c9760d95d6515469f..cfe36d6f3ac95d76ab655c7a2c7499697d88dd2b 100644 (file)
#include "MmServiceMgr.h"
-#define MmServiceMgr_PORT (59)
-
typedef struct {
RcmServer_Params rcmParams;
Int aryLen;
OmapRpc_Handle handle;
handle = OmapRpc_createChannel(name, MultiProc_getId("HOST"),
- MmServiceMgr_PORT, rcmParams, fxnSigTab, delFxn);
+ RPMessage_ASSIGN_ANY, rcmParams, fxnSigTab, delFxn);
if (handle == NULL) {
status = MmServiceMgr_E_FAIL;
index 441d031fbdd0316737ef408796dc08255efb1b86..99fadf5be309b0604d9968eb344f2b304917f6dc 100644 (file)
NameMap_register("rpmsg-rpc", obj->channelName, obj->port);
- System_printf("OMAPRPC: started channel on port: %d\n", obj->port);
+ System_printf("OMAPRPC: started channel %s on port: %d\n", obj->channelName, obj->port);
while (!obj->shutdown) {
goto unload;
}
+ /* set port to the created local endpoint */
+ obj->port = obj->localEndPt;
+
Task_Params_init(&taskParams);
taskParams.instance->name = channelName;
taskParams.stackSize = 0x2000; /* must cover all proxy stack usage */