From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Cc: Oleksij Rempel <o.rempel@pengutronix.de>,
Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/3] MIPS: pbl_main_entry(): inline barebox_uncompress()
Date: Thu, 13 Jun 2024 02:28:06 +0300 [thread overview]
Message-ID: <20240612232807.142127-3-antonynpavlov@gmail.com> (raw)
In-Reply-To: <20240612232807.142127-1-antonynpavlov@gmail.com>
Unify MIPS pbl_main_entry() with RISC-V barebox_pbl_start().
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
arch/mips/boot/main_entry-pbl.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/arch/mips/boot/main_entry-pbl.c b/arch/mips/boot/main_entry-pbl.c
index 01833a508d3..7b5e81817e0 100644
--- a/arch/mips/boot/main_entry-pbl.c
+++ b/arch/mips/boot/main_entry-pbl.c
@@ -21,15 +21,6 @@ unsigned long free_mem_end_ptr;
void pbl_main_entry(void *fdt, void *fdt_end, u32 ram_size);
-static void barebox_uncompress(void *compressed_start, unsigned int len)
-{
- /* set 128 KiB at the end of the MALLOC_BASE for early malloc */
- free_mem_ptr = TEXT_BASE - SZ_128K;
- free_mem_end_ptr = free_mem_ptr + SZ_128K;
-
- pbl_barebox_uncompress((void*)TEXT_BASE, compressed_start, len);
-}
-
void __section(.text_entry) pbl_main_entry(void *fdt, void *fdt_end,
u32 ram_size)
{
@@ -42,8 +33,13 @@ void __section(.text_entry) pbl_main_entry(void *fdt, void *fdt_end,
/* clear bss */
memset(__bss_start, 0, __bss_stop - __bss_start);
+ /* set 128 KiB at the end of the MALLOC_BASE for early malloc */
+ free_mem_ptr = TEXT_BASE - SZ_128K;
+ free_mem_end_ptr = free_mem_ptr + SZ_128K;
+
piggy_len = (unsigned long)&input_data_end - (unsigned long)&input_data;
- barebox_uncompress(&input_data, piggy_len);
+
+ pbl_barebox_uncompress((void *)TEXT_BASE, &input_data, piggy_len);
fdt_len = (unsigned long)fdt_end - (unsigned long)fdt;
if (!fdt_len) {
--
2.39.0
next prev parent reply other threads:[~2024-06-12 23:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-12 23:28 [PATCH 0/3] MIPS: pbl fixes Antony Pavlov
2024-06-12 23:28 ` [PATCH 1/3] MIPS: don't pass fdt_size into main_entry() Antony Pavlov
2024-06-12 23:28 ` Antony Pavlov [this message]
2024-06-12 23:28 ` [PATCH 3/3] MIPS: rename pbl_main_entry() -> barebox_pbl_start() Antony Pavlov
2024-06-13 6:59 ` [PATCH 0/3] MIPS: pbl fixes 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=20240612232807.142127-3-antonynpavlov@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=o.rempel@pengutronix.de \
/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