This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: IXP425 Big Endian Mode


 Hello All,

> Thanks for your suggestion!
>
> I am still having one doubt -
>
> When I compare the code(pls read elf file) compiled in
> little endian mode with the one in big endian mode
> using objdump - I see that bytes are swapped. E.g a
> code which looks like E6000021 in little endian mode
> becomes 210000E6 in big endian mode. Now, during
> instruction fetch and decode cycle, how processor
> decodes this big endian instruction, when the state of
> the processor is in little endian? Pls note that the
> processor is in little endian mode and trying to
> execute a big-endian instruction. So, byte 0 for it
> will be E6 of the big endian instruction, but the
> correct one should be 21.
>
> I think 'am confused in some way. Please help me to
> come out from this confusion.
#ifdef CYGINT_HAL_ARM_BIGENDIAN
? ? ? ?// set big-endian
? ? ? ?mrc??????p15, 0, r0, c1, c0, 0
? ? ? ?orr??????????????r0, r0, #0x80
? ? ? ?mcr??????p15, 0, r0, c1, c0, 0
? ? ? CPWAIT ?r0
#endif

If I can I explain my point of view. Above code regards external bus - before 
change this bus works in little endian address coherend mode ( see docu. 
regarding address and data cohered mode  - this is a Intel "discover"). Core 
as I saw always works in big endian mode - to run code  you must just swap 
code compiled in little endian. Please see to this discuss list - someone ask 
how to start window$ CE ( their compiler works only in little endian)

Best Regards,
jerzy

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]