mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: BAREBOX <barebox@lists.infradead.org>
Subject: [PATCH 1/7] memory: request RO data section as separate region
Date: Fri, 13 Jun 2025 09:58:49 +0200	[thread overview]
Message-ID: <20250613-arm-mmu-xn-ro-v1-1-60f05c6e7b4b@pengutronix.de> (raw)
In-Reply-To: <20250613-arm-mmu-xn-ro-v1-0-60f05c6e7b4b@pengutronix.de>

Map the RO data section as separate region so that it becomes visible in
the iomem output.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/memory.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/common/memory.c b/common/memory.c
index a5b081be2c709f04667a67fbd2110520ab4973e3..708bfd26a0fc3d295d09632fb92e89f474bb7422 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -103,8 +103,12 @@ static int mem_malloc_resource(void)
 			malloc_end - malloc_start + 1);
 	request_barebox_region("barebox code",
 			(unsigned long)&_stext,
-			(unsigned long)&_etext -
+			(unsigned long)&__start_rodata -
 			(unsigned long)&_stext);
+	request_barebox_region("barebox RO data",
+			(unsigned long)&__start_rodata,
+			(unsigned long)&__end_rodata -
+			(unsigned long)&__start_rodata);
 	request_barebox_region("barebox data",
 			(unsigned long)&_sdata,
 			(unsigned long)&_edata -

-- 
2.39.5




  reply	other threads:[~2025-06-13  9:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-13  7:58 [PATCH 0/7] ARM: Map sections RO/XN Sascha Hauer
2025-06-13  7:58 ` Sascha Hauer [this message]
2025-06-13  9:15   ` [PATCH 1/7] memory: request RO data section as separate region Ahmad Fatoum
2025-06-13  7:58 ` [PATCH 2/7] ARM: pass barebox base to mmu_early_enable() Sascha Hauer
2025-06-13  9:17   ` Ahmad Fatoum
2025-06-13  7:58 ` [PATCH 3/7] ARM: mmu: move ARCH_MAP_WRITECOMBINE to header Sascha Hauer
2025-06-13  9:18   ` Ahmad Fatoum
2025-06-13  7:58 ` [PATCH 4/7] ARM: MMU: map memory for barebox proper pagewise Sascha Hauer
2025-06-13  9:23   ` Ahmad Fatoum
2025-06-13  7:58 ` [PATCH 5/7] ARM: MMU: map text segment ro and data segments execute never Sascha Hauer
2025-06-13 10:12   ` Ahmad Fatoum
2025-06-13 10:36   ` Ahmad Fatoum
2025-06-13  7:58 ` [PATCH 6/7] ARM: MMU64: map memory for barebox proper pagewise Sascha Hauer
2025-06-13 10:29   ` Ahmad Fatoum
2025-06-13  7:58 ` [PATCH 7/7] ARM: MMU64: map text segment ro and data segments execute never Sascha Hauer
2025-06-13 10:40   ` Ahmad Fatoum
2025-06-13 12:44 ` [PATCH 0/7] ARM: Map sections RO/XN Ahmad Fatoum

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=20250613-arm-mmu-xn-ro-v1-1-60f05c6e7b4b@pengutronix.de \
    --to=s.hauer@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