I am going to name Mr. Copy and Mr. Paste as the culprits, your honor.
Since they were acting on my direct orders, I ask mercy from the court.
I definitely know better and will try to do better in the future.  :)

--Z

On Mon, 2009-11-16 at 15:54 -0700, David Brownell wrote:
> Newly introduced failure mode I saw:
> 
> Info : JTAG tap: omap5912.dsp tap/device found: 0xffffff81 (mfg: 0x7c0, part: 
> 0xffff, ver: 0xf)
> Warn : JTAG tap: omap5912.dsp       UNEXPECTED: 0xffffff81 (mfg: 0x7c0, part: 
> 0xffff, ver: 0xf)
> Error: JTAG tap: omap5912.dsp  expected 1 of 1: 0x03df1d81 (mfg: 0x6c0, part: 
> 0x3df1, ver: 0x0)
> Info : JTAG tap: omap5912.arm tap/device found: 0x0692602f (mfg: 0x017, part: 
> 0x6926, ver: 0x0)
> Warn : TAP omap5912.unknown does not have IDCODE
> 
> Hmm, that "Warn" should at worst be "Info" -- different issue.
> 
> This patch was fingered by "git bisect".  The appended tweak
> resolves this regression.  Never assume "char" is unsigned!!
> 
> - Dave
> 
> --- a/src/helper/binarybuffer.h
> +++ b/src/helper/binarybuffer.h
> @@ -41,7 +41,8 @@
>  static inline void buf_set_u32(void *_buffer,
>               unsigned first, unsigned num, uint32_t value)
>  {
> -     char *buffer = (char *)_buffer;
> +     uint8_t *buffer = (uint8_t *)_buffer;
> +
>       if ((num == 32) && (first == 0)) {
>               buffer[3] = (value >> 24) & 0xff;
>               buffer[2] = (value >> 16) & 0xff;
> @@ -69,7 +70,8 @@ static inline void buf_set_u32(void *_buffer,
>  static inline uint32_t buf_get_u32(const void *_buffer,
>               unsigned first, unsigned num)
>  {
> -     char *buffer = (char *)_buffer;
> +     uint8_t *buffer = (uint8_t *)_buffer;
> +
>       if ((num == 32) && (first == 0)) {
>               return (((uint32_t)buffer[3]) << 24) |
>                       (((uint32_t)buffer[2]) << 16) |


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

Reply via email to