{
  "id": "embedded/arm-mpu-fault-unprivileged-access",
  "signature": "MPU fault: unprivileged access to privileged region at address 0x20001000",
  "signature_zh": "MPU故障：在地址0x20001000处非特权访问特权区域",
  "regex": "MPU fault: unprivileged access to privileged region at address 0x[0-9A-Fa-f]+",
  "domain": "embedded",
  "category": "system_error",
  "subcategory": null,
  "root_cause": "MPU region configuration mismatch: code running in unprivileged mode attempted to read or write a memory region marked as privileged-only.",
  "root_cause_type": "generic",
  "root_cause_zh": "MPU区域配置不匹配：在非特权模式下运行的代码尝试读取或写入标记为仅特权访问的内存区域。",
  "versions": [
    {
      "version": "ARM Cortex-M7 r1p0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "FreeRTOS 10.4.6 with MPU support",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Disabling MPU entirely removes protection but does not fix root cause; security or safety requirements may be violated.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Increasing stack size does not resolve MPU access violations; fault is due to privilege level, not stack depth.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set MPU region attribute to 'privileged read-write, unprivileged execute never' for sensitive areas. Example: MPU->RBAR = (0x20001000 & MPU_RBAR_ADDR_Msk) | MPU_RBAR_VALID_Msk | (0 << MPU_RBAR_REGION_Pos); MPU->RASR = (0x3 << MPU_RASR_AP_Pos) | MPU_RASR_XN_Msk;",
      "success_rate": 0.9,
      "how": "Set MPU region attribute to 'privileged read-write, unprivileged execute never' for sensitive areas. Example: MPU->RBAR = (0x20001000 & MPU_RBAR_ADDR_Msk) | MPU_RBAR_VALID_Msk | (0 << MPU_RBAR_REGION_Pos); MPU->RASR = (0x3 << MPU_RASR_AP_Pos) | MPU_RASR_XN_Msk;",
      "condition": "",
      "sources": []
    },
    {
      "action": "Switch offending task to privileged mode by setting configUSE_TASK_FPU_SUPPORT to 1 and using vTaskPrioritySet to adjust.",
      "success_rate": 0.82,
      "how": "Switch offending task to privileged mode by setting configUSE_TASK_FPU_SUPPORT to 1 and using vTaskPrioritySet to adjust.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Set MPU region attribute to 'privileged read-write, unprivileged execute never' for sensitive areas. Example: MPU->RBAR = (0x20001000 & MPU_RBAR_ADDR_Msk) | MPU_RBAR_VALID_Msk | (0 << MPU_RBAR_REGION_Pos); MPU->RASR = (0x3 << MPU_RASR_AP_Pos) | MPU_RASR_XN_Msk;",
    "Switch offending task to privileged mode by setting configUSE_TASK_FPU_SUPPORT to 1 and using vTaskPrioritySet to adjust."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.arm.com/documentation/den0013/latest/ARM-MPU",
  "official_doc_section": null,
  "error_code": "0x00000020",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}