diff options
author | Pali Rohár | 2022-09-04 03:28:59 +0200 |
---|---|---|
committer | Tom Rini | 2022-09-15 16:11:01 -0400 |
commit | 5c9bf1d65530d85dcdcca329bee7ce93818a6e3e (patch) | |
tree | 311af33ebd366205a406e0bcdfb8978dddab9407 /board/nokia | |
parent | 0b6924cc0f192deffe546135224d3b3c4ecadbb8 (diff) |
Nokia RX-51: Do not clear unknown memory in lowlevel_init.S
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>
Diffstat (limited to 'board/nokia')
-rw-r--r-- | board/nokia/rx51/lowlevel_init.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/nokia/rx51/lowlevel_init.S b/board/nokia/rx51/lowlevel_init.S index 53697fd4e12..1cf8f8d8b2f 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 |