Received: from [140.186.70.92] (port=58809 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P4J3X-00025l-NO for qemu-devel@nongnu.org; Fri, 08 Oct 2010 15:57:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P4J2w-0002bC-RJ for qemu-devel@nongnu.org; Fri, 08 Oct 2010 15:56:04 -0400 Received: from adelie.canonical.com ([91.189.90.139]:59078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P4J2w-0002ax-D9 for qemu-devel@nongnu.org; Fri, 08 Oct 2010 15:56:02 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1P4J2t-0000o7-Vy for ; Fri, 08 Oct 2010 20:56:00 +0100 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 1AE182E80F9 for ; Fri, 8 Oct 2010 19:55:52 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Fri, 08 Oct 2010 19:48:07 -0000 From: jb <657006@bugs.launchpad.net> Sender: bounces@canonical.com References: <20101008180054.4876.62094.malonedeb@palladium.canonical.com> Message-Id: <20101008194807.6472.96837.malone@wampee.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 657006] Re: arm - svc instruction Reply-To: Bug 657006 <657006@bugs.launchpad.net> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org I made a mistake, there are 2 irq : 11 and 15 and best_irq =3D 11 after svc= call So it should launch vPortSVCHandler but it does not. -- = arm - svc instruction https://bugs.launchpad.net/bugs/657006 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. Status in QEMU: New Bug description: The svc instruction doesn't work as expected. -> qemu 0.13.0 rc1 (git) Test : demo with freeRTOS (for example FreeRTOS-6.0.5/Demo/CORTEX_LM3S811_G= CC) with the card lm3s811evb. If we start the scheduler, it will call that function (__attribute__ (( nak= ed ))) : void vPortStartFirstTask( void ) { __asm volatile( " ldr r0, =3D0xE000ED08 \n" /* Use the NVIC offset register to locate= the stack. */ " ldr r0, [r0] \n" " ldr r0, [r0] \n" " msr msp, r0 \n" /* Set the msp back to the start of the stack. */ " svc 0 \n" /* System call to start first task. */ ); } The 4 first lines in asm work fine. The scv 0 call will rise the right inte= rrupt in qemu (line 151, in arm_gic.c, best_irq =3D 15). However, it will n= ever call the PendSV Handler (xPortPendSVHandler here). This function is re= corded in the nvic vector. Next, (after the svc), the processor will execute the line after in code (t= his is a naked function) so the next function written after vPortStartFirst= Task in the code. command line : console 1 : qemu-system-arm -M lm3s6965evb -kernel gcc/RTOSDemo.axf -s -S console 2 : arm-none-eabi-gdb -ex "target remote localhost:1234" gcc/RTOSDe= mo.axf arm-none-eabi from http://www.codesourcery.com/sgpp/lite/arm/portal/release= 1294 Same error with another project with arm-elf processor : arm cortex m3 host : gentoo (2.6.35-r9) (without kqemu)