This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

syslink 2.20.02.20 vs syslink 2.21.01.05

Hi,

 

a customer is using EZSDK 5.05 for DM8148 which comes with syslink 2.20.02.20. They are having to patch that syslink per the log below to make it work for them. At the same time they have tested with the latest syslink 2.21.01.05, and it works out of box in their system, without any patches.

The basic question is given the patching below, should the customer use syslink 2.21 inside of 5.05 EZSDK, they just want to make sure that syslink 2.21 has all good fixes and it does not break other things. Maybe you can comment on the kind of patching below.

 

 

Here are the issue with syslink 2.20.02.20

 

  1. Failed to compile samples – patch the syslink_2_20_02_20/packages/ti/syslink/samples/hlos/slaveLoader/usr/Linux/Makefile to have these target to get it working (this is in 2.21.01.05)

 

ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/packages/ti/syslink/samples/hlos/slaveLoader/usr/Linux/Makefile

84,6 → 84,15

debug:          build $(SAMPLES_DIR)/$(APP_LIB)_debug     $(SAMPLES_DIR)/$(SAMPLE).exe_debug    move_debug

release:        build $(SAMPLES_DIR)/$(APP_LIB)_release   $(SAMPLES_DIR)/$(SAMPLE).exe_release  move_release

 

+ # Explicit dependencies

+ $(SAMPLES_DIR)/$(APP_LIB)_debug: build

+ $(SAMPLES_DIR)/$(APP_LIB)_release: build

+ $(SAMPLES_DIR)/$(SAMPLE).exe_debug: build

+ $(SAMPLES_DIR)/$(SAMPLE).exe_release: build

 

+ move_debug:   build $(SAMPLES_DIR)/$(APP_LIB)_debug   $(SAMPLES_DIR)/$(SAMPLE).exe_debug

+ move_release: build $(SAMPLES_DIR)/$(APP_LIB)_release $(SAMPLES_DIR)/$(SAMPLE).exe_release

 

build:

        @echo Building $(SAMPLES_DIR)/$(APP_LIB) "("$(WAY)")"

        $(MKDIR) $(LIB_DIR)

 

Once got it compile, the dsp does not work so we get no audio.

 

Opening proc handle. DSP: 0

Open result = 159195136

Attaching...Attach result = 75886592

Loading /opt/2gig/adtd/bootSpin-good.out

Load Complete. Status: 50618368

Starting DSP

DSP Started Status: 111693824

Pre download entry point is [0x42854648]

Starting download of file: /opt/2gig/adtd/2Gig.bin

Address failure: 10809828

Address failure: 10809a28

Address failure: 10809c28

Address failure: 10809e28

Address failure: 1080a028

Address failure: 1080a228

Address failure: 1080a428

Address failure: 1080a628

Address failure: 1080a828

Address failure: 1080aa28

Address failure: 1080ac28

Address failure: 1080ae28

Address failure: 1080b028

Address failure: 1080b228

Address failure: 1080b428

Address failure: 1080b628

Address failure: 1080b828

Address failure: 1080ba28

Address failure: 1080bc28

Address failure: 1080be28

Address failure: 1080c028

Address failure: 1080c228

Address failure: 1080c428

Address failure: 1080c628

Address failure: 1080c828

Address failure: 1080ca28

Address failure: 1080cc28

Address failure: 1080ce28

Address failure: 1080d028

Address failure: 1080d228

Address failure: 1080d428

Address failure: 1080d628

Address failure: 1080d828

Address failure: 1080da28

Address failure: 1080dc28

Address failure: 1080de28

Address failure: 1080e028

Address failure: 1080e228

Address failure: 1080e428

Address failure: 1080e628

Address failure: 1080e828

Address failure: 1080ea28

Address failure: 1080ec28

Address failure: 1080ee28

Address failure: 1080f028

Address failure: 1080f228

Address failure: 1080f428

Address failure: 1080f628

Address failure: 1080f828

Address failure: 1080fa28

Address failure: 1080fc28

Address failure: 1080fe28

Address failure: 10810028

Address failure: 10810228

Download Complete. Status: 8

entry point is [0x42854648]

bootaccess is [0x31]

bootaccess is [0x31]

Boot address is 9a0ff001

Entry Point String is 42854648

Boot address is 42854401

resetaccess is [0x31]

resetaccess is [0x31]

reset is 1

 

 

Patch the following to get it working again:

 

--- syslink_2_20_02_20/packages/ti/syslink/procMgr/common/loaders/Elf/DLOAD/DLOAD/dload.c        2012-09-29 23:02:55.000000000 -0600

+++ syslink_2_21_01_05/packages/ti/syslink/procMgr/common/loaders/Elf/DLOAD/DLOAD/dload.c     2013-03-07 16:22:41.877161607 -0700

@@ -618,6 +618,7 @@

          DLIMP_Loaded_Segment seg;

          seg.obj_desc = DLIF_malloc(sizeof(struct DLOAD_MEMORY_SEGMENT));

          seg.phdr.p_vaddr = dyn_module->phdr[i].p_vaddr;

+         seg.phdr.p_paddr = dyn_module->phdr[i].p_paddr;

          seg.phdr.p_offset = dyn_module->phdr[i].p_offset;

          seg.obj_desc->target_page = 0; /*not used*/

          seg.modified = 0;

@@ -951,7 +952,7 @@

       targ_req.flags = 0;

       if (seg[i].phdr.p_flags & PF_X) targ_req.flags |= DLOAD_SF_executable;

       targ_req.align = 0x20;

-      seg[i].obj_desc->target_address = (TARGET_ADDRESS)seg[i].phdr.p_vaddr;

+      seg[i].obj_desc->target_address = (TARGET_ADDRESS)seg[i].phdr.p_paddr;

       targ_req.flags |= DLOAD_SF_relocatable;

       targ_req.fp = fd;

       targ_req.segment = seg[i].obj_desc;

 

 

--- syslink_2_20_02_20/packages/ti/syslink/procMgr/common/ProcMgr.c           2012-09-29 23:03:16.000000000 -0600

+++ syslink_2_21_01_05/packages/ti/syslink/procMgr/common/ProcMgr.c        2013-03-07 16:22:42.117161608 -0700

@@ -894,8 +894,7 @@

     ProcMgr_AddrInfo         aInfo;

     (Void)index;

 

-    GT_2trace(curTrace, GT_ENTER,

-        "--> ProcMgr_attach: handle=0x%x, params=0x%x", handle, params);

+    GT_2trace(curTrace, GT_ENTER, "ProcMgr_attach", handle, params);

 

     GT_assert (curTrace, (handle != NULL));

 

@@ -1059,7 +1058,7 @@

     }

#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */

 

-    GT_1trace(curTrace, GT_LEAVE, "<-- ProcMgr_attach: status=0x%x", status);

+    GT_1trace(curTrace, GT_LEAVE, "ProcMgr_attach", status);

 

     /*! @retval ProcMgr_S_SUCCESS Operation successful */

     return (status);

@@ -1629,112 +1628,121 @@

     return state;

}

 

-

-/* Function to read from the slave Processor's memory space. */

-Int

-ProcMgr_read (ProcMgr_Handle handle,

-              UInt32         procAddr,

-              UInt32 *       numBytes,

-              Ptr            buffer)

+/*

+ *  ======== ProcMgr_read ========

+ *  Read from the slave processor's memory space.

+ */

+Int ProcMgr_read(ProcMgr_Handle handle, UInt32 procAddr, UInt32 *numBytes,

+        Ptr buffer)

{

-    Int              status         = ProcMgr_S_SUCCESS;

-    ProcMgr_Object * procMgrHandle  = (ProcMgr_Object *) handle;

-    IArg             key;

-    Ptr              addr;

+    Int                 status = ProcMgr_S_SUCCESS;

+    ProcMgr_Object *    procMgrHandle = (ProcMgr_Object *)handle;

+    IArg                key;

+    Ptr                 mpa; /* master physical address */

+    Ptr                 kva; /* kernel virtual address */

 

-    GT_4trace (curTrace, GT_ENTER, "ProcMgr_read",

-               handle, procAddr, numBytes, buffer);

+    GT_4trace(curTrace, GT_ENTER, "ProcMgr_read", handle, procAddr, numBytes,

+            buffer);

 

-    GT_assert (curTrace, (handle   != NULL));

-    GT_assert (curTrace, (numBytes != NULL));

-    GT_assert (curTrace, (buffer   != NULL));

+    GT_assert(curTrace, (handle != NULL));

+    GT_assert(curTrace, (numBytes != NULL));

+    GT_assert(curTrace, (buffer != NULL));

 

 #if !defined(SYSLINK_BUILD_OPTIMIZE)

     if (ProcMgr_state.refCount < 0) {

-        GT_setFailureReason (curTrace,

-                             GT_4CLASS,

-                             "ProcMgr_read",

-                             ProcMgr_E_INVALIDSTATE,

-                             "Module was not initialized!");

+        GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                ProcMgr_E_INVALIDSTATE, "Module was not initialized!");

+        status = ProcMgr_E_FAIL;

     }

-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE)*/

+#endif

#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)

-    if (handle == NULL) {

+    if ((status == ProcMgr_S_SUCCESS) && (handle == NULL)) {

         /*! @retval  ProcMgr_E_HANDLE Invalid argument */

         status = ProcMgr_E_HANDLE;

-        GT_setFailureReason (curTrace,

-                             GT_4CLASS,

-                             "ProcMgr_read",

-                             status,

-                             "Invalid handle specified");

+        GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                status, "Invalid handle specified");

     }

-    else if (numBytes == NULL) {

+    if ((status == ProcMgr_S_SUCCESS) && (numBytes == NULL)) {

         /*! @retval  ProcMgr_E_INVALIDARG Invalid value NULL provided for

                      argument numBytes */

         status = ProcMgr_E_INVALIDARG;

-        GT_setFailureReason (curTrace,

-                           GT_4CLASS,

-                           "ProcMgr_read",

-                           status,

-                           "Invalid value NULL provided for argument numBytes");

+        GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                status, "Invalid value NULL provided for argument numBytes");

     }

-    else if (buffer == NULL) {

+    if ((status == ProcMgr_S_SUCCESS) && (buffer == NULL)) {

         /*! @retval  ProcMgr_E_INVALIDARG Invalid value NULL provided for

                      argument buffer */

         status = ProcMgr_E_INVALIDARG;

-        GT_setFailureReason (curTrace,

-                             GT_4CLASS,

-                             "ProcMgr_read",

-                             status,

-                             "Invalid value NULL provided for argument buffer");

+        GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                status, "Invalid value NULL provided for argument buffer");

     }

-    else {

-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */

-        /* Check if the address is already mapped */

-        status = ProcMgr_translateAddr (handle,

-                                        (Ptr *) &addr,

-                                        ProcMgr_AddrType_MasterKnlVirt,

-                                        (Ptr) procAddr,

-                                        ProcMgr_AddrType_SlaveVirt);

-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)

+#endif

+    /* Ensure the address is properly mapped. Do this by checking

+     * the current translation table which is updated each time an

+     * address mapping is performed. However, this must be done in

+     * two steps because we cannot map directly from slave virtual

+     * to kernel virtual. If the following two translations succeed,

+     * then we know the address has been mapped:

+     *   1) translate slave virtual to master physical

+     *   2) translate master physical to kernel virtual

+     */

+    if (status == ProcMgr_S_SUCCESS) {

+        status = ProcMgr_translateAddr(handle, &mpa,

+                ProcMgr_AddrType_MasterPhys, (Ptr)procAddr,

+                ProcMgr_AddrType_SlaveVirt);

+

         if (status < 0) {

-            GT_setFailureReason (curTrace,

-                                 GT_4CLASS,

-                                 "ProcMgr_read",

-                                 status,

-                                 "Address is not mapped!");

+            GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                    status, "failed to translate slave virtual to "

+                    "master physical");

         }

         else {

-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */

-            /* Enter critical section protection. */

-            key = IGateProvider_enter (ProcMgr_state.gateHandle);

+            status = ProcMgr_S_SUCCESS; /* ensure proper return code */

+        }

+    }

 

-            /* Read from the slave processor's memory. */

-            status = Processor_read (procMgrHandle->procHandle,

-                                     (UInt32)addr,

-                                     numBytes,

-                                     buffer);

-            /* Leave critical section protection. */

-            IGateProvider_leave (ProcMgr_state.gateHandle, key);

-#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)

-            if (status < 0) {

-                GT_setFailureReason (curTrace,

-                               GT_4CLASS,

-                               "ProcMgr_read",

-                               status,

-                               "Failed to get read from slave processor's memory!");

-            }

+    if (status == ProcMgr_S_SUCCESS) {

+        status = ProcMgr_translateAddr(handle, &kva,

+                ProcMgr_AddrType_MasterKnlVirt, mpa,

+                ProcMgr_AddrType_MasterPhys);

+

+        if (status < 0) {

+            GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                    status, "target address is not mapped");

+        }

+        else {

+            status = ProcMgr_S_SUCCESS; /* ensure proper return code */

         }

     }

-#endif /* #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS) */

 

-    GT_1trace (curTrace, GT_LEAVE, "ProcMgr_read", status);

+    /* slave's address is mapped, proceed with data read */

+    if (status == ProcMgr_S_SUCCESS) {

+

+        key = IGateProvider_enter(ProcMgr_state.gateHandle);

+

+        /* read from the slave processor's memory */

+        status = Processor_read(procMgrHandle->procHandle, (UInt32)kva,

+                numBytes, buffer);

+

+

+        IGateProvider_leave(ProcMgr_state.gateHandle, key);

+

+        if (status < 0) {

+            GT_setFailureReason(curTrace, GT_4CLASS, "ProcMgr_read",

+                    status, "failed to read slave's memory");

+            status = ProcMgr_E_FAIL;

+        }

+        else {

+            status = ProcMgr_S_SUCCESS; /* ensure proper return code */

+        }

+    }

+

+    GT_1trace(curTrace, GT_LEAVE, "ProcMgr_read", status);

 

     /*! @retval ProcMgr_S_SUCCESS Operation successful */

-    return status;

+    return(status);

}

 

-

/*

  *  ======== ProcMgr_write ========

  *  Write into the slave processor's memory space.

@@ -1742,11 +1750,11 @@

Int ProcMgr_write(ProcMgr_Handle handle, UInt32 procAddr, UInt32 *numBytes,

         Ptr buffer)

{

-    Int              status = ProcMgr_S_SUCCESS;

-    ProcMgr_Object * procMgrHandle = (ProcMgr_Object *)handle;

-    IArg             key;

-    Ptr              mpa; /* master physical address */

-    Ptr              kva; /* kernel virtual address */

+    Int                 status = ProcMgr_S_SUCCESS;

+    ProcMgr_Object *    procMgrHandle = (ProcMgr_Object *)handle;

+    IArg                key;

+    Ptr                 mpa; /* master physical address */

+    Ptr                 kva; /* kernel virtual address */

 

     GT_4trace(curTrace, GT_ENTER, "ProcMgr_write",

             handle, procAddr, numBytes, buffer);

@@ -1804,8 +1812,7 @@

                     "master physical");

         }

         else {

-            /* ensure proper return code */

-            status = ProcMgr_S_SUCCESS;

+            status = ProcMgr_S_SUCCESS; /* ensure proper return code */

         }

     }

 

@@ -1819,30 +1826,29 @@

                     status, "target address is not mapped");

         }

         else {

-            /* ensure proper return code */

-            status = ProcMgr_S_SUCCESS;

+            status = ProcMgr_S_SUCCESS; /* ensure proper return code */

         }

     }

 

+    /* slave's address is mapped, proceed with data write */

     if (status == ProcMgr_S_SUCCESS) {

-        /* enter critical section protection */

+

         key = IGateProvider_enter(ProcMgr_state.gateHandle);

 

         /* write into the slave processor's memory */

         status = Processor_write(procMgrHandle->procHandle, (UInt32)kva,

                 numBytes, buffer);

 

-        /* leave critical section protection */

+

         IGateProvider_leave(ProcMgr_state.gateHandle, key);

 

         if (status < 0) {

             GT_setFailureReason (curTrace, GT_4CLASS, "ProcMgr_write",

-                    status, "failed to write slave processor's memory");

+                    status, "failed to write slave's memory");

             status = ProcMgr_E_FAIL;

         }

         else {

-            /* ensure proper return code */

-            status = ProcMgr_S_SUCCESS;

+            status = ProcMgr_S_SUCCESS; /* ensure proper return code */

         }

     }

 

@@ -2071,16 +2077,16 @@

                           GT_2CLASS,

                           "ProcMgr_translateAddr "

                           "Failed to translate address: srcAddr [0x%x] "

-                          "dstAddr [0x%x]\n",

+                          "dstAddr [0x%x]",

                           srcAddr,

                           *dstAddr);

             }

         }

         else {

             GT_2trace (curTrace,

-                       GT_1CLASS,

-                       "    ProcMgr_translateAddr: srcAddr [0x%x] "

-                       "dstAddr [0x%x]\n",

+                       GT_2CLASS,

+                       "ProcMgr_translateAddr: srcAddr [0x%x] "

+                       "dstAddr [0x%x]",

                        srcAddr,

                        *dstAddr);

         }

@@ -2482,6 +2488,7 @@

 

 #if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)

                         if (status < 0) {

+                            status = ProcMgr_E_MAP;

                             GT_setFailureReason(curTrace, GT_4CLASS,

                                 "_ProcMgr_map", status, "Processor_map failed");

                         }

@@ -2512,12 +2519,12 @@

                         dstAddr = addrInfo->addr [ProcMgr_AddrType_SlaveVirt];

                         dstAddr &= ~(0x1000 - 1);

                         GT_4trace (curTrace,

-                                   GT_1CLASS,

+                                   GT_2CLASS,

                                    "_ProcMgr_map for SlaveVirt:\n"

                                    "    dstAddr       [0x%x]\n"

                                    "    sgList.paddr  [0x%x]\n"

                                    "    sgList.offset [0x%x]\n"

-                                   "    sgList.size [0x%x]\n",

+                                   "    sgList.size [0x%x]",

                                    dstAddr,

                                    sgList.paddr,

                                    sgList.offset,

@@ -2528,6 +2535,7 @@

                                                 &sgList);

#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)

                         if (status < 0) {

+                            status = ProcMgr_E_MAP;

                             GT_setFailureReason (curTrace,

                                              GT_4CLASS,

                                              "_ProcMgr_map",

@@ -2583,6 +2591,7 @@

             }

             else {

                 /* TBD: unmap the mapped */

+                status = ProcMgr_E_MAP;

                 GT_setFailureReason (curTrace,

                                      GT_4CLASS,

                                      "_ProcMgr_map",

@@ -2736,13 +2745,13 @@

                 && (procMgrHandle->memEntries [i].inUse == TRUE))   {

                 mme = &procMgrHandle->memEntries [i];

                 GT_5trace (curTrace,

-                     GT_1CLASS,

+                     GT_3CLASS,

                  "_ProcMgr_unmap check:\n"

                  "    unmapType                                       [0x%x]\n"

                  "    srcAddrType                                     [0x%x]\n"

                  "    mme->info.addr [ProcMgr_AddrType_MasterPhys]    [0x%x]\n"

                  "    mme->info.addr [ProcMgr_AddrType_SlaveVirt]     [0x%x]\n"

-                 "    mme->info.addr [ProcMgr_AddrType_MasterKnlVirt] [0x%x]\n",

+                 "    mme->info.addr [ProcMgr_AddrType_MasterKnlVirt] [0x%x]",

                  unmapType,

                  srcAddrType,

                  mme->info.addr [ProcMgr_AddrType_MasterPhys],

@@ -2782,13 +2791,13 @@

                     mme = &procMgrHandle->memEntries [i];

 

                     GT_5trace (curTrace,

-                               GT_1CLASS,

+                               GT_3CLASS,

                  "_ProcMgr_unmap check:\n"

                  "    unmapType                                       [0x%x]\n"

                  "    srcAddrType                                     [0x%x]\n"

                  "    mme->info.addr [ProcMgr_AddrType_MasterPhys]    [0x%x]\n"

                  "    mme->info.addr [ProcMgr_AddrType_SlaveVirt]     [0x%x]\n"

-                 "    mme->info.addr [ProcMgr_AddrType_MasterKnlVirt] [0x%x]\n",

+                 "    mme->info.addr [ProcMgr_AddrType_MasterKnlVirt] [0x%x]",

                                unmapType,

                                srcAddrType,

                                mme->info.addr [ProcMgr_AddrType_MasterPhys],

@@ -2836,7 +2845,7 @@

                  "    srcAddrType                                     [0x%x]\n"

                  "    addrInfo->addr [ProcMgr_AddrType_MasterPhys]    [0x%x]\n"

                  "    addrInfo->addr [ProcMgr_AddrType_SlaveVirt]     [0x%x]\n"

-                 "    addrInfo->addr [ProcMgr_AddrType_MasterKnlVirt] [0x%x]\n",

+                 "    addrInfo->addr [ProcMgr_AddrType_MasterKnlVirt] [0x%x]",

                  unmapType,

                  srcAddrType,

                  addrInfo->addr [ProcMgr_AddrType_MasterPhys],

@@ -2872,6 +2881,7 @@

                                           mme->info.size);

#if !defined(SYSLINK_BUILD_OPTIMIZE) && defined (SYSLINK_BUILD_HLOS)

                 if (status < 0) {

+                    status = ProcMgr_E_MAP;

                     GT_setFailureReason (curTrace,

                                          GT_4CLASS,

                                          "_ProcMgr_unmap",

 

 Thanks,

--Gunter

 

  • Hi Gunter,

    SysLink 2.21.00.05 has been built with newer versions of IPC (1.25.01.09), BIOS (6.34.03.19), and xdctools (3.24.03.33)
    than syslink 2.20.00.20 (IPC 1.24.03.32, BIOS 6.33.05.46, xdctools 3.23.03.53).  Newer versions of BIOS, IPC, and xdctools are used
    to get bug fixes or support for new devices. If the customer's samples build and run with the newer syslink, it should be fine to use it.

    Best regards,

        Janet