On Wed, Apr 04, 2001 at 08:58:54AM -0500, David Milburn wrote:
> #define TAG_DATA(type, tag_ptr) ((type *) tag_ptr+1)

Ok, here are some comments.  First off, there seems to be excess unnecessary
use of __attribute__((packed)) in there which is definitely not needed.
You've got:

        _u16 tag_type;
        _u16 tag_len;
        char tag_data[0];

This needs no packing at all on ARM:
        &tag_type + 1 = &tag_len
        &tag_len + 1 = &tag_data.

Secondly, why do we have such a horrible TAG_DATA macro?  All its doing
is trying to convert a tag pointer into a data pointer.  Surely the
following would be a hell of a lot cleaner, both from a readability
standpoint, and in terms of type sizes:

#define TAG_DATA(type, tag_ptr) ((type *) (tag_ptr)->data)

However, I don't believe that this is where your problem lies, I believe
that something else is writing into this tag's data field, setting the
0x0400 part of the address.
   _____
  |_____| ------------------------------------------------- ---+---+-
  |   |        Russell King       [EMAIL PROTECTED]      --- ---
  | | | |            http://www.arm.linux.org.uk/            /  /  |
  | +-+-+                                                     --- -+-
  /   |               THE developer of ARM Linux              |+| /|\
 /  | | |                                                     ---  |
    +-+-+ -------------------------------------------------  /\\\  |

_______________________________________________
http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
Please visit the above address for information on this list.

Reply via email to