Changed the DDR rate to 1333 and fixed the HUA boot from NOR problem
[keystone-rtos/ibl.git] / src / interp / elf / dlw_client.c
index 2bf2103a4dd9e366a1ee09246445f98d00734e66..d9c00d332fdc5e0a75d01228a3f704fb373913c6 100644 (file)
@@ -159,9 +159,14 @@ BOOL DLIF_allocate(struct DLOAD_MEMORY_REQUEST *targ_req)
    /*   load placement or both load and run placement, then we can do the    */
    /*   copy.                                                                */
    /*------------------------------------------------------------------------*/
-   memset(targ_req->host_address, 0, obj_desc->memsz_in_bytes);
-   fseek(f,targ_req->offset,SEEK_SET);
-   fread(targ_req->host_address,obj_desc->objsz_in_bytes,1,f);
+   if (obj_desc->objsz_in_bytes)
+   {
+       /* Do not clear uninitialized data section, so that the section can 
+          be mapped to the same region IBL uses */ 
+       memset(targ_req->host_address, 0, obj_desc->memsz_in_bytes);
+       fseek(f,targ_req->offset,SEEK_SET);
+       fread(targ_req->host_address,obj_desc->objsz_in_bytes,1,f);
+   }
 
    /*------------------------------------------------------------------------*/
    /* Once we have target address for this allocation, add debug information */