| 244 | } |
| 245 | |
| 246 | static void |
| 247 | dmar_clear_faults(struct dmar_unit *unit) |
| 248 | { |
| 249 | uint32_t frec, frir, fsts; |
| 250 | int i; |
| 251 | |
| 252 | for (i = 0; i < DMAR_CAP_NFR(unit->hw_cap); i++) { |
| 253 | frir = (DMAR_CAP_FRO(unit->hw_cap) + i) * 16; |
| 254 | frec = dmar_read4(unit, frir + 12); |
| 255 | if ((frec & DMAR_FRCD2_F32) == 0) |
| 256 | continue; |
| 257 | dmar_write4(unit, frir + 12, DMAR_FRCD2_F32); |
| 258 | } |
| 259 | fsts = dmar_read4(unit, DMAR_FSTS_REG); |
| 260 | dmar_write4(unit, DMAR_FSTS_REG, fsts); |
| 261 | } |
| 262 | |
| 263 | int |
| 264 | dmar_init_fault_log(struct dmar_unit *unit) |
no test coverage detected