From: Felix Fu fuzhen5@huawei.com
hulk inclusion category: feature bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAI881 CVE: NA
-----------------------------------------
This reverts commit f9a36bdaecec968caa1afbc7385fb6a079f338ee.
Signed-off-by: Felix Fu fuzhen5@huawei.com --- arch/arm/boot/compressed/head.S | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 2021baee35ad..9f406e9c0ea6 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -814,24 +814,20 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size teq r0, r2 bne 1b /* - * Make sure our entire executable image (including payload) is mapped - * cacheable, in case it is located outside the region we covered above. - * (This may be the case if running from flash or with randomization enabled) - * If the regions happen to overlap, we just duplicate some of the above. + * If ever we are running from Flash, then we surely want the cache + * to be enabled also for our execution instance... We map 2MB of it + * so there is no map overlap problem for up to 1 MB compressed kernel. + * If the execution is in RAM then we would only be duplicating the above. */ orr r1, r6, #0x04 @ ensure B is set for this orr r1, r1, #3 << 10 mov r2, pc - adr_l r9, _end mov r2, r2, lsr #20 - mov r9, r9, lsr #20 orr r1, r1, r2, lsl #20 add r0, r3, r2, lsl #2 - add r9, r3, r9, lsl #2 -0: str r1, [r0], #4 + str r1, [r0], #4 add r1, r1, #1048576 - cmp r0, r9 - bls 0b + str r1, [r0] mov pc, lr ENDPROC(__setup_mmu)