[okl4-developer] Problem with inline assembler on arm926ejs

Lukas HANEL lukas.hanel at st.com
Tue Apr 8 17:56:01 EST 2008


Hi

I am trying to port OKL4 to a platform based on the arm926ejs core.
Therefore I copied the xscale platform folder and changed the
tools/machines.py to be based on an other processor architecture.
E.g.
< class pxa(xscale):
> class pxa(arm926ejs):

Trying to compile this gave me an error related to cryptic inline
assembler code.
However it seems, that the same code is working in other files, so I am
confused.
The problem occures in arm926ejs/cpu.h, but nearly the same code is used
in arm926ejs/cache.h
A similar syntax can be found in cache.h of other architectures.
Do you have a good reference for the inline assembly language?

Thanks
Lukas

Listing:
~/okl4_release_1.5.2nhk$ ./tools/build.py machine=nhk15 project=iguana
example=naming simulate --debug=presub
scons: Reading SConscript files ...
Warn: No serial driver configured, not building serial server
SERIAL_DRIVER is  uart_8250
scons: done reading SConscript files.
scons: Building targets ...
[CXX ] build/pistachio/l4kernel/object/src/cache.o
In file included from platform/pxa/pistachio/include/plat/timer.h:92,
                 from arch/arm/pistachio/include/arch/config.h:377,
                 from pistachio/include/config.h:146,
                 from pistachio/include/l4.h:70,
                 from pistachio/src/cache.cc:65:
arch/arm/pistachio/cpu/arm926ejs/include/cpu/cpu.h: In static member
function `static void arm_cpu::sleep()':
arch/arm/pistachio/cpu/arm926ejs/include/cpu/cpu.h:99: error: expected
`)' before "_"
arch/arm/pistachio/cpu/arm926ejs/include/cpu/cpu.h:97: warning: unused
variable 'zero'
scons: *** [build/pistachio/l4kernel/object/src/cache.o] Error 1
scons: building terminated because of errors.

arch/arm/pistachio/cpu/arm926ejs/include/cpu/cpu.h:
    static inline void sleep(void)
    {
        word_t zero = 0;
        __asm__  __volatile__ (
            "   mcr     p15, 0, "_(zero)", c7, c0, 4    ;" /* Wait for
interrupt */
#if defined(__GNUC__)
            :: [zero] "r" (zero)
#endif
        );
    }




More information about the Developer mailing list