Infinite loop in PSOS_INIT()

From: Arun R (arun.rangasamy_at_gmail.com)
Date: 10/08/04


Date: 8 Oct 2004 04:54:04 -0700

Hi,

Problem Summary:
While executing the BSP code for our target board (on ARMulator, an
ARM instruction set simulator) the processor goes into an infinite
loop at PSOS_INIT(). We have no clue as to why this happens. Please
read below for more details. Thank-you!

Details:
We are using ARMulator to simulate a system that has an ARM946ES
processor, a UART connected to a Keyboard, an Interrupt Controller,
and a Timer, apart from other components. The UART, Keyboard,
Interrupt Controller and Timer are simulated as ARMulator extensions,
and other components are not simulated. PSOS is used in the real
hardware system. We compiled the code (for the real hardware system)
as a .axf image, loaded the image in ARM Extended Debugger (AXD), and
executed the code. We found that the processor went into an infinite
loop, in the function PSOS_INIT() (called from the function SysInit in
the file Sysinit.c of PSOS BSP).

This is the register dump, when ARMulator is in the infinite loop:
Registers Bank: Current (SVC mode)
Index Name Value
#1 r0 0x00000F0D
#2 r1 0x00000F0D
#3 r2 0x00000F0D
#4 r3 0x00000F0D
#5 r4 0x00000F0D
#6 r5 0x00000001
#7 r6 0x00000000
#8 r7 0x00000000
#9 r8 0x60000093
#10 r9 0x405233E0
#11 r10 0x60000093
#12 r11 0x00000000
#13 r12 0x00002000
#14 r13 0x40525068
#15 r14 0x0027CD18
#16 pc 0x0027B2F4
#17 cpsr 0x60000093
#18 spsr 0x00000000

This is the snapshot of ARMulator disassembly:
0027b2e4 [0xeafffffd] b 0x27b2e0 ; (pSOS_Ienter + 0x930)
0027b2e8 [0xe10fa000] mrs r10,cpsr
0027b2ec [0xe38a8080] orr r8,r10,#0x80
0027b2f0 [0xe129f008] msr cpsr_cf,r8
0027b2f4 [0xe1a00000] nop ;;;;}}} Infinite
0027b2f8 [0xeafffffd] b 0x27b2f4 ;;;;}}} Loop
0027b2fc [0xe8bd00f0] ldmfd r13!,{r4-r7}

If someone can help us in identifying the cause of the problem, and
overcoming this, it will be of great help. Also, it will be extremely
useful, if someone lists various possible scenarios/exceptional
conditions under which PSOS_INIT drives the CPU to an infinite loop.
In our case, it goes into an unconditional infinite loop.

Thank you for your time.

Regards,
Arun



Relevant Pages

  • Re: How to find out if process is in a loop?
    ... the problem of finding whether a problem is in an infinite ... For more information refer ... the program which i suspect to be in an infinite loop. ... the same stack repeatedly something is a problem. ...
    (comp.unix.aix)
  • Re: StackOverflowException with attribute
    ... I figured that the recursion wasn't infinite. ... it would seem that the call to GetProperties on the ... You need to find some way to break this loop. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: whats consensus or standard on what should "while(1){}" do? loop forever or do nothing?
    ... Doing nothing forever takes infinite time and never gets to ... The block has no side effects, so the compiler could remove it without ... But, according to the rules of C, your loop does terminate eventually. ... have an appropriate newsgroups line in your header for your mail to be seen, ...
    (comp.lang.c.moderated)
  • Re: X locks up after a random time
    ... The server is probably stuck in an infinite ... The server is probably stuck in an infinite loop. ...
    (Fedora)
  • Re: while (1) vs. for ( ;; )
    ... >to write to the next guy who will be reading the code. ... You are unfamiliar with the term "infinite loop"? ... Balmer Consulting ...
    (comp.lang.c)