• P
    hw/arm/armv7m: Add mpu-ns-regions and mpu-s-regions properties · cb0929bb
    Peter Maydell 提交于
    M-profile CPUs generally allow configuration of the number of MPU
    regions that they have.  We don't currently model this, so our
    implementations of some of the board models provide CPUs with the
    wrong number of regions.  RTOSes like Zephyr that hardcode the
    expected number of regions may therefore not run on the model if they
    are set up to run on real hardware.
    
    Add properties mpu-ns-regions and mpu-s-regions to the ARMV7M object,
    matching the ability of hardware to configure the number of Secure
    and NonSecure regions separately.  Our actual CPU implementation
    doesn't currently support that, and it happens that none of the MPS
    boards we model set the number of regions differently for Secure vs
    NonSecure, so we provide an interface to the boards and SoCs that
    won't need to change if we ever do add that functionality in future,
    but make it an error to configure the two properties to different
    values.
    
    (The property name on the CPU is the somewhat misnamed-for-M-profile
    "pmsav7-dregion", so we don't follow that naming convention for
    the properties here. The TRM doesn't say what the CPU configuration
    variable names are, so we pick something, and follow the lowercase
    convention we already have for properties here.)
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: NPhilippe Mathieu-Daudé <philmd@linaro.org>
    Message-id: 20230724174335.2150499-3-peter.maydell@linaro.org
    cb0929bb
armv7m.h 3.6 KB