Solved

SDRAM mapping?

Posted on 2003-11-18
6
312 Views
Last Modified: 2013-12-15
I am involved in an embedded project. How would I tell my linux kernel about the presence of 32MB SDRAM?
0
Comment
Question by:Johncy
  • 3
  • 3
6 Comments
 
LVL 11

Expert Comment

by:dimitry
ID: 9775755
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
 

Author Comment

by:Johncy
ID: 9775921
Thanks for your suggestion. How about the physical address mapping of the SDRAM to the processor?
0
 
LVL 11

Expert Comment

by:dimitry
ID: 9780883
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

Author Comment

by:Johncy
ID: 9793866
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
 

Author Comment

by:Johncy
ID: 9983713
Please tell me about the SDRAM mapping address for the kernel.
0
 
LVL 11

Accepted Solution

by:
dimitry earned 40 total points
ID: 9985614
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question