[#7319] function __register_frame_info_bases() in trunk GNU gcc calls NULL address if built into FLAT binary

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

[#7319] function __register_frame_info_bases() in trunk GNU gcc calls NULL address if built into FLAT binary

Submitted By: Sonic Zhang

Open Date

2012-09-11 06:36:30     Close Date

2012-10-24 05:41:26

Priority:

Medium High     Assignee:

Sonic Zhang

Stuart Henderson

Board:

STAMP     Silicon Revision:

Resolution:

Under Debugging     Fixed In Release:

N/A

Processor:

BF537     

Host Operating System:

toolchain rev.:

    kernel rev.:

State:

Closed     Found In Release:

2012R2

Is this bug repeatable?:

N/A     

Summary: function __register_frame_info_bases() in trunk GNU gcc calls NULL address if built into FLAT binary

Details:

 

Run FLAT bonnie++ v1.94 built by trunk GNU gcc on bf537-stamp, application crashes at offset 0xb098 in function __register_frame_info_bases(). The same bonnie++ built by 2012R1 toolchain has no such issue.

 

root:/> bonnie\+\+

Jump to NULL address

Deferred Exception context

CURRENT PROCESS:

COMM=bonnie++ PID=177  CPU=0

TEXT = 0x00600040-0x00623000        DATA = 0x00623020-0x006302a8

BSS = 0x006302a8-0x00636cd0  USER-STACK = 0x00646f34

 

return address: [0x  (null)]; contents of:

 

ADSP-BF537-0.2 500(MHz CCLK) 125(MHz SCLK) (mpu off)

Linux version 3.5.0-ADI-2012R1-pre-00822-ge228d94-dirty (sonic@nine) (gcc version 4.3.5 (ADI-trunk/svn-5865) ) #2 Tue Sep 11 18:46:43 CST 2012

 

 

0000b048 <___register_frame_info_bases>:

    b048:       10 32           P2 = R0;

    b04a:       c5 04           [--SP] = (P5:5);

    b04c:       00 e8 03 00     LINK 0xc;               /* (12) */

    b050:       29 32           P5 = R1;

    b052:       b9 a1           R1 = [FP + 0x18];

    b054:       42 0c           CC = P2 == 0x0;

    b056:       3c 18           IF CC JUMP 0xb0ce <___register_frame_info_bases+0x86>;

    b058:       00 00           NOP;

    b05a:       00 00           NOP;

    b05c:       00 00           NOP;

    b05e:       10 91           R0 = [P2];

    b060:       00 0c           CC = R0 == 0x0;

    b062:       36 18           IF CC JUMP 0xb0ce <___register_frame_info_bases+0x86>;

    b064:       f8 63           R0 = -0x1 (X);          /*              R0=0xffffffff( -1) */

    b066:       28 93           [P5] = R0;

    b068:       00 cc 00 c0     R0 = R0 -|- R0 || [P5 + 0x4] = R2 || NOP;

    b06c:       6a b0 00 00

    b070:       28 b1           [P5 + 0x10] = R0;

    b072:       20 e1 f8 07     R0 = 0x7f8 (X);         /*              R0=0x7f8(2040) */

    b076:       28 b6           W[P5 + 0x10] = R0;

    b078:       40 e1 00 00     R0.H = 0x0;             /* (  0)        R0=0x7f8(2040) */

    b07c:       00 e1 e8 f9     R0.L = 0xf9e8;          /* (-1560)      R0=0xf9e8 <_pthread_cancel>(63976) */

    b080:       a9 b0           [P5 + 0x8] = R1;

    b082:       ea bc           [P5 + 0xc] = P2;

    b084:       00 0c           CC = R0 == 0x0;

    b086:       1d 18           IF CC JUMP 0xb0c0 <___register_frame_info_bases+0x78>;

    b088:       40 e1 03 00     R0.H = 0x3;             /* (  3)        R0=0x3f9e8(260584) */

    b08c:       4a e1 00 00     P2.H = 0x0;             /* (  0)        P2=0x48 */

    b090:       0a e1 00 00     P2.L = 0x0;             /* (  0)        P2=0x0 */

    b094:       00 e1 a4 02     R0.L = 0x2a4;           /* (676)        R0=0x302a4 <_object_mutex>(197284) */

    b098:       62 00           CALL (P2);

    b09a:       4a e1 03 00     P2.H = 0x3;             /* (  3)        P2=0x30000 */

    b09e:       0a e1 c0 02     P2.L = 0x2c0;           /* (704)        P2=0x302c0 <_unseen_objects> */

    b0a2:       10 91           R0 = [P2];

    b0a4:       68 b1           [P5 + 0x14] = R0;

    b0a6:       55 93           [P2] = P5;

    b0a8:       40 e1 03 00     R0.H = 0x3;             /* (  3)        R0=0x302a4 <_object_mutex>(197284) */

    b0ac:       4a e1 00 00     P2.H = 0x0;             /* (  0)        P2=0x2c0 */

    b0b0:       01 e8 00 00     UNLINK;

    b0b4:       00 e1 a4 02     R0.L = 0x2a4;           /* (676)        R0=0x302a4 <_object_mutex>(197284) */

    b0b8:       0a e1 00 00     P2.L = 0x0;             /* (  0)        P2=0x0 */

    b0bc:       85 04           (P5:5) = [SP++];

    b0be:       52 00           JUMP (P2);

    b0c0:       4a e1 03 00     P2.H = 0x3;             /* (  3)        P2=0x30000 */

    b0c4:       0a e1 c0 02     P2.L = 0x2c0;           /* (704)        P2=0x302c0 <_unseen_objects> */

    b0c8:       10 91           R0 = [P2];

    b0ca:       68 b1           [P5 + 0x14] = R0;

    b0cc:       55 93           [P2] = P5;

    b0ce:       01 e8 00 00     UNLINK;

    b0d2:       85 04           (P5:5) = [SP++];

 

Follow-ups

 

--- Sonic Zhang                                              2012-09-25 23:15:57

Please check the assembly code of function <___register_frame_info_bases>

in bfin-uclinux/lib/gcc/bfin-uclinux/4.3.5/libgcc.a

 

--- Stuart Henderson                                         2012-09-26 13:23:46

This should be fixed.

 

--- Mingquan Pan                                             2012-10-08 06:15:19

Seen from the latest spimmc test log which also runs flat bonnie++ test, it

still fails (using the updated toolchain from Sep 28).

 

echo 0 > /proc/sys/kernel/hung_task_timeout_secs^M

root:/> ^[[6ntime bonnie++ -u root -d /mnt -s 200M^M

Using uid:0, gid:0.^M

Writing a byte at a time...done^M

Writing intelligently...mmcblk0: error -84 transferring data, sector 20, nr 2,

cmd response 0x0, card status 0x0^M

end_request: I/O error, dev mmcblk0, sector 20^M

Buffer I/O error on device mmcblk0p1, logical block 2^M

lost page write due to I/O error on mmcblk0p1^M

------------[ cut here ]------------^M

WARNING: at fs/buffer.c:1108^M

Modules linked in:^M

^M

ADSP-BF537-0.2 500(MHz CCLK) 125(MHz SCLK) (mpu off)^M

Linux version 3.5.0-ADI-2012R1-pre-00842-g0de3a1e-dirty

(test@linux58-mmc-usblan-btuart) (gcc version 4.3.5 (ADI-trunk/svn-5865) ) #18

Sun Sep 30 07:57:41 CST 2012^M

^M

SEQUENCER STATUS:               Not tainted^M

SEQSTAT: 00002021  IPEND: 8008  IMASK: ffff  SYSCFG: 0006^M

  EXCAUSE   : 0x21^M

  physical IVG3 asserted : <0xffa007a0> { _trap + 0x0 }^M

  physical IVG15 asserted : <0xffa01084> { _evt_system_call + 0x0 }^M

  logical irq   6 mapped  : <0xffa003b8> { _bfin_coretmr_interrupt + 0x0

}^M

  logical irq  10 mapped  : <0x000e33a0> { _bfin_rtc_interrupt + 0x0 }^M

  logical irq  17 mapped  : <0x000da13c> { _bfin_spi_pio_irq_handler +

0x0 }^M

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

}^M

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

}^M

  logical irq  55 mapped  : <0x000f0b40> { _mmc_spi_detect_irq + 0x0 }^M

  logical irq 106 mapped  : <0x000dd89c> { _bfin_mac_interrupt + 0x0 }^M

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

RETN: <0x012e3af0> /* kernel dynamic memory */^M

RETX: <0x00000480> /* Maybe fixed code section */^M

RETS: <0x0008c13a> { _ext2_new_blocks + 0x412 }^M

PC  : <0x0006ddfc> { _mark_buffer_dirty + 0xa0 }^M

DCPLB_FAULT_ADDR: <0x001eb949> /* kernel dynamic memory */^M

ICPLB_FAULT_ADDR: <0x0006ddfc> { _mark_buffer_dirty + 0xa0 }^M

PROCESSOR STATE:^M

R0 : 00000000    R1 : ffffffff    R2 : 00000001    R3 : 029a29c4^M

R4 : 00023254    R5 : 00000011    R6 : 00000001    R7 : 00023254^M

P0 : 00000092    P1 : 029a29c4    P2 : 001eb949    P3 : 01c8b274^M

P4 : 02981a00    P5 : 02b52a20    FP : 00000000    SP : 012e3a14^M

LB0: ffa017b0    LT0: ffa017b0    LC0: 00000000^M

LB1: 0006da2c    LT1: 0006da22    LC1: 00000000^M

B0 : 00000000    L0 : 00000000    M0 : ffffffe8    I0 : 00000000^M

B1 : 00000000    L1 : 00000000    M1 : 00000000    I1 : 00183ae6^M

B2 : 00000001    L2 : 00000000    M2 : 00000000    I2 : 01273e18^M

B3 : 00000000    L3 : 00000000    M3 : 00000000    I3 : 00000000^M

A0.w: 0000d86c   A0.x: 00000000   A1.w: 00003496   A1.x: 00000000^M

USP : 011cc988  ASTAT: 02003025^M

^M

---[ end trace a38823ac57bdb0ce ]---^M

Disabling lock debugging due to kernel taint^M

Hardware Trace:^M

   0 Target : <0x00004004> { _trap_c + 0x0 }^M

     Source : <0xffa00734> { _exception_to_level5 + 0xa4 } JUMP.L^M

   1 Target : <0xffa00690> { _exception_to_level5 + 0x0 }^M

     Source : <0xffa00548> { _bfin_return_from_exception + 0x20 } RTX^M

   2 Target : <0xffa00528> { _bfin_return_from_exception + 0x0 }^M

     Source : <0xffa005ea> { _ex_trap_c + 0x72 } JUMP.S^M

   3 Target : <0xffa00578> { _ex_trap_c + 0x0 }^M

     Source : <0xffa00808> { _trap + 0x68 } JUMP (P4)^M

   4 Target : <0xffa007be> { _trap + 0x1e }^M

     Source : <0xffa007ba> { _trap + 0x1a } IF CC JUMP pcrel ^M

   5 Target : <0xffa007a0> { _trap + 0x0 }^M

      FAULT : <0x0006ddfc> { _mark_buffer_dirty + 0xa0 } BUG^M

     Source : <0x0006ddfa> { _mark_buffer_dirty + 0x9e } IF !CC JUMP

pcrel (BP)^M

   6 Target : <0x0006ddee> { _mark_buffer_dirty + 0x92 }^M

     Source : <0x0006dd62> { _mark_buffer_dirty + 0x6 } IF CC JUMP pcrel

^M

   7 Target : <0x0006dd5c> { _mark_buffer_dirty + 0x0 }^M

     Source : <0x0008c136> { _ext2_new_blocks + 0x40e } JUMP.L^M

   8 Target : <0x0008c12e> { _ext2_new_blocks + 0x406 }^M

     Source : <0x0008bee6> { _ext2_new_blocks + 0x1be } IF !CC JUMP pcrel

^M

   9 Target : <0x0008bebc> { _ext2_new_blocks + 0x194 }^M

     Source : <0x0008c0e0> { _ext2_new_blocks + 0x3b8 } JUMP.S^M

  10 Target : <0x0008c0d4> { _ext2_new_blocks + 0x3ac }^M

     Source : <0x0008beba> { _ext2_new_blocks + 0x192 } IF !CC JUMP pcrel

(BP)^M

  11 Target : <0x0008beb4> { _ext2_new_blocks + 0x18c }^M

     Source : <0x0008be7c> { _ext2_new_blocks + 0x154 } IF !CC JUMP pcrel

(BP)^M

  12 Target : <0x0008be56> { _ext2_new_blocks + 0x12e }^M

     Source : <0x0008bb6e> { _ext2_try_to_allocate_with_rsv + 0x196 }

RTS^M

  13 Target : <0x0008bb64> { _ext2_try_to_allocate_with_rsv + 0x18c }^M

     Source : <0x0008bc70> { _ext2_try_to_allocate_with_rsv + 0x298 }

JUMP.S^M

  14 Target : <0x0008bc62> { _ext2_try_to_allocate_with_rsv + 0x28a }^M

     Source : <0x0008baa6> { _ext2_try_to_allocate_with_rsv + 0xce } IF

!CC JUMP pcrel ^M

  15 Target : <0x0008baa2> { _ext2_try_to_allocate_with_rsv + 0xca }^M

     Source : <0x0008b534> { _ext2_try_to_allocate + 0x244 } RTS^M

mmcblk0: error -110 sending status command, retrying^M

mmcblk0: error -110 sending status command, retrying^M

mmcblk0: error -110 sending status command, aborting^M

end_request: I/O error, dev mmcblk0, sector 540^M

Buffer I/O error on device mmcblk0p1, logical block 262^M

lost page write due to I/O error on mmcblk0p1^M

mmcblk0: error -110 sending status command, retrying^M

mmcblk0: error -110 sending status command, retrying^M

mmcblk0: error -110 sending status command, aborting^M

end_request: I/O error, dev mmcblk0, sector 144432^M

Buffer I/O error on device mmcblk0p1, logical block 72208^M

lost page write due to I/O error on mmcblk0p1^M

mmcblk0: error -110 sending status command, retrying^M

mmcblk0: error -110 sending status command, retrying^M

mmcblk0: error -110 sending status command, aborting^M

 

...

 

root:/> ^[[6nversion^M

kernel:    Linux release 3.5.0-ADI-2012R1-pre-00842-g0de3a1e-dirty, build #18

Sun Sep 30 07:57:41 CST 2012^M

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5865) ^M

user-dist: release svn-10810, build #221 Sun Sep 30 07:56:05 CST 2012^M

 

--- Stuart Henderson                                         2012-10-08 10:01:20

That seems to be a different issue.  It looks like we're running out of memory.

I'm getting the same result with 2012R1 and trunk.  Can you provide me with

instructions on how to build a working version of bonnie++?

 

--- Mingquan Pan                                             2012-10-09 05:12:25

You can select BR2_PACKAGE_BONNIE in kernel make menuconfig, which is located in

:

Location:                                                                     

                                                                          │ 

  │     -> Package Selection for the target                              

                                            

  │       -> Debugging, profiling and benchmark

 

It should include bonnie++ which can be used.

 

--- Stuart Henderson                                         2012-10-09 05:21:59

I mean, how do I make a version of bonnie++ which works?  the tar suggests it

works with 2012R1, but if i build it with 2012R1 it still fails for me.

 

--- Mingquan Pan                                             2012-10-10 01:22:11

The latest log which shows bonnie++ passes is in Jun with uclinux-dist:

 

## Booting kernel from Legacy Image at 02000000 ...

   Image Name:   bf537-0.2-3.3.0-ADI-2012R1-pre-0

   Created:      2012-06-10   0:17:55 UTC

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    4998428 Bytes = 4.8 MiB

   Load Address: 00001000

   Entry Point:  001e9c70

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 001e9c70

Linux version 3.3.0-ADI-2012R1-pre-00726-g2c9ee82-dirty

(test@linux58-mmc-usblan-btuart) (gcc version 4.3.5 (ADI-trunk/svn-5764) ) #498

Sun Jun 10 08:17:44 CST 2012

register early platform devices

bootconsole [early_shadow0] enabled

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Limiting kernel memory to 56MB due to anomaly 05000263

Board Memory: 64MB

Kernel Managed Memory: 64MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x0014fb00

  rodata    = 0x0014fb00-0x001bd60c

  bss       = 0x001be000-0x001cdd5c

  data      = 0x001cdd5c-0x001e2000

    stack   = 0x001e0000-0x001e2000

  init      = 0x001e2000-0x00928000

  available = 0x00928000-0x03800000

  DMA Zone  = 0x03f00000-0x04000000

Hardware Trace active and enabled

Boot Mode: 0

Reset caused by Software reset

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

Compiled for ADSP-BF537 Rev 0.2

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

Processor Speed: 500 MHz core clock and 125 MHz System Clock

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-back) in data cache

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

Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50

earlyprintk=serial,uart0,57600 console=ttyBF0,57600

ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf537-stamp:eth0:off

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

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

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

Memory available: 47360k/65536k RAM, (7448k init code, 1338k kernel code, 586k

data, 1024k dma, 7780k reserved)

NR_IRQS:146

Configuring Blackfin Priority Driven Interrupts

Šconsole [ttyBF0] enabled, bootconsole disabledrly

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

Blackfin Scratchpad data SRAM: 4 KB

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

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

Blackfin L1 Instruction SRAM: 48 KB (34 KB free)

NET: Registered protocol family 16

gpiochip_add: registered GPIOs 0 to 47 on device: BFIN-GPIO

Blackfin DMA Controller

stamp_init(): registering device resources

bio: create slab <bio-0> at 0

bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0,

regs@ffc00500, dma channel@7

Switching to clocksource bfin_cs_cycles

NET: Registered protocol family 2

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

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

debug-mmrs: setting up Blackfin MMR debugfs

msgmni has been set to 92

io scheduler noop registered (default)

bfin-uart: Blackfin serial driver

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

brd: module loaded

bfin_mii_bus: probed

bfin_mac: attached PHY driver [Generic PHY]

(mii_bus:phy_addr=bfin_mii_bus-0:01, irq=-1,

mdc_clk=2500000Hz(mdc_div=24)@sclk=125MHz)

bfin_mac bfin_mac.0: eth0: Blackfin on-chip Ethernet MAC driver, Version 1.1

rtc-bfin rtc-bfin: rtc core: registered rtc-bfin as rtc0

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

mmc_spi spi0.1: ASSUMING 3.2-3.4 V slot power

mmc_spi spi0.1: SD/MMC host mmc0, no DMA, no WP, no poweroff

TCP cubic registered

NET: Registered protocol family 17

mmc_spi spi0.1: setup: unsupported mode bits 4

mmc_spi spi0.1: can't change chip-select polarity

rtc-bfin rtc-bfin: setting system clock to 1970-09-16 06:22:11 UTC (22314131)

mmc0: host does not support reading read-only switch. assuming write-enable.

IP-Config: Complete:

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174,

     host=bf537-stamp, domain=, nis-domain=(none),

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

mmc0: new SD card on SPI

mmcblk0: mmc0:0000 SD256 241 MiB

mmcblk0: p1

dma_alloc_init: dma_page @ 0x02979000 - 256 pages at 0x03f00000ýFreeing unused

kernel memory: 7448k freed

                           _____________________________________

        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.18.4 (2012-06-09 17:10:50 CST) hush - the humble shell

 

root:/> version

kernel:    Linux release 3.3.0-ADI-2012R1-pre-00726-g2c9ee82-dirty, build #498

Sun Jun 10 08:17:44 CST 2012

toolchain: bfin-uclinux-gcc release gcc version 4.3.5 (ADI-trunk/svn-5764)

user-dist: release svn-10705, build #7497 Sun Jun 10 08:16:08 CST 2012

root:/> successful boot attemptPHY: bfin_mii_bus-0:01 - Link is Up -

100/Full

fdisk /dev/mmcblk0

 

The number of cylinders for this disk is set to 7720.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): p

 

Disk /dev/mmcblk0: 4 heads, 16 sectors, 7720 cylinders

Units = cylinders of 64 * 512 bytes

 

        Device Boot    Start       End    Blocks   Id  System

/dev/mmcblk0p1             1      7720    247032   83  Linux

 

Command (m for help): d

Partition number (1-4): 1

 

Command (m for help): fdisk /dev/mmcblk0

f: unknown command

Command action

   a   toggle a bootable flag

   b   edit bsd disklabel

   c   toggle the dos compatibility flag

   d   delete a partition

   l   list known partition types

   m   print this menu

   n   add a new partition

   o   create a new empty DOS partition table

   p   print the partition table

   q   quit without saving changes

   s   create a new empty Sun disklabel

   t   change a partition's system id

   u   change display/entry units

   v   verify the partition table

   w   write table to disk and exit

   x   extra functionality (experts only)

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-7720, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-7720, default 7720):

Using default value 7720

 

Command (m for help): t

Partition number (1-4): 1

Hex code (type L to list codes): 83

 

Command (m for help): p

w

 

Disk /dev/mmcblk0: 4 heads, 16 sectors, 7720 cylinders

Units = cylinders of 64 * 512 bytes

 

        Device Boot    Start       End    Blocks   Id  System

/dev/mmcblk0p1             1      7720    247032   83  Linux

 

Command (m for help): The partition table has been altered!

 

Calling ioctl() to re-read partition table.

mmcblk0: p1

mmcblk0: p1

 

WARNING: If you have created or modified any DOS 6.x

partitions, please see the fdisk manual page for additional

information.

Syncing disks.

root:/> Whole card is created as ext2

ls /dev/mmcblk0*

/dev/mmcblk0    /dev/mmcblk0p1

root:/>

ase 29 ...PASS

 

Case 29 ...PASS

6ntime mke2fs /dev/mmcblk0p1

mke2fs 1.41.12 (17-May-2010)

ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab

file while determining whether /dev/mmcblk0p1 is mounted.

Filesystem label=

OS type: Linux

Block size=1024 (log=0)

Fragment size=1024 (log=0)

Stride=0 blocks, Stripe width=0 blocks

62000 inodes, 247032 blocks

12351 blocks (5.00%) reserved for the super user

First data block=1

Maximum filesystem blocks=67371008

31 block groups

8192 blocks per group, 8192 fragments per group

2000 inodes per group

Superblock backups stored on blocks:

    8193, 24577, 40961, 57345, 73729, 204801, 221185

 

Writing inode tables: done                           

Writing superblocks and filesystem accounting information: done

 

This filesystem will be automatically checked every 26 mounts or

180 days, whichever comes first.  Use tune2fs -c or -i to override.

real    0m 28.48s

user    0m 0.01s

sys    0m 0.27s

root:/> mke2fs done, test pass

 

Case 30 ...PASS

 

Case 30 ...PASS

mount -t ext2 /dev/mmcblk0p1 /mnt

root:/> mount EXT2 FS done, test pass

 

Case 31 ...PASS

 

Case 31 ...PASS

echo 0 > /proc/sys/kernel/hung_task_timeout_secs

root:/> time bonnie++ -u root -d /mnt -s 200M

Using uid:0, gid:0.

Writing a byte at a time...done

Writing intelligently...done

Rewriting...done

Reading a byte at a time...done

Reading intelligently...done

start 'em...done...done...done...done...done...

Create files in sequential order...done.

Stat files in sequential order...done.

Delete files in sequential order...done.

Create files in random order...done.

Stat files in random order...done.

Delete files in random order...done.

Version  1.94       ------Sequential Output------ --Sequential Input-

--Random-

Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block--

--Seeks--

Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec

%CP

blackfin       200M    54  82   304   1   166   0   113  65   359   0  21.5 

0

Latency              4786ms   23075ms   10932ms     238ms     452ms    6072ms

Version  1.94       ------Sequential Create------ --------Random

Create--------

blackfin            -Create-- --Read--- -Delete-- -Create-- --Read---

-Delete--

              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec

%CP

                 16   234  76 27326 100  2045  21   245  80 +++++ +++   758

70

Latency             33459us     400us    1010us   31208us     104us    8083us

1.93c,1.94,blackfin,1,22313996,200M,,54,82,304,1,166,0,113,65,359,0,21.5,0,16,,,,,234,76,27326,100,2045,21,245,80,+++++,+++,758,70,4786ms,23075ms,10932ms,238ms,452ms,6072ms,33459us,400us,1010us,31208us,104us,8083us

real    51m 51.57s

user    0m 14.30s

sys    3m 26.17s

root:/>

      ase 32 ...PASS

 

Case 32 ...PASS

 

 

SPIMMC TEST (INTERRUPT) ............[PASS]

Ending ./spimmc_test.exp

 

--- Mingquan Pan                                             2012-10-15 03:44:22

There was bonnie ++ log on Sep 25 passed under buildroot, but with sdiommc not

spimmc device.

 

## Booting kernel from Legacy Image at 02000000 ...

   Image Name:   bf609-0.0-3.5.0-ADI-2012R1-pre

   Image Type:   Blackfin Linux Kernel Image (gzip compressed)

   Data Size:    3934814 Bytes = 3.8 MiB

   Load Address: 00001000

   Entry Point:  0028fa80

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

Starting Kernel at = 0028fa80

Linux version 3.5.0-ADI-2012R1-pre (test@linux89-bf609-ssm2603) (gcc version

4.3.5 (ADI-trunk/svn-5865) ) #4 Tue Sep 25 21:07:54 CST 2012

register early platform devices

bootconsole [early_shadow0] enabled

ERROR: Not running on ADSP-BF609: unknown CPUID 0x0000 Rev 0.0

bootconsole [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 128MB

Kernel Managed Memory: 128MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x001bed28

  rodata    = 0x001bed4c-0x00251270

  bss       = 0x00252000-0x00265314

  data      = 0x00265320-0x0028c000

    stack   = 0x0028a000-0x0028c000

  init      = 0x0028c000-0x00501000

  available = 0x00501000-0x07f00000

  DMA Zone  = 0x07f00000-0x08000000

Hardware Trace active and enabled

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

Compiled for ADSP-BF609 Rev 0.0

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

Processor Speed: 500 MHz core clock, 125 MHz SCLk, 125 MHz SCLK0, 125 MHz SCLK1

and 250 MHz DCLK

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

  External memory: cacheable in instruction cache

  L2 SRAM        : uncacheable in instruction cache

Data Cache Enabled for CPU0

  External memory: cacheable (write-back) in data cache

  L2 SRAM        : uncacheable in data cache

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

Kernel command line: root=/dev/mtdblock0 rw ip=10.100.4.50

earlyprintk=serial,uart0,57600 console=ttyBF0,57600

ip=10.100.4.50:10.100.4.174:10.100.4.174:255.255.255.0:bf609-ezkit:eth0:off

PID hash table entries: 512 (order: -1, 2048 bytes)

Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)

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

Memory available: 123756k/131072k RAM, (2516k init code, 1783k kernel code,

821k data, 1024k dma, 1172k reserved)

NR_IRQS:299

Configuring Blackfin Priority Driven Interrupts

Console: colour dummy device 80x25console [ttyBF0] enabled, bootconsole

disabled

console [ttyBF0] enabled, bootconsole disabled

Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)

pid_max: default: 32768 minimum: 301

Mount-cache hash table entries: 512

devtmpfs: initialized

Blackfin Scratchpad data SRAM: 4 KB

Blackfin L1 Data A SRAM: 16 KB (9 KB free)

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

Blackfin L1 Instruction SRAM: 64 KB (51 KB free)

Blackfin L2 SRAM: 256 KB (256 KB free)

NET: Registered protocol family 16

Blackfin DMA Controller

ezkit_init(): registering device resources

ezkit_init(): request emac pins failed

bio: create slab <bio-0> at 0

SCSI subsystem initialized

bfin-spi bfin-spi.0: master is unqueued, this is deprecated

bfin-spi bfin-spi.0: bfin-spi probe success

bfin-spi bfin-spi.1: master is unqueued, this is deprecated

bfin-spi bfin-spi.1: bfin-spi probe success

usbcore: registered new interface driver usbfs

usbcore: registered new interface driver hub

usbcore: registered new device driver usb

i2c-bfin-twi i2c-bfin-twi.0: Blackfin on-chip I2C TWI Contoller,

regs_base@ffc01e00

i2c-bfin-twi i2c-bfin-twi.1: Blackfin on-chip I2C TWI Contoller,

regs_base@ffc01f00

NET: Registered protocol family 23

Switching to clocksource bfin_cs_cycles

NET: Registered protocol family 2

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

TCP established hash table entries: 4096 (order: 3, 32768 bytes)

TCP bind hash table entries: 4096 (order: 2, 16384 bytes)

TCP: Hash tables configured (established 4096 bind 4096)

TCP: reno registered

UDP hash table entries: 256 (order: 0, 4096 bytes)

UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

NET: Registered protocol family 1

msgmni has been set to 241

io scheduler noop registered (default)

bfin-uart: Blackfin serial driver

bfin-uart.0: ttyBF0 at MMIO 0xffc02000 (irq = 96) is a BFIN-UART

physmap platform flash device: 01000000 at b0000000

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

0x000089 Chip ID 0x008821

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Intel/Sharp Extended Query Table at 0x010A

Using buffer write method

Using auto-unlock on power-up/resume

cfi_cmdset_0001: Erase suspend on write enabled

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

0x000000000000-0x000000080000 : "bootloader(nor)"

0x000000080000-0x000000480000 : "linux kernel(nor)"

0x000000480000-0x000001000000 : "file system(nor)"

m25p80 spi0.1: w25q32 (4096 Kbytes)

Creating 3 MTD partitions on "m25p80":

0x000000000000-0x000000080000 : "bootloader(spi)"

0x000000080000-0x000000200000 : "linux kernel(spi)"

0x000000200000-0x000000400000 : "file system(spi)"

CAN device driver interface

bfin_can bfin_can.0: bfin_can device registered(&reg_base=ffc00a00,

rx_irq=55, tx_irq=56, err_irq=57, sclk=125000000)

    DWMAC100

No HW DMA feature register supported

Enhanced/Alternate descriptors

RX IPC Checksum Offload not configured.

stmmac_dvr_probe: warning: cannot get CSR clock

stmmac: probed

eth0: PHY ID 20005c90 at 1 IRQ 0 (stmmac-0:01) active

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

musb-hdrc: version 6.0, ?dma?, otg (peripheral+host)

input: bfin-rotary as /devices/platform/bfin-rotary/input/input0

i2c /dev entries driver

bfin_wdt: initialized: timeout=20 sec (nowayout=0)

dma_alloc_init: dma_page @ 0x047c9000 - 256 pages at 0x07f00000

usbcore: registered new interface driver usbhid

usbhid: USB HID core driver

TCP: cubic registered

NET: Registered protocol family 17

can: controller area network core (rev 20090105 abi 8)

NET: Registered protocol family 29

eth0: device MAC address 00:e0:22:fe:88:a6

No MAC Management Counters available

mmc0: host does not support reading read-only switch. assuming write-enable.

IP-Config: Complete:

     device=eth0, addr=10.100.4.50, mask=255.255.255.0, gw=10.100.4.174

     host=bf609-ezkit, domain=, nis-domain=(none)

     bootserver=10.100.4.174, rootserver=10.100.4.174, rootpath=

mmc0: new SD card at address e624

Freeing unused kernel memory: 2516k freed

mmcblk0: mmc0:e624 SU02G 1.84 GiB

mmcblk0: p1

 

 

BusyBox v1.20.2 (2012-09-25 16:06:46 CST) hush - the humble shell

 

root:/>successful boot attempt ifconfig eth0PHY: stmmac-0:01 - Link is Up -

100/Full

10.100.4.50

root:/> Ethernet may has been activated already!

version

kernel:    Linux release 3.5.0-ADI-2012R1-pre, build #4 Tue Sep 25 21:07:54 CST

2012

toolchain:

/home/test/workspace/src/kernel/label/BF609-EZKIT-STD/output/host/usr/bin/bfin-linux-uclibc-gcc

release gcc version 4.3.5 (ADI-trunk/svn-5865)

user-dist: release git-89b13ab, build #1 Tue Sep 25 16:09:06 CST 2012

root:/>

Linux version: 3.5.0-ADI-2012R1-pre

GCC version: 4.3.5 (ADI-trunk/svn-5865)

user-dist version: git-89b13ab

fdisk /dev/mmcblk0

 

The number of cylinders for this disk is set to 60352.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

   (e.g., DOS FDISK, OS/2 FDISK)

 

Command (m for help): p

 

Disk /dev/mmcblk0: 1977 MB, 1977614336 bytes

4 heads, 16 sectors/track, 60352 cylinders

Units = cylinders of 64 * 512 = 32768 bytes

 

        Device Boot      Start         End      Blocks  Id System

/dev/mmcblk0p1               1       60352     1931256  83 Linux

 

Command (m for help): d

Selected partition 1

 

Command (m for help): 1

1: unknown command

Command Action

a    toggle a bootable flag

b    edit bsd disklabel

c    toggle the dos compatibility flag

d    delete a partition

l    list known partition types

n    add a new partition

o    create a new empty DOS partition table

p    print the partition table

q    quit without saving changes

s    create a new empty Sun disklabel

t    change a partition's system id

u    change display/entry units

v    verify the partition table

w    write table to disk and exit

x    extra functionality (experts only)

 

Command (m for help): fdisk /dev/mmcblk0

f: unknown command

Command Action

a    toggle a bootable flag

b    edit bsd disklabel

c    toggle the dos compatibility flag

d    delete a partition

l    list known partition types

n    add a new partition

o    create a new empty DOS partition table

p    print the partition table

q    quit without saving changes

s    create a new empty Sun disklabel

t    change a partition's system id

u    change display/entry units

v    verify the partition table

w    write table to disk and exit

x    extra functionality (experts only)

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-60352, default 1): Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-60352, default 60352): Using

default value 60352

 

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): 1

Changed system type of partition 1 to 1 (FAT12)

 

Command (m for help): 83

8: unknown command

Command Action

a    toggle a bootable flag

b    edit bsd disklabel

c    toggle the dos compatibility flag

d    delete a partition

l    list known partition types

n    add a new partition

o    create a new empty DOS partition table

p    print the partition table

q    quit without saving changes

s    create a new empty Sun disklabel

t    change a partition's system id

u    change display/entry units

v    verify the partition table

w    write table to disk and exit

x    extra functionality (experts only)

 

Command (m for help): p

 

Disk /dev/mmcblk0: 1977 MB, 1977614336 bytes

4 heads, 16 sectors/track, 60352 cylinders

Units = cylinders of 64 * 512 = 32768 bytes

 

        Device Boot      Start         End      Blocks  Id System

/dev/mmcblk0p1               1       60352     1931256   1 FAT12

 

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table

mmcblk0: p1

root:/> Whole card is created as ext2

ls /dev/mmcblk0*

/dev/mmcblk0    /dev/mmcblk0p1

root:/>

ase 30 ...PASS

 

Case 30 ...PASS

6ntime mke2fs /dev/mmcblk0p1

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

120720 inodes, 482814 blocks

24140 blocks (5%) reserved for the super user

First data block=0

Maximum filesystem blocks=4194304

15 block groups

32768 blocks per group, 32768 fragments per group

8048 inodes per group

Superblock backups stored on blocks:

    32768, 98304, 163840, 229376, 294912

real    0m 22.20s

user    0m 0.07s

sys    0m 1.22s

root:/> ke2fs done, test pass

 

Case 31 ...PASS

 

Case 31 ...PASS

nmount -t ext2 /dev/mmcblk0p1 /mnt

root:/> mount EXT2 FS done, test pass

 

Case 32 ...PASS

 

Case 32 ...PASS

echo 0 > /proc/sys/kernel/hung_task_timeout_secs

root:/>

Case 33 ...PASS

 

Case 33 ...PASS

time bonnie++ -u root -d /mnt -s 200M

Using uid:0, gid:0.

Writing a byte at a time...done

Writing intelligently...done

Rewriting...done

Reading a byte at a time...done

Reading intelligently...done

start 'em...done...done...done...done...done...

Create files in sequential order...done.

Stat files in sequential order...done.

Delete files in sequential order...done.

Create files in random order...done.

Stat files in random order...done.

Delete files in random order...done.

Version  1.94       ------Sequential Output------ --Sequential Input-

--Random-

Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block--

--Seeks--

Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec

%CP

buildroot      200M    39  97  1478   8  1093   7   159  99  5139  16 110.8 

5

Latency               753ms     422ms     497ms   64377us   53733us     129ms

Version  1.94       ------Sequential Create------ --------Random

Create--------

buildroot           -Create-- --Read--- -Delete-- -Create-- --Read---

-Delete--

              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec

%CP

                 16   221  95 13343 100  2876  50   223  96 18014  99   683

88

Latency             18774us     478us     817us   21298us     308us    4502us

1.93c,1.94,buildroot,1,1167609547,200M,,39,97,1478,8,1093,7,159,99,5139,16,110.8,5,16,,,,,221,95,13343,100,2876,50,223,96,18014,99,683,88,753ms,422ms,497ms,64377us,53733us,129ms,18774us,478us,817us,21298us,308us,4502us

real    12m 1.16s

user    0m 19.57s

sys    4m 42.94s

root:/>

Case 34 ...PASS

 

Case 34 ...PASS

 

 

SDIOMMC TEST ............[PASS]

 

--- Mingquan Pan                                             2012-10-24 06:43:18

The original issue is gone. The current error has been reported.

Duplicated. See [#7209].

 

 

 

    Files

    Changes

    Commits

    Dependencies

    Duplicates

    Associations

    Tags

 

File Name     File Type     File Size     Posted By

No Files Were Found

Attachments

    Outcomes