2008-02-25 14:40:32     MTD Partitioning

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-02-25 14:40:32     MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51617    Earlier today, I managed to get MTD partitioning to work.

 

U-Boot bootargs:

 

    root=/dev/mtdblock0 rw console=ttyBF0,57600 mtdparts=physmap-flash.0:128k(uboot)ro,3840k(uImage),64k(defconf),64k(conf)

 

I burn uImage.ext2 to the flash and boot:

 

Boot messages:

 

Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600 mtdparts=physmap-flash.0:128k(uboot)ro,3840k(uImage),64k(defconf),64k(conf)              

 

        ...

 

    physmap platform flash device: 00400000 at 20000000

    physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank

     Amd/Fujitsu Extended Query Table at 0x0040

    number of CFI chips: 1

    cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.

    4 cmdlinepart partitions found on MTD device physmap-flash.0

    Creating 4 MTD partitions on "physmap-flash.0":

    0x00000000-0x00020000 : "uboot"

    0x00020000-0x003e0000 : "uImage"

    0x003e0000-0x003f0000 : "defconf"

    0x003f0000-0x00400000 : "conf"

 

Dev tree shows:

 

root:/> ls /dev

 

    console    mtd0ro     mtdblock0  ram0       ram15      ram8       ttyBF0

    full       mtd1       mtdblock1  ram1       ram2       ram9       urandom

    kmem       mtd1ro     mtdblock2  ram10      ram3       random     watchdog

    kmsg       mtd2       mtdblock3  ram11      ram4       snd        zero

    log        mtd2ro     null       ram12      ram5       sport0

    mem        mtd3       ptmx       ram13      ram6       sport1

    mtd0       mtd3ro     pts        ram14      ram7       tty

    root:/>  

 

 

I rebuild with netflash enabled (not touching any kernel settings), and that fails (see other thread). I turn netflash back off, load the new image, and now the kernel refuses to map partitions on the flash:

 

    uclinux[mtd]: RAM probe address=0x3700000 size=0x800000

    Creating 1 MTD partitions on "RAM":

    0x00000000-0x00800000 : "ROMfs"                                                                                                                           

 

What could I have done wrong?

QuoteReplyEditDelete

 

 

2008-02-25 15:02:04     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51621    you're comparing two different flash drivers

 

there is the uClinux MTD RAM ROMFS one (which is an mtd backed by RAM) and there is the physflash MTD which works off of a CFI that is mapped into physical memory.  you can use both at the same time, but if you have a rootfs in flash, the fake uClinux MTD mapping tends to be pointless.

QuoteReplyEditDelete

 

 

2008-02-25 15:06:54     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51622    So if I want to do my own mapping of the flash, but still have the kernel execute from RAM, would I disable MTD_UCLINUX? Doing that, all my ext2 images disappear on re-build.

QuoteReplyEditDelete

 

 

2008-02-25 16:21:53     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51628    you can either boot out of initramfs (and thus you dont need MTD_UCLINUX), or you can just use both flash mappings at the same time

QuoteReplyEditDelete

 

 

2008-02-25 16:33:52     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51630    initramfs is just for ramboot, right? (assuming you're talking about the binary). I'm actually burning uImage.ext2 to the flash and running a flashboot where u-boot unzips, copies to ram, jumps to offset, etc.

 

Sorry for my density, but I'm just not grasping this.

QuoteReplyEditDelete

 

 

2008-02-25 17:29:26     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51632    intramfs is for whatever you want.  yes, the rootfs is in ram, but so is uImage.ext2.  they both have the rootfs built into the kernel which is placed into the uImage and automatically extracted.

 

neither option precludes you from using the physical mapping driver though.  post your entire kernel output.

QuoteReplyEditDelete

 

 

2008-02-28 12:18:22     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51810   

bf537> printenv bootargs

bootargs=root=/dev/mtdblock0 rw console=ttyBF0,57600 mtdparts=physmap-flash.0:128k(uboot)ro,3840k(uImage),64k(defconf),64k(conf)

bf537> printenv flashboot

flashboot=bootm 0x20020000

bf537> run flashboot

 

bf537> run flashboot

## Booting image at 20020000 ...

   Image Name:   uClinux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3425299 Bytes =  3.3 MB

   Load Address: 00001000

   Entry Point:  0017c000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 17c000

Linux version 2.6.22.18-ADI-2008R1-svn4385 (cameron@camlinux) (gcc version 4.1.2 (ADI svn)) #70 Thu Feb 28 09:14:06 PST 2008

Hardware Trace Active and Enabled

Warning: limiting memory to 55MB due to hardware anomaly 05000263

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 400 MHz core clock and 80 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x0011dac0

  rodata    = 0x0011e000-0x0016ba14

  data      = 0x0016c000-0x0017c000

    stack   = 0x0016c000-0x0016e000

  init      = 0x0017c000-0x00190000

  bss       = 0x00190000-0x0019fd10

  available = 0x0019fd10-0x03700000

  rootfs    = 0x03700000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 13970

Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600 mtdparts=physmap-flash.0:128k(uboot)ro,3840k(uImage),64k(defconf),64k(conf)

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 54080k/65536k RAM, (80k init code, 1138k kernel code, 441k data, 1024k dma, 8776k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (39 KB free)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

.IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

JFFS2 version 2.2. (NAND) .. 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

pfx: pfbits driver for bf5xx

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=15)@sclk=80MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

uclinux[mtd]: RAM probe address=0x3700000 size=0x800000

Creating 1 MTD partitions on "RAM":

0x00000000-0x00800000 : "ROMfs"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).

ASoC version 0.13.1

AD1980 SoC Audio Codec

dma_alloc_init: dma_page @ 0x002f9000 - 256 pages at 0x03f00000

asoc: AC97 <-> bf5xx-ac97 mapping ok

ad1980: Found AD1981 - only 2/2 IN/OUT Channels supported

ALSA device list:

  #0: bf5xx-board (AD1980)

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

VFS: Mounted root (ext2 filesystem).

Freeing unused kernel memory: 80k freed

grep: not found

                           _____________________________________

        a8888b.           / Welcome to the uClinux distribution \

       d888888b.         /       _     _                         \

       8P"YP"Y88        /       | |   |_|            __  __ (TM)  |

       8|o||o|88  _____/        | |    _ ____  _   _ \ \/ /       |

       8'    .88       \        | |   | |  _ \| | | | \  /        |

       8`._.' Y8.       \       | |__ | | | | | |_| | /  \        |

      d/      `8b.       \      \____||_|_| |_|\____|/_/\_\       |

     dP   .    Y8b.       \   For embedded processors including   |

    d8:'  "  `::88b        \    the Analog Devices Blackfin      /

   d8"         'Y88b        \___________________________________/

  :8P    '      :888

   8a.   :     _a88P         For further information, check out:

._/"Yaa_:   .| 88P|            - http://blackfin.uclinux.org/

\    YP"    `| 8P  `.          - http://docs.blackfin.uclinux.org/

/     \.___.d|    .'           - http://www.uclinux.org/

`--..__)8888P`._.'  jgs/a:f    - http://www.analog.com/blackfin

 

Have a lot of fun...

 

 

BusyBox v1.4.1 (2008-02-25 10:58:48 PST) Built-in shell (msh)

Enter 'help' for a list of built-in commands.

 

root:/>            

 

QuoteReplyEditDelete

 

 

2008-02-28 12:30:48     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51813    Bugreport attached.

bugreport.tgz

QuoteReplyEditDelete

 

 

2008-02-28 12:40:57     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51815    the physmap / bf5xx-flash driver do not show ... that means you either havent selected them or you've built them as modules

 

verify you have properly selected the flash mapping drivers

QuoteReplyEditDelete

 

 

2008-02-28 13:59:07     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51824    D'oh! It was set to build as a module.

 

When I enable it, I get the following errors:

 

bf537> run bootcmd

## Booting image at 20020000 ...

   Image Name:   uClinux Kernel and ext2

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3423819 Bytes =  3.3 MB

   Load Address: 00001000

   Entry Point:  0017c000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 17c000

Linux version 2.6.22.18-ADI-2008R1-svn4385 (cameron@camlinux) (gcc version 4.1.2 (ADI svn)) #73 Thu Feb 28 09:45:19 PST 2008

Hardware Trace Active and Enabled

Warning: limiting memory to 55MB due to hardware anomaly 05000263

Blackfin support (C) 2004-2007 Analog Devices, Inc.

Compiled for ADSP-BF537 Rev 0.2

Blackfin Linux support by http://blackfin.uclinux.org/

Processor Speed: 400 MHz core clock and 80 MHz System Clock

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  text      = 0x00001000-0x0011dbc0

  rodata    = 0x0011e000-0x0016bb10

  data      = 0x0016c000-0x0017c000

    stack   = 0x0016c000-0x0016e000

  init      = 0x0017c000-0x00190000

  bss       = 0x00190000-0x0019fd10

  available = 0x0019fd10-0x03700000

  rootfs    = 0x03700000-0x03f00000

  DMA Zone  = 0x03f00000-0x04000000

Instruction Cache Enabled

Data Cache Enabled (write-through)

Built 1 zonelists.  Total pages: 13970

Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600 mtdparts=physmap-flash.0:128k(uboot)ro,3840k(uImage),64k(defconf),64k(conf)

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 256 (order: 8, 1024 bytes)

Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)

Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)

Memory available: 54080k/65536k RAM, (80k init code, 1138k kernel code, 441k data, 1024k dma, 8776k reserved)

Blackfin Scratchpad data SRAM: 4 KB

Blackfin Data A SRAM: 16 KB (15 KB free)

Blackfin Data B SRAM: 16 KB (16 KB free)

Blackfin Instruction SRAM: 48 KB (39 KB free)

Security Framework v1.0.0 initialized

Mount-cache hash table entries: 512

NET: Registered protocol family 16

Blackfin GPIO Controller

Blackfin DMA Controller

stamp_init(): registering device resources

Generic PHY: Registered new driver

.IP route cache hash table entries: 1024 (order: 0, 4096 bytes)

TCP established hash table entries: 2048 (order: 2, 16384 bytes)

TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

TCP: Hash tables configured (established 2048 bind 2048)

TCP reno registered

JFFS2 version 2.2. (NAND) .. 2001-2006 Red Hat, Inc.

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

pfx: pfbits driver for bf5xx

bfin-wdt: initialized: timeout=20 sec (nowayout=0)

Serial: Blackfin serial driver

bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 18) is a BFIN-UART

RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize

bfin_mac_mdio: probed

bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:00, irq=-1, mdc_clk=2500000Hz(mdc_div=15)@sclk=80MHz)

bfin_mac: Version 1.1, Blackfin BF53[67] BF527 on-chip Ethernet MAC driver

physmap platform flash device: 00400000 at 20000000

4 cmdlinepart partitions found on MTD device physmap-flash.0

Creating 4 MTD partitions on "physmap-flash.0":

0x00000000-0x00020000 : "uboot"

0x00020000-0x003e0000 : "uImage"

0x003e0000-0x003f0000 : "defconf"

0x003f0000-0x00400000 : "conf"

kobject_add failed for physmap-flash.0 with -EEXIST, don't try to register things with the same name in the same directory.

Hardware Trace:

   0 Target : <0x000046bc> { _dump_stack + 0x0 }

     Source : <0x0008e3b0> { _kobject_shadow_add + 0xd4 }

   1 Target : <0x0008e3b0> { _kobject_shadow_add + 0xd4 }

     Source : <0x0008e3f4> { _kobject_shadow_add + 0x118 }

   2 Target : <0x0008e3f4> { _kobject_shadow_add + 0x118 }

     Source : <0x0000d61a> { _printk + 0x16 }

   3 Target : <0x0000d616> { _printk + 0x12 }

     Source : <0x0000d4cc> { _vprintk + 0x1b8 }

   4 Target : <0x0000d4c0> { _vprintk + 0x1ac }

     Source : <0xffa00d20> { __common_int_entry + 0xd8 }

   5 Target : <0xffa00cbe> { __common_int_entry + 0x76 }

     Source : <0xffa00af0> { _return_from_int + 0x58 }

   6 Target : <0xffa00af0> { _return_from_int + 0x58 }

     Source : <0xffa00ac6> { _return_from_int + 0x2e }

   7 Target : <0xffa00a98> { _return_from_int + 0x0 }

     Source : <0xffa00cba> { __common_int_entry + 0x72 }

   8 Target : <0xffa00cb8> { __common_int_entry + 0x70 }

     Source : <0xffa0040c> { _asm_do_IRQ + 0x68 }

   9 Target : <0xffa00404> { _asm_do_IRQ + 0x60 }

     Source : <0x00011706> { __local_bh_enable + 0x3e }

  10 Target : <0x000116c8> { __local_bh_enable + 0x0 }

     Source : <0x00011810> { ___do_softirq + 0x94 }

  11 Target : <0x00011808> { ___do_softirq + 0x8c }

     Source : <0x000117e8> { ___do_softirq + 0x6c }

  12 Target : <0x000117dc> { ___do_softirq + 0x60 }

     Source : <0x000118f0> { _tasklet_action + 0x7c }

  13 Target : <0x000118ea> { _tasklet_action + 0x76 }

     Source : <0x000118c6> { _tasklet_action + 0x52 }

  14 Target : <0x000118c4> { _tasklet_action + 0x50 }

     Source : <0x0001b36e> { ___rcu_process_callbacks + 0xb6 }

  15 Target : <0x0001b368> { ___rcu_process_callbacks + 0xb0 }

     Source : <0x0001b2fe> { ___rcu_process_callbacks + 0x46 }

Stack from 0024bedc:

        0024bee0 0008e3b4 0018d234 ffffffef 0015571a 00176e28 0000001f 000a4a00

        000a4a06 0018d234 00176dbc 0018c3f4 001760e4 00176e24 00000000 0018d2a0

        00176e60 00176e60 00176db4 0018c3f4 00000000 0018d2a0 000a839c 0018d234

        00176db4 0018c3f4 00000001 00000000 00000000 00000000 00000000 002ff660

        00000000 00147140 00000000 001891e0 0018d234 0024a000 00000000 00000000

        0018d230 0018d224 0024a000 0017c674 00000000 00000000 00000000 00000000

 

Call Trace:

[<0017c5ec>] _kernel_init+0x0/0x234

[<00001686>] _kernel_thread_helper+0x6/0xc

 

uclinux[mtd]: RAM probe address=0x3700000 size=0x800000

Creating 1 MTD partitions on "RAM":

0x00000000-0x00800000 : "ROMfs"

bfin-spi bfin-spi.0: Blackfin BF5xx on-chip SPI Contoller Driver, Version 1.0, regs_base@ffc00500, dma channel@7

Advanced Linux Sound Architecture Driver Version 1.0.12rc1 (Thu Jun 22 13:55:50 2006 UTC).

ASoC version 0.13.1

AD1980 SoC Audio Codec

dma_alloc_init: dma_page @ 0x002f8000 - 256 pages at 0x03f00000

asoc: AC97 <-> bf5xx-ac97 mapping ok

ad1980: Found AD1981 - only 2/2 IN/OUT Channels supported

ALSA device list:

  #0: bf5xx-board (AD1980)

TCP cubic registered

NET: Registered protocol family 1

NET: Registered protocol family 17

List of all partitions:

1f00        128 mtdblock0 (driver?)

1f01       3840 mtdblock1 (driver?)

1f02         64 mtdblock2 (driver?)

1f03         64 mtdblock3 (driver?)

1f04       8192 mtdblock4 (driver?)

No filesystem could mount root, tried:  ext2

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,0)

 

The help for MTD_PHYSMAP states: "You will need to configure the physical address and size of the flash chips on your particular board as well as the bus width, either statically with config options or at run-time." It also says to "Ignore this option if you use run-time physmap configurati (i.e., run-time calling physmap_configure())."

 

It looks like the only sources that call physmap_configure() are arch/ppc/syslib/m8xx_setup.c and drivers/mtd/maps/pq2fads.c, neither of which I'm using.

QuoteReplyEditDelete

 

 

2008-02-28 14:25:42     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51827    you cannot specify the physmap specs in both the board configuration file and the kernel configuration file

 

you most likely need to update your kernel config

QuoteReplyEditDelete

 

 

2008-02-28 14:36:46     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51829    Mike, that's my problem. If I enable MTD_PHYSMAP, I have to define that flash there, don't I?

 

It doesn't appear there's a way to override the stamp_partitions[] in stamp.c from the kernel config.

QuoteReplyEditDelete

 

 

2008-02-28 14:56:24     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51830    if by "there" you mean "set the address/length/width in the kernel config", then the answer is "no".  if you look at the board resources, it sets those values in there.  the kernel config options are historical only and deprecated.

 

there is no need to set the mapping in the kernel config since it can easily be done via the kernel cmdline

QuoteReplyEditDelete

 

 

2008-02-28 15:13:32     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51833    If there's no need to set the mapping in the kernel config, why did you have me select it?

 

"the physmap / bf5xx-flash driver do not show ... that means you either havent selected them or you've built them as modules"

 

If I select the physmap driver, I have to enter some values for the start/length/width in the kernel config. Even if I set them to all zeros (which I wouldn't expect to work), I get the same issue.

 

By board resource file, are you referring to stamp.c (in case of BF537 stamp)? If so, your wiki even states that I can override those partitions using a combination of command line and physmap drivers.

QuoteReplyEditDelete

 

 

2008-02-28 15:28:00     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51835    i said enable the mapping, i did not say specify the parameters.  you should leave them all set to 0.  if you read the actual physmap driver, you will see that those parameters are all *optional* and deprecated.  nothing says you have to enter the values for the kernel config.

QuoteReplyEditDelete

 

 

2008-02-28 15:44:19     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51837    Ah, yes. Sorry, my mistake.

 

I've got it working now:

 

Kernel command line: root=/dev/mtdblock4 rw console=ttyBF0,57600 mtdparts=BF5xx-Flash:128k(uboot)rw,3840k(uImage),64k(defconf),64k(conf)

 

I have physmap enabled with all values set to zero.

 

The only thing I'm wondering about is setting root to mtdblock4. That's the mtd partition set in RAM. I imagine that's ok since I'm running everything out of RAM.

 

 

Thanks for all the help.

QuoteReplyEditDelete

 

 

2008-02-28 16:03:48     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51841    if the uclinux mtd is detected after the physmap, then it should stay as mtdblock4 (assuming you declared the first 4 partitions via physmap: 0-3)

 

i'm not sure if there's a way to force the order of mappings ... it may be related to the order the resources are declared/enumerated ...

QuoteReplyEditDelete

 

 

2008-02-28 16:09:22     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51842    I don't think it'll be a problem for me.

 

One thing, though. Ever since I set all the flash size parameters to zero in the physmap section of the config, I get a kernel panic when I run 'reboot'. Related?

 

panic.txt

QuoteReplyEditDelete

 

 

2008-02-28 16:28:57     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51843    It looks like everything goes to pot during the call to reboot(0x01234567);

QuoteReplyEditDelete

 

 

2008-02-28 16:30:03     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51844    while anything is possible, it seems pretty unlikely ... if you check the physmap driver, the address/width/len defines are not used at all so long as len == 0

 

cant say ive seen panics on the bf537-stamp when using physmap

 

what is the panic exactly ?

QuoteReplyEditDelete

 

 

2008-02-28 16:43:07     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51846    I attached it to the post...I thought...

 

root:/> reboot

Jump to address 0 - 0x0fff

Kernel OOPS in progress

Defered Exception context

CURRENT PROCESS:

COMM=reboot PID=174

TEXT = 0x0025c000-0x0025ca4c  DATA = 0x0346aa4c-0x0346abfc

BSS = 0x0346abfc-0x035e0000   USER-STACK = 0x035ffed0

 

return address: [0x00000000]; contents of:

 

SEQUENCER STATUS:               Not tainted

SEQSTAT: 0000002d  IPEND: 8030  SYSCFG: 0006

  HWERRCAUSE: 0x0

  EXCAUSE   : 0x2d

  physical IVG15 asserted : <0xffa00e80> { _evt_system_call + 0x0 }

  logical irq   6 mapped  : <0xffa00270> { _timer_interrupt + 0x0 }

  logical irq  12 mapped  : <0x000c8a3c> { _rx_handler + 0x0 }

  logical irq  13 mapped  : <0x000c8a98> { _tx_handler + 0x0 }

  logical irq  18 mapped  : <0x000a3d98> { _bfin_serial_dma_rx_int + 0x0 }

  logical irq  19 mapped  : <0x000a374c> { _bfin_serial_dma_tx_int + 0x0 }

  logical irq  24 mapped  : <0x000ad2bc> { _bf537mac_interrupt + 0x0 }

  logical irq  45 mapped  : <0x000c955c> { _err_handler + 0x0 }

RETE: <0x00000000> /* Maybe null pointer? */

RETN: <0x00299da8> /* unknown address */

RETX: <0x00000000> /* Maybe null pointer? */

RETS: <0x000b152c> { _physmap_flash_shutdown + 0x1c }

PC  : <0x00000000> /* Maybe null pointer? */

DCPLB_FAULT_ADDR: <0x0028b6fc> /* unknown address */

ICPLB_FAULT_ADDR: <0x00000000> /* Maybe null pointer? */

 

PROCESSOR STATE:

R0 : 0028b680    R1 : 00000000    R2 : 00000000    R3 : 00000000

R4 : 00000000    R5 : 01234567    R6 : fee1dead    R7 : 00173e18

P0 : 0016ea14    P1 : 00000000    P2 : 0028b680    P3 : 03091bd8

P4 : 00000084    P5 : 002e0e00    FP : 035ffdd8    SP : 00299ccc

LB0: 0369e181    LT0: 0369e174    LC0: 00000000

LB1: 00371a9f    LT1: 00371a98    LC1: 00000000

B0 : 00000000    L0 : 00000000    M0 : 00000000    I0 : 035ffb84

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 03091bd8

B2 : 00000000    L2 : 00000000    M2 : 00000000    I2 : 00000000

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000

A0.w: 0000002c   A0.x: 00000000   A1.w: 0000002c   A1.x: 00000000

USP : 035ffdcc  ASTAT: 02002002

 

Hardware Trace:

   0 Target : <0x000047e0> { _trap_c + 0x0 }

     Source : <0xffa0078c> { _exception_to_level5 + 0xb4 }

   1 Target : <0xffa006d8> { _exception_to_level5 + 0x0 }

     Source : <0xffa00634> { _ex_trap_c + 0x5c }

   2 Target : <0xffa005d8> { _ex_trap_c + 0x0 }

     Source : <0xffa0082c> { _trap + 0x28 }

   3 Target : <0xffa00804> { _trap + 0x0 }

     Source : <0x000b152a> { _physmap_flash_shutdown + 0x1a }

   4 Target : <0x000b1510> { _physmap_flash_shutdown + 0x0 }

     Source : <0x000a806e> { _platform_drv_shutdown + 0xe }

   5 Target : <0x000a8060> { _platform_drv_shutdown + 0x0 }

     Source : <0x000a987e> { _device_shutdown + 0x2e }

   6 Target : <0x000a987c> { _device_shutdown + 0x2c }

     Source : <0x000a98bc> { _device_shutdown + 0x6c }

   7 Target : <0x000a9880> { _device_shutdown + 0x30 }

     Source : <0x000a98b0> { _device_shutdown + 0x60 }

   8 Target : <0x000a98aa> { _device_shutdown + 0x5a }

     Source : <0x000a989c> { _device_shutdown + 0x4c }

   9 Target : <0x000a9880> { _device_shutdown + 0x30 }

     Source : <0x000a98b0> { _device_shutdown + 0x60 }

  10 Target : <0x000a98aa> { _device_shutdown + 0x5a }

     Source : <0x000a989c> { _device_shutdown + 0x4c }

  11 Target : <0x000a9880> { _device_shutdown + 0x30 }

     Source : <0x000a98b0> { _device_shutdown + 0x60 }

  12 Target : <0x000a98aa> { _device_shutdown + 0x5a }

     Source : <0x000a989c> { _device_shutdown + 0x4c }

  13 Target : <0x000a9880> { _device_shutdown + 0x30 }

     Source : <0x000a98b0> { _device_shutdown + 0x60 }

  14 Target : <0x000a98aa> { _device_shutdown + 0x5a }

     Source : <0x000a989c> { _device_shutdown + 0x4c }

  15 Target : <0x000a9880> { _device_shutdown + 0x30 }

     Source : <0x000a98b0> { _device_shutdown + 0x60 }

Stack from 00299cac:

        00299e7c ffa00790 0016e56c 0016e56c 0016e568 00000000 00053a4c ffa00404

        00000000 00008030 0000002d 00000000 00299da8 00000000 00000000 000b152c

        0028b680 02002002 00371a9f 0369e181 00371a98 0369e174 00000000 00000000

        0000002c 00000000 0000002c 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

        00000000 00000000 03091bd8 035ffb84 035ffdcc 035ffdd8 002e0e00 00000084

 

Call Trace:

[<00017b30>] _blocking_notifier_call_chain+0x10/0x18

[<000a9880>] _device_shutdown+0x30/0x88

[<00011130>] _getnstimeofday+0x10/0x30

[<00017ff8>] _kernel_restart+0x28/0x60

[<0000ffff>] _do_exit+0x663/0x760

[<00019724>] _sys_reboot+0xb0/0x180

[<000d9ef1>] _neigh_add+0xb9/0x1f8

[<0001fa20>] _ktime_get_ts+0x20/0x4c

[<00187040>] _net_olddevs_init+0x54/0x94

[<0001f69a>] _hrtimer_start+0x7e/0xbc

[<0001f65a>] _hrtimer_start+0x3e/0xbc

[<0011bc12>] _do_nanosleep+0x62/0x7c

[<0001f448>] _hrtimer_cancel+0x10/0x1c

[<0011bc18>] _do_nanosleep+0x68/0x7c

[<00189c3c>] _ip_auto_config+0x420/0x600

[<0001f742>] _hrtimer_nanosleep+0x32/0xd4

[<0001f38c>] _hrtimer_wakeup+0x0/0x20

[<0001f83c>] _sys_nanosleep+0x58/0x5c

[<0001f7e4>] _sys_nanosleep+0x0/0x5c

[<00019674>] _sys_reboot+0x0/0x180

[<0000fffe>] _do_exit+0x662/0x760

[<00008000>] _l1sram_alloc_max+0x3c/0x80

 

Modules linked in:

Kernel panic - not syncing: Kernel exception

 

QuoteReplyEditDelete

 

 

2008-02-28 19:19:51     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51862    cant say i'm seeing that ... also, you originally said you were using:

mtdparts=physmap-flash.0:128k(uboot)ro,3840k(uImage),64k(defconf),64k(conf)

 

but in your last post you said:

mtdparts=BF5xx-Flash:128k(uboot)rw,3840k(uImage),64k(defconf),64k(conf)

 

the BF5xx-flash mapping driver is not for the BF537-STAMP, so that argument wont work at all

 

did you make any changes to the board resources file ?

QuoteReplyEditDelete

 

 

2008-02-29 10:26:00     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51902    Trying to get things to work I used the BF5xx-Flash parameter. When things were actually working, I used physmap. I guess I just scrolled up too far in my console buffer.

QuoteReplyEditDelete

 

 

2008-02-29 14:31:05     Re: MTD Partitioning

Cameron Barfield (UNITED STATES)

Message: 51916    The panic on reboot seems to have magically resolved itself...

QuoteReplyEditDelete

 

 

2008-02-29 14:43:43     Re: MTD Partitioning

Mike Frysinger (UNITED STATES)

Message: 51918    when i first integrated the physmap stuff for our platforms, i recall getting a similar panic, but that was only during initial development.  once i ironed things out, i was unable to replicate it to root cause the issue.

Attachments

Outcomes