how kernel figure out DDR RAM size when bootargs's mem not specified?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
how kernel figure out DDR RAM size when bootargs's mem not specified?
I have a 2.6.35 Kernel runnning on rescue mode, booting wiht u-boot, on powerpc, on in-house card, with 512M RAM.
The Kernel boots well when
1) bootargs has mem=512M, or
2) mem is not specified in bootargs.
Therefore, if bootargs does not specify any value for mem, my linux kernel looks to be able to figure out the DDR RAM 512M that is configured by u-boot from my testing.
Does anyone know how Kernel figured out the size of DDR RAM hat is configured by u-boot without learning the size from bootargs's mem argument ?
The kernel probes the hardware to find out what's present - including how much memory.
That is a kernel parameter that is generally used to cause the kernel to use less than the total memory installed. On x86 the bootloaders don't know anything about that parameter and pass it on (uninterpreted and ignored) to the kernel. Probably the same on Power.
Although my kernel boots well when
1) if bootargs has mem=512M, or 2) mem is not specified.
I need to reserve some memnory for not being touched by Kernel.
However, if I reserve 1M mewmory with mem=511M, the kernel traped
when unpacking rootfs at the following location.
The trap is ppc 0x300 exception - mmu data access error.
May someone point me some clue to figure out the reason of the issue?
Thanks a lot for help.
------ More details as below:
packages/linux-centaur/init/initramfs.c: printk(KERN_INFO "Trying to unpack rootfs image as initramfs...\n")
err = unpack_to_rootfs((char *)initrd_start,
initrd_end - initrd_start);
Unfortunately there is not a specific ppc section at LQ, but since it is a kernel related question I've moved this thread to Linux - Kernel for better exposure. Maybe some kernel expert could step in.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.