2008-05-08 09:12:24     BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

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

2008-05-08 09:12:24     BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55634   

 

Hi,

 

I use BF537 rev0.3 but when I changed the uclinux config setting from rev0.2 to rev0.3 the memory is still limited to 54MB.  The hardware anomaly 05000263 should according Analog  not exist in  rev0.3 and that line during boot does actually not exist when I changed to rev0.3, so that seems to be ok. But there seems to be some other limitation. (I'm using the 2007R1.1 release)

 

I have 64MB of sdram on my board so there seems to be 10MB missing.

 

root:~> free                                                                                                    

                  total         used         free       shared      buffers                                         

Mem:        54188        10180        44008            0          136

 

any thoughts?

 

regards,

 

/Mattias

QuoteReplyEditDelete

 

 

2008-05-08 09:24:29     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Diego Serafin (ITALY)

Message: 55635   

 

On my 0.3 (2008R1 but was OK with latest 2007Rxx):

 

root:~> free

              total         used         free       shared      buffers

  Mem:       127360        46960        80400            0            0

 

 

128M are there. Did you remember setting the proper BF version in menuconfig?

 

Regards,

 

Diego.

 

 

QuoteReplyEditDelete

 

 

2008-05-08 09:53:33     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mike Frysinger (UNITED STATES)

Message: 55638   

 

as you said, you're using 2007R1.  upgrade.

QuoteReplyEditDelete

 

 

2008-05-08 10:36:56     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Robin Getz (UNITED STATES)

Message: 55641   

 

Mattias:

 

Mike is correct - when we made 2007R1 - there was no 0.3 silicon, so the option to turn off that bug does not exist.

 

If you look at your kernel boot - it might says something like "Warning - compiled for 0.2, but running on 0.3" (although, we might have added that after 2007R1 was released, I can't remember

 

-Robin

QuoteReplyEditDelete

 

 

2008-05-08 10:49:33     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55643   

 

Hi,

 

Now I have tested with 2008R1-RC8 and get the same result.

 

Robin:

 

During boot I get the following (for both 2007R1.1 and 2008R1) :

 

Compiled for ADSP-BF537 Rev 0.3                                                                                 

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

Processor Speed: 600 MHz core clock and 120 MHz System Clock                                                    

Board Memory: 64MB                                                                                              

Kernel Managed Memory: 64MB

 

root:~> free                                                                                                    

              total         used         free       shared      buffers                                         

  Mem:        54112         7404        46708            0          128

 

/Mattias

QuoteReplyEditDelete

 

 

2008-05-08 10:58:00     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mike Frysinger (UNITED STATES)

Message: 55645   

 

post the full boot log rather than just a snippet

QuoteReplyEditDelete

 

 

2008-05-08 11:22:08     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55646   

 

Bytes transferred = 10543804 (a0e2bc hex)                                                                                                     

Loading .text @ 0x0000a000 (1097808 bytes)                                                                                                    

Loading .rodata @ 0x00117000 (257060 bytes)                                                                                                   

Loading __ksymtab @ 0x00155c24 (14720 bytes)                                                                                                  

Loading __ksymtab_gpl @ 0x001595a4 (3840 bytes)                                                                                               

Loading __ksymtab_strings @ 0x0015a4a4 (44388 bytes)                                                                                          

Loading __param @ 0x00165208 (460 bytes)                                                                                                      

Loading .data @ 0x00166000 (73728 bytes)                                                                                                      

Loading .init.text @ 0x00178000 (94940 bytes)                                                                                                 

Loading .init.data @ 0x0018f2dc (3388 bytes)                                                                                                  

Loading .init.setup @ 0x00190018 (596 bytes)                                                                                                  

Loading .initcall.init @ 0x0019026c (456 bytes)                                                                                               

Loading .con_initcall.init @ 0x00190434 (4 bytes)                                                                                             

Loading .security_initcall.init @ 0x00190438 (4 bytes)                                                                                        

Loading .init.ramfs @ 0x0019043c (134 bytes)                                                                                                  

Loading .text_l1 @ 0xffa00000 (7888 bytes)                                                                                                    

sh_addr: FFA00000, p_paddr: 001904C2                                                                                                          

Loading from: 01188000 to 001904C2, size: 7888                                                                                                

Loading .data_l1 @ 0xff800000 (192 bytes)                                                                                                     

sh_addr: FF800000, p_paddr: 00192392                                                                                                          

Loading from: 0118A000 to 00192392, size: 192                                                                                                 

Clearing .bss @ 0x00193000 (1128400 bytes)                                                                                                    

Loading .romfs @ 0x002a67d0 (8388608 bytes)                                                                                                   

## Starting application at 0x00178000 ...                                                                                                     

Linux version 2.6.22.18-ADI-2008R1-svn (mokn@xw440048m7) (gcc version 4.1.2 (ADI svn)) #122 Thu May 8 17:18:11 CEST 2008                      

Hardware Trace Active and Enabled                                                                                                             

Reset caused by Software reset                                                                                                                

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

Compiled for ADSP-BF537 Rev 0.3                                                                                                               

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

Processor Speed: 600 MHz core clock and 120 MHz System Clock                                                                                  

Board Memory: 64MB                                                                                                                            

Kernel Managed Memory: 62MB                                                                                                                   

Memory map:                                                                                                                                   

  text      = 0x0000a000-0x00116050                                                                                                           

  rodata    = 0x00117000-0x001653d4                                                                                                           

  data      = 0x00166000-0x00178000                                                                                                           

    stack   = 0x00166000-0x00168000                                                                                                           

  init      = 0x00178000-0x00193000                                                                                                           

  bss       = 0x00193000-0x002a67d0                                                                                                           

  available = 0x002a67d0-0x03600000                                                                                                           

  rootfs    = 0x03600000-0x03e00000                                                                                                           

Instruction Cache Enabled                                                                                                                     

Data Cache Enabled (write-back)                                                                                                               

Built 1 zonelists.  Total pages: 13716                                                                                                        

Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600 rw mem=62M max_mem=64M$# developer ip=10.46.11.49:10.46.11.141:192.168.0.1:255f

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: 52004k/63488k RAM, (108k init code, 1072k kernel code, 1493k data, 0k dma, 620k 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 (40 KB free)                                                                                                 

Security Framework v1.0.0 initialized                                                                                                         

Capability LSM 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                                                                                                            

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                                                                                                                           

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                                                                                                                  

timer_initialize: module loaded                                                                                                               

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

Serial: Blackfin serial driver                                                                                                                

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

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

SMSC LAN83C185: Registered new driver                                                                                                         

bfin_mac_mdio: probed                                                                                                                         

bfin_mac: attached PHY driver [SMSC LAN83C185] (mii_bus:phy_addr=0:01, irq=-1, mdc_clk=2500000Hz(mdc_div=23)@sclk=120MHz)                     

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

uclinux[mtd]: RAM probe address=0x3600000 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                              

net2272: PLX NET2272 USB Peripheral Controller                                                                                                

net2272: irq 54, mapped mem 20300000, chip rev 0011                                                                                           

net2272: running in 16-bit, no byte swap local bus mode                                                                                       

net2272: version: 2005 Sept 8                                                                                                                 

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

TCP cubic registered                                                                                                                          

NET: Registered protocol family 1                                                                                                             

NET: Registered protocol family 17                                                                                                            

rtc-bfin rtc-bfin: setting the system clock to 1970-01-01 07:53:59 (28439)                                                                    

IP-Config: Gateway not on directly connected network.                                                                                         

VFS: Mounted root (ext2 filesystem).                                                                                                          

Freeing unused kernel memory: 108k freed                                                                                                      

PHY: 0:01 - Link is Up - 100/Full                                                                                                             

                                                                                                                                              

                                                                                                                                              

/etc/issue                                                                                                                                    

blackfin login: root                                                                                                                          

Password:                                                                                                                                     

                           _____________________________________                                                                              

        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-05-08 16:23:46 CEST) Built-in shell (msh)                                                                                

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

                                                                                                                                              

root:~>

 

 

QuoteReplyEditDelete

 

 

2008-05-08 11:34:34     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mike Frysinger (UNITED STATES)

Message: 55647   

 

looks like it worked just fine to me

 

i think you're forgetting to calculate in the rootfilesystem ... double check the memory map displayed

QuoteReplyEditDelete

 

 

2008-05-08 14:28:21     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55651   

 

Ok,

 

So from the boot log

 

available = 0x002a67d0-0x03600000                                                                                                            

rootfs    = 0x03600000-0x03e00000

 

Then available memory would be: 0x3600000 - 0x002a67d0 =  0x3359830 = 53844016B

 

and rootfs : 0x3e00000-0x3600000 = 0x800000 = 8388608B

 

Doesn't this mean that I have used 8388608B and there are 53844016B available?

 

But the free command says that I only have 54 MB in total of which I have used the rootfs or...?

 

/Mattias

QuoteReplyEditDelete

 

 

2008-05-08 15:38:43     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Robin Getz (UNITED STATES)

Message: 55652   

 

Mattias:

 

You wrote:

 

>Kernel Managed Memory: 62MB

>Memory map:0x0000a000-0x00116050

>  rodata    = 0x00117000-0x001653d4

>  data      = 0x00166000-0x00178000

>    stack   = 0x00166000-0x00168000

>  init      = 0x00178000-0x00193000

>  bss       = 0x00193000-0x002a67d0

>  available = 0x002a67d0-0x03600000

>  rootfs    = 0x03600000-0x03e00000

 

If you have a look - available memory (0x002a67d0-0x03600000)  - 53844016 bytes + init (0x00178000-0x00193000) 110592 bytes == 53954608 bytes == 52690.0 kbytes == 51.4 Mbytes

 

 

 

This is what the kernel tells you.

 

-Robin

QuoteReplyEditDelete

 

 

2008-05-09 03:18:01     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55657   

 

Hi again,

 

This might seem obvious to you but I have some things I don't understand.

 

From the free command:

 

root:~> free                                                                                                                                  

                  total            used         free       shared      buffers                                                                       

  Mem:        52112         5616        46496            0           96

 

The total memory of 52112KB is approx of the calculated available memory from the memory map.

 

What is used memory? I thought that was the memory occupied by the rootfs.

 

Why does Diegos system (second post), show a total memory close to his total physical memory.(Not 10MB less)?

 

When I build the system for a rev0.2 I get the following boot log. ( I attached a snippet from the memory layout and marked in red where it says that 8192B is reserved)

 

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

Recovering from Watchdog event                                                                                                                

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

Compiled for ADSP-BF537 Rev 0.2                                                                                                               

Warning: Compiled for Rev 2, but running on Rev 3                                                                                             

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

Processor Speed: 600 MHz core clock and 120 MHz System Clock                                                                                  

Board Memory: 64MB                                                                                                                            

Kernel Managed Memory: 62MB                                                                                                                   

Memory map:                                                                                                                                   

  text      = 0x0000a000-0x00116060                                                                                                           

  rodata    = 0x00117000-0x00165440                                                                                                           

  data      = 0x00166000-0x00178000                                                                                                           

    stack   = 0x00166000-0x00168000                                                                                                           

  init      = 0x00178000-0x00193000                                                                                                           

  bss       = 0x00193000-0x002a67d0                                                                                                           

  available = 0x002a67d0-0x03600000                                                                                                           

  rootfs    = 0x03600000-0x03e00000                                                                                                           

Instruction Cache Enabled                                                                                                                     

Data Cache Enabled (write-back)                                                                                                               

Built 1 zonelists.  Total pages: 13716                                                                                                        

Kernel command line: root=/dev/mtdblock0 rw console=ttyBF0,57600 rw mem=62M max_mem=64M$# developer ip=10.46.11.49:10.46.11.141:192.168.0.1:255f

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: 52004k/63488k RAM, (108k init code, 1072k kernel code, 1493k data, 0k dma, 8812k reserved)

 

This reservation is not there when I build for a rev0.3 version.

 

Bu the free command still shows the same amount of total memory.

 

/Mattias

 

 

QuoteReplyEditDelete

 

 

2008-05-09 03:51:37     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mike Frysinger (UNITED STATES)

Message: 55659   

 

Diego isnt using the ram-backed mtd rootfilesystem.  you are.

 

the memory map already shows where memory is being allocated on your system.  the kernel does not know anything about the 8meg region used by the romfs, thus it doesnt show up in the free.

QuoteReplyEditDelete

 

 

2008-05-09 04:49:41     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55668   

 

Ok,

 

That makes sense now thanks. But where in the settings is the setting where I do the 8M allocation of rom? Is the problem the ext2 filesystem?

 

/Mattias

QuoteReplyEditDelete

 

 

2008-05-09 05:17:12     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mike Frysinger (UNITED STATES)

Message: 55669   

 

it's up to you how you want to do the root filesystem.  if you have the uClinux MTD driver enabled, then a filesystem is created according to the Makefile in the vendors/board directory.  the default size is 8meg.

QuoteReplyEditDelete

 

 

2008-05-09 05:56:06     Re: BF537 rev0.2 -> rev0.3 still gives max usable memory of 54MB

Mattias K (SWEDEN)

Message: 55671   

 

ok, thanks. Didn't know about this.

QuoteReplyEditDelete

Attachments

    Outcomes