All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: u-boot@lists.denx.de
Subject: [PATCH 2/9] Nokia RX-51: Do not clear unknown memory in lowlevel_init.S
Date: Sun,  4 Sep 2022 03:28:59 +0200	[thread overview]
Message-ID: <20220904012906.17718-3-pali@kernel.org> (raw)
In-Reply-To: <20220904012906.17718-1-pali@kernel.org>

If kernel image in uImage or zImage format is not detected by
lowlevel_init.S code then do not clear memory location where image was
expected. If image is not detected then this memory region is unknown.
So do not unconditionally clear it.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 board/nokia/rx51/lowlevel_init.S | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/board/nokia/rx51/lowlevel_init.S b/board/nokia/rx51/lowlevel_init.S
index 53697fd4e125..1cf8f8d8b2f7 100644
--- a/board/nokia/rx51/lowlevel_init.S
+++ b/board/nokia/rx51/lowlevel_init.S
@@ -76,7 +76,7 @@ save_boot_params:
 	ldr	r4, [r0, #36]	/* r4 - 4 bytes header of kernel at offset 36 */
 	ldr	r5, z_magic	/* r5 - LINUX_ARM_ZIMAGE_MAGIC */
 	cmp	r4, r5
-	bne	copy_kernel_end	/* skip if invalid image */
+	bne	skip_copy	/* skip if invalid image */
 
 copy_kernel_loop:
 	ldmdb	r1!, {r3 - r10}
@@ -84,12 +84,12 @@ copy_kernel_loop:
 	cmp	r1, r0
 	bhi	copy_kernel_loop
 
-copy_kernel_end:
-
 	/* remove header in source kernel image */
 	mov	r5, #0
 	str	r5, [r0]	/* remove 4 bytes header of kernel uImage */
 	str	r5, [r0, #36]	/* remove 4 bytes header of kernel zImage */
 
+skip_copy:
+
 	/* Returns */
 	b	save_boot_params_ret
-- 
2.20.1


  parent reply	other threads:[~2022-09-04  1:30 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-04  1:28 [PATCH 0/9] Nokia RX-51: Small cleanups and UBI boot test case Pali Rohár
2022-09-04  1:28 ` [PATCH 1/9] Nokia RX-51: Remove label copy_kernel_start from lowlevel_init.S Pali Rohár
2022-09-15 21:54   ` Tom Rini
2022-09-04  1:28 ` Pali Rohár [this message]
2022-09-15 21:54   ` [PATCH 2/9] Nokia RX-51: Do not clear unknown memory in lowlevel_init.S Tom Rini
2022-09-04  1:29 ` [PATCH 3/9] Nokia RX-51: Set default SYS_LOAD_ADDR to 0x80008000 Pali Rohár
2022-09-15 21:54   ` Tom Rini
2022-09-04  1:29 ` [PATCH 4/9] Nokia RX-51: Change UBIFS volume size to 1870 LEBs in test script Pali Rohár
2022-09-15 21:55   ` Tom Rini
2022-09-04  1:29 ` [PATCH 5/9] Nokia RX-51: Call bootm in test script only when image is valid Pali Rohár
2022-09-15 21:55   ` Tom Rini
2022-09-04  1:29 ` [PATCH 6/9] Nokia RX-51: Fix documentation how to enable UBI support Pali Rohár
2022-09-15 21:55   ` Tom Rini
2022-09-04  1:29 ` [PATCH 7/9] Nokia RX-51: Do not set useless ARCH= in test script Pali Rohár
2022-09-15 21:55   ` Tom Rini
2022-09-04  1:29 ` [PATCH 8/9] Nokia RX-51: Add comment describing kernel image type into " Pali Rohár
2022-09-15 21:55   ` Tom Rini
2022-09-04  1:29 ` [PATCH 9/9] Nokia RX-51: Add booting from UBI " Pali Rohár
2022-09-15 18:34   ` Tom Rini
2022-09-15 18:57     ` Pali Rohár
2022-09-15 18:59   ` [PATCH v2] " Pali Rohár
2022-09-15 21:55     ` Tom Rini
2022-09-04  3:01 ` [PATCH 0/9] Nokia RX-51: Small cleanups and UBI boot test case Tony Dinh
2022-09-04  9:37   ` Pali Rohár
2022-09-04 19:28     ` Tony Dinh
2022-09-04 19:56       ` Tony Dinh
2022-09-04 21:58       ` Daniel Golle
2022-09-04 22:10         ` Pali Rohár
2022-09-05 21:35           ` Tony Dinh
2022-09-19 11:12 ` Alexander Dahl
2022-09-19 11:23   ` Pali Rohár

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=20220904012906.17718-3-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.