On Fri, Apr 1, 2011 at 1:30 PM, Øyvind Harboe <[email protected]> wrote:
> On Fri, Apr 1, 2011 at 1:23 PM, Drasko DRASKOVIC
> <[email protected]> wrote:
>>
>> Hi Øyvind,
>> just one quick question. In mips_m4k.c, in
>> mips_m4k_bulk_write_memory() in the code like this :
>>
>>                t = malloc(count * sizeof(uint32_t));
>>                if (t == NULL)
>>                {
>>                        LOG_ERROR("Out of memory");
>>                        return ERROR_FAIL;
>>                }
>>
>>                uint32_t i, t32;
>>                for(i = 0; i < (count * 4); i += 4)
>>                {
>>                        t32 = be_to_h_u32((uint8_t *) &buffer[i]);
>>                        h_u32_to_le(&t[i], t32);
>>                }
>>
>> Who frees the t (malloc'ed mem) after ?
>
> A bit further down:
>
>        if (t != NULL)
>                free(t);

OK, I see. That's good for write. But for mips_m4k_read_memory() we
have to byte-swap directly buffer, right ?


>> Otherwise, really good work. I merged the changes and it works. I have
>> an impression there is performance benefit also - quicker image
>> writing to the RAM.
>
> Hmm... w.r.t. performance only drscan_8 comes to mind.
>
> If you cleaned up the mips_ejtag_drscan_32 like I did for the
> mips_ejtag_drscan_8 then that would probably help.
>
> There are two things to do with mips_ejtag_drscan_32. Create
> an _out version that returns void(only adds to the queue) and
> does not read back and introduce error propagation for the
> remainder of the cases.

Hm... I thought I saw in the patches that you removed some
keep_alive() from the OpenOCD code... Maybe that give us a little
speed up ? I do not, know that was just an impression, maybe it is not
true - I did not do the benchmarking.

BR,
Drasko
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to