[Top] [All Lists]

RE: Kernel unaligned access

To: "Anoop P.A." <>
Subject: RE: Kernel unaligned access
From: "Maciej W. Rozycki" <>
Date: Tue, 25 May 2010 05:59:53 +0100 (BST)
Cc: linux-mips <>, Ralf Baechle <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <>
User-agent: Alpine 2.00 (LFD 1167 2008-08-23)
On Mon, 24 May 2010, Anoop P.A. wrote:

> Thanks for your reply but unfortunately we are not in a position to
> upgrade the kernel. It will be great if you can give me some pointers to
> debug the issue.

 Well, you are on your own then.

 Pointers?  Well, first despite the confusing message it's not an 
alignment error.  The Linux kernel does not try to be particularly precise 
here and hardware does not always help either (the RM9000 isn't a MIPS64 
architecture processor, is it?).  Anyway, BadVAddr is 0x9a5d9c1483fa8a60, 
which clearly indicates this is a reference to an address outside the 
defined address space.  I don't know off the head how many physical 
address bits the RM9000 implements, but the typical number is 40 and the 
extreme one is 44.  Masking out the XKPHYS cache coherence mode and 
(optimistically) 44 address bits we are still left with 
0x025d900000000000.  These bits in the address are what the CPU complains 

 Second, the address looks remarkably similar to the value in $lo, that is 
0x025d9c1482fa8a60.  Go calculate the difference!  That's probably an 
index to an array of some sort that went out of limits.

 The rest you need to figure out yourself.  It might be easier if you 
disable the unaligned access emulator altogether (#ifdef it out or 
whatever) and let the kernel throw an error straight away.  It might be 
that you're getting a nested fault.  That's what the decoded value of EPC 
being do_ade+0x1c4/0x470 actually suggests.

 Good luck!


<Prev in Thread] Current Thread [Next in Thread>