target/arm: Factor MPU lookup code out of get_phys_addr_pmsav8()
commit54317c0ff3a3c0f6b2c3a1d3c8b5d93686a86d24
authorPeter Maydell <peter.maydell@linaro.org>
Wed, 13 Dec 2017 17:59:24 +0000 (13 17:59 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Wed, 13 Dec 2017 17:59:24 +0000 (13 17:59 +0000)
tree2fc325cfe26dab1e1d6f38d07d586518ed6034e9
parentec8e3340286a87d3924c223d60ba5c994549f796
target/arm: Factor MPU lookup code out of get_phys_addr_pmsav8()

For the TT instruction we're going to need to do an MPU lookup that
also tells us which MPU region the access hit. This requires us
to do the MPU lookup without first doing the SAU security access
check, so pull the MPU lookup parts of get_phys_addr_pmsav8()
out into their own function.

The TT instruction also needs to know the MPU region number which
the lookup hit, so provide this information to the caller of the
MPU lookup code, even though get_phys_addr_pmsav8() doesn't
need to know it.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 1512153879-5291-7-git-send-email-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
target/arm/helper.c