Link to home
Start Free TrialLog in
Avatar of Johncy
Johncy

asked on

SDRAM mapping?

I am involved in an embedded project. How would I tell my linux kernel about the presence of 32MB SDRAM?
Avatar of dimitry
dimitry

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.
Avatar of Johncy

ASKER

Thanks for your suggestion. How about the physical address mapping of the SDRAM to the processor?
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;
        ...
}
Avatar of Johncy

ASKER

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?
Avatar of Johncy

ASKER

Please tell me about the SDRAM mapping address for the kernel.
ASKER CERTIFIED SOLUTION
Avatar of dimitry
dimitry

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial