Skip to content

Commit

Permalink
ARC: [plat-sim] unbork non default CONFIG_LINUX_LINK_BASE
Browse files Browse the repository at this point in the history
HIGHMEM support bumped the default memory size for nsim platform to 1G.
Thus total memory ended at the very edge of start of peripherals address
space. With linux link base shifted, memory started bleeding into
peripheral space which caused early boot bad_page spew !

Fixes: 29e3322 ("ARC: mm: HIGHMEM: populate high memory from DT")
Reported-by: Anton Kolesov <akolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Vineet Gupta committed Dec 17, 2015
1 parent c512c6b commit ff1c0b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/arc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ config LINUX_LINK_BASE
However some customers have peripherals mapped at this addr, so
Linux needs to be scooted a bit.
If you don't know what the above means, leave this setting alone.
This needs to match memory start address specified in Device Tree

config HIGHMEM
bool "High Memory Support"
Expand Down
3 changes: 2 additions & 1 deletion arch/arc/boot/dts/nsim_hs.dts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

memory {
device_type = "memory";
reg = <0x0 0x80000000 0x0 0x40000000 /* 1 GB low mem */
/* CONFIG_LINUX_LINK_BASE needs to match low mem start */
reg = <0x0 0x80000000 0x0 0x20000000 /* 512 MB low mem */
0x1 0x00000000 0x0 0x40000000>; /* 1 GB highmem */
};

Expand Down
4 changes: 3 additions & 1 deletion arch/arc/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size)
int in_use = 0;

if (!low_mem_sz) {
BUG_ON(base != low_mem_start);
if (base != low_mem_start)
panic("CONFIG_LINUX_LINK_BASE != DT memory { }");

low_mem_sz = size;
in_use = 1;
} else {
Expand Down

0 comments on commit ff1c0b6

Please sign in to comment.