diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-08-02 14:33:16 -0700 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-09-01 00:33:03 +0200 |
commit | 23b5f7c09292256f1b40572a24451778d918330d (patch) | |
tree | 5d3c98c70cd7fc5f261d6d19eab51575ee191b04 | |
parent | 47ac8bfd3d796a9727d6bf9759cbb65abfe82858 (diff) |
colibri_imx7: carve out PMD aligned amount of memory
If the Cortex-M4 is running we carve out 1MiB of memory for
rpmsg communication and/or the firmware running from DDR.
On the Colibri iMX7D this area is in the middle of its 512MiB
of memory. Linux seems not to handle the sparse memory area
well and shows only the first 254MiB of memory as available.
Enabling highmem seems to work around this issue. However,
enabling highmem is not ideal since memory from the highmem
area is more restricted then lowmem.
Aligning the carved out memory to ARM Linux' PMD (page middle
directory) size of 2MiB seem to allow allocating all available
memory as lowmem. Hence increase the carveout region to 2MiB.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rw-r--r-- | board/toradex/colibri_imx7/colibri_imx7.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 22dd61b0d40..0a2c121a573 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -408,7 +408,7 @@ ulong board_get_usable_ram_top(ulong total_size) { /* Reserve last 1MiB for M4 on modules with 256MiB RAM */ if (gd->ram_size == SZ_256M) - return gd->ram_top - SZ_1M; + return gd->ram_top - SZ_2M; else return gd->ram_top; } @@ -438,7 +438,7 @@ int ft_board_setup(void *blob, bd_t *bd) * alignment for Linux due to MMU section size restrictions). */ start[0] = gd->bd->bi_dram[0].start; - size[0] = SZ_256M - SZ_1M; + size[0] = SZ_256M - SZ_2M; /* If needed, create a second entry for memory beyond 256M */ if (gd->bd->bi_dram[0].size > SZ_256M) { |