Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15ea6a8a authored by Prasad Sodagudi's avatar Prasad Sodagudi Committed by Matt Wagantall
Browse files

ARM: decompressor: avoid speculative prefetch from protected regions



Currently first 1GB memory mapped with read, write and execute
permissions and unfortunately speculative prefetch causing
undesirable sideffects if those regions are protected.

Hence the flag CONFIG_ARM_DECOMPRESSOR_LIMIT limit the size
of the memory to be mapped by decompressor with read, write
and execute permissions to avoid speculative prefetch.

Change-Id: I3f2495649153ae16040579b71dff5b78315b29a8
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent a546ed61
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -2078,6 +2078,17 @@ config AUTO_ZRELADDR
	  0xf8000000. This assumes the zImage being placed in the first 128MB
	  from start of memory.

config ARM_DECOMPRESSOR_LIMIT
	hex "Limit the decompressor memory area"
	default 0x10000000
	help
	  Allows overriding of the memory size that decompressor maps with
	  read, write and execute permissions to avoid speculative prefetch.

	  By default ARM_DECOMPRESSOR_LIMIT maps first 1GB of memory
	  with read, write and execute permissions and reset of the memory
	  as strongly ordered.

endmenu

menu "CPU Power Management"
+1 −1
Original line number Diff line number Diff line
@@ -639,7 +639,7 @@ __setup_mmu: sub r3, r4, #16384 @ Page directory size
		mov	r0, r3
		mov	r9, r0, lsr #18
		mov	r9, r9, lsl #18		@ start of RAM
		add	r10, r9, #0x10000000	@ a reasonable RAM size
		add	r10, r9, #CONFIG_ARM_DECOMPRESSOR_LIMIT
		mov	r1, #0x12		@ XN|U + section mapping
		orr	r1, r1, #3 << 10	@ AP=11
		add	r2, r3, #16384