On Thu, 14 Sep 2000, Gordon McNutt wrote:
> I hope it's something that simple. But the following example makes me
> worry that it is not, as this example does not use structs:
>
> u8 buf[4];
> u16 *a;
> a = &buf[1];
> *a = 4;
>
> Printing the contents of buf shows one thing on the ARM:
>
> 0xbffffc40 = 0x4
> 0xbffffc41 = 0x0
> 0xbffffc42 = 0x0
> 0xbffffc43 = 0x0
You're doing word access to a non-word-aligned address. Check the fixups
in the kernel - and be aware that some ARM CPUs can't trap it
properly at all.
That also looks like what would happen if you just put 0xbffffc41 on the
address lines and did the word write - but your 16-bit memory was ignoring
A0. Probably just a coincidence, though.
Can you show the asm which is produced by your code?
-- dwmw2Received on Fri Sep 15 02:07:03 2000
This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:43:42 EDT