SDRAM mapping?

I am involved in an embedded project. How would I tell my linux kernel about the presence of 32MB SDRAM?
Who is Participating?
dimitryConnect With a Mentor Commented:
Take a look on following documentation:
 - src/arch/i386/mm/init.c
   function mem_init()
 - src/Documentation/IO-mapping.txt
 - src/Documentation/i386/boot.txt

Your bootloader may pass this to the kernel. For example through redboot you can pass to the kernel:
"root=/dev/mtdblock3 mem=32M"
So with the help of mem=sizeM you may "tell" to kernel size of your SDRAM.
JohncyAuthor Commented:
Thanks for your suggestion. How about the physical address mapping of the SDRAM to the processor?
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

Take a look on file arch.c under ~/arch/CPUNAME/kernel and you will find:
Function somename_fixup(...,struct meminfo *mi)
        mi->nr_banks      = 1;
        mi->bank[0].start = PHYS_OFFSET;  /* <--SDRAM phyical address */
        mi->bank[0].size  = (32*1024*1024);  /* <-- SDRAM size */
        mi->bank[0].node  = 0;
JohncyAuthor Commented:
I could find such a file for ARM but no such file arch.c in arch/i386/kernel. Where could i get the information for x86 architecture?
JohncyAuthor Commented:
Please tell me about the SDRAM mapping address for the kernel.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.