target-arm: fix get_phys_addr_v6/SCTLR_AFE access check
authorAndrew Jones <drjones@redhat.com>
Mon, 16 Mar 2015 12:30:46 +0000 (12:30 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 16 Mar 2015 12:30:46 +0000 (12:30 +0000)
commitd76951b65dfb1be4e41cfae6abebf8db7a1243a3
tree009e131341d239ccf3079161871b40f9b9bf9e71
parent0fbf5238203041f734c51b49778223686f14366b
target-arm: fix get_phys_addr_v6/SCTLR_AFE access check

Introduce simple_ap_to_rw_prot(), which has the same behavior as
ap_to_rw_prot(), but takes the 2-bit simple AP[2:1] instead of
the 3-bit AP[2:0]. Use this in get_phys_addr_v6 when SCTLR_AFE
is set, as that bit indicates we should be using the simple AP
format.

It's unlikely this path is getting used. I don't see CR_AFE
getting used by Linux, so possibly not. If it had been, then
the check would have been wrong for all but AP[2:1] = 0b11.
Anyway, this should fix it up, in case it ever does get used.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1426099139-14463-3-git-send-email-drjones@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/helper.c