2009-03-12 05:29:33 mmap
Daniele Pagani (ITALY)
Message: 70838
Dear Sirs,
according to:
http://docs.blackfin.uclinux.org/doku.php?id=mmap
I use mmap function.
If I use on 2008R1.5-RC3 the bootargs with maxmem=32M and mem=28M then I can mmap this free space.
In my driver I do a printk of:
_ramend and physical_mem_end and all works fine.
If I do the same think with 2009 live distribution (with the same u-boot), then I find:
_ramend = physical_mem_end, so I can not use the free space.
So, the question is, how can I use mmap reserving memory with u-boot in uClinux 2009 live distribution?
uclinux 7862
linux 6164
Best regards,
Daniele.
TranslateQuoteReplyEditDelete
2009-03-12 06:15:58 Re: mmap
Mike Frysinger (UNITED STATES)
Message: 70843
post the full boot output of the non-working kernel
QuoteReplyEditDelete
2009-03-12 06:59:42 Re: mmap
Daniele Pagani (ITALY)
Message: 70848
Linux version 2.6.28.7-ADI-2009R1-pre-svn6163 (root@linux-fbdo) (gcc version 4.1
.2 (ADI svn)) #18 Wed Mar 11 12:08:50 CET 2009
console [early_BFuart0] enabled
early printk enabled on early_BFuart0
Warning: limiting memory to 19MB due to hardware anomaly 05000263
Board Memory: 20MB
Kernel Managed Memory: 20MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x0010c480
rodata = 0x0010c480-0x0015aea0
bss = 0x0015aea0-0x0016983c
data = 0x0016983c-0x0017a000
stack = 0x00178000-0x0017a000
init = 0x0017a000-0x00465000
available = 0x00465000-0x012ff000
DMA Zone = 0x01300000-0x01400000
Hardware Trace Active and Enabled
Boot Mode: 0
Blackfin support (C) 2004-2009 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 100 MHz System Clock
boot memmap: 0000000000465000 - 00000000012ff000 (usable)
On node 0 totalpages: 4863
free_area_init_node: node 0, pgdat 001762ac, node_mem_map 0046a000
DMA zone: 38 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 4825 pages, LIFO batch:0
Normal zone: 0 pages used for memmap
Movable zone: 0 pages used for memmap
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: 4825
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,115200 cons
ole=ttyBF0,115200 maxmem=24M mem=20M
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
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: 4863
Memory available: 14652k/20480k RAM, (2988k init code, 1069k kernel code, 439k d
ata, 1024k dma, 308k reserved)
Calibrating delay loop... 997.37 BogoMIPS (lpj=1994752)
Security Framework initialized
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (15 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (41 KB free)
PDA for CPU0 reserved at 0015bed0
net_namespace: 288 bytes
NET: Registered protocol family 16
Blackfin GPIO Controller
Blackfin DMA Controller
stamp_init(): registering device resources
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
Setting up Blackfin MMR debugfs
msgmni has been set to 28
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
simple-gpio: now handling 48 GPIOs: 0 - 47
Serial: Blackfin serial driver
bfin-uart.1: 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=0:03, irq=-1, mdc_
clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
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.
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x00000000-0x00040000 : "bootloader(nor)"
0x00040000-0x003f0000 : "Linux"
0x003f0000-0x00400000 : "MAC Address(nor)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_b
ase@ffc00500, dma channel@7
i2c /dev entries driver
i2c-bfin-twi i2c-bfin-twi.0: Blackfin BF5xx on-chip I2C TWI Contoller, regs_base
@ffc01400
TCP cubic registered
NET: Registered protocol family 17
Distributed Switch Architecture driver version 0.1
eth0: detected a KSZ8893M switch
dsa slave smi: probed
Freeing unused kernel memory: 2988k freed
dma_alloc_init: dma_page @ 0x00460000 - 256 pages at 0x01300000
TranslateQuoteReplyEditDelete
2009-03-12 07:00:54 Re: mmap
Daniele Pagani (ITALY)
Message: 70849
bootargs=root=/dev/mtdblock0 rw earlyprintk=serial,uart0,115200 console=ttyBF0,1
15200 maxmem=24M mem=20M
TranslateQuoteReplyEditDelete
2009-03-12 07:08:20 Re: mmap
Mike Frysinger (UNITED STATES)
Message: 70851
your command line is wrong. you forgot the underscore in max_mem.