Skip to contentSkip to conversation

Linux kernel panics and core dumps.

DISCUSSION Arun Dharankar 3 participants 4 messages Apr 8, 2003 – Apr 9, 2003

lore
Share & tools
lore
#0 lore raw

Greetings.

On x86 architectures there seem to be at least two ways of producing Linux kernel panic dumps. These projects are hosted at

"http://lkcd.sourceforge.net/" (originated in SGI), and

"http://oss.missioncriticallinux.com/projects/mcore/"
(originated in MCLX).

Of the two, the second one seems to work quite well on x86 PCs. I dont know how much of it is actively supported on PowerPCs. So, the first question is:

Has anyone tried this on PowerPC, specifically Linux kernel versions 2.4.x? The code for PowerPC seems to be there, but the Makefiles dont seem to be up-to-date, and could be broken.

Further more, this same project has some documentation which has a good discussion on different approaches to Linux kernel memory dumps. One item in this discussion is about the BIOS/bootloader support.

Essentially, if PPCBoot/U-Boot was to recognize the Linux kernel memory layout, a much more reliable scheme could be implemented. For example, under all panic or hang conditions (watchdog), the system could just be rebooted. During the startup, PPCBoot/U-Boot along with Linux, could save the Linux kernel dump reliably. MCLX scheme seems to follow this approach, but does not rely on the bootloader.

Has anyone investigated this? Or anything already done, and cares to share it? Any thoughts on this?

Best regards,
-Arun.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#1 lore raw

ppcboot 2.0.0 + ppclinux2.4.devel, network weirdo

Hi guys:

I have ppclinux 2.4.devel (2.4.20) running on my 440gp ebony board with ppcboot 2.0.0. Normally I use tftp to get the compressed kernel image to 440gp and bootm from memory. So far I have these issues:

1. for some reason, linux kernel sees the two eth interfaces but fails to get the correct MAC addresses, thus when system fully boots up "ifconfig" shows two eth0/eth1 with MAC addr as ff:ff:ff:ff:ff:ff, because this is same as brd, many network services won't work.
I checked kernel source code and found that, in include/asm-ppc/ibm440.h, there's a structure "board_info" holds MAC addresses of the two enet interfaces. According to this header file: "Ebony firmware stores MAC addresses in the F/W VPD area. The firmware must store the other dynamic values in NVRAM like on the previous 40x systems so they should be accessible if we really want them."
So, my question is: how can I get ibm440's EMAC info? from NVRAM? the kernel I am using now does not support NVRAM for ppc yet.

2. to temporarily solve the problem in 1., I modifed drivers/net/ibm_ocp/ibm_ocp_enet.c:ocp_enet_probe(),
when reading the MAC address, I simply assigned some fake MAC addrs to dev->dev_addr, and the network part is working now, I can telnet into my 440gp, also ftp out from it.
I did relatively enough tests using tftp from my server to get the kernel image loaded to 440gp and bootm to bring the system up, everything looked fine. Then I decided that I want to copy the memory area of kernel image to flash and boot from there. the booting seemed OK, no errors reported, except that after the system fully booted up I found I could not ping the network from/into 440gp box.
Several minutes later I found if I tftp something, let's see, a 1-byte file, or even a non-existent file, then bootm from flash would bring up working network interfaces. It looked like "tftp" does some initialization
for the network interfaces.
I read ppcboot-2.0.0/common/cmd_net.c:netboot_common(), which calls net/net.c:NetLoop(), in which I see functions like eth_halt(), eth_init(bd) get called.
Here's my 2nd question: is it a good idea that I modify ppcboot to include these network initialization functions just before booting my kernel image? Maybe this is not necessary but I really could not figure out why the "tftp" before loading kernel image made the difference on the network.

Thanks,

El.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#2 lore raw

Re: ppcboot 2.0.0 + ppclinux2.4.devel, network weirdo

Quoted 6 lines · In message <000d01c2fe74$83264520$1464a8c0@sjeng3> you wrote:

Here's my 2nd question: is it a good idea that I modify ppcboot to include these network initialization functions just before booting my kernel image? Maybe this is not necessary but I really could not figure out why the "tftp" before loading kernel image made the difference on the network.

This is a somewhat philosophical question, and opinions differ. IMHO a Linux driver usually should perform all required initializations himself instead on relying on certain things to be done by some firmware.

Wolfgang Denk

--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: [email protected] "...one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of
their C programs." - Robert Firth

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

#3 lore raw

Re: ppcboot 2.0.0 + ppclinux2.4.devel, network weirdo

Quoted 8 lines

This is a somewhat philosophical question, and opinions differ. IMHO a Linux driver usually should perform all required initializations himself instead on relying on certain things to be done by some firmware.

Wolfgang Denk

Thanks Wolfgang for the input.

El.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/