Skip to content
Snippets Groups Projects
Commit e27bddff authored by Frieder Schrempf's avatar Frieder Schrempf Committed by Stefano Babic
Browse files

imx8m: Restrict usable memory to space below 4G boundary


Some IPs have their accessible address space restricted by the
interconnect. Let's make sure U-Boot only ever uses the space below
the 4G address boundary (which is 3GiB big), even when the effective
available memory is bigger.

We implement board_get_usable_ram_top() for all i.MX8M SoCs, as the
whole family is affected by this.

Signed-off-by: default avatarFrieder Schrempf <frieder.schrempf@kontron.de>
parent ef62fff2
No related branches found
No related tags found
No related merge requests found
......@@ -296,6 +296,20 @@ phys_size_t get_effective_memsize(void)
#endif
}
ulong board_get_usable_ram_top(ulong total_size)
{
/*
* Some IPs have their accessible address space restricted by
* the interconnect. Let's make sure U-Boot only ever uses the
* space below the 4G address boundary (which is 3GiB big),
* even when the effective available memory is bigger.
*/
if (PHYS_SDRAM + gd->ram_size > 0x80000000)
return 0x80000000;
return PHYS_SDRAM + gd->ram_size;
}
static u32 get_cpu_variant_type(u32 type)
{
struct ocotp_regs *ocotp = (struct ocotp_regs *)OCOTP_BASE_ADDR;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment