OSDN Git Service

target/arm: Make stage_2_format for cache attributes optional
authorTobias Röhmel <tobias.roehmel@rwth-aachen.de>
Tue, 6 Dec 2022 10:25:00 +0000 (11:25 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 Jan 2023 11:51:09 +0000 (11:51 +0000)
commitfaa1451e7b6443d0bc23099886626a4b6f91301f
tree25b9ce2d8dea155371c816587dc60e2b75fe9807
parent910e4f24975f53645d308aa6c895f4599dd47c43
target/arm: Make stage_2_format for cache attributes optional

The v8R PMSAv8 has a two-stage MPU translation process, but, unlike
VMSAv8, the stage 2 attributes are in the same format as the stage 1
attributes (8-bit MAIR format). Rather than converting the MAIR
format to the format used for VMSA stage 2 (bits [5:2] of a VMSA
stage 2 descriptor) and then converting back to do the attribute
combination, allow combined_attrs_nofwb() to accept s2 attributes
that are already in the MAIR format.

We move the assert() to combined_attrs_fwb(), because that function
really does require a VMSA stage 2 attribute format. (We will never
get there for v8R, because PMSAv8 does not implement FEAT_S2FWB.)

Signed-off-by: Tobias Röhmel <tobias.roehmel@rwth-aachen.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20221206102504.165775-4-tobias.roehmel@rwth-aachen.de
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/ptw.c