[U-Boot] Statically allocate a range of physical memory to an OS image.

Hello,
I want to execute a an OS (either Linux or Android) on the Arndale exynos 5250 board. The board features 2 GB of RAM. However, I want to statically alloacate a specifc region of RAM (e.g. 1 GB) to be used by the OS, While the other 1 GB is reserved for other purposes.
What is the best way to achieve this goal? do I need to change the FDT to reflect only the region of memory that I want to be visible by the OS? or can it be done througth the bootargs passed from uboot to the kernel?
Please share your ideas.
Many thanks.
-- View this message in context: http://u-boot.10912.n7.nabble.com/Statically-allocate-a-range-of-physical-me... Sent from the U-Boot mailing list archive at Nabble.com.

Dear "mazen.e",
In message 1401177091915-180825.post@n7.nabble.com you wrote:
I want to execute a an OS (either Linux or Android) on the Arndale exynos 5250 board. The board features 2 GB of RAM. However, I want to statically alloacate a specifc region of RAM (e.g. 1 GB) to be used by the OS, While the other 1 GB is reserved for other purposes.
If you boot an OS, you don;t reserve any memory in U-Boot at all. At the moment U-Boot branches to the OS entry point, U-Boot is dead and gone, including any memory alocation information that might have been present in U-Boot.
It is then up to the OS to set up it's own memory manegement.
Best regards,
Wolfgang Denk

Great, many thanks for this information.
On the other hand, according to my basic understanding (Please correct me if I am wrong), U-boot can pass through the bootargs env variable information about available memory in the platform. For instance, bootargs mem=512M@0xA0000000 .. instructs the kernel that the available memory is 512 MB starting @ 0xA0000000, in such case the rest of the platform memory is not even visible to the kernel and its MMU. Is this conclusion true?
Thank you very much.
-- View this message in context: http://u-boot.10912.n7.nabble.com/Statically-allocate-a-range-of-physical-me... Sent from the U-Boot mailing list archive at Nabble.com.

Dear "mazen.e",
In message 1401191218533-180832.post@n7.nabble.com you wrote:
On the other hand, according to my basic understanding (Please correct me if I am wrong), U-boot can pass through the bootargs env variable information about available memory in the platform. For instance, bootargs mem=512M@0xA0000000 .. instructs the kernel that the available memory is 512 MB starting @ 0xA0000000, in such case the rest of the platform memory is not even visible to the kernel and its MMU. Is this conclusion true?
Actually, today we use the device tree to pass this information.
And it is not correct that any memory outside the specification of "mem=" is not _visible_ to the kernel. Please understand that it is really up to the kernel (or whatever program you boot) to set up hiw own memory map. In case of the Linux, it is the Linux kernel itself which implements the "mem=" ABI - and if you use it, it choses to _ignore_ any other possibly existing memory regions. But this is totally voluntary, and done only in Linux. There is nothing that U-Boot does here, so the term "not visible" is only true in the sense "because the kernel decides to close both eyes and never will even attempt to look in that direction".
Best regards,
Wolfgang Denk

Great, thank you very much for this valuable information.
-- View this message in context: http://u-boot.10912.n7.nabble.com/Statically-allocate-a-range-of-physical-me... Sent from the U-Boot mailing list archive at Nabble.com.
participants (2)
-
mazen.e
-
Wolfgang Denk