[okl4-developer] booting fails on pxa270

kashin Lin kashin08 at gmail.com
Tue Sep 25 16:22:36 EST 2007


Hi,
i put those debug codes in timer and serial server:
*(in iguana/timer/src/main.c)*
int
main(int argc, char **argv)
{
      struct driver_ops *ops;
      objref_t obj;
*L4_KDB_Enter("In timer server");*
      obj = device_create_impl(L4_Myself(), 0UL, NULL);
      naming_insert("timer", obj);
*L4_KDB_Enter("After device_create_impl");*
      ops = TIMER_DRIVER.ops.d_ops;
      iguana_cb_handle = cb_attach(__callback_buffer);
#ifdef ENABLE_PM_THREAD
{
      L4_ThreadId_t unused;
      pm_thread = thread_create_priority(1, &unused);
      L4_KDB_SetThreadName(unused, "PwrMgmt");
}
#endif
*L4_KDB_Enter("Before timer server loop");*
      server_loop();
      assert(!"Should reach here\n");
      return 0;
}

*(in iguana/serial/src/main.c)*
int
main(int argc, char **argv)
{
      struct driver_ops *ops;
*L4_KDB_Enter("In serial server");*
      device_create_impl(L4_Myself(), 0UL, NULL);
      ops = SERIAL_DRIVER.ops.d_ops;
*L4_KDB_Enter("After serial device_create_impl");*
      iguana_cb_handle = cb_attach(__callback_buffer);
*L4_KDB_Enter("Before serial server loop");*
      server_loop();
      assert(!"Should reach here\n");
      return 0;
}

objref_t
device_create_impl(CORBA_Object _caller, objref_t driver,
idl4_server_environment * _env)
{
      ...
#if defined(SERIAL_FFUART)
      /* Use FFUART */
      printf("Using FFUART.\n");
*L4_KDB_Enter("After printf");*
      r = hardware_back_memsection(memory, 0x40100000, L4_IOMemory);
*L4_KDB_Enter("After back_memsection");*
      hardware_register_interrupt(L4_Myself(), 22);
*L4_KDB_Enter("After register_interrupt");*
#else
#error unsupported UART
#endif
      assert(r == 0);
      printf("Backed PXA serial\n");
     ...
}

the output i got:
=============
vbase is 0x1302000, vend is 0xcfffffff
addr is 0x1302000, vbase is 0x1302000
--- KD# User: In timer server ---
> showqueue

[255]: (roottask)
[240]: ig_timer
[200]: ig_namin
[100]: ig_seria vmlinux
idle : idle

> go
PXA25X OS Timer driver starting...
PXA25X wrap handler installed
--- KD# User: After device_create_impl ---
> showqueue

[255]: (roottask) (IRQ 28) (IRQ 27)
[242]: (tmr_wrap)
[240]: (ig_timer)
[200]: ig_namin
[100]: ig_seria vmlinux
idle : idle

> go
--- KD# User: Before timer server loop ---
> showqueue

[255]: (roottask) (IRQ 28) (IRQ 27)
[242]: (tmr_wrap)
[240]: (ig_timer)
[200]: ig_namin
[100]: ig_seria vmlinux
idle : idle

> go
--- KD# User: In serial server ---
> showqueue

[255]: (roottask) (IRQ 28) (IRQ 27)
[242]: (tmr_wrap)
[240]: (ig_timer)
[200]: (ig_namin)
[100]: ig_seria vmlinux
idle : idle

> go
Using--- KD# User: In main ---
> showqueue

[255]: (roottask) (IRQ 28) (IRQ 27)
[242]: (tmr_wrap)
[240]: (ig_timer)
[200]: (ig_namin)
[100]: ig_seria vmlinux
idle : idle

> go
--- KD# User: Before SetThreadName ---
> showqueue

[255]: (roottask) (IRQ 28) (IRQ 27)
[242]: (tmr_wrap)
[240]: (ig_timer)
[200]: (ig_namin)
[100]: ig_seria vmlinux
idle : idle

> go
FFUART.
--- KD# User: Before create_priority ---
> showqueue

[255]: (roottask) (IRQ 28) (IRQ 27)
[242]: (tmr_wrap)
[240]: (ig_timer)
[200]: (ig_namin)
[100]: ig_seria L_timer
idle : idle

> go
(STOP HERE)

it seems this stop is before register interrupt and reconfigure UART
(right?).
but i still have no idea what may cause it.

do you have any ideas about this? or what i can try?

thanks for any suggestions.







2007/9/24, Carl van Schaik <carl at ok-labs.com>:
>
> Hi Kashin,
>
> You can try put some of the same debug in the timer driver and timer
> server/
>
> iguana/timer/
> drivers/pxa250_timer/
>
> I suspect its the serial driver causing the problem (but I could be
> wrong).
>
> regards,
> Carl
>
> kashin Lin wrote:
> > Hi,
> >
> > i pepper some "L4_KDB_Enter" in "linux/kernel/arch/l4/kernel/main.c"
> > and the details are:
> > ==================================================
> > int
> > main(int argc, char **argv)
> > {
> >       int r;
> > *L4_KDB_Enter("In main");*
> >       /* Start a new thread */
> >       assert(argc > 0 && argv[0] != NULL);
> >       strlcpy(saved_command_line, argv[1], COMMAND_LINE_SIZE);
> > * L4_KDB_Enter("Before SetThreadName");*
> >       L4_KDB_SetThreadName(L4_Myself(), "L_timer");
> > *L4_KDB_Enter("Before create_priority");*
> >       r = thread_create_priority(99, &main_thread);
> >       assert (r != 0);
> > *L4_KDB_Enter("Before SetThreadName for main thread");*
> >       timer_thread = L4_Myself();
> >       L4_KDB_SetThreadName(main_thread, "L_syscall");
> > *L4_KDB_Enter("Before L4_Start_SpIp");*
> >       /* Setup our TLS as well */
> >       setup_tls(0);
> >       L4_Start_SpIp(main_thread,
> >                            (L4_Word_t) &main_stack[STACK_SIZE-1],
> >                            (L4_Word_t) start_kernel);
> > *L4_KDB_Enter("Before interrupt_loop");*
> >       /* Now we go and do the timer stuff */
> >       interrupt_loop();
> >       return 0;
> > }
> >
> >
> > and each time when i get in l4_kdb, i show the schedule
> > queue to know the threads' information.
> >
> > the following is the message i got:
> > ========================
> > *PXA25X OS Timer driver starting...
> > PXA25X wrap handler installed
> > Using FFUART--- KD# User: In main ---
> > > showqueue
> >
> > [255]: (roottask) (IRQ 28) (IRQ 27)
> > [242]: (tmr_wrap)
> > [240]: (ig_timer)
> > [200]: (ig_namin)
> > [100]: ig_seria vmlinux
> > idle : idle
> >
> > > go
> >
> > --- KD# User: Before SetThreadName ---
> > > showqueue
> >
> > [255]: (roottask) (IRQ 28) (IRQ 27)
> > [242]: (tmr_wrap)
> > [240]: (ig_timer)
> > [200]: (ig_namin)
> > [100]: ig_seria vmlinux
> > idle : idle
> >
> > > go
> > .
> >
> > Backed --- KD# User: Before create_priority ---
> > > showqueue
> >
> > [255]: (roottask) (IRQ 28) (IRQ 27) (IRQ 22)
> > [242]: (tmr_wrap)
> > [240]: (ig_timer)
> > [200]: (ig_namin)
> > [100]: ig_seria L_timer
> > idle : idle
> > > go
> > (STOP HERE)*
> >
> > but i am not sure this stopping is due to which thread or it's just
> > hardware error...
> > can you give me some suggestions about this situation?
> > or what should i do to bring you more information?
> >
> > thanks for your answering.
> >
> >
> > 2007/9/20, Carl van Schaik < carl at ok-labs.com <mailto:carl at ok-labs.com
> >>:
> >
> >     To me it looks like the UART server is starting up and
> >     reconfigures the
> >     UART etc. At this point, the uart fifo empties and it seems that no
> >     further writes happen. This is probably because you are not getting
> >     interrupts. Either the serial driver registers the wrong interrupt
> >     number or the driver is misconfiguring the UART.
> >
> >     regards,
> >     Carl
> >
> >     Ben Leslie wrote:
> >     > On Wed Sep 05, 2007 at 17:15:09 +0800, kashin Lin wrote:
> >     >
> >     >> Hi,
> >     >>
> >     >> i build okl4 for pxa270 using following machine configuration:
> >     >> vbase is 0x1302000, vend is 0xcfffffff
> >     >> addr is 0x1302000, vbase is 0x1302000
> >     >> PXA25X OS Timer driver starting...
> >     >> PXA25X wrap handler installed
> >     >> Using FFUA *(STOP HERE)
> >     >> ========================================
> >     >>
> >     >> can anyone give me some suggestions about what may be the cause
> >     of this
> >     >> status
> >     >> and how can i fix it?
> >     >>
> >     >
> >     > I'm not sure what the cause is. Are you able to enter the kernel
> >     > debugger at this point to try and get some further information?
> >     >
> >     > Cheers,
> >     >
> >     > Ben
> >     >
> >     > _______________________________________________
> >     > Developer mailing list
> >     > Developer at okl4.org <mailto:Developer at okl4.org>
> >     > https://lists.okl4.org/mailman/listinfo/developer
> >     >
> >     >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.okl4.org/pipermail/developer/attachments/20070925/d98591be/attachment.htm 


More information about the Developer mailing list