coreboot-kgpe-d16/payloads/libpayload/arch/arm64
Julius Werner 41ddd4fcc1 libpayload: arm64: Fix MMU range overlap check
The ARM64 MMU code maintains a list of used ranges, to avoid mapping the
DMA buffer over the coreboot tables and things like that. Unfortunately,
the overlap with ranges in that list is checked with

 (start1 >= start2 && start1 <= end2) || (end1 >= start2 && end1 <= end2)

which is not a full overlap check and misses the case where the second
region is completely contained within the first. This patch replaces
that code with a properly vetted primitive from Stack Overflow.

BRANCH=none
BUG=chrome-os-partner:54416
TEST=Observe how Kevin recovery screen now gets drawn at 10x the speed.

Change-Id: I7e2706426762794e160d743bbfc40da1e26eee12
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/16075
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-08-08 17:35:31 +02:00
..
lib Add newlines at the end of all coreboot files 2016-08-01 21:43:56 +02:00
Kconfig arm64: xcompile: Add support for A53 erratum 843419 2015-08-28 06:46:09 +00:00
Makefile.inc libpayload arm64: Add support for mmu 2015-03-21 13:38:41 +01:00
cache.c arm64: Add arch_program_segment_loaded call to arm64 2015-04-22 08:56:36 +02:00
coreboot.c libpayload arm64: Remove dependency on coreboot tables for dma areas 2015-03-21 13:38:29 +01:00
cpu.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
dummy_media.c cbfs: define libpayload_init_default_cbfs_media weakly 2015-07-06 09:42:12 +02:00
exception.c arm64: Add stack dump to exception handler 2016-05-24 20:51:28 +02:00
exception_asm.S libpayload arm64: Remove tight-coupling with any particular EL 2015-03-21 13:35:47 +01:00
gdb.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
head.S libpayload arm64: Initialize exception stack 2015-03-21 13:35:33 +01:00
libpayload.ldscript libpayload: Move base address, stack and heap size to Kconfig 2016-03-15 20:53:38 +01:00
main.c libpayload: Make Kconfig bools use IS_ENABLED() 2015-06-30 18:55:15 +02:00
memcpy.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
memmove.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
memset.S libpayload arm64: Remove the DONT_USE_DC macro 2015-03-21 13:35:58 +01:00
mmu.c libpayload: arm64: Fix MMU range overlap check 2016-08-08 17:35:31 +02:00
selfboot.c libpayload arm64: Add selfboot.c required by depthcharge 2015-01-09 07:07:53 +01:00
sysinfo.c libpayload arm64: Add functions for reading memranges 2015-03-21 13:36:04 +01:00
timer.c libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
util.S libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00
virtual.c libpayload: Add support for arm64 in libpayload 2015-01-09 07:04:28 +01:00