)]}'
{
  "commit": "2d211fe6f9d511cdcce344f1c9c422fe33b5a957",
  "tree": "2cfbc4ff22633ccc88fc28d0fcd5d2595bac585d",
  "parents": [
    "0cfd6c0b5ec0f7394c4537c288a948c49894dcc6"
  ],
  "author": {
    "name": "Evgeny Voevodin",
    "email": "evvoevod@tenstorrent.com",
    "time": "Thu May 07 18:08:07 2026 +0000"
  },
  "committer": {
    "name": "Anup Patel",
    "email": "anup@brainfault.org",
    "time": "Sat May 09 12:59:43 2026 +0530"
  },
  "message": "lib: sbi: hart: Detect and enable Smrnmi before trap-based feature detection\n\nThe location of the RNMI/E trap vectors in the Smrnmi extension is\nimplementation-defined, so platforms with vendor-specific NMI vector\nmechanisms must install the firmware\u0027s NMI entry points themselves.\n\nAdd an smrnmi_handlers_init() callback to sbi_platform_operations that\nreceives the firmware entry points and lets platform code install them\nat the hardware-specific vector locations. Two pointers are passed:\n\n  - _trap_rnmi_handler: the dedicated RNMI entry point that saves\n    context using the Smrnmi MN* CSRs and returns via mnret.\n  - _trap_handler: the regular M-mode trap entry since RNME is taken\n    as a regular M-mode trap with NMIE\u003d0.\n\nWhen Smrnmi is present, install the platform\u0027s NMI vectors via the new\ncallback, initialize MNSCRATCH with the per-hart scratch pointer, and\nset MNSTATUS.NMIE.\n\nSmrnmi-enabled platforms must register smrnmi_handlers_init; if the\nextension is detected but no callback is registered, sbi_panic() is\ncalled since enabling NMIs without handlers in place would route\nsubsequent traps into nowhere.\n\nSigned-off-by: Evgeny Voevodin \u003cevvoevod@tenstorrent.com\u003e\nReviewed-by: Anup Patel \u003canup@brainfault.org\u003e\nLink: https://lore.kernel.org/r/88b1470e1e3348d454b4b995a11a85c01914f7af.1778176768.git.evvoevod@tenstorrent.com\nSigned-off-by: Anup Patel \u003canup@brainfault.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "715df4992dbe5c120e0c3f923b3053435ced2016",
      "old_mode": 33188,
      "old_path": "include/sbi/sbi_platform.h",
      "new_id": "fe382b565ba365c90079527fc1c7b7e1e4054266",
      "new_mode": 33188,
      "new_path": "include/sbi/sbi_platform.h"
    },
    {
      "type": "modify",
      "old_id": "781161e58abbe532c04bb1817e4730a7bd8c0a5e",
      "old_mode": 33188,
      "old_path": "lib/sbi/sbi_hart.c",
      "new_id": "92c602aaab91579beba1f597f0c60d365862b014",
      "new_mode": 33188,
      "new_path": "lib/sbi/sbi_hart.c"
    }
  ]
}
