* BDI kernel debug
@ 2004-07-06 11:31 Marco Schramel
2004-07-06 18:18 ` Wolfgang Denk
2004-07-07 11:42 ` Fahd Abidi
0 siblings, 2 replies; 7+ messages in thread
From: Marco Schramel @ 2004-07-06 11:31 UTC (permalink / raw)
To: PPC_LINUX
Hi all,
i have some problems with debugging my kernel. This is the first time i use bdi for kernel debugging. ELDK 3.0 is my toolchain (Target 8270).
My bdi2000 can sync with the gdb (ddd) debugger.
I let the kernel run until "start_here", at example. Then i try to step through the source. I see the source and i can step in it. Sometimes it happens that i spend a lot of time in
linux/kernel/timer.c. Then the output of gdb is "
(gdb) next
Single stepping until exit from function __cli,
which has no line number information.
Program received signal SIGSTOP, Stopped (signal).
0xc0007dec in __cli ()"
The same output with "step". "Cont" ends also there, although i had set a breakpoint later in the source.
Are there some options in the kernel or in the gdb to set ?
Thanks in advance
Marco
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel@go.bartec.de
Phone: +49 (0)9929/301332
Fax: +49 (0)9929/301112
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BDI kernel debug
2004-07-06 11:31 BDI kernel debug Marco Schramel
@ 2004-07-06 18:18 ` Wolfgang Denk
2004-07-07 5:01 ` Marco Schramel
2004-07-07 11:42 ` Fahd Abidi
1 sibling, 1 reply; 7+ messages in thread
From: Wolfgang Denk @ 2004-07-06 18:18 UTC (permalink / raw)
To: Marco Schramel; +Cc: PPC_LINUX
In message <200407061331.08613.Schramel.Linux@go.bartec.de> you wrote:
>
> i have some problems with debugging my kernel. This is the first time i use bdi for kernel debugging. ELDK 3.0 is my toolchain (Target 8270).
...
> Are there some options in the kernel or in the gdb to set ?
Did you enable CONFIG_DEBUG_KERNEL in your kernel configuration?
Did you read the FAQ section of the DULG, especially
http://www.denx.de/twiki/bin/view/DULG/HowToDebugLinuxExceptions
and
http://www.denx.de/twiki/bin/view/DULG/HowToSingleStepThroughRFIInstruction
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
Death, when unnecessary, is a tragic thing.
-- Flint, "Requiem for Methuselah", stardate 5843.7
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BDI kernel debug
2004-07-06 18:18 ` Wolfgang Denk
@ 2004-07-07 5:01 ` Marco Schramel
0 siblings, 0 replies; 7+ messages in thread
From: Marco Schramel @ 2004-07-07 5:01 UTC (permalink / raw)
To: Wolfgang Denk; +Cc: PPC_LINUX
Hello,
>
> > Are there some options in the kernel or in the gdb to set ?
>
> Did you enable CONFIG_DEBUG_KERNEL in your kernel configuration?
Yes it is enabled, furthermore the "Include BDI-2000 user context switcher" is set and compiler options "Additional compile arguments: "-g -ggdb -fno-schedule-insns -fno-schedule-insns2" are set
> Did you read the FAQ section of the DULG, especially
> http://www.denx.de/twiki/bin/view/DULG/HowToDebugLinuxExceptions
> and
> http://www.denx.de/twiki/bin/view/DULG/HowToSingleStepThroughRFIInstruction
In my case i try to step through m8260_setup_arch() function to debug m8260_find_bridges() for pci support. Is there the MMU already on ?
I think it is.
When the bdi runs through the code the most time it comes to the __delay() function. Then i try "step" or "next" and it often hangs forever.
> Best regards,
>
> Wolfgang Denk
Thank you for your reply.
Best regards,
Marco
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel@go.bartec.de
Phone: +49 (0)9929/301332
Fax: +49 (0)9929/301112
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: BDI kernel debug
2004-07-06 11:31 BDI kernel debug Marco Schramel
2004-07-06 18:18 ` Wolfgang Denk
@ 2004-07-07 11:42 ` Fahd Abidi
2004-07-07 11:52 ` Marco Schramel
1 sibling, 1 reply; 7+ messages in thread
From: Fahd Abidi @ 2004-07-07 11:42 UTC (permalink / raw)
To: 'Marco Schramel', PPC_LINUX
Marco,
Please look online at the Ultimate Solutions website, I documented this
issue a little while ago, http://www.ultsol.com/faq-P305.htm. Wolfgang made
the right suggestion, using BDI_CONFIG_SWITCH will cure this problem.
Fahd
-----Original Message-----
From: Marco Schramel [mailto:Schramel.Linux@go.bartec.de]
Sent: Tuesday, July 06, 2004 6:31 AM
Subject: BDI kernel debug
i have some problems with debugging my kernel. This is the first time i
use bdi for kernel debugging. ELDK 3.0 is my toolchain (Target 8270). My
bdi2000 can sync with the gdb (ddd) debugger. I let the kernel run until
"start_here", at example. Then i try to step through the source. I see
the source and i can step in it. Sometimes it happens that i spend a lot
of time in linux/kernel/timer.c. Then the output of gdb is "
(gdb) next
Single stepping until exit from function __cli,
which has no line number information.
Program received signal SIGSTOP, Stopped (signal).
0xc0007dec in __cli ()"
The same output with "step". "Cont" ends also there, although i had set
a breakpoint later in the source.
Are there some options in the kernel or in the gdb to set ?
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BDI kernel debug
2004-07-07 11:42 ` Fahd Abidi
@ 2004-07-07 11:52 ` Marco Schramel
0 siblings, 0 replies; 7+ messages in thread
From: Marco Schramel @ 2004-07-07 11:52 UTC (permalink / raw)
To: fabidi; +Cc: PPC_LINUX
Fahd,
thank you for your answer
>
> Please look online at the Ultimate Solutions website, I documented this
> issue a little while ago, http://www.ultsol.com/faq-P305.htm. Wolfgang made
> the right suggestion, using BDI_CONFIG_SWITCH will cure this problem.
But my kernel has this option.
Best regards
Marco
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: BDI kernel debug
[not found] <81C69D96BDD30640952C7A404004AA250C2CA8@h0007e95d9fa7.ne.client2.attbi.com>
@ 2004-07-07 13:07 ` Fahd Abidi
2004-07-08 14:03 ` Marco Schramel
0 siblings, 1 reply; 7+ messages in thread
From: Fahd Abidi @ 2004-07-07 13:07 UTC (permalink / raw)
To: 'Marco Schramel'; +Cc: 'PPC_LINUX'
Ok,
Then check /linuxroot/arch/ppc/kernel/head.S, do a search for
CONFIG_BDI_SWITCH. Make sure the option is valid and that the pgtables do
indeed get updated. If the switch is valid then probably something else is
wrong.
Check to make sure that the PGTABLE base is at 0x000000f0 and that is what
you have set it to in your BDI config file. The BDI config file has to match
what you have in head.S.
You can also manually update the Page Tables by entering the address of
swapper_pg_dir into the location 0x000000f8. Do this update from the BDI
right before the instruction that causes the SIGSTOP. This should resolve
the problem.
Fahd
-----Original Message-----
From: Marco Schramel [mailto:Schramel.Linux@go.bartec.de]
Sent: Wednesday, July 07, 2004 6:53 AM
Subject: Re: BDI kernel debug
thank you for your answer
> Please look online at the Ultimate Solutions website, I documented
> this issue a little while ago, http://www.ultsol.com/faq-P305.htm.
> Wolfgang made the right suggestion, using BDI_CONFIG_SWITCH will cure
> this problem.
But my kernel has this option.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: BDI kernel debug
2004-07-07 13:07 ` Fahd Abidi
@ 2004-07-08 14:03 ` Marco Schramel
0 siblings, 0 replies; 7+ messages in thread
From: Marco Schramel @ 2004-07-08 14:03 UTC (permalink / raw)
To: fabidi; +Cc: 'PPC_LINUX'
Fahd,
thanks for the help
> Then check /linuxroot/arch/ppc/kernel/head.S, do a search for
> CONFIG_BDI_SWITCH. Make sure the option is valid and that the pgtables do
> indeed get updated. If the switch is valid then probably something else is
> wrong.
>
> Check to make sure that the PGTABLE base is at 0x000000f0 and that is what
> you have set it to in your BDI config file. The BDI config file has to
> match what you have in head.S.
Adding PTBASE 0x000000f0 to the [TARGET] section in the bdi config file works very well.
Thanks
Marco
---------
Marco Schramel
R&D
Bartec GmbH
Schulstr. 30
94239 Gotteszell, Germany
www.bartec.de
Marco.Schramel@go.bartec.de
Phone: +49 (0)9929/301332
Fax: +49 (0)9929/301112
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2004-07-08 14:03 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-06 11:31 BDI kernel debug Marco Schramel
2004-07-06 18:18 ` Wolfgang Denk
2004-07-07 5:01 ` Marco Schramel
2004-07-07 11:42 ` Fahd Abidi
2004-07-07 11:52 ` Marco Schramel
[not found] <81C69D96BDD30640952C7A404004AA250C2CA8@h0007e95d9fa7.ne.client2.attbi.com>
2004-07-07 13:07 ` Fahd Abidi
2004-07-08 14:03 ` Marco Schramel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).