summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 61d61dd)
raw | patch | inline | side by side (parent: 61d61dd)
author | vwan@ti.com <vwan@ti.com> | |
Thu, 5 Feb 2015 19:32:48 +0000 (11:32 -0800) | ||
committer | Robert Tivy <rtivy@ti.com> | |
Tue, 10 Feb 2015 19:04:06 +0000 (11:04 -0800) |
This commit eliminates all build warnings in the QNX IPC build process.
It addresses SDOCM00113501.
Signed-off-by: VW <vwan@ti.com>
It addresses SDOCM00113501.
Signed-off-by: VW <vwan@ti.com>
18 files changed:
diff --git a/qnx/src/api/MessageQ.c b/qnx/src/api/MessageQ.c
index 66a9219995041afcd99e630fcbc40381a6686e44..bea345111e264ba1cd629759d09da150e8612b07 100644 (file)
--- a/qnx/src/api/MessageQ.c
+++ b/qnx/src/api/MessageQ.c
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Int status = MessageQ_S_SUCCESS;
MessageQ_Object * obj = NULL;
UInt16 queueIndex = 0u;
- UInt16 procId;
MessageQDrv_CmdArgs cmdArgs;
int fildes[2];
MessageQ_Params ps;
/* Populate the params member */
memcpy(&obj->params, &ps, sizeof(ps));
- procId = MultiProc_self();
obj->queue = cmdArgs.args.create.queueId;
obj->serverHandle = cmdArgs.args.create.handle;
{
MessageQ_Object * obj = (MessageQ_Object *) handle;
char buf = 'n';
- int numBytes;
/* Write to pipe to awaken any threads blocked on this messageQ: */
- numBytes = write(obj->unblockFdW, &buf, 1);
+ write(obj->unblockFdW, &buf, 1);
}
/* Embeds a source message queue into a message. */
PRINTVERBOSE1("transportGet: read from fd: %d\n", fd)
ret = ioctl(fd, TIIPC_IOCGETREMOTE, &remote);
+ if (ret == -1) {
+ printf("ioctl failed: %s (%d)\n", strerror(errno), errno);
+ status = MessageQ_E_FAIL;
+ goto exit;
+ }
PRINTVERBOSE3("\tReceived a msg: byteCount: %d, rpmsg addr: %d, rpmsg \
proc: %d\n", byteCount, remote.remote_addr, remote.remote_proc)
- PRINTVERBOSE2("\tMessage Id: %d, Message size: %d\n", msg->msgId, msg->msgSize)
+ PRINTVERBOSE2("\tMessage Id: %d, Message size: %d\n", msg->msgId,
+ msg->msgSize)
*retMsg = msg;
index 514afbcf922986e0ecf58c07056e8b6225a05fd5..32608ab367e33f84a50e55f78c1d2544f62c358b 100644 (file)
/*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Void GateMutex_leave (GateMutex_Handle gmHandle, IArg key)
{
GateMutex_Object * obj = (GateMutex_Object *)gmHandle;
+#if defined(IPC_BUILD_DEBUG)
int ret;
ret = pthread_mutex_unlock(&(obj->mutex));
assert(ret == 0);
+#else
+ pthread_mutex_unlock(&(obj->mutex));
+#endif
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c b/qnx/src/ipc3x_dev/ti/syslink/build/Qnx/resmgr/syslink_main.c
index 8025b935448a13fbf12f0b1a0ef8f92d037e63c7..5979e6fc76e6a88ca06572f5acd4185bedddcc19 100644 (file)
int c;
int hib_enable = 1;
uint32_t hib_timeout = PM_HIB_DEFAULT_TIME;
- char *user_parm = NULL;
struct stat sbuf;
int i = 0;
char * abs_path = NULL;
/* Parse the input args */
while (1)
{
- c = getopt (argc, argv, "H:T:U:gc:dv:a:");
+ c = getopt (argc, argv, "H:T:gc:dv:a:");
if (c == -1)
break;
hib_timeout = atoi(optarg);
break;
#endif
- case 'U':
- user_parm = optarg;
- break;
case 'd':
disableRecovery = true;
break;
return(-1);
}
-#if (_NTO_VERSION >= 800)
- /* Relinquish privileges */
- status = procmgr_ability( 0,
- DENY_ALL | PROCMGR_AID_SPAWN,
- DENY_ALL | PROCMGR_AID_FORK,
- PROCMGR_ADN_NONROOT | PROCMGR_AOP_ALLOW | PROCMGR_AID_MEM_PEER,
- PROCMGR_ADN_NONROOT | PROCMGR_AOP_ALLOW | PROCMGR_AID_MEM_PHYS,
- PROCMGR_ADN_NONROOT | PROCMGR_AOP_ALLOW | PROCMGR_AID_INTERRUPT,
- PROCMGR_ADN_NONROOT | PROCMGR_AOP_ALLOW | PROCMGR_AID_PATHSPACE,
- PROCMGR_ADN_NONROOT | PROCMGR_AOP_ALLOW | PROCMGR_AID_RSRCDBMGR,
- PROCMGR_ADN_ROOT | PROCMGR_AOP_ALLOW | PROCMGR_AOP_LOCK | PROCMGR_AOP_SUBRANGE | PROCMGR_AID_SETUID,
- (uint64_t)1, (uint64_t)~0,
- PROCMGR_ADN_ROOT | PROCMGR_AOP_ALLOW | PROCMGR_AOP_LOCK | PROCMGR_AOP_SUBRANGE | PROCMGR_AID_SETGID,
- (uint64_t)1, (uint64_t)~0,
- PROCMGR_ADN_ROOT | PROCMGR_AOP_DENY | PROCMGR_AOP_LOCK | PROCMGR_AID_EOL);
-
- if (status != EOK) {
- Osal_printf("procmgr_ability failed! errno=%d", status);
- return EXIT_FAILURE;
- }
-
- /* Reduce priority to either what defined from command line or at least nobody */
- if (user_parm != NULL) {
- if (set_ids_from_arg(user_parm) < 0) {
- Osal_printf("unable to set uid/gid - %s", strerror(errno));
- return EXIT_FAILURE;
- }
- } else {
- if (setuid(99) != 0) {
- Osal_printf("unable to set uid - %s", strerror(errno));
- return EXIT_FAILURE;
- }
- }
-#endif
-
/* make this a daemon process */
if (-1 == procmgr_daemon(EXIT_SUCCESS,
PROCMGR_DAEMON_NOCLOSE | PROCMGR_DAEMON_NODEVNULL)) {
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/VAYUIpuHalBoot.c b/qnx/src/ipc3x_dev/ti/syslink/family/common/vayu/vayuipu/VAYUIpuHalBoot.c
index 66fd2a292bdb66734b6468f2c575ec31bfaa93b8..3a4538c2a9678865f6ffc7876b1f050550ccfe15 100644 (file)
VAYUIPU_halBootCtrl (Ptr halObj, Processor_BootCtrlCmd cmd, Ptr args)
{
Int status = PROCESSOR_SUCCESS;
- VAYUIPU_HalObject * halObject = NULL;
GT_3trace (curTrace, GT_ENTER, "VAYUIPU_halBootCtrl", halObj, cmd, args);
GT_assert (curTrace, (halObj != NULL));
GT_assert (curTrace, (cmd < Processor_BootCtrlCmd_EndValue));
- halObject = (VAYUIPU_HalObject *) halObj;
-
switch (cmd) {
case Processor_BootCtrlCmd_SetEntryPoint:
{
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayudsp/VAYUDspEnabler.c b/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayudsp/VAYUDspEnabler.c
index aab0af5981db734706187455927fe652ec7d687b..d2283618e1c3e9d74e6392fe0a5cb27962d2e0ff 100644 (file)
*
* ============================================================================
*
- * Copyright (c) 2013, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015, Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
struct pg_table_attrs *pt = pt_Table;
struct iotlb_entry *mapAttrs;
int status = 0;
- VAYUDSP_HalMmuEntryInfo setPteInfo;
mapAttrs = Memory_alloc(0, sizeof(struct iotlb_entry), 0, NULL);
l1_base_va = pt->l1_base_va;
mapAttrs->da = va;
mapAttrs->pa = pa;
mapAttrs->pgsz = MMU_CAM_PGSZ_16M;
- setPteInfo.elementSize = attrs->element_size;
- setPteInfo.endianism = attrs->endianism;
- setPteInfo.masterPhyAddr = pa;
- setPteInfo.mixedSize = attrs->mixedSize;
- setPteInfo.size = size;
- setPteInfo.slaveVirtAddr = va;
status = hw_mmu_pte_set(pg_tbl_va, pa, va, size, attrs);
if (status == RET_OK)
@@ -1404,9 +1397,6 @@ static Int rproc_mem_unmap (UInt32 mmuBase, struct pg_table_attrs * p_pt_attrs,
UInt32 rem_bytes_l2;
UInt32 vaCurr;
Int status = 0;
- UInt32 temp;
- UInt32 pAddr;
- UInt32 numof4Kpages = 0;
if (mmuBase == 0) {
status = -ENOMEM;
@@ -1475,14 +1465,6 @@ static Int rproc_mem_unmap (UInt32 mmuBase, struct pg_table_attrs * p_pt_attrs,
if ((pte_size != 0) && (rem_bytes_l2
>= pte_size) &&
!(vaCurr & (pte_size - 1))) {
- /* Collect Physical addresses from VA */
- pAddr = (pte_val & ~(pte_size - 1));
- if (pte_size == HW_PAGE_SIZE_64KB)
- numof4Kpages = 16;
- else
- numof4Kpages = 1;
- temp = 0;
-
if (hw_mmu_pte_clear(pte_addr_l2,
vaCurr, pte_size) == RET_OK) {
rem_bytes_l2 -= pte_size;
@@ -1520,13 +1502,6 @@ static Int rproc_mem_unmap (UInt32 mmuBase, struct pg_table_attrs * p_pt_attrs,
/* pte_size = 1 MB or 16 MB */
if ((pte_size != 0) && (rem_bytes >= pte_size) &&
!(vaCurr & (pte_size - 1))) {
- if (pte_size == HW_PAGE_SIZE_1MB)
- numof4Kpages = 256;
- else
- numof4Kpages = 4096;
- temp = 0;
- /* Collect Physical addresses from VA */
- pAddr = (pte_val & ~(pte_size - 1));
if (hw_mmu_pte_clear(L1_base_va, vaCurr,
pte_size) == RET_OK) {
rem_bytes -= pte_size;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayudsp/VAYUDspHalMmu.c b/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayudsp/VAYUDspHalMmu.c
index de4ea27650fb65729a795d923175581c07e3f802..560e4886acbc28d18a1f1ab15ddcce80e71b4ae6 100644 (file)
case Processor_MmuCtrlCmd_AddEntry:
{
- VAYUDSP_HalMmuCtrlArgs_AddEntry * addEntry;
- addEntry = (VAYUDSP_HalMmuCtrlArgs_AddEntry *) args;
-
- halObject = (VAYUDSP_HalObject *) halObj;
- /* Add the entry in TLB for new request */
- //status = _VAYUDSP_halMmuAddEntry (halObject,addEntry) ;
-#if !defined(IPC_BUILD_OPTIMIZE)
- if (status < 0) {
- /*! @retval PROCESSOR_E_FAIL Failed to dynamically add DSP MMU
- * entry. */
- status = PROCESSOR_E_FAIL;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUDSP_halMmuCtrl",
- status,
- "Failed to dynamically add DSP MMU entry");
- }
-#endif /* if !defined(IPC_BUILD_OPTIMIZE) */
}
break;
case Processor_MmuCtrlCmd_DeleteEntry:
{
- VAYUDSP_HalMmuCtrlArgs_DeleteEntry * deleteEntry;
- deleteEntry = (VAYUDSP_HalMmuCtrlArgs_DeleteEntry *) args;
-
- halObject = (VAYUDSP_HalObject *) halObj;
- /* Add the entry in TLB for new request */
- //status = _VAYUDSP_halMmuDeleteEntry (halObject,deleteEntry);
-#if !defined(IPC_BUILD_OPTIMIZE)
- if (status < 0) {
- /*! @retval PROCESSOR_E_FAIL Failed to dynamically delete DSP
- * MMU entry */
- status = PROCESSOR_E_FAIL;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUDSP_halMmuCtrl",
- status,
- "Failed to dynamically add DSP MMU entry");
- }
-#endif /* if !defined(IPC_BUILD_OPTIMIZE) */
}
break;
UInt32 * iopgd = NULL;
UInt32 currentEntrySize;
VAYUDSP_HalMmuEntryInfo currentEntry;
- VAYUDSP_HalMmuObject * mmu0Obj, *mmu1Obj;
//UInt32 clearBytes = 0;
GT_2trace (curTrace, GT_ENTER, "_VAYUDSP_halMmuDeleteEntry",
GT_assert (curTrace, (entry != NULL));
GT_assert (curTrace, (entry->size != 0));
- mmu0Obj = &(halObject->mmu0Obj);
- mmu1Obj = &(halObject->mmu1Obj);
-
/* Add the entry (or entries) */
Memory_copy(¤tEntry,
entry,
}
+#ifdef MMUTEST
static ULONG HAL_MMU_PteAddrL1(const ULONG L1_base, const ULONG va)
{
ULONG TTB_13_to_7, VA_31_to_20, desc_13_to_0;
{
return ( (L2_base & 0xFFFFFC00) | ( (va >> 10) & 0x3FC ) );
}
+#endif
#define OUTREG32(x, y) WRITE_REGISTER_ULONG(x, (ULONG)(y))
struct iotlb_entry *mapAttrs)
{
Int status = 0;
+#ifdef MMUTEST
ULONG pteAddr, pteVal;
Int numEntries = 1;
ULONG physicalAddr = mapAttrs->pa;
while (--numEntries >= 0)
{
-#ifdef MMUTEST
((ULONG*)pteAddr)[numEntries] = pteVal;
-#endif
}
+#endif
return status;
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayuipu/VAYUIpuEnabler.c b/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayuipu/VAYUIpuEnabler.c
index bcadd3236fdec3a70f71d934f3b4da61ed56e609..d92c2bcf2f7a46e112cbdde06837ac4f7ad562cb 100644 (file)
*
* ============================================================================
*
- * Copyright (c) 2013-2014, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015, Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
UInt32 l2_page_num = 0;
struct pg_table_attrs *pt = pt_Table;
int status = 0;
- VAYUIPU_HalMmuEntryInfo setPteInfo;
l1_base_va = pt->l1_base_va;
pg_tbl_va = l1_base_va;
}
}
if (status == 0) {
- setPteInfo.elementSize = attrs->element_size;
- setPteInfo.endianism = attrs->endianism;
- setPteInfo.masterPhyAddr = pa;
- setPteInfo.mixedSize = attrs->mixedSize;
- setPteInfo.size = size;
- setPteInfo.slaveVirtAddr = va;
status = hw_mmu_pte_set(pg_tbl_va, pa, va, size, attrs);
if (status == RET_OK)
status = 0;
UInt32 rem_bytes_l2;
UInt32 vaCurr;
Int status = 0;
- UInt32 temp;
- UInt32 pAddr;
- UInt32 numof4Kpages = 0;
struct pg_table_attrs * p_pt_attrs = NULL;
if (halObject == NULL) {
>= pte_size) &&
!(vaCurr & (pte_size - 1))) {
/* Collect Physical addresses from VA */
- pAddr = (pte_val & ~(pte_size - 1));
- if (pte_size == HW_PAGE_SIZE_64KB)
- numof4Kpages = 16;
- else
- numof4Kpages = 1;
- temp = 0;
-
if (hw_mmu_pte_clear(pte_addr_l2,
vaCurr, pte_size) == RET_OK) {
rem_bytes_l2 -= pte_size;
/* pte_size = 1 MB or 16 MB */
if ((pte_size != 0) && (rem_bytes >= pte_size) &&
!(vaCurr & (pte_size - 1))) {
- if (pte_size == HW_PAGE_SIZE_1MB)
- numof4Kpages = 256;
- else
- numof4Kpages = 4096;
- temp = 0;
/* Collect Physical addresses from VA */
- pAddr = (pte_val & ~(pte_size - 1));
if (hw_mmu_pte_clear(L1_base_va, vaCurr,
pte_size) == RET_OK) {
rem_bytes -= pte_size;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayuipu/VAYUIpuHalMmu.c b/qnx/src/ipc3x_dev/ti/syslink/family/vayu/vayuipu/VAYUIpuHalMmu.c
index 5d486ae4ea8c97882dbfe5e40c3b31db4061f985..2ad5fb8a1d2f6eeeb85e49ac4ec1a7dd8a452bcd 100644 (file)
case Processor_MmuCtrlCmd_AddEntry:
{
- VAYUIPU_HalMmuCtrlArgs_AddEntry * addEntry;
- addEntry = (VAYUIPU_HalMmuCtrlArgs_AddEntry *) args;
-
- halObject = (VAYUIPU_HalObject *) halObj;
- /* Add the entry in TLB for new request */
- //status = _VAYUIPU_halMmuAddEntry (halObject,addEntry) ;
-#if !defined(IPC_BUILD_OPTIMIZE)
- if (status < 0) {
- /*! @retval PROCESSOR_E_FAIL Failed to dynamically add IPU MMU
- * entry. */
- status = PROCESSOR_E_FAIL;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUIPU_halMmuCtrl",
- status,
- "Failed to dynamically add IPU MMU entry");
- }
-#endif /* if !defined(IPC_BUILD_OPTIMIZE) */
}
break;
case Processor_MmuCtrlCmd_DeleteEntry:
{
- VAYUIPU_HalMmuCtrlArgs_DeleteEntry * deleteEntry;
- deleteEntry = (VAYUIPU_HalMmuCtrlArgs_DeleteEntry *) args;
-
- halObject = (VAYUIPU_HalObject *) halObj;
- /* Add the entry in TLB for new request */
- //status = _VAYUIPU_halMmuDeleteEntry (halObject,deleteEntry);
-#if !defined(IPC_BUILD_OPTIMIZE)
- if (status < 0) {
- /*! @retval PROCESSOR_E_FAIL Failed to dynamically delete IPU
- * MMU entry */
- status = PROCESSOR_E_FAIL;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "VAYUIPU_halMmuCtrl",
- status,
- "Failed to dynamically add IPU MMU entry");
- }
-#endif /* if !defined(IPC_BUILD_OPTIMIZE) */
}
break;
UInt32 * iopgd = NULL;
UInt32 currentEntrySize;
VAYUIPU_HalMmuEntryInfo currentEntry;
- VAYUIPU_HalMmuObject * mmuObj;
+ /* VAYUIPU_HalMmuObject * mmuObj; */
//UInt32 clearBytes = 0;
GT_2trace (curTrace, GT_ENTER, "_VAYUIPU_halMmuDeleteEntry",
GT_assert (curTrace, (entry != NULL));
GT_assert (curTrace, (entry->size != 0));
- mmuObj = &(halObject->mmuObj);
+ /* mmuObj = &(halObject->mmuObj); */
/* copy the entry (or entries) */
Memory_copy(¤tEntry,
return status;
}
-
+#ifdef MMUTEST
static ULONG HAL_MMU_PteAddrL1(const ULONG L1_base, const ULONG va)
{
ULONG TTB_13_to_7, VA_31_to_20, desc_13_to_0;
{
return ( (L2_base & 0xFFFFFC00) | ( (va >> 10) & 0x3FC ) );
}
+#endif
#define OUTREG32(x, y) WRITE_REGISTER_ULONG(x, (ULONG)(y))
struct iotlb_entry * mapAttrs)
{
Int status = 0;
+#ifdef MMUTEST
ULONG pteAddr, pteVal;
Int numEntries = 1;
ULONG physicalAddr = mapAttrs->pa;
while (--numEntries >= 0)
{
-#ifdef MMUTEST
((ULONG*)pteAddr)[numEntries] = pteVal;
-#endif
}
-
+#endif
return status;
}
diff --git a/qnx/src/ipc3x_dev/ti/syslink/inc/_GateMP_daemon.h b/qnx/src/ipc3x_dev/ti/syslink/inc/_GateMP_daemon.h
index 87c4f11a679c3a9c07077dbfa8dceeff0261bf85..6fe681a0d7d45a2f30425b1db4ee0f6332bf0e29 100644 (file)
/*
- * Copyright (c) 2013-2014, Texas Instruments Incorporated
+ * Copyright (c) 2013-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
*/
Int GateMP_destroy(Bool forced);
+/*!
+ * Start the GateMP module.
+ */
+Int GateMP_start(Void);
+
+/*!
+ * Stop the GateMP module.
+ */
+Int GateMP_stop(Void);
+
/*!
* Find a free resource id for a particular protection type.
*/
diff --git a/qnx/src/ipc3x_dev/ti/syslink/inc/knl/ProcDefs.h b/qnx/src/ipc3x_dev/ti/syslink/inc/knl/ProcDefs.h
index 3d6b15ccfefddbc143e913965273c44393c0e1c7..3076ee92d5ea2130e9ef45146de671b5f995b331 100644 (file)
/*!< Client callback function. */
Ptr arg;
/*!< Client arg to pass to the callback function. */
- ProcMgr_EventType state[];
+ ProcMgr_State state[];
/*!< States registered for notification. */
} Processor_Register;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Qnx/MessageQCopyDrv.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Qnx/MessageQCopyDrv.c
index f4a86bf6924ddb62f5bd4c1301d47231ffacd27c..2a8dde3f3c54edacebf6c3efd58f365eb7c6c676 100644 (file)
*/
void mqcopy_server_test_cb(MessageQCopy_Handle handle, void * data, int len, void * priv, UInt32 src, UInt16 srcProc)
{
- int status = 0;
char message[MessageQCopy_BUFSIZE];
memcpy(message, data, len);
@@ -184,13 +183,13 @@ void mqcopy_server_test_cb(MessageQCopy_Handle handle, void * data, int len, voi
mqcopy_test_num_msgs++, handle, src, message);
if (mqcopy_test_num_msgs < MQCOPY_TEST_NUM_MSG) {
- status = MessageQCopy_send (srcProc,
- local_procid,
- src,
- local_endpoint,
- MQCOPY_TSET_MSG,
- String_len(MQCOPY_TSET_MSG),
- TRUE);
+ MessageQCopy_send (srcProc,
+ local_procid,
+ src,
+ local_endpoint,
+ MQCOPY_TSET_MSG,
+ String_len(MQCOPY_TSET_MSG),
+ TRUE);
}
else {
OsalSemaphore_post(mqcopy_test_sem);
void mqcopy_client_test_cb(MessageQCopy_Handle handle, void * data, int len, void * priv, UInt32 src, UInt16 srcProc)
{
- int status = 0, i = 0;
+ int i = 0;
char message[MessageQCopy_BUFSIZE];
memcpy(message, data, len);
@@ -282,13 +281,13 @@ void mqcopy_client_test_cb(MessageQCopy_Handle handle, void * data, int len, voi
}
if (i != 10) {
if (mqcopy_test_num_msgs < MQCOPY_TEST_NUM_MSG) {
- status = MessageQCopy_send (mqcopy_test_handles[i].procId,
- local_procid,
- mqcopy_test_handles[i].endpoint,
- local_endpoint,
- MQCOPY_TSET_MSG,
- String_len(MQCOPY_TSET_MSG),
- TRUE);
+ MessageQCopy_send(mqcopy_test_handles[i].procId,
+ local_procid,
+ mqcopy_test_handles[i].endpoint,
+ local_endpoint,
+ MQCOPY_TSET_MSG,
+ String_len(MQCOPY_TSET_MSG),
+ TRUE);
}
else {
OsalSemaphore_post(mqcopy_test_sem);
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Qnx/gatemp_devctl.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/knl/Qnx/gatemp_devctl.c
index 3bd559fc9dfb6497c890dd1226acadb78f552ecc..f8d4f7c01a150211a521020da26f6348642e51fb 100644 (file)
ipc_ocb_t *ocb);
int ipc_gatemp_start(resmgr_context_t *ctp, io_devctl_t *msg,
ipc_ocb_t *ocb);
+int ipc_gatemp_stop(resmgr_context_t *ctp, io_devctl_t *msg,
+ ipc_ocb_t *ocb);
int ipc_gatemp_isSetup(resmgr_context_t *ctp, io_devctl_t *msg,
ipc_ocb_t *ocb);
int ipc_gatemp_stop(resmgr_context_t *ctp, io_devctl_t *msg,
ipc_ocb_t *ocb)
{
- GateMPDrv_CmdArgs * cargs = (GateMPDrv_CmdArgs *)
- (_DEVCTL_DATA (msg->i));
GateMPDrv_CmdArgs * out = (GateMPDrv_CmdArgs *)
(_DEVCTL_DATA (msg->o));
diff --git a/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/usr/Qnx/MessageQCopyDrv.c b/qnx/src/ipc3x_dev/ti/syslink/ipc/hlos/usr/Qnx/MessageQCopyDrv.c
index 870e729cdda6b9169fa3bcccb1a463f070853038..8c7e2b111418503eabb0b0086958dd3367f5710e 100644 (file)
*
* ============================================================================
*
- * Copyright (c) 2011-2012, Texas Instruments Incorporated
+ * Copyright (c) 2011-2015, Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
{
Int status = MessageQCopy_S_SUCCESS;
int osStatus = 0;
- Bool isForked = FALSE;
GT_0trace (curTrace, GT_ENTER, "MessageQCopyDrv_open");
if (MessageQCopyDrv_setup != getpid ()) {
/* Indicates that this is a forked process - Ang - need to check this? */
MessageQCopyDrv_setup = getpid ();
- isForked = TRUE;
}
else {
/* TBD: Protection for refCount. */
diff --git a/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/ProcMgr.c b/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/ProcMgr.c
index d15b7a16aeda5cbd636c96133a3d1f9b3c3dc26a..7dc2fef966f8460307bc92a408431dcbba030cf9 100644 (file)
Int status = ProcMgr_S_SUCCESS;
ProcMgr_Object * procMgrHandle = (ProcMgr_Object *) handle ;
IArg key;
- UInt32 index = 0;
ProcMgr_AttachParams tmpParams;
Processor_AttachParams procAttachParams;
Loader_AttachParams loaderAttachParams;
for (i = 0;
(i < procAttachParams.numMemEntries) && (status >= 0);
i++) {
- index = i;
me = &procAttachParams.memEntries [i];
srcAddr = me->addr [ProcMgr_AddrType_SlaveVirt];
dstAddr = me->addr [ProcMgr_AddrType_MasterPhys];
diff --git a/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/arm_reloc.c b/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/arm_reloc.c
index 3123c6910745dbb876517decf30d8e739e46c8e5..1d0b7b6b6bd099e4bad095ec7ada4e7a5605a971 100644 (file)
--- a/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/arm_reloc.c
+++ b/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/DLOAD/TMS470_DLOAD_REL/arm_reloc.c
uint8_t* address,
uint32_t* addend)
{
+ uint32_t temp;
+
switch (r_type)
{
case R_ARM_ABS32:
case R_ARM_ABS16:
{
*addend = *((uint16_t*)address);
- *addend = SIGN_EXTEND(*addend, 16);
+ temp = SIGN_EXTEND(*addend, 16);
+ *addend = temp;
}
break;
case R_ARM_ABS8:
{
*addend = *address;
- *addend = SIGN_EXTEND(*addend, 8);
+ temp = SIGN_EXTEND(*addend, 8);
+ *addend = temp;
}
break;
for ( ; rid < relnum; rid++)
{
- int32_t r_symid = ELF32_R_SYM(rel_table[rid].r_info);
-
/*---------------------------------------------------------------*/
/* If the relocation offset falls within the segment, process it */
/*---------------------------------------------------------------*/
{
rel_mask_for_group(r_type, reloc_val);
}
-#endif
\ No newline at end of file
+#endif
diff --git a/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/ElfLoader.c b/qnx/src/ipc3x_dev/ti/syslink/procMgr/hlos/knl/loaders/Elf/Qnx/ElfLoader.c
index 7a8cd3bce7420b331473b12d5cd6b9a43108400b..cb4d12596d225725e392dcf4bc001c06d9172050 100644 (file)
{
Int status = LOADER_SUCCESS;
DLOAD_HANDLE elfObject = NULL;
- ElfLoader_Object * object = NULL;
_ElfLoader_Object * elfLoaderObject = NULL;
Loader_Object * handle;
IArg key;
/* Reset handle in Loader handle array. */
ElfLoader_state.loaderHandles [handle->procId] = NULL;
- object = (ElfLoader_Object *) handle->object;
-
/* Free memory used for the ElfLoader object. */
if (handle->object != NULL) {
elfObject = (DLOAD_HANDLE)((ElfLoader_Object *)
elfObj = elfLoaderObj->elfObject;
GT_assert (curTrace, (elfObj != NULL));
- if (!DLOAD_get_entry_point(elfObj, fileId, (TARGET_ADDRESS)entryPt)) {
+ if (!DLOAD_get_entry_point(elfObj, fileId, (TARGET_ADDRESS *)entryPt)) {
status = LOADER_E_FAIL;
}
_ElfLoader_Object * _elfLoaderObj;
Processor_Handle procHandle;
UInt32 procAddr_masterPhys;
- UInt32 procAddr_masterVirt;
ProcMgr_AddrInfo aInfo;
UInt32 numBytes;
Int status = LOADER_SUCCESS;
ProcMgr_AddrType_MasterPhys);
if (status >= 0) {
- procAddr_masterVirt = aInfo.addr [ProcMgr_AddrType_MasterKnlVirt];
-
/* Suspect this function has not been validated, so do a Memcopy */
status = ProcMgr_read (_elfLoaderObj->pmHandle,
sectionInfo->physicalAddress,
diff --git a/qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/NameServer_daemon.c b/qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/NameServer_daemon.c
index bd7cc2a0fb3c618a05eaa64bd2529646984b03ba..09f259800f3fc0d91e08d3aa3b9e71c88e748625 100644 (file)
/*
- * Copyright (c) 2012-2014, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
NameServer_Handle handle;
Int status = NameServer_E_FAIL;
char buf = 'n';
- int numBytes;
int waitFd = NameServer_module->waitFdW;
if (msg->request == NAMESERVER_REQUEST) {
memcpy(&NameServer_module->nsMsg, msg, sizeof(NameServerMsg));
/* Post the eventfd upon which NameServer_get() is waiting */
- numBytes = write(waitFd, &buf, sizeof(buf));
+ write(waitFd, &buf, sizeof(buf));
}
}
Int NameServer_setup(Void)
{
Int status = NameServer_S_SUCCESS;
- UInt16 numProcs;
int fd[2];
pthread_mutex_lock(&NameServer_module->modGate);
goto exit;
}
- numProcs = MultiProc_getNumProcessors();
-
if (pipe(fd) == -1) {
status = NameServer_E_FAIL;
LOG0("NameServer_setup: failed to create waitFd.\n")
if (FD_ISSET(waitFd, &rfds)) {
/* Read, just to balance the write: */
numBytes = read(waitFd, &buf, sizeof(buf));
+ if (numBytes == -1) {
+ LOG0("NameServer_getRemote: read failure\n")
+ status = NameServer_E_FAIL;
+ goto exit;
+ }
/* Process response: */
replyMsg = &NameServer_module->nsMsg;
diff --git a/qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalThread.c b/qnx/src/ipc3x_dev/ti/syslink/utils/hlos/knl/osal/Qnx/OsalThread.c
index 2e818180c1200717c52fd7cbbd80348c0efc9859..e9448efdf27ed22227c519249481228217260e90 100644 (file)
GT_setFailureReason(curTrace,
GT_4CLASS,
"OsalThread_create",
- OSALTHREAD_E_MEMORY,
+ status,
"Memory Allocation failure ");
}
else{