Andes Workshop

It is currently Sun Oct 13, 2024 3:38 am

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: the message "Unhandled unaligned access exception"
PostPosted: Thu Apr 28, 2011 5:40 pm 
Offline
User avatar

Joined: Fri Mar 04, 2011 9:36 pm
Posts: 500
Q:We also found the message "Unhandled unaligned access exception"
appears when we load Linux kernel module.
Shall we need to consider the alignment issue in our code or your
compiler will deal with this issue?

A:Andes compiler和x86不同,我們不會自動處理unaligned的情況。
如果您的module是開機之後才insert,有一個可以處理的辦法:
開機之後,在command line裡下這個command,
echo “7” > /proc/cpu/alignment
再insert module

Q:We have tried it, but the message disappears but the following new message "_do_unaligned_access" appears and then the kernel crashes.
Please also refer to the attachment and give us some suggestion.

A: "_do_unaligned_access" 因為在build kernel時,必須要打開unalignment handler。
Build kernel時,在System type->最下方的kernel support unaligned access handling
(請參考下圖,因為我使用cygwin,所以有亂碼)

Attachment:
unaligned.gif
unaligned.gif [ 26.08 KiB | Viewed 14777 times ]


PS. 編Linux Kernel時要記得加上環境變數
$ export ARCH=nds32 CROSS_COMPILE=nds32le-linux-
這樣子System type的選項才會出現。
詳細的編譯步驟可以看BSP v3.0.0


Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group