[PATCH v2 3/6] ARM: cpu: start: register barebox memory area

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



By registering the barebox area, we ensure that functions like
memory_bank_first_find_space() skip over the memory area barebox uses
for itself.

The OS can still reclaim this area once barebox has shutdown.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
v1 -> v2:
  - new patch
---
 arch/arm/cpu/start.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
index a73224bab930..4f68119d5089 100644
--- a/arch/arm/cpu/start.c
+++ b/arch/arm/cpu/start.c
@@ -219,6 +219,8 @@ __noreturn __prereloc void barebox_non_pbl_start(unsigned long membase,
 	pr_debug("initializing malloc pool at 0x%08lx (size 0x%08lx)\n",
 			malloc_start, malloc_end - malloc_start);
 
+	register_barebox_area(barebox_base, endmem - barebox_base);
+
 	kasan_init(membase, memsize, malloc_start - (memsize >> KASAN_SHADOW_SCALE_SHIFT));
 
 	mem_malloc_init((void *)malloc_start, (void *)malloc_end - 1);
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux