|Subject:||trying to mmap part of the system memory (RAM)|
|From:||prem kumar <email@example.com>|
|Date:||Fri, 22 Jul 2005 06:09:43 -0700 (PDT)|
|Domainkey-signature:||a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=oXsSviun9XHtYdfVJBCLXMmv/5SWtNRj5wpG97waJmyjIOBAeY8xOZI15cJ1lG+mQxQHoDBJZkBvo04Q1cIbrvbSRed/8ztApLdA0zugHznxwoCMDOccXkt4osagHD1FHgT2m0RTSnKzNZEyHWaBK8LK81q0UNvE9exyWYCOVq8= ;|
I've been trying to impliment mmap() fucntionality in my driver code. The intent is to reserve a piece of memory as buffer (about 2M) and map this area to the user space that calls this driver.
In the book Linux Device Driver by Rubini says that if we limit the use of system memory by the kernel, ie. tell the kernel to use less than the available amount of kernel space using command line option, we could in effect reuse the remaining memory by using the ioremap() system call.
I am working on MIPS RM5200 core (32 bit external Sys/Ad bus), the total availabe RAM size on the system is 64M, I have specified in the PMON boot code 32M size for use. So when the system boots up i can see that around 28M space is available using the free command.
Now when i use the ioremap() system call, it returns me an address, which i presume to be the virtual address. When i try to use this address driectly or with writeb()/readb() system call, the whole system just reboots.
Can any one please tell if i am doing the right thing.. is there an lternate to ioremap() which would actually work? How do i get hold of the unused RAM space?
The address range that i'm using is 0xA2000000 as there is a direct mapping of memory in kseg1 address space for MIPS
I would be delighted to hear from anybody with a possible sol. :-)
Thanking in advance..
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: CVS Update@linux-mips.org: linux, Ralf Baechle|
|Next by Date:||Re: Going over 512M of memory, Ralf Baechle|
|Previous by Thread:||trying to mmap part of the system memory (RAM), mojoe thinks|
|Next by Thread:||The Linux binutils 126.96.36.199.2 is released, H. J. Lu|
|Indexes:||[Date] [Thread] [Top] [All Lists]|