* sc3200 cpu + apm module kernel crash
@ 2006-11-03 23:06 Nicolas FR
2006-11-05 18:21 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas FR @ 2006-11-03 23:06 UTC (permalink / raw)
To: linux-kernel
Hi,
I am currently trying to setup a fully functionnal linux on a Tatung
webpad (shipped with winCE), which has a AMD/NSC SC3200 CPU (more
details on my blog here: http://www.geek-fr.com ). So far everything
goes fine except one thing:
when I try to load the APM module, the kernel crashes. I have tried
different options, but always got the same crash. I have enabled some
verbosing and finally found that the crash is happening in
arch/i386/kernel/apm.c in function static void apm_mainloop(void) when
calling apm_event_handler();
I have thrown a bunch of "printk(KERN_INFO "apm: I am here\n");" and
noticed the crash is happening just when calling apm_event_handler();
and does not even execute any instruction in this function... This is
the point I don't understand, how can it crash just on calling a
function and not executing the first statement in this function?
Moreover by enabling soft lockup detection I have managed to get those
informations:
==========================
apm: BIOS version 1.2 Flags 0x07 (Driver version 1.16ac)
apm: entry f000:51c8 cseg16 f000 dseg 40 cseg len ffff, dseg ken ffff
cseg16 len ffff
apm: Connection version 1.2
apm: AC on line, battery statys high, battery life 100%
apm: battery flag 0x01, battery life unknown
BUG: soft lockup detected on CPU#0!
[<c011d102>] update_process_times+0x22/0x60
[<c0106441>] timer_interrupt+0x41/0x80
[<c0134773>] handle_IRQ_event+0x33/0x60
[<c0134813>] __do_IRQ+0x73/0xd0
[<c0105171>] do_IRQ+0x31/0x70
[<c0103b1a>] common_interrupt+0x1a/0x20
[<c0409200>] do_cyrix_devid+0x60/0x90
==========================
Any idea on what can be happening here?
Regards,
Nicolas.
PS: please CC me if answering this message, as I am not subscribed to the list
PPS: I have read the list FAQ before posting, but still if this
message is not appropriate to the list, then sorry.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sc3200 cpu + apm module kernel crash
2006-11-03 23:06 sc3200 cpu + apm module kernel crash Nicolas FR
@ 2006-11-05 18:21 ` Alan Cox
2006-11-05 21:33 ` Nicolas FR
0 siblings, 1 reply; 4+ messages in thread
From: Alan Cox @ 2006-11-05 18:21 UTC (permalink / raw)
To: Nicolas FR; +Cc: linux-kernel
Ar Sad, 2006-11-04 am 00:06 +0100, ysgrifennodd Nicolas FR:
> I have thrown a bunch of "printk(KERN_INFO "apm: I am here\n");" and
> noticed the crash is happening just when calling apm_event_handler();
> and does not even execute any instruction in this function... This is
> the point I don't understand, how can it crash just on calling a
> function and not executing the first statement in this function?
APM is BIOS code so the assembler inlines trap into the firmware and the
firmware sometimes isn't very good, particularly the 32bit entry points
which are not used by a certain other vendors products.
In those cases you need to trace the asm code in the firmware and see if
the firmware is buggy.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: sc3200 cpu + apm module kernel crash
2006-11-05 18:21 ` Alan Cox
@ 2006-11-05 21:33 ` Nicolas FR
2006-11-05 23:21 ` Alan Cox
0 siblings, 1 reply; 4+ messages in thread
From: Nicolas FR @ 2006-11-05 21:33 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel
I have finally traced down the bug (Tatung webpad TWN-5213CU with SC3200 CPU):
- in apm_mainloop there is an for(;;) loop, which set a
scheduler_timeout (1second) and then calls apm_event_handler().
- apm_event_handler does some checks and calls check_events();
- check_events has a loop:
while ((event = get_event()) != 0) { switch (event) {...} }
The module was "crashing" on my box because it keeps on receiving
events=APM_UPDATE_TIME meaning that it would never get out of the
while() loop in check_events. I need to do some tests but I might
simply fix this by ignoring APM_UPDATE_TIME events. I first thought
replacing the "while ((event = get_event()) != 0)" by an "if ((event =
get_event()) != 0)" but maybe I would miss other events doing this?
Best regards,
Nicolas.
PS: btw, thanks for your email that's really nice to answer every
message on this mailing list.
On 11/5/06, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> Ar Sad, 2006-11-04 am 00:06 +0100, ysgrifennodd Nicolas FR:
> > I have thrown a bunch of "printk(KERN_INFO "apm: I am here\n");" and
> > noticed the crash is happening just when calling apm_event_handler();
> > and does not even execute any instruction in this function... This is
> > the point I don't understand, how can it crash just on calling a
> > function and not executing the first statement in this function?
>
> APM is BIOS code so the assembler inlines trap into the firmware and the
> firmware sometimes isn't very good, particularly the 32bit entry points
> which are not used by a certain other vendors products.
>
> In those cases you need to trace the asm code in the firmware and see if
> the firmware is buggy.
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: sc3200 cpu + apm module kernel crash
2006-11-05 21:33 ` Nicolas FR
@ 2006-11-05 23:21 ` Alan Cox
0 siblings, 0 replies; 4+ messages in thread
From: Alan Cox @ 2006-11-05 23:21 UTC (permalink / raw)
To: Nicolas FR; +Cc: linux-kernel
Ar Sul, 2006-11-05 am 22:33 +0100, ysgrifennodd Nicolas FR:
> The module was "crashing" on my box because it keeps on receiving
> events=APM_UPDATE_TIME meaning that it would never get out of the
> while() loop in check_events. I need to do some tests but I might
That's a BIOS bug
> simply fix this by ignoring APM_UPDATE_TIME events. I first thought
If that works can you run dmidecode on your box and post me the output,
from that we can add a blacklist entry to automatically handle this.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-11-05 23:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03 23:06 sc3200 cpu + apm module kernel crash Nicolas FR
2006-11-05 18:21 ` Alan Cox
2006-11-05 21:33 ` Nicolas FR
2006-11-05 23:21 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox