IID
只读/写入声明读取时给出当前最高优先级 pending-and-enabled 外部中断 identity;写 stopei 会按当前可读值清除对应 pending 位。
这个字段控制什么
- - 读取时给出当前最高优先级 pending-and-enabled 外部中断 identity;写 stopei 会按当前可读值清除对应 pending 位。
stopei(0x15C)是 AIA/IMSIC 的 Supervisor top external interrupt CSR,报告并可声明 supervisor interrupt file 中最高优先级的 pending-and-enabled 外部中断。
读取时给出当前最高优先级 pending-and-enabled 外部中断 identity;写 stopei 会按当前可读值清除对应 pending 位。
读取值中的 interrupt priority,AIA/IMSIC 中与 identity 相同。
其他位读为 0。
stopei 是 IMSIC supervisor interrupt file 的 top-external-interrupt 视图。它的读值由 pending、enable 和 eithreshold 决定;写入声明当前读值对应的中断。
在 supervisor external interrupt handler 中读取 stopei 得到 top interrupt identity。
用同一 CSR read/write 操作声明该中断;返回值右移 16 得到 minor identity。
调用对应外部中断服务例程;若需要分步声明,应通过 siselect/sireg 清除 eip pending 位。
stopei 的可读 top 值不受 sie/hie/vsie 等 enable CSR 影响;这些寄存器影响中断投递,而 stopei 反映 interrupt file 内部 pending-and-enabled 状态。
写入值被忽略;清除哪个 pending 位由写入时 stopei 当前可读值决定。