• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 323
  • Last Modified:

SDRAM mapping?

I am involved in an embedded project. How would I tell my linux kernel about the presence of 32MB SDRAM?
0
Johncy
Asked:
Johncy
  • 3
  • 3
1 Solution
 
dimitryCommented:
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.
0
 
JohncyAuthor Commented:
Thanks for your suggestion. How about the physical address mapping of the SDRAM to the processor?
0
 
dimitryCommented:
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;
        ...
}
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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?
0
 
JohncyAuthor Commented:
Please tell me about the SDRAM mapping address for the kernel.
0
 
dimitryCommented:
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

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now