mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH v2 3/6] ARM: cpu: start: register barebox memory area
Date: Fri, 17 May 2024 08:45:08 +0200	[thread overview]
Message-ID: <20240517064511.3307462-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20240517064511.3307462-1-a.fatoum@pengutronix.de>

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@pengutronix.de>
---
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




  parent reply	other threads:[~2024-05-17  6:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-17  6:45 [PATCH v2 0/6] add PBL handoff-data support Ahmad Fatoum
2024-05-17  6:45 ` [PATCH v2 1/6] memory: add support for requesting barebox area as a whole Ahmad Fatoum
2024-05-17  6:45 ` [PATCH v2 2/6] treewide: use request_barebox_region for possible barebox memory regions Ahmad Fatoum
2024-05-17  6:45 ` Ahmad Fatoum [this message]
2024-05-17  6:45 ` [PATCH v2 4/6] ARM: move blob_is_arm_boarddata() to include Ahmad Fatoum
2024-05-17  6:45 ` [PATCH v2 5/6] add handoff-data support Ahmad Fatoum
2024-05-17  6:45 ` [PATCH v2 6/6] ARM: pass handoff data from PBL to proper Ahmad Fatoum
2024-05-21  7:14 ` [PATCH v2 0/6] add PBL handoff-data support Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240517064511.3307462-4-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox