)]}'
{
  "commit": "e73b8bb8a3e9a162f70e9ffbf922d4fafc96bbfb",
  "tree": "35f371646d3c509185c8ee520a3e578f62f32b21",
  "parents": [
    "cb0929bb1344d095c9e7980e3803562b8b3cd604"
  ],
  "author": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Mon Jul 24 18:43:35 2023 +0100"
  },
  "committer": {
    "name": "Peter Maydell",
    "email": "peter.maydell@linaro.org",
    "time": "Thu Aug 31 11:07:02 2023 +0100"
  },
  "message": "hw/arm: Set number of MPU regions correctly for an505, an521, an524\n\nThe IoTKit, SSE200 and SSE300 all default to 8 MPU regions.  The\nMPS2/MPS3 FPGA images don\u0027t override these except in the case of\nAN547, which uses 16 MPU regions.\n\nDefine properties on the ARMSSE object for the MPU regions (using the\nsame names as the documented RTL configuration settings, and\nfollowing the pattern we already have for this device of using\nall-caps names as the RTL does), and set them in the board code.\n\nWe don\u0027t actually need to override the default except on AN547,\nbut it\u0027s simpler code to have the board code set them always\nrather than tracking which board subtypes want to set them to\na non-default value separately from what that value is.\n\nTho overall effect is that for mps2-an505, mps2-an521 and mps3-an524\nwe now correctly use 8 MPU regions, while mps3-an547 stays at its\ncurrent 16 regions.\n\nIt\u0027s possible some guest code wrongly depended on the previous\nincorrectly modeled number of memory regions. (Such guest code\nshould ideally check the number of regions via the MPU_TYPE\nregister.) The old behaviour can be obtained with additional\n-global arguments to QEMU:\n\nFor mps2-an521 and mps2-an524:\n -global sse-200.CPU0_MPU_NS\u003d16 -global sse-200.CPU0_MPU_S\u003d16 -global sse-200.CPU1_MPU_NS\u003d16 -global sse-200.CPU1_MPU_S\u003d16\n\nFor mps2-an505:\n -global sse-200.CPU0_MPU_NS\u003d16 -global sse-200.CPU0_MPU_S\u003d16\n\nNB that the way the implementation allows this use of -global\nis slightly fragile: if the board code explicitly sets the\nproperties on the sse-200 object, this overrides the -global\ncommand line option. So we rely on:\n - the boards that need fixing all happen to use the SSE defaults\n - we can write the board code to only set the property if it\n   is different from the default, rather than having all boards\n   explicitly set the property\n - the board that does need to use a non-default value happens\n   to need to set it to the same value (16) we previously used\nThis works, but there are some kinds of refactoring of the\nmps2-tz.c code that would break the support for -global here.\n\nResolves: https://gitlab.com/qemu-project/qemu/-/issues/1772\nSigned-off-by: Peter Maydell \u003cpeter.maydell@linaro.org\u003e\nReviewed-by: Richard Henderson \u003crichard.henderson@linaro.org\u003e\nReviewed-by: Philippe Mathieu-Daudé \u003cphilmd@linaro.org\u003e\nMessage-id: 20230724174335.2150499-4-peter.maydell@linaro.org\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0202bad787bf477baba8f40c23b8921125dffb65",
      "old_mode": 33188,
      "old_path": "hw/arm/armsse.c",
      "new_id": "11cd08b6c1e68707a47067720dcdc88f0df1adde",
      "new_mode": 33188,
      "new_path": "hw/arm/armsse.c"
    },
    {
      "type": "modify",
      "old_id": "587310730208e2b604100a21a353b66aaa6b3dab",
      "old_mode": 33188,
      "old_path": "hw/arm/mps2-tz.c",
      "new_id": "eae3639da23c6fd78674c763d77063767a1a08ea",
      "new_mode": 33188,
      "new_path": "hw/arm/mps2-tz.c"
    },
    {
      "type": "modify",
      "old_id": "cd0931d0a0bc088224408121dfc1c87fb8ada76b",
      "old_mode": 33188,
      "old_path": "include/hw/arm/armsse.h",
      "new_id": "88b3b759c5a8d68a653cfda46684b383aebba09e",
      "new_mode": 33188,
      "new_path": "include/hw/arm/armsse.h"
    }
  ]
}
