|
From: Mahr, S. <Ste...@sp...> - 2011-07-08 16:10:12
|
>> - buf_set_u32 and buf_get_u32 make sure that data is in host endianness
> Why ? Don't we want the data to be in target endianess ?
>> You need swapping when reading and comparing debug registers or send code to MIPS CPU.
> Can you give the example of some of these comparisons in the source
> code ? You are referring to some comparisons in mips32_pracc.c ?
example:
mips_m4k.c: mips_m4k_poll
mips_ejtag_set_instr(ejtag_info, EJTAG_INST_CONTROL);
retval = mips_ejtag_drscan_32(ejtag_info, &ejtag_ctrl);
...
if (ejtag_ctrl & EJTAG_CTRL_ROCC)
{...
ejtag_ctrl is host endian uint32. If mips_ejtag_drscan_32 would be in
target endianness you need to swap here or write and use a new function
that does swapping.
|