2009-06-15 11:08:58     Physical system RAM

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

2009-06-15 11:08:58     Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75739   

 

Hi,

I try to use "Physical system RAM"

 

CONFIG_MTD_PHRAM=y

bootargs 'root=/dev/mtdblock0 rw mem=21M max_mem=32M$# phram=rdisk,21Mi,11Mi clkin_hz=24000000 earlyprintk=serial,uart0,57600 console=tty0 console=ttyBF0,57600'

 

but it seems not working. There is no MTD device under /dev and:

 

root:/> cat /proc/mtd

dev:    size   erasesize  name

root:/>

 

Regards,

Nikolay

QuoteReplyEditDelete

 

 

2009-06-15 11:13:58     Re: Physical system RAM

Mike Frysinger (UNITED STATES)

Message: 75740   

 

did you verify you passed the command line properly ?  did you review the kernel log ?

QuoteReplyEditDelete

 

 

2009-06-15 11:32:52     Re: Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75741   

 

it's passed properly. The /ver/log is empty. No kernel log.

QuoteReplyEditDelete

 

 

2009-06-15 11:37:09     Re: Physical system RAM

Mike Frysinger (UNITED STATES)

Message: 75742   

 

there is always a kernel log.  read `dmesg`.

QuoteReplyEditDelete

 

 

2009-06-15 11:46:22     Re: Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75743   

 

root:/> dmesg

Linux version 2.6.30-ADI-2010R1-pre-svn6721 (root@dlnx764) (gcc version 4.1.2 (A

DI svn)) #67 Mon Jun 15 16:24:59 IST 2009

console [early_BFuart0] enabled

early printk enabled on early_BFuart0

Board Memory: 32MB

Kernel Managed Memory: 21MB

Memory map:

  fixedcode = 0x00000400-0x00000490

  text      = 0x00001000-0x000ea700

  rodata    = 0x000ea700-0x00138184

  bss       = 0x00139000-0x00148e60

  data      = 0x00148e60-0x0015a000

    stack   = 0x00158000-0x0015a000

  init      = 0x0015a000-0x0044a000

  available = 0x0044a000-0x013ff000

  DMA Zone  = 0x01400000-0x01500000

Hardware Trace Active and Enabled

Boot Mode: 3

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

Compiled for ADSP-BF527 Rev 0.1

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

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

Processor Speed: 528 MHz core clock and 132 MHz System Clock

boot memmap: 000000000044a000 - 00000000013ff000 (usable)

On node 0 totalpages: 5119

free_area_init_node: node 0, pgdat 001570ec, node_mem_map 0044c000

  DMA zone: 40 pages used for memmap

  DMA zone: 0 pages reserved

  DMA zone: 5079 pages, LIFO batch:0

NOMPU: setting up cplb tables

Instruction Cache Enabled for CPU0

Data Cache Enabled for CPU0 (write-back)

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

Kernel command line: root=/dev/mtdblock0 rw mem=21M max_mem=32M$# phram=rdisk,21

Mi,11Mi clkin_hz=24000000 earlyprintk=serial,uart0,57600 console=tty0 console=tt

yBF0,57600

NR_IRQS:119

Configuring Blackfin Priority Driven Interrupts

PID hash table entries: 128 (order: 7, 512 bytes)

Console: colour dummy device 80x25

console [tty0] enabled

console handover: boot [early_BFuart0] -> real [ttyBF0]

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

Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)

Kernel managed physical pages: 5119

Memory available: 15792k/21504k RAM, (3008k init code, 933k kernel code, 447k da

ta, 1024k dma, 296k reserved)

Calibrating delay loop... 1052.67 BogoMIPS (lpj=2105344)

Security Framework initialized

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 (42 KB free)

net_namespace: 296 bytes

NET: Registered protocol family 16

Blackfin DMA Controller

ad7160eval_init(): registering device resources

bio: create slab <bio-0> at 0

Setting up Blackfin MMR debugfs

msgmni has been set to 30

io scheduler noop registered

io scheduler anticipatory registered (default)

io scheduler cfq registered

Serial: Blackfin serial driver

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

brd: module loaded

loop: module loaded

slram: not enough parameters.

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

ase@ffc00500, dma channel@7

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

@ffc01400

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

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

Freeing unused kernel memory: 3008k freed

dma_alloc_init: dma_page @ 0x0015a000 - 256 pages at 0x01400000

mmc_spi spi0.0: requested mode not fully supported

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

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

mmc0: new SD card on SPI

mmcblk0: mmc0:0000       481 MiB

mmcblk0: p1

QuoteReplyEditDelete

 

 

2009-06-15 11:55:50     Re: Physical system RAM

Mike Frysinger (UNITED STATES)

Message: 75744   

 

are you sure you enabled the right driver ?  perhaps you enabled slram and not phram.

QuoteReplyEditDelete

 

 

2009-06-15 11:59:01     Re: Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75745   

 

It is PHRAM...

 

.config - Linux Kernel v2.6.30 Configuration

──────────────────────────────────────────────────────────────────────────────

  ┌─────────────────── Self-contained MTD device drivers ───────────────────┐

  │  Arrow keys navigate the menu.  <Enter> selects submenus --->.          │

  │  Highlighted letters are hotkeys.  Pressing <Y> includes, <N> excludes, │

  │  <M> modularizes features.  Press <Esc><Esc> to exit, <?> for Help, </> │

  │  for Search.  Legend: [*] built-in  [ ] excluded  <M> module  < >       │

  │ ┌─────────────────────────────────────────────────────────────────────┐ │

  │ │    < > Support for AT45xxx DataFlash                                │ │

  │ │    < > Support most SPI Flash chips (AT26DF, M25P, W25X, ...)       │ │

  │ │    < > Uncached system RAM                                          │ │

  │ │    <*> Physical system RAM                                          │ │

  │ │    < > Test driver using RAM                                        │ │

  │ │    < > MTD using block device                                       │ │

  │ │        *** Disk-On-Chip Device Drivers ***                          │ │

  │ │    < > M-Systems Disk-On-Chip 2000 and Millennium (DEPRECATED)      │ │

  │ │    < > M-Systems Disk-On-Chip Millennium-only alternative driver (DE│ │

  │ │    < > M-Systems Disk-On-Chip Millennium Plus                       │ │

  │ └─────────────────────────────────────────────────────────────────────┘ │

  ├─────────────────────────────────────────────────────────────────────────┤

  │                    <Select>    < Exit >    < Help >                     │

  └─────────────────────────────────────────────────────────────────────────┘

 

and .config:

 

CONFIG_MTD_PHRAM=y

QuoteReplyEditDelete

 

 

2009-06-16 15:17:33     Re: Physical system RAM

Mike Frysinger (UNITED STATES)

Message: 75848   

 

works fine for me:

root:/> insmod phram.ko phram=rdisk,21Mi,11Mi

root:/> grep rdisk /proc/mtd

mtd5: 00b00000 00001000 "rdisk"

QuoteReplyEditDelete

 

 

2009-06-17 08:58:20     Re: Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75886   

 

when I build it as module it seems to work (despite the error "phram: illegal device length" after insmod).

 

root:/> cat /proc/mtd

dev:    size   erasesize  name

mtd0: 00b00000 00001000 "rdisk"

root:/>

 

,but when I build it into the kernel, it doesn't work for me.

 

 

 

 

 

QuoteReplyEditDelete

 

 

2009-06-17 09:35:22     Re: Physical system RAM

Mike Frysinger (UNITED STATES)

Message: 75890   

 

that's because you probably passed it wrong.  it is a *module* paramater, not a common kernel paramater.  module paramaters must be prefixed properly.  read the documentation:

linux-2.6.x/Documentation/kernel-parameters.txt

QuoteReplyEditDelete

 

 

2009-06-17 10:14:13     Re: Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75896   

Thanks!

Now the phram module returns an error:

 

 

Kernel command line: root=/dev/mmcblk0p1 ro rootdelay=1 mem=21M max_mem=32M$#  phram.phram=rdisk,22Mi,9Mi clkin_hz=24000000 earlyprintk=serial,uar

t0,57600 console=tty0 console=ttyBF0,57600

phram: out of memory

 

Tried different 'phram=' parameters... and 'memmap=10M$21M' also.

 

The same seems to work if not built into the kernel...

QuoteReplyEditDelete

 

 

2009-06-17 10:17:29     Re: Physical system RAM

Mike Frysinger (UNITED STATES)

Message: 75897   

 

no idea -- we've never used phram before

QuoteReplyEditDelete

 

 

2009-06-17 10:27:38     Re: Physical system RAM

Nikolay Chokoev (IRELAND)

Message: 75898   

 

... the module loaded from console is OK for me. It seems working.

 

...just was wondering...

Attachments

    Outcomes