From: Misbah khan <misbah_khan@engineer.com>
To: linuxppc-embedded@ozlabs.org
Subject: Re: how to allocate 9MB of memory in kernel ?
Date: Tue, 22 Jul 2008 06:22:45 -0700 (PDT) [thread overview]
Message-ID: <18587466.post@talk.nabble.com> (raw)
In-Reply-To: <4885AC94.7050501@coritel.it>
Hi All ...
First of all let me thank you for your valuable suggessions ...
1. I wanted to allocate 9MB in kernel and wanted that memory to be mapped to
the physically continews SDRAM memory. but till now i could not found a way
to do so ???
2. So i thought to use ioremap to map SDRAM and make it accessible to user
using mmap technique but there is only one doubt and that is will it be
secure and stable and whether it is a right way of doing ???
3. Now i have allocated 3MB of memory in kernel for simulation purpose in
dma region and writing to 1 MB at a time in the driver and reading it in the
application this works good in the Linux PC where as in the board i could
just read '/0' char always .
4. When i do ioremap to a cpld memory mapped reg (as i am using simul board
which does not have the actual SDRAM mapping ) i could read write to it but
in the application i can read a value of '/0' always
5. Can i actually do ioremap to 9 MB SDRAM memory and map it to the user
using function remap_pfn_range() ???
I am sorry Stornelli
--- Since there is a time criticality hence i am not able to look the driver
books and documentation as of now and trying my little knowledge and your
suggessions ....
------ Misbah <><
Marco Stornelli wrote:
>
>> On Tuesday 22 July 2008, Misbah khan wrote:
>>> I am getting kernel panic while trying these as suggested by you ,the
>>> following points will elaborate my concern :-
>>> i am allocating memory using vmalloc and remaping to the SDRAM area as
>>> :-
>>>
>>> buf_area = vmalloc(sizeof(circularbuffer_S));
>>> if(!buf_area)
>>> {
>>> printk(KERN_ALERT"vmalloc failed \n");
>>> return -1;
>>> }
>>>
>>> buf_area = (circularbuffer_S *)ioremap(7700000,900000);
>>> if(!buf_area)
>>> {
>>> printk(KERN_ALERT"ioremap failed \n");
>>> return -1;
>>> }
>
> Misbah I suggest you, before to write in a Linux mailing list, to read
> Understanding the Linux kernel, Linux device drivers, Understanding the
> Linux virtual memory manager and so on, to study them very well, to
> think well about your problem and then ask for help in a mailing list.
>
> Regards,
>
> --
> Marco Stornelli
> Embedded Software Engineer
> CoRiTeL - Consorzio di Ricerca sulle Telecomunicazioni
> http://www.coritel.it
>
> marco.stornelli@coritel.it
> +39 06 72582838
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
>
>
--
View this message in context: http://www.nabble.com/how-to-allocate-9MB-of-memory-in-kernel---tp18503022p18587466.html
Sent from the linuxppc-embedded mailing list archive at Nabble.com.
next prev parent reply other threads:[~2008-07-22 13:22 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-17 7:26 how to allocate 9MB of memory in kernel ? Misbah khan
2008-07-17 7:51 ` Marco Stornelli
2008-07-17 8:34 ` Misbah khan
2008-07-17 9:04 ` Marco Stornelli
2008-07-17 7:56 ` Arnd Bergmann
2008-07-17 8:19 ` Misbah khan
2008-07-17 8:24 ` Arnd Bergmann
2008-07-18 4:44 ` Misbah khan
2008-07-18 6:50 ` Marco Stornelli
2008-07-18 8:48 ` Misbah khan
2008-07-18 14:57 ` Timur Tabi
2008-07-18 15:39 ` Arnd Bergmann
2008-07-22 5:23 ` Misbah khan
2008-07-22 6:43 ` Marco Stornelli
2008-07-22 9:31 ` Arnd Bergmann
2008-07-22 9:47 ` Marco Stornelli
2008-07-22 13:22 ` Misbah khan [this message]
2008-07-22 15:12 ` Arnd Bergmann
2008-07-23 7:30 ` Misbah khan
2008-07-24 8:33 ` Misbah khan
2008-07-24 9:31 ` Arnd Bergmann
2008-07-25 8:43 ` Misbah khan
2008-07-25 8:50 ` Arnd Bergmann
2008-08-02 19:13 ` harihanv
2008-07-23 12:47 ` Alessandro Rubini
2008-07-17 8:02 ` Sylvain Joyeau
2008-07-17 8:41 ` Misbah khan
[not found] <mailman.2280.1216290829.2883.linuxppc-embedded@ozlabs.org>
2008-07-17 20:15 ` Siva Prasad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18587466.post@talk.nabble.com \
--to=misbah_khan@engineer.com \
--cc=linuxppc-embedded@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).