Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

uClinux MMU - Kernel panic

After I succesfully downloaded image to sdram I get such of error.

My sdram is 8MB and image is 3007KB.

nios2-terminal:

Uncompressing Linux... Ok, booting the kernel.

Linux version 2.6.34-00692-g5bc7853-dirty (lukasz@srv) (gcc version 4.1.2)# 79 Fri Mar 25 14:59:52 CET 2011

bootconsole [early0] enabled

early_console initialized at 0xe1809050

Linux/Nios II-MMU

init_bootmem_node(?,0xbc2, 0x800, 0x1000)

free_bootmem(0xbc2000, 0x43e000)

reserve_bootmem(0xbc2000, 0x100)

Built 1 zonelists in Zone order, mobility grouping off. Total pages: 2032

Kernel command line:

PID hash table entries: 32 (order: -5, 128 bytes)

Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)

Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)

We have 4096 pages of RAM

Memory available: 4260k/3847k RAM, 0k/0k ROM (1098k kernel code, 2748k data)

Hierarchical RCU implementation.

NR_IRQS:32

Calibrating delay loop... 24.16 BogoMIPS (lpj=120832)

Mount-cache hash table entries: 512

init_BSP(): registering device resources

Switching to clocksource timer

swapper invoked oom-killer: gfp_mask=0x200d2, order=0, oom_adj=0

Stack from c0c18b74:

000200d2

c084a2a4

00000000

000200d2

00000000

00000000

c0bac424

c0bac424

00000000

00000000

c084a884

00000000

000200d2

00000004

35df8f9f

000200d2

00000000

00000000

c0bb2ddc

00000001

00000000

c084a8ec

00000000

00000000

000200d2

c084dcac

00000001

00000042

c0bb253c

00000000

c0bb253c

00000000

00000000

00000000

00000000

c0c17bc0

00000040

c0bb253c

00000000

000200d2

00000010

c0bb2de0

00000000

00000001

00000001

00000000

00000000

00000000

Call Trace:

[<c08476c0>]

[<c088b5a4>]

[<c0846948>]

[<c08481a4>]

[<c080cb60>]

[<c0845634>]

[<c0816c24>]

[<c08483e0>]

[<c086d664>]

[<c08d2924>]

[<c086deac>]

[<c086e528>]

[<c08c294c>]

[<c0800210>]

[<c08a0000>]

[<c0802254>]

[<c080be74>]

[<c08021b8>]

[<c0801034>]

[<c0802248>]

Mem-Info:

DMA per-cpu:

CPU 0: hi: 0, btch: 1 usd: 0

active_anon:0 inactive_anon:0 isolated_anon:0

active_file:5 inactive_file:0 isolated_file:0

unevictable:945 dirty:0 writeback:0 unstable:0

free:0 slab_reclaimable:26 slab_unreclaimable:70

mapped:0 shmem:0 pagetables:0 bounce:0

DMA free:0kB min:0kB low:0kB high:0kB active_anon:0kB inactive_anon:0kB active_file:20kB inactive_file:0kB unevictable:3780kB isolated(anon):0kB isolated(file):0kB present:8128kB mlocked:0kB dirty:0kB writeback:0kB mapped:0kB shmem:0kB slab_reclaimable:104kB slab_unreclaimable:280kB kernel_stack:36kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:945 all_unreclaimable? no

lowmem_reserve[]: 0 0 0

DMA: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB

950 total pagecache pages

2048 pages RAM

983 pages reserved

0 pages shared

1030 pages non-shared

Kernel panic - not syncing: Out of memory and no killable processes...

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You're running out of memory, somehow only 4MB get recognized:

    Memory available: 4260k/3847k RAM, 0k/0k ROM (1098k kernel code, 2748k data

    this menas only about 400kB are available for userspace etc. which is way to small. I guess even 8MB will probably be too small, depending on the configuration of your image (kernel and userspace-tools).

    What value does DDR2_TOP_SPAN in your generated header file have?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have 8MB sdram. I tried to make small my kernel but I dont know what can I delete from it. When I download image I have to download 3007kB.

    DDR2_TOP_SPAN is 8388608

    Can I tunn it somehow to run it on 8MB sdram?
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sorry, I was wrong. The whole 8MB of RAM seem to have been used, not only 4MB. But it still seems to be too small for your current image.

    Please try to deselect as many drivers/options as possible from the kernel and as many userspace tools and libraries from the "Application/Library Settings" menuconfig. You should be able to produce an image of around 2MB
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Fortunately I have to run more stuff like ethernet GPIO and so on and I get new de2-70 board with more memory. I connect 32MB and now its working. Free shows:

    free

    total used free shared buffers

    Mem: 30992 7784 23208 0 0

    Swap: 0 0 0

    Total: 30992 7784 23208