[Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5
Calabro' Fabio
Fabio.Calabro at consulenti.fastweb.it
Wed Aug 26 14:04:02 CEST 2009
Hi,
I had not problem with sh QAtomic for my target. In your case try to ask to ST or give a look to STLinux website where you can find some qatomic operarion written by ST.
Best Regard
Fabio
-----Original Message-----
From: sunny an [mailto:sunny at i-winix.com]
Sent: Wed 8/26/2009 6:32 AM
To: Calabro' Fabio
Cc: qt-interest at trolltech.com
Subject: RE: [Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5
Hi Fabio,
It is hard to add architecture for me...
I don't know exactly our CPU support what atomic operation.
In ST40 core and Instruction set architecure manual :
------------------------------------------------------
TAS.B @Rn
Description: This instruction performs a test-and-set operation on the
byte data at the virtual
address specified in Rn. It begins by purging the operand cache block
(if any)
containing the accessed memory location. The 8 bits of data at the
virtual address
are read from memory. If the read data is 0 the T-bit is set, otherwise
the T-bit is
cleared. The highest bit of the 8-bit data (bit 7) is set, and the
result is written back to
the memory at the same virtual address.
This test-and-set is atomic from the CPU perspective. This instruction
cannot be
interrupted during its operation.
Operation:
Exceptions: WADDERR, OTLBMULTIHIT, WTLBMISS, READPROT, WRITEPROT,
FIRSTWRITE
Note: The TAS.B instruction guarantees atomicity of all accesses from
the ST40 regardless
of their destination in the address space.
There is no guarantee of atomicity with respect to other bus initiators
accessing the
same location in memory.
------------------------------------------------------
But I don't know anything else...
I don't know whether should define
Q_ATOMIC_INT_FETCH_AND_ADD_STORE_IS_XXX_NATIVE or not,
Q_ATOMIC_POINTER_TEST_AND_SET_IS_XXX_NATIVE or not, something else...
How can I get this information about that? Should I request that to ST
FA engineer?
I appreciated your kind reply one more again...
Best regards,
Sunny An.
-
------------------------------------------------------------
An Jung Sun
STB Devision R&D Dept. Principal Engineer
WINIX Co., Ltd.
Angade BLDG, 363, Yangjae-dong, Seocho-gu, Seoul, Korea
Tel:+82-2-555-9200(Ext.335), Fax:+82-2-529-4846
Email:sunny at i-winix.com
------------------------------------------------------------
2009-08-25 (?), 12:52 +0200, Calabro' Fabio ???:
> Hi Sunny,
>
> If you define a new architecture coping linux-sh-g++ and calling it linux-sh4-g++, you have to define it in ./src/corelib/arch/qatomic_arch.h too.
> Open this file and add:
>
> #elif defined(QT_ARCH_SH4)
> #include "QtCore/qatomic_sh4.h"
>
> fill qatomic_sh4.h coping QAtomic operation from qatomic_sh.h
>
> You have to create a new dir on /src/corelib/arch called sh4
> and create arch.pri
>
> You had this Warning because the new arch that you defined is not knows from qt that can't find QAtomic operations ... and are telling you to use generic QAtomic methods.
>
> so if you want to use a custom name for your build follow what qt did for sh porting ... and do the same. Or ...simply build with -embedded sh and modify qmake.conf directly :)
>
> Best Regard
>
> Fabio
>
>
>
>
> -----Original Message-----
> From: sunny an [mailto:sunny at i-winix.com]
> Sent: Tue 8/25/2009 12:28 PM
> To: Calabro' Fabio
> Cc: qt-interest at trolltech.com
> Subject: RE: [Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5
>
> First of all, Thanks a lot for your reply!
>
> I have configured like this :
>
> ./configure -embedded sh4
>
> actually, It was a first try to compile QT embedded library. So I used a
> simple option.
>
> Before configure run, I made mkspecs/qws/linux-sh4-g++ directory using
> linux-sh-g++ copy and modified qmake.conf like bellow article you
> described.
>
> ./configure was successful and run make & make install.
> It also successful. but somthing strange log appeared like bellows:
>
>
> for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/qtconcurrent/runfunction/runfunction.pro
>
> for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/qtconcurrent/wordcount/wordcount.pro
>
> for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/qtconcurrent/imagescaling/imagescaling.pro
>
> for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/phonon/musicplayer/musicplayer.pro
>
> for /root/project/tools/qt-embedded-linux-opensource-src-4.5.2/examples/phonon/capabilities/capabilities.pro
>
> NOTICE: Atomic operations are not yet supported for this
> architecture.
>
> Qt will use the 'generic' architecture instead, which uses a
> single pthread_mutex_t to protect all atomic operations. This
> implementation is the slow (but safe) fallback implementation
> for architectures Qt does not yet support.
>
> Qt is now configured for building. Just run 'gmake'.
> Once everything is built, you must run 'gmake install'.
> Qt will be installed into /usr/local/Trolltech/QtEmbedded-4.5.2-generic
>
> To reconfigure, run 'gmake confclean' and 'configure'.
>
> [root at localhost qt-embedded-linux-opensource-src-4.5.2]#
>
> Do you know what the NOTICE mean???
>
>
> Best Regards
>
>
> Sunny An.
>
> -
> ------------------------------------------------------------
> An Jung Sun
> STB Devision R&D Dept. Principal Engineer
>
> WINIX Co., Ltd.
> Angade BLDG, 363, Yangjae-dong, Seocho-gu, Seoul, Korea
> Tel:+82-2-555-9200(Ext.335), Fax:+82-2-529-4846
> Email:sunny at i-winix.com
> ------------------------------------------------------------
>
>
> 2009-08-25 (?), 10:27 +0200, Calabro' Fabio ???:
> > Hi Sunny,
> >
> > I'm using something like this:
> >
> > ./configure -embedded sh -fast -depths all -release -qconfig box -no-qt3support -no-accessibility -no-exceptions -no-iconv -no-cups -no-nis -system-zlib -qt-gif -qt-libpng -no-libmng -qt-libjpeg -qt-freetype -no-qdbus -no-glib -qt-kbd-usb -qt-kbd-tty -qt-mouse-pc -no-webkit -no-svg -no-scripttools -no-phonon -no-phonon-backend -prefix $YOURPREFIX -confirm-license -opensource -little-endian
> >
> > where depths is all but can be 16 32... depend on your necessity and -qconfig box is your custom configuration file where you can enable or disable qt features you have need. You have to create it on /src/corelib/global/ dir like qconfig-box.h. Have a look to qconfig-medium.h ..large etc .... and create you custom qconfig.
> > Of course you have to customize qmake.conf for your compiler ... for example:
> >
> > QMAKE_CC = sh4-linux-gcc
> > QMAKE_CXX = sh4-linux-g++
> > QMAKE_LINK = sh4-linux-g++
> > QMAKE_LINK_SHLIB = sh4-linux-g++
> >
> > I thing this is all information you have need to compile for your target. Let me know if will be everything ok
> >
> > Best Regard
> > Fabio
> >
> >
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: sunny an [mailto:sunny at i-winix.com]
> > Sent: Tue 8/25/2009 4:00 AM
> > To: qt-interest at trolltech.com; Calabro' Fabio
> > Subject: [Qt-interest] Fixed a non-aligned memory access for SH4 platformin QT Embedded 4.5
> >
> > Hi~
> >
> > I'm a software engineer using QT embedded on SH4 architecure target like
> >
> > you. target cpu is STi7101.
> >
> > I am trying to install QT Embedded linux 4.5.2 on my host pc.
> >
> > I don't know what is exact option for my target.
> >
> > Could you let me know install option for SH4?
> >
> >
> > ./configure -embedded [architecure] <-- what is an [architecture]?
> >
> >
> > Thanks in advance!
> >
> > Regards,
> >
> > Sunny An.
> >
> > -
> > ------------------------------------------------------------
> > An Jung Sun
> > STB Devision R&D Dept. Principal Engineer
> >
> > WINIX Co., Ltd.
> > Angade BLDG, 363, Yangjae-dong, Seocho-gu, Seoul, Korea
> > Tel:+82-2-555-9200(Ext.335), Fax:+82-2-529-4846
> > Email:sunny at i-winix.com
> > ------------------------------------------------------------
> >
> >
> >
>
>
More information about the Qt-interest-old
mailing list