Tool/software: Linux
We are working on the IDK571X board. We want to configure a pool buffer of 16M starting at address 0x9F000000. Linux is running on ARM15 and the CMEM is defined in the dts file.
We want to use the CMEM in a user application, but before executing this application, we see that the buffer pool is already busy:
# cat /proc/cmem
Block 0: Pool 0: 1 bufs size 0x1000000 (0x1000000 requested)
Pool 0 busy bufs:
id 0: phys addr 0x9f000000 (cached)
And because of this, when we run the application we get the message "Failed to find a pool which fits 0x80000"
We have printed the debug messages during kernel initialitazion and found that someone has already taken it:
[ 13.845831] CMEMK Debug: open: called.
[ 13.849612] CMEMK Debug: GETVERSION ioctl received, returning 0x4140000.
[ 13.947898] CMEMK Debug: GETNUMBLOCKS ioctl received, returning 1.
[ 13.994644] CMEMK Debug: GETBLOCK ioctl received.
[ 14.003309] EXT4-fs (mmcblk1p2): recovery complete
[ 14.003340] EXT4-fs (mmcblk1p2): mounted filesystem with ordered data mode. Opts: (null)
[ 14.164681] CMEMK Debug: GETBLOCK: returning phys base 0x9f000000, size 0x1000000.
[ 14.217943] CMEMK Debug: ALLOCCACHED ioctl received on pool 0 for memory block 0
[ 14.270590] SCSI subsystem initialized
[ 14.330567] FAT-fs (mmcblk1p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[ OK ] Started Avahi mDNS/DNS-SD Stack.
[ 14.465983] CMEMK Debug: ALLOCCACHED: allocated a buffer at 0x9f000000 (phys address)
[ 14.466012] CMEMK Debug: mmap: vma->vm_start = 0xb5cbe000
[ 14.466013] CMEMK Debug: mmap: vma->vm_end = 0xb6cbe000
[ 14.466015] CMEMK Debug: mmap: size = 0x1000000
[ 14.466017] CMEMK Debug: mmap: vma->vm_pgoff = 0x9f000
Since we have not run the application, could it be a demo application? How can we trace it to find the place where it has been taken?
If we do not include cmemk.ko in the TargetNFS and include it before our application execution with insmod, it works ok.