>>> How do they convert then, when they do not know from which endianes to
>>> convert from ?
>>
>> Conversion is done from byte array of jtag chain.
> How ?

buf_get_u32 does conversion from uint8* array

example:
mips_ejtag_get_impcode (mips_ejtag.c)

  field.in_value is filled by jtag_add_dr_scan with 4 times uint8.
  buf_get_u32 converts byte array to host endian uint32


>> The endianness of MIPS EJTAG tap seems to have always the same endianness,
>> no matter of MIPS CPU memory endianness.
> What makes you think so ?

Because openocd works in all combinations of BE and LE host and target. (If you
revert commit 2482244b0788c007dd789c21a4416379c229ea5c.) So yes, it's just a 
guess.


Could this be the explanation:

http://downloads.buffalo.nas-central.org/LS2_MIPSel/DevelopmentTools/JTAG/MD00047-2B-EJTAG-SPC-03.10.pdf
Page 97:
Byte 0 refers to bits 7:0, byte 1 refers to bits 15:8, byte 2 refers to bits 
23:16, and byte 3 refers to bits
31:24, independent of endianess.

Please also see Chapter 6.3.3, 6.3.6, 6.4.1, etc. TAPs are alway LSB first, so 
endianness doesn't matter here.

_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to